Graphite press balancing

This commit is contained in:
Anuken
2019-01-26 11:32:39 -05:00
parent 83b5f6ef2d
commit 7924051c0d
6 changed files with 18 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -652,6 +652,7 @@ unit.phantom.name = Phantom Drone
unit.phantom.description = An advanced drone unit. Automatically mines ores and repairs blocks. Significantly more effective than a spirit drone. unit.phantom.description = An advanced drone unit. Automatically mines ores and repairs blocks. Significantly more effective than a spirit drone.
unit.dagger.name = Dagger unit.dagger.name = Dagger
unit.dagger.description = A basic ground unit. Useful in swarms. unit.dagger.description = A basic ground unit. Useful in swarms.
unit.crawler.name = Crawler
unit.titan.name = Titan unit.titan.name = Titan
unit.titan.description = An advanced, armored ground unit. Attacks both ground and air targets. unit.titan.description = An advanced, armored ground unit. Attacks both ground and air targets.
unit.ghoul.name = Ghoul Bomber unit.ghoul.name = Ghoul Bomber

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@@ -228,9 +228,8 @@ public class Blocks implements ContentList{
siliconSmelter = new PowerSmelter("silicon-smelter"){{ siliconSmelter = new PowerSmelter("silicon-smelter"){{
requirements(Category.crafting, ItemStack.with(Items.copper, 60, Items.lead, 50)); requirements(Category.crafting, ItemStack.with(Items.copper, 60, Items.lead, 50));
health = 90;
craftEffect = Fx.smeltsmoke; craftEffect = Fx.smeltsmoke;
result = Items.silicon; output = Items.silicon;
craftTime = 40f; craftTime = 40f;
size = 2; size = 2;
hasLiquids = false; hasLiquids = false;
@@ -240,19 +239,16 @@ public class Blocks implements ContentList{
consumes.power(0.05f); consumes.power(0.05f);
}}; }};
graphitePress = new PowerSmelter("graphite-press"){{ graphitePress = new GenericCrafter("graphite-press"){{
requirements(Category.crafting, ItemStack.with(Items.copper, 200, Items.lead, 50)); requirements(Category.crafting, ItemStack.with(Items.copper, 200, Items.lead, 50));
health = 90; craftEffect = Fx.pulverizeMedium;
craftEffect = Fx.smeltsmoke; output = Items.graphite;
result = Items.graphite; craftTime = 90f;
craftTime = 50f;
size = 2; size = 2;
hasLiquids = false; hasItems = true;
flameColor = Color.valueOf("ffef99");
consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2)); consumes.item(Items.coal, 2);
consumes.power(0.05f);
}}; }};
plastaniumCompressor = new PlastaniumCompressor("plastanium-compressor"){{ plastaniumCompressor = new PlastaniumCompressor("plastanium-compressor"){{
@@ -275,7 +271,7 @@ public class Blocks implements ContentList{
phaseWeaver = new PhaseWeaver("phase-weaver"){{ phaseWeaver = new PhaseWeaver("phase-weaver"){{
requirements(Category.crafting, ItemStack.with(Items.silicon, 260, Items.lead, 240, Items.thorium, 150)); requirements(Category.crafting, ItemStack.with(Items.silicon, 260, Items.lead, 240, Items.thorium, 150));
craftEffect = Fx.smeltsmoke; craftEffect = Fx.smeltsmoke;
result = Items.phasefabric; output = Items.phasefabric;
craftTime = 120f; craftTime = 120f;
size = 2; size = 2;
@@ -286,7 +282,7 @@ public class Blocks implements ContentList{
surgeSmelter = new PowerSmelter("alloy-smelter"){{ surgeSmelter = new PowerSmelter("alloy-smelter"){{
requirements(Category.crafting, ItemStack.with(Items.silicon, 160, Items.lead, 160, Items.thorium, 140)); requirements(Category.crafting, ItemStack.with(Items.silicon, 160, Items.lead, 160, Items.thorium, 140));
craftEffect = Fx.smeltsmoke; craftEffect = Fx.smeltsmoke;
result = Items.surgealloy; output = Items.surgealloy;
craftTime = 75f; craftTime = 75f;
size = 2; size = 2;
@@ -327,7 +323,7 @@ public class Blocks implements ContentList{
flameColor = Color.CLEAR; flameColor = Color.CLEAR;
hasItems = true; hasItems = true;
hasPower = true; hasPower = true;
result = Items.pyratite; output = Items.pyratite;
size = 2; size = 2;

View File

@@ -27,9 +27,8 @@ import static io.anuke.mindustry.Vars.content;
public class PowerSmelter extends PowerBlock{ public class PowerSmelter extends PowerBlock{
protected final int timerDump = timers++; protected final int timerDump = timers++;
protected final int timerCraft = timers++;
protected Item result; protected Item output;
protected float minFlux = 0.2f; protected float minFlux = 0.2f;
protected int fluxNeeded = 1; protected int fluxNeeded = 1;
@@ -63,7 +62,7 @@ public class PowerSmelter extends PowerBlock{
super.init(); super.init();
produces.set(result); produces.set(output);
} }
@Override @Override
@@ -76,7 +75,7 @@ public class PowerSmelter extends PowerBlock{
public void setStats(){ public void setStats(){
super.setStats(); super.setStats();
stats.add(BlockStat.outputItem, result); stats.add(BlockStat.outputItem, output);
stats.add(BlockStat.craftSpeed, 60f / craftTime, StatUnit.itemsSecond); stats.add(BlockStat.craftSpeed, 60f / craftTime, StatUnit.itemsSecond);
stats.add(BlockStat.inputItemCapacity, itemCapacity, StatUnit.items); stats.add(BlockStat.inputItemCapacity, itemCapacity, StatUnit.items);
stats.add(BlockStat.outputItemCapacity, itemCapacity, StatUnit.items); stats.add(BlockStat.outputItemCapacity, itemCapacity, StatUnit.items);
@@ -87,8 +86,8 @@ public class PowerSmelter extends PowerBlock{
PowerSmelterEntity entity = tile.entity(); PowerSmelterEntity entity = tile.entity();
if(entity.timer.get(timerDump, 5) && entity.items.has(result)){ if(entity.timer.get(timerDump, 5) && entity.items.has(output)){
tryDump(tile, result); tryDump(tile, output);
} }
//heat it up if there's enough power //heat it up if there's enough power
@@ -117,7 +116,7 @@ public class PowerSmelter extends PowerBlock{
entity.craftTime += entity.delta() * entity.power.satisfaction; entity.craftTime += entity.delta() * entity.power.satisfaction;
if(entity.items.get(result) >= itemCapacity //output full if(entity.items.get(output) >= itemCapacity //output full
|| entity.heat <= minHeat //not burning || entity.heat <= minHeat //not burning
|| entity.craftTime < craftTime*baseSmeltSpeed){ //not yet time || entity.craftTime < craftTime*baseSmeltSpeed){ //not yet time
return; return;
@@ -146,7 +145,7 @@ public class PowerSmelter extends PowerBlock{
} }
} }
offloadNear(tile, result); offloadNear(tile, output);
Effects.effect(craftEffect, flameColor, tile.drawx(), tile.drawy()); Effects.effect(craftEffect, flameColor, tile.drawx(), tile.drawy());
} }