Skip to content

Commit

Permalink
Burner Generator visuals
Browse files Browse the repository at this point in the history
  • Loading branch information
Slotterleet committed May 3, 2024
1 parent 3dd3361 commit 1f8d935
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 13 deletions.
19 changes: 13 additions & 6 deletions src/fos/content/FOSBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ vanadium, new BasicBulletType(2f, 60){{
shootSound = Sounds.flame2;

var fire = new MultiEffect(Fx.fire, Fx.fireSmoke);
var fireLong = new MultiEffect(FOSFx.fireLong, FOSFx.fireSmokeLong);

ammo(
arkycite, new LiquidBulletType(arkycite){{
Expand All @@ -758,11 +759,10 @@ arkycite, new LiquidBulletType(arkycite){{
pierce = true;
pierceCap = 2;
despawnHit = true;
fragOnHit = true;
hitEffect = fire;
hitEffect = fireLong;
//scaleLife = true;

puddleSize = 10f;
puddleSize = 5f;
puddleAmount = 10f;
puddles = 3;
orbSize = 4f;
Expand All @@ -784,11 +784,10 @@ oil, new LiquidBulletType(oil){{
pierce = true;
pierceCap = 2;
despawnHit = true;
fragOnHit = true;
hitEffect = fire;
hitEffect = fireLong;
//scaleLife = true;

puddleSize = 10f;
puddleSize = 5f;
puddleAmount = 10f;
puddles = 3;
orbSize = 4f;
Expand Down Expand Up @@ -1395,9 +1394,17 @@ diamond, new MissileBulletType(5f, 5){{
size = 3;
liquidCapacity = 60f;
powerProduction = 15f;
generateEffect = FOSFx.generatorSmoke;
effectChance = 0.05f;
consume(new ConsumeLiquidFlammable(0.4f, 0.5f){{
filter = l -> l.flammability >= minFlammability && !l.gas;
}});
drawer = new DrawMulti(
new DrawRegion("-bottom"),
new DrawLiquidTile(arkycite, 8f),
new DrawLiquidTile(oil, 8f),
new DrawDefault()
);
requirements(Category.power, with(tin, 75, brass, 150, vanadium, 100));
}};
heatGenerator = new HeatGenerator("heat-generator"){{
Expand Down
42 changes: 35 additions & 7 deletions src/fos/content/FOSFx.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class FOSFx {
Lines.poly(polyLines, e.x, e.y, 1f);
}).followParent(true).layer(Layer.shields),

tokiciteBoil = new Effect(240f, e -> {
windSmoke = new Effect(240f, e -> {
if (Groups.weather.contains(we -> we.weather instanceof ParticleWeather p && p.useWindVector)) {
WeatherState w = Groups.weather.find(ws -> ws.weather instanceof ParticleWeather p && p.useWindVector);
e.x += w.windVector.x * 24f * w.intensity * e.fin();
Expand All @@ -99,17 +99,26 @@ public class FOSFx {
e.y += v.y * 12f * e.fin();
}

Draw.color(e.color, 0.4f * e.fout());
Draw.color(e.color, 0.6f * e.fout());
Fill.circle(e.x, e.y, 4f * (1 + e.fin()));
}),

brassSmelterCraft = new Effect(1f, e -> {
var c = FOSFluids.tokicite.color;
//copypasta time
tokiciteBoil.at(e.x - 8f, e.y - 8f, c);
tokiciteBoil.at(e.x + 8f, e.y - 8f, c);
tokiciteBoil.at(e.x - 8f, e.y + 8f, c);
tokiciteBoil.at(e.x + 8f, e.y + 8f, c);
windSmoke.at(e.x - 8f, e.y - 8f, c);
windSmoke.at(e.x + 8f, e.y - 8f, c);
windSmoke.at(e.x - 8f, e.y + 8f, c);
windSmoke.at(e.x + 8f, e.y + 8f, c);
}),

generatorSmoke = new Effect(1f, e -> {
var c = Pal.gray;
//copypasta time
windSmoke.at(e.x - 8f, e.y - 8f, c);
windSmoke.at(e.x + 8f, e.y - 8f, c);
windSmoke.at(e.x - 8f, e.y + 8f, c);
windSmoke.at(e.x + 8f, e.y + 8f, c);
}),

deathrayDespawn = new Effect(60f, 720f, e -> {
Expand All @@ -121,7 +130,7 @@ public class FOSFx {

refinerySmoke = new Effect(1f, e -> {
//RECYCLED ASSET TIME
tokiciteBoil.at(e.x, e.y, Pal.gray);
windSmoke.at(e.x, e.y, Pal.gray);
}),

dotLaserLine = new Effect(10f, e -> {
Expand All @@ -148,5 +157,24 @@ public class FOSFx {
alpha((0.5f - Math.abs(e.fin() - 0.5f)) * 2f);
Fill.circle(e.x + (x * e.finpow()), e.y + (y * e.finpow()), 0.5f + e.fout() * 4f);
}));
}),

fireLong = new Effect(300f, e -> {
color(Pal.lightFlame, Pal.darkFlame, e.fin());

randLenVectors(e.id, 2, 2f + e.fin() * 9f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f);
});

color();

Drawf.light(e.x, e.y, 20f * e.fslope(), Pal.lightFlame, 0.5f);
}),
fireSmokeLong = new Effect(300f, e -> {
color(Color.gray);

randLenVectors(e.id, 1, 2f + e.fin() * 7f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f);
});
});
}

0 comments on commit 1f8d935

Please sign in to comment.