diff --git a/core/assets-raw/sprites/blocks/defense/build-tower.png b/core/assets-raw/sprites/blocks/defense/build-tower.png index e0c015d92e..867a67b561 100644 Binary files a/core/assets-raw/sprites/blocks/defense/build-tower.png and b/core/assets-raw/sprites/blocks/defense/build-tower.png differ diff --git a/core/assets-raw/sprites/blocks/production/melter.png b/core/assets-raw/sprites/blocks/production/melter.png index f499dd9893..304f7119a5 100644 Binary files a/core/assets-raw/sprites/blocks/production/melter.png and b/core/assets-raw/sprites/blocks/production/melter.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-centrifuge-bottom.png b/core/assets-raw/sprites/blocks/production/slag-centrifuge-bottom.png new file mode 100644 index 0000000000..4f4b6a2b8f Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-centrifuge-bottom.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-centrifuge-glow.png b/core/assets-raw/sprites/blocks/production/slag-centrifuge-glow.png new file mode 100644 index 0000000000..f85f42d1a7 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-centrifuge-glow.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-centrifuge-liquid.png b/core/assets-raw/sprites/blocks/production/slag-centrifuge-liquid.png new file mode 100644 index 0000000000..a8fb90921f Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-centrifuge-liquid.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-centrifuge.png b/core/assets-raw/sprites/blocks/production/slag-centrifuge.png new file mode 100644 index 0000000000..087cb47e60 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-centrifuge.png differ diff --git a/core/assets-raw/sprites/items/liquid-cryofluid.png b/core/assets-raw/sprites/items/liquid-cryofluid.png index dca841ea69..a72f3b4d62 100644 Binary files a/core/assets-raw/sprites/items/liquid-cryofluid.png and b/core/assets-raw/sprites/items/liquid-cryofluid.png differ diff --git a/core/assets-raw/sprites/items/liquid-gallium.png b/core/assets-raw/sprites/items/liquid-gallium.png index ad5cf133fd..7f1d7f8a24 100644 Binary files a/core/assets-raw/sprites/items/liquid-gallium.png and b/core/assets-raw/sprites/items/liquid-gallium.png differ diff --git a/core/assets-raw/sprites/items/liquid-oil.png b/core/assets-raw/sprites/items/liquid-oil.png index 402be18572..5af0c2531a 100644 Binary files a/core/assets-raw/sprites/items/liquid-oil.png and b/core/assets-raw/sprites/items/liquid-oil.png differ diff --git a/core/assets-raw/sprites/items/liquid-slag.png b/core/assets-raw/sprites/items/liquid-slag.png index 21b9d3ea7e..1b17f29e50 100644 Binary files a/core/assets-raw/sprites/items/liquid-slag.png and b/core/assets-raw/sprites/items/liquid-slag.png differ diff --git a/core/assets-raw/sprites/items/liquid-water.png b/core/assets-raw/sprites/items/liquid-water.png index b675b3cfb8..4fd8b92f74 100644 Binary files a/core/assets-raw/sprites/items/liquid-water.png and b/core/assets-raw/sprites/items/liquid-water.png differ diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index f61cb723ac..076df440ae 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -453,3 +453,4 @@ 63253=cyanogen-synthesizer|block-cyanogen-synthesizer-ui 63252=cyanogen|liquid-cyanogen-ui 63251=gallium|liquid-gallium-ui +63250=slag-centrifuge|block-slag-centrifuge-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 4c325f53df..070602aef6 100644 Binary files a/core/assets/logicids.dat and b/core/assets/logicids.dat differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 0433c675b6..4ff7944899 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1039,20 +1039,37 @@ public class Blocks implements ContentList{ }}; //TODO implement - is this even necessary? - if(false) slagCentrifuge = new GenericCrafter("slag-centrifuge"){{ requirements(Category.crafting, with(Items.tungsten, 60, Items.graphite, 60, Items.oxide, 40)); + consumes.power(2f / 60f); + size = 3; consumes.item(Items.sand, 1); + consumes.liquid(Liquids.slag, 40f / 60f); liquidCapacity = 80f; - consumes.liquid(Liquids.slag, 40f / 60f); - outputLiquid = new LiquidStack(Liquids.gallium, 1f); + var drawers = Seq.with(new DrawRegion("-bottom"), new DrawLiquidRegion(Liquids.slag){{ alpha = 0.7f; }}); + + for(int i = 0; i < 5; i++){ + int fi = i; + drawers.add(new DrawGlowRegion(-1f){{ + glowIntensity = 0.3f; + rotateSpeed = 3f / (1f + fi/1.4f); + alpha = 0.4f; + color = new Color(1f, 0.5f, 0.5f, 1f); + }}); + } + + drawer = new DrawMulti(drawers.and(new DrawBlock())); + iconOverride = new String[]{"-bottom", ""}; + + craftTime = 60f * 2f; + + outputLiquid = new LiquidStack(Liquids.gallium, 2f); outputItem = new ItemStack(Items.scrap, 1); }}; - //TODO "crucible" is getting old //TODO should have a useful turret ammo byproduct? //original: consumes.items(with(Items.copper, 3, Items.lead, 4, Items.titanium, 2, Items.silicon, 3)); surgeCrucible = new HeatCrafter("surge-crucible"){{ @@ -1107,6 +1124,8 @@ public class Blocks implements ContentList{ particleLife = 140f; }}); + iconOverride = new String[]{"-bottom", "", "-top"}; + size = 3; outputLiquid = new LiquidStack(Liquids.cyanogen, 3f); diff --git a/core/src/mindustry/world/blocks/production/BeamDrill.java b/core/src/mindustry/world/blocks/production/BeamDrill.java index 1c401454fe..039f1e1580 100644 --- a/core/src/mindustry/world/blocks/production/BeamDrill.java +++ b/core/src/mindustry/world/blocks/production/BeamDrill.java @@ -38,7 +38,7 @@ public class BeamDrill extends Block{ public Color sparkColor = Color.valueOf("fd9e81"), glowColor = Color.white; public float glowIntensity = 0.2f, pulseIntensity = 0.07f; public float glowScl = 3f; - public int sparks = 8; + public int sparks = 7; public float sparkRange = 10f, sparkLife = 27f, sparkRecurrence = 4f, sparkSpread = 45f, sparkSize = 3.5f; public Color heatColor = new Color(1f, 0.35f, 0.35f, 0.9f); diff --git a/core/src/mindustry/world/draw/DrawGlowRegion.java b/core/src/mindustry/world/draw/DrawGlowRegion.java index ee3272ae06..dd60d48cab 100644 --- a/core/src/mindustry/world/draw/DrawGlowRegion.java +++ b/core/src/mindustry/world/draw/DrawGlowRegion.java @@ -15,20 +15,28 @@ public class DrawGlowRegion extends DrawBlock{ public Blending blending = Blending.additive; public String suffix = "-glow"; public float alpha = 0.9f, glowScale = 10f, glowIntensity = 0.5f; + public float rotateSpeed = 0f; public float layer = Layer.blockAdditive; public Color color = Color.red.cpy(); - public TextureRegion top; + public TextureRegion region; + + public DrawGlowRegion(){ + } + + public DrawGlowRegion(float layer){ + this.layer = layer; + } @Override public void drawBase(Building build){ if(build.warmup() <= 0.001f) return; float z = Draw.z(); - Draw.z(layer); + if(layer > 0) Draw.z(layer); Draw.blend(blending); Draw.color(color); Draw.alpha((Mathf.absin(build.totalProgress(), glowScale, alpha) * glowIntensity + 1f - glowIntensity) * build.warmup() * alpha); - Draw.rect(top, build.x, build.y); + Draw.rect(region, build.x, build.y, build.totalProgress() * rotateSpeed); Draw.reset(); Draw.blend(); Draw.z(z); @@ -36,7 +44,7 @@ public class DrawGlowRegion extends DrawBlock{ @Override public void load(Block block){ - top = Core.atlas.find(block.name + suffix); + region = Core.atlas.find(block.name + suffix); } @Override diff --git a/core/src/mindustry/world/draw/DrawLiquidRegion.java b/core/src/mindustry/world/draw/DrawLiquidRegion.java index 11cb308cf2..c1c27fb02f 100644 --- a/core/src/mindustry/world/draw/DrawLiquidRegion.java +++ b/core/src/mindustry/world/draw/DrawLiquidRegion.java @@ -14,6 +14,7 @@ public class DrawLiquidRegion extends DrawBlock{ public Liquid drawLiquid; public TextureRegion liquid; public String suffix = "-liquid"; + public float alpha = 1f; public DrawLiquidRegion(Liquid drawLiquid){ this.drawLiquid = drawLiquid; @@ -31,7 +32,7 @@ public class DrawLiquidRegion extends DrawBlock{ Liquid drawn = drawLiquid != null ? drawLiquid : build.liquids.current(); Drawf.liquid(liquid, build.x, build.y, build.liquids.get(drawn) / build.block.liquidCapacity, - drawn.color + Tmp.c1.set(drawn.color).a(drawn.color.a * alpha) ); } diff --git a/core/src/mindustry/world/draw/DrawMulti.java b/core/src/mindustry/world/draw/DrawMulti.java index 580184e606..2aa69d1eb3 100644 --- a/core/src/mindustry/world/draw/DrawMulti.java +++ b/core/src/mindustry/world/draw/DrawMulti.java @@ -1,6 +1,7 @@ package mindustry.world.draw; import arc.graphics.g2d.*; +import arc.struct.*; import arc.util.*; import mindustry.entities.units.*; import mindustry.gen.*; @@ -19,6 +20,10 @@ public class DrawMulti extends DrawBlock{ this.drawers = drawers; } + public DrawMulti(Seq drawers){ + this.drawers = drawers.toArray(DrawBlock.class); + } + @Override public void drawBase(Building build){ for(var draw : drawers){