diff --git a/core/assets-raw/sprites/blocks/production/slag-incinerator-liquid.png b/core/assets-raw/sprites/blocks/production/slag-incinerator-liquid.png new file mode 100644 index 0000000000..4759ece2ce Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-incinerator-liquid.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-incinerator-top.png b/core/assets-raw/sprites/blocks/production/slag-incinerator-top.png new file mode 100644 index 0000000000..5fd4aef511 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-incinerator-top.png differ diff --git a/core/assets-raw/sprites/blocks/production/slag-incinerator.png b/core/assets-raw/sprites/blocks/production/slag-incinerator.png new file mode 100644 index 0000000000..2ad32b475b Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/slag-incinerator.png differ diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 70b201e130..b69beefcda 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -455,3 +455,5 @@ 63251=gallium|liquid-gallium-ui 63250=slag-centrifuge|block-slag-centrifuge-ui 63249=slag-heater|block-slag-heater-ui +63248=slag-incinerator|block-slag-incinerator-ui +63247=phase-synthesizer|block-phase-synthesizer-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 4116860eb8..d218107478 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 780f81c5c4..2d41190ded 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, slagHeater, heatReactor, carbideCrucible, slagCentrifuge, surgeCrucible, cyanogenSynthesizer, + electrolyzer, oxidationChamber, slagHeater, slagIncinerator, heatReactor, carbideCrucible, slagCentrifuge, surgeCrucible, cyanogenSynthesizer, phaseSynthesizer, cellSynthesisChamber, //sandbox @@ -105,7 +105,7 @@ public class Blocks implements ContentList{ duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, foreshadow, spectre, meltdown, segment, parallax, tsunami, //turrets - erekir - breach, fracture, + breach, fracture, sublimate, //units commandCenter, @@ -120,10 +120,8 @@ public class Blocks implements ContentList{ message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank, //campaign - launchPad, interplanetaryAccelerator, + launchPad, interplanetaryAccelerator - //nuclear? - nuclearWarhead, warheadAssembler, ballisticSilo //TODO ; /** @deprecated use the blocks with proper names */ @@ -1022,6 +1020,12 @@ public class Blocks implements ContentList{ consumes.power(0.5f / 60f); }}; + slagIncinerator = new ItemIncinerator("slag-incinerator"){{ + requirements(Category.crafting, with(Items.tungsten, 15)); + size = 1; + consumes.liquid(Liquids.slag, 2f / 60f); + }}; + heatReactor = new HeatProducer("heat-reactor"){{ //TODO quadvent? //TODO coolant? @@ -1149,6 +1153,39 @@ public class Blocks implements ContentList{ liquidCapacity = 40f; }}; + //TODO bad name + phaseSynthesizer = new HeatCrafter("phase-synthesizer"){{ + requirements(Category.crafting, with(Items.tungsten, 60, Items.graphite, 60, Items.carbide, 30)); + + size = 3; + + itemCapacity = 30; + heatRequirement = 8f; + craftTime = 60f * 5f; + liquidCapacity = 80f * 5; + + ambientSound = Sounds.techloop; + ambientSoundVolume = 0.07f; + + outputItem = new ItemStack(Items.phaseFabric, 1); + + drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawCircles(){{ + color = Color.valueOf("ffc073").a(0.24f); + strokeMax = 2.5f; + radius = 10f; + amount = 3; + }}, new DrawLiquidRegion(Liquids.slag), new DrawBlock(), new DrawHeatInput(), new DrawHeatRegion(){{ + heatColor = Color.valueOf("ff6060ff"); + }}, new DrawHeatRegion("-vents"){{ + heatColor.a = 1f; + }}); + iconOverride = new String[]{"-bottom", ""}; + + consumes.items(with(Items.thorium, 1, Items.sand, 4)); + consumes.liquid(Liquids.ozone, 4f / 60f); + consumes.power(10f); + }}; + //TODO needs to be completely redone from the ground up cellSynthesisChamber = new LiquidConverter("cell-synthesis-chamber"){{ //TODO booster mechanics? @@ -2641,6 +2678,13 @@ public class Blocks implements ContentList{ limitRange(); }}; + //TODO bad name + if(false) + sublimate = new ContinuousTurret("sublimate"){{ + //TODO requirements + requirements(Category.turret, with(Items.tungsten, 35, Items.silicon, 35), true); + }}; + //endregion //region units diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 639b2fb98d..4d06a5eec1 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -1687,17 +1687,22 @@ public class Fx{ generatespark = new Effect(18, e -> { randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> { - float len = e.fout() * 4f; color(Pal.orangeSpark, Color.gray, e.fin()); - Fill.circle(e.x + x, e.y + y, len/2f); + Fill.circle(e.x + x, e.y + y, e.fout() * 4f /2f); }); }), fuelburn = new Effect(23, e -> { randLenVectors(e.id, 5, e.fin() * 9f, (x, y) -> { - float len = e.fout() * 4f; color(Color.lightGray, Color.gray, e.fin()); - Fill.circle(e.x + x, e.y + y, len/2f); + Fill.circle(e.x + x, e.y + y, e.fout() * 2f); + }); + }), + + incinerateSlag = new Effect(34, e -> { + randLenVectors(e.id, 4, e.finpow() * 5f, (x, y) -> { + color(Pal.slagOrange, Color.gray, e.fin()); + Fill.circle(e.x + x, e.y + y, e.fout() * 1.7f); }); }), diff --git a/core/src/mindustry/world/blocks/production/ItemIncinerator.java b/core/src/mindustry/world/blocks/production/ItemIncinerator.java new file mode 100644 index 0000000000..bfc4cca07a --- /dev/null +++ b/core/src/mindustry/world/blocks/production/ItemIncinerator.java @@ -0,0 +1,68 @@ +package mindustry.world.blocks.production; + +import arc.graphics.g2d.*; +import arc.math.*; +import mindustry.annotations.Annotations.*; +import mindustry.content.*; +import mindustry.entities.*; +import mindustry.gen.*; +import mindustry.graphics.*; +import mindustry.type.*; +import mindustry.world.*; +import mindustry.world.meta.*; + +/** Incinerator that accepts only items and optionally requires a liquid, e.g. slag. */ +public class ItemIncinerator extends Block{ + public Effect effect = Fx.incinerateSlag; + public float effectChance = 0.2f; + + public @Load("@-liquid") TextureRegion liquidRegion; + public @Load("@-top") TextureRegion topRegion; + + public ItemIncinerator(String name){ + super(name); + update = true; + solid = true; + } + + @Override + public TextureRegion[] icons(){ + return new TextureRegion[]{region, topRegion}; + } + + public class ItemIncineratorBuild extends Building{ + + @Override + public void updateTile(){ + } + + @Override + public BlockStatus status(){ + return consValid() ? BlockStatus.active : BlockStatus.noInput; + } + + @Override + public void draw(){ + super.draw(); + + if(liquidRegion.found()){ + Drawf.liquid(liquidRegion, x, y, liquids.currentAmount() / liquidCapacity, liquids.current().color); + } + if(topRegion.found()){ + Draw.rect(topRegion, x, y); + } + } + + @Override + public void handleItem(Building source, Item item){ + if(Mathf.chance(effectChance)){ + effect.at(x, y); + } + } + + @Override + public boolean acceptItem(Building source, Item item){ + return consValid(); + } + } +}