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.dagger.name = Dagger
unit.dagger.description = A basic ground unit. Useful in swarms.
unit.crawler.name = Crawler
unit.titan.name = Titan
unit.titan.description = An advanced, armored ground unit. Attacks both ground and air targets.
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"){{
requirements(Category.crafting, ItemStack.with(Items.copper, 60, Items.lead, 50));
health = 90;
craftEffect = Fx.smeltsmoke;
result = Items.silicon;
output = Items.silicon;
craftTime = 40f;
size = 2;
hasLiquids = false;
@ -240,19 +239,16 @@ public class Blocks implements ContentList{
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));
health = 90;
craftEffect = Fx.smeltsmoke;
result = Items.graphite;
craftTime = 50f;
craftEffect = Fx.pulverizeMedium;
output = Items.graphite;
craftTime = 90f;
size = 2;
hasLiquids = false;
flameColor = Color.valueOf("ffef99");
hasItems = true;
consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2));
consumes.power(0.05f);
consumes.item(Items.coal, 2);
}};
plastaniumCompressor = new PlastaniumCompressor("plastanium-compressor"){{
@ -275,7 +271,7 @@ public class Blocks implements ContentList{
phaseWeaver = new PhaseWeaver("phase-weaver"){{
requirements(Category.crafting, ItemStack.with(Items.silicon, 260, Items.lead, 240, Items.thorium, 150));
craftEffect = Fx.smeltsmoke;
result = Items.phasefabric;
output = Items.phasefabric;
craftTime = 120f;
size = 2;
@ -286,7 +282,7 @@ public class Blocks implements ContentList{
surgeSmelter = new PowerSmelter("alloy-smelter"){{
requirements(Category.crafting, ItemStack.with(Items.silicon, 160, Items.lead, 160, Items.thorium, 140));
craftEffect = Fx.smeltsmoke;
result = Items.surgealloy;
output = Items.surgealloy;
craftTime = 75f;
size = 2;
@ -327,7 +323,7 @@ public class Blocks implements ContentList{
flameColor = Color.CLEAR;
hasItems = true;
hasPower = true;
result = Items.pyratite;
output = Items.pyratite;
size = 2;

View File

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