diff --git a/core/assets-raw/sprites/blocks/production/slag-heater-bottom.png b/core/assets-raw/sprites/blocks/production/slag-heater-bottom.png new file mode 100644 index 0000000000..16e718a939 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-heater-bottom.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-heater-heat.png b/core/assets-raw/sprites/blocks/production/slag-heater-heat.png new file mode 100644 index 0000000000..1b293c32c8 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-heater-heat.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-heater-liquid.png b/core/assets-raw/sprites/blocks/production/slag-heater-liquid.png new file mode 100644 index 0000000000..1c8f9ac253 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-heater-liquid.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-heater-top.png b/core/assets-raw/sprites/blocks/production/slag-heater-top.png new file mode 100644 index 0000000000..cadd63b0c6 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-heater-top.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-heater-top1.png b/core/assets-raw/sprites/blocks/production/slag-heater-top1.png new file mode 100644 index 0000000000..7a563faa78 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-heater-top1.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-heater-top2.png b/core/assets-raw/sprites/blocks/production/slag-heater-top2.png new file mode 100644 index 0000000000..6e8ffe98cd Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-heater-top2.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-heater.png b/core/assets-raw/sprites/blocks/production/slag-heater.png new file mode 100644 index 0000000000..2ab51c583f Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-heater.png differ diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 076df440ae..70b201e130 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -454,3 +454,4 @@ 63252=cyanogen|liquid-cyanogen-ui 63251=gallium|liquid-gallium-ui 63250=slag-centrifuge|block-slag-centrifuge-ui +63249=slag-heater|block-slag-heater-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 070602aef6..4116860eb8 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 4ff7944899..f3ccaff9c2 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -60,7 +60,7 @@ public class Blocks implements ContentList{ //crafting siliconSmelter, siliconCrucible, siliconArcFurnace, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer, melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge, - electrolyzer, oxidationChamber, heatReactor, carbideCrucible, slagCentrifuge, surgeCrucible, cyanogenSynthesizer, + electrolyzer, oxidationChamber, slagHeater, heatReactor, carbideCrucible, slagCentrifuge, surgeCrucible, cyanogenSynthesizer, cellSynthesisChamber, //sandbox @@ -1010,6 +1010,17 @@ public class Blocks implements ContentList{ heatOutput = 5f; }}; + slagHeater = new HeatProducer("slag-heater"){{ + requirements(Category.crafting, with(Items.tungsten, 30, Items.graphite, 30)); + + drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidRegion(Liquids.slag), new DrawRegion("-top"), new DrawHeatOutput(true)); + iconOverride = new String[]{"-bottom", "", "-top"}; + size = 2; + craftTime = 60f * 1f; + heatOutput = 2f; + consumes.liquid(Liquids.slag, 20f / 60f); + }}; + heatReactor = new HeatProducer("heat-reactor"){{ //TODO quadvent? //TODO coolant? @@ -1038,7 +1049,6 @@ public class Blocks implements ContentList{ consumes.power(2f); }}; - //TODO implement - is this even necessary? slagCentrifuge = new GenericCrafter("slag-centrifuge"){{ requirements(Category.crafting, with(Items.tungsten, 60, Items.graphite, 60, Items.oxide, 40)); @@ -1070,7 +1080,7 @@ public class Blocks implements ContentList{ outputItem = new ItemStack(Items.scrap, 1); }}; - //TODO should have a useful turret ammo byproduct? + //TODO should have a useful turret ammo byproduct? scrap? //original: consumes.items(with(Items.copper, 3, Items.lead, 4, Items.titanium, 2, Items.silicon, 3)); surgeCrucible = new HeatCrafter("surge-crucible"){{ requirements(Category.crafting, with(Items.tungsten, 60, Items.graphite, 60, Items.carbide, 30)); diff --git a/core/src/mindustry/world/blocks/heat/HeatProducer.java b/core/src/mindustry/world/blocks/heat/HeatProducer.java index f4736addf9..b54f4cd5eb 100644 --- a/core/src/mindustry/world/blocks/heat/HeatProducer.java +++ b/core/src/mindustry/world/blocks/heat/HeatProducer.java @@ -15,9 +15,7 @@ public class HeatProducer extends GenericCrafter{ public HeatProducer(String name){ super(name); - drawer = new DrawMulti(new DrawHeatOutput(){{ - drawRegion = true; - }}); + drawer = new DrawHeatOutput(true); rotateDraw = false; rotate = true; canOverdrive = false; @@ -35,7 +33,7 @@ public class HeatProducer extends GenericCrafter{ public void setBars(){ super.setBars(); - bars.add("heat", (HeatProducerBuild entity) -> new Bar("bar.heat", Pal.lightOrange, () -> entity.heat)); + bars.add("heat", (HeatProducerBuild entity) -> new Bar("bar.heat", Pal.lightOrange, () -> entity.heat / heatOutput)); } public class HeatProducerBuild extends GenericCrafterBuild implements HeatBlock{ diff --git a/core/src/mindustry/world/draw/DrawHeatOutput.java b/core/src/mindustry/world/draw/DrawHeatOutput.java index a8591f414e..e88459b417 100644 --- a/core/src/mindustry/world/draw/DrawHeatOutput.java +++ b/core/src/mindustry/world/draw/DrawHeatOutput.java @@ -18,6 +18,13 @@ public class DrawHeatOutput extends DrawBlock{ public float heatPulse = 0.3f, heatPulseScl = 10f, glowMult = 1.2f; public boolean drawRegion = false; + public DrawHeatOutput(){ + } + + public DrawHeatOutput(boolean drawRegion){ + this.drawRegion = drawRegion; + } + @Override public void drawBase(Building build){ if(drawRegion) Draw.rect(build.block.region, build.x, build.y);