Slag-based incinerator
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 138 B |
Binary file not shown.
|
After Width: | Height: | Size: 141 B |
BIN
core/assets-raw/sprites/blocks/production/slag-incinerator.png
Normal file
BIN
core/assets-raw/sprites/blocks/production/slag-incinerator.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 601 B |
@@ -455,3 +455,5 @@
|
|||||||
63251=gallium|liquid-gallium-ui
|
63251=gallium|liquid-gallium-ui
|
||||||
63250=slag-centrifuge|block-slag-centrifuge-ui
|
63250=slag-centrifuge|block-slag-centrifuge-ui
|
||||||
63249=slag-heater|block-slag-heater-ui
|
63249=slag-heater|block-slag-heater-ui
|
||||||
|
63248=slag-incinerator|block-slag-incinerator-ui
|
||||||
|
63247=phase-synthesizer|block-phase-synthesizer-ui
|
||||||
|
|||||||
Binary file not shown.
@@ -60,7 +60,7 @@ public class Blocks implements ContentList{
|
|||||||
//crafting
|
//crafting
|
||||||
siliconSmelter, siliconCrucible, siliconArcFurnace, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
|
siliconSmelter, siliconCrucible, siliconArcFurnace, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
|
||||||
melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge,
|
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,
|
cellSynthesisChamber,
|
||||||
|
|
||||||
//sandbox
|
//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,
|
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, foreshadow, spectre, meltdown, segment, parallax, tsunami,
|
||||||
|
|
||||||
//turrets - erekir
|
//turrets - erekir
|
||||||
breach, fracture,
|
breach, fracture, sublimate,
|
||||||
|
|
||||||
//units
|
//units
|
||||||
commandCenter,
|
commandCenter,
|
||||||
@@ -120,10 +120,8 @@ public class Blocks implements ContentList{
|
|||||||
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
|
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
|
||||||
|
|
||||||
//campaign
|
//campaign
|
||||||
launchPad, interplanetaryAccelerator,
|
launchPad, interplanetaryAccelerator
|
||||||
|
|
||||||
//nuclear?
|
|
||||||
nuclearWarhead, warheadAssembler, ballisticSilo //TODO
|
|
||||||
;
|
;
|
||||||
|
|
||||||
/** @deprecated use the blocks with proper names */
|
/** @deprecated use the blocks with proper names */
|
||||||
@@ -1022,6 +1020,12 @@ public class Blocks implements ContentList{
|
|||||||
consumes.power(0.5f / 60f);
|
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"){{
|
heatReactor = new HeatProducer("heat-reactor"){{
|
||||||
//TODO quadvent?
|
//TODO quadvent?
|
||||||
//TODO coolant?
|
//TODO coolant?
|
||||||
@@ -1149,6 +1153,39 @@ public class Blocks implements ContentList{
|
|||||||
liquidCapacity = 40f;
|
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
|
//TODO needs to be completely redone from the ground up
|
||||||
cellSynthesisChamber = new LiquidConverter("cell-synthesis-chamber"){{
|
cellSynthesisChamber = new LiquidConverter("cell-synthesis-chamber"){{
|
||||||
//TODO booster mechanics?
|
//TODO booster mechanics?
|
||||||
@@ -2641,6 +2678,13 @@ public class Blocks implements ContentList{
|
|||||||
limitRange();
|
limitRange();
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
//TODO bad name
|
||||||
|
if(false)
|
||||||
|
sublimate = new ContinuousTurret("sublimate"){{
|
||||||
|
//TODO requirements
|
||||||
|
requirements(Category.turret, with(Items.tungsten, 35, Items.silicon, 35), true);
|
||||||
|
}};
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
//region units
|
//region units
|
||||||
|
|
||||||
|
|||||||
@@ -1687,17 +1687,22 @@ public class Fx{
|
|||||||
|
|
||||||
generatespark = new Effect(18, e -> {
|
generatespark = new Effect(18, e -> {
|
||||||
randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> {
|
randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> {
|
||||||
float len = e.fout() * 4f;
|
|
||||||
color(Pal.orangeSpark, Color.gray, e.fin());
|
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 -> {
|
fuelburn = new Effect(23, e -> {
|
||||||
randLenVectors(e.id, 5, e.fin() * 9f, (x, y) -> {
|
randLenVectors(e.id, 5, e.fin() * 9f, (x, y) -> {
|
||||||
float len = e.fout() * 4f;
|
|
||||||
color(Color.lightGray, Color.gray, e.fin());
|
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);
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user