Plastic production system balancing

This commit is contained in:
Anuken
2018-03-28 10:20:42 -04:00
parent a98f42012a
commit 737c63da5e
4 changed files with 17 additions and 15 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#Autogenerated file. Do not modify. #Autogenerated file. Do not modify.
#Tue Mar 27 23:35:26 EDT 2018 #Wed Mar 28 10:18:53 EDT 2018
version=release version=release
androidBuildCode=692 androidBuildCode=693
name=Mindustry name=Mindustry
code=3.4 code=3.4
build=custom build build=custom build
@@ -102,11 +102,12 @@ public class CraftingBlocks {
plasticFormer = new GenericCrafter("plasticformer") {{ plasticFormer = new GenericCrafter("plasticformer") {{
inputLiquid = Liquids.oil; inputLiquid = Liquids.oil;
liquidUse = 0.1f; liquidUse = 0.3f;
liquidCapacity = 60f; liquidCapacity = 60f;
powerUse = 0.05f; powerUse = 0.3f;
craftTime = 70f; craftTime = 80f;
output = Items.plastic; output = Items.plastic;
itemCapacity = 30;
size = 2; size = 2;
health = 320; health = 320;
hasPower = hasLiquids = true; hasPower = hasLiquids = true;
@@ -119,7 +120,7 @@ public class CraftingBlocks {
powerUse = 0.05f; powerUse = 0.05f;
craftTime = 10f; craftTime = 10f;
outputLiquid = Liquids.oil; outputLiquid = Liquids.oil;
outputLiquidAmount = 0.05f; outputLiquidAmount = 0.08f;
size = 2; size = 2;
health = 320; health = 320;
hasLiquids = true; hasLiquids = true;
@@ -80,16 +80,16 @@ public class ProductionBlocks {
waterextractor = new SolidPump("waterextractor") {{ waterextractor = new SolidPump("waterextractor") {{
result = Liquids.water; result = Liquids.water;
powerUse = 0.1f; powerUse = 0.2f;
pumpAmount = 0.4f; pumpAmount = 0.1f;
size = 2; size = 2;
liquidCapacity = 30f; liquidCapacity = 30f;
}}, }},
oilextractor = new SolidPump("oilextractor") {{ oilextractor = new SolidPump("oilextractor") {{
result = Liquids.oil; result = Liquids.oil;
powerUse = 0.5f; powerUse = 0.6f;
pumpAmount = 0.4f; pumpAmount = 0.06f;
size = 3; size = 3;
liquidCapacity = 80f; liquidCapacity = 80f;
}}, }},
@@ -98,8 +98,8 @@ public class ProductionBlocks {
resource = Blocks.grass; resource = Blocks.grass;
result = Items.biomatter; result = Items.biomatter;
inputLiquid = Liquids.water; inputLiquid = Liquids.water;
liquidUse = 0.1f; liquidUse = 0.2f;
drillTime = 300; drillTime = 260;
size = 2; size = 2;
hasLiquids = true; hasLiquids = true;
hasPower = true; hasPower = true;
@@ -79,8 +79,8 @@ public class GenericCrafter extends Block{
float liquidUsed = Math.min(liquidCapacity, liquidUse * Timers.delta()); float liquidUsed = Math.min(liquidCapacity, liquidUse * Timers.delta());
int itemsUsed = (inputItem == null ? 0 : (int)(1 + inputItem.amount * entity.progress)); int itemsUsed = (inputItem == null ? 0 : (int)(1 + inputItem.amount * entity.progress));
if((!hasLiquids || liquidUsed > entity.liquid.amount) && if((!hasLiquids || entity.liquid.amount >= liquidUsed) &&
(!hasPower || powerUsed > entity.power.amount) && (!hasPower || entity.power.amount >= powerUsed) &&
(inputItem == null || entity.inventory.hasItem(inputItem.item, itemsUsed))){ (inputItem == null || entity.inventory.hasItem(inputItem.item, itemsUsed))){
entity.progress += 1f / craftTime * Timers.delta(); entity.progress += 1f / craftTime * Timers.delta();
@@ -92,7 +92,8 @@ public class GenericCrafter extends Block{
if(inputItem != null) tile.entity.inventory.removeItem(inputItem); if(inputItem != null) tile.entity.inventory.removeItem(inputItem);
offloadNear(tile, output); offloadNear(tile, output);
Effects.effect(craftEffect, tile.worldx(), tile.worldy()); Effects.effect(craftEffect, tile.drawx(), tile.drawy());
entity.progress = 0f;
} }
if(tile.entity.timer.get(timerDump, 5)){ if(tile.entity.timer.get(timerDump, 5)){