Plastic production system balancing
This commit is contained in:
@@ -102,11 +102,12 @@ public class CraftingBlocks {
|
||||
|
||||
plasticFormer = new GenericCrafter("plasticformer") {{
|
||||
inputLiquid = Liquids.oil;
|
||||
liquidUse = 0.1f;
|
||||
liquidUse = 0.3f;
|
||||
liquidCapacity = 60f;
|
||||
powerUse = 0.05f;
|
||||
craftTime = 70f;
|
||||
powerUse = 0.3f;
|
||||
craftTime = 80f;
|
||||
output = Items.plastic;
|
||||
itemCapacity = 30;
|
||||
size = 2;
|
||||
health = 320;
|
||||
hasPower = hasLiquids = true;
|
||||
@@ -119,7 +120,7 @@ public class CraftingBlocks {
|
||||
powerUse = 0.05f;
|
||||
craftTime = 10f;
|
||||
outputLiquid = Liquids.oil;
|
||||
outputLiquidAmount = 0.05f;
|
||||
outputLiquidAmount = 0.08f;
|
||||
size = 2;
|
||||
health = 320;
|
||||
hasLiquids = true;
|
||||
|
||||
@@ -80,16 +80,16 @@ public class ProductionBlocks {
|
||||
|
||||
waterextractor = new SolidPump("waterextractor") {{
|
||||
result = Liquids.water;
|
||||
powerUse = 0.1f;
|
||||
pumpAmount = 0.4f;
|
||||
powerUse = 0.2f;
|
||||
pumpAmount = 0.1f;
|
||||
size = 2;
|
||||
liquidCapacity = 30f;
|
||||
}},
|
||||
|
||||
oilextractor = new SolidPump("oilextractor") {{
|
||||
result = Liquids.oil;
|
||||
powerUse = 0.5f;
|
||||
pumpAmount = 0.4f;
|
||||
powerUse = 0.6f;
|
||||
pumpAmount = 0.06f;
|
||||
size = 3;
|
||||
liquidCapacity = 80f;
|
||||
}},
|
||||
@@ -98,8 +98,8 @@ public class ProductionBlocks {
|
||||
resource = Blocks.grass;
|
||||
result = Items.biomatter;
|
||||
inputLiquid = Liquids.water;
|
||||
liquidUse = 0.1f;
|
||||
drillTime = 300;
|
||||
liquidUse = 0.2f;
|
||||
drillTime = 260;
|
||||
size = 2;
|
||||
hasLiquids = true;
|
||||
hasPower = true;
|
||||
|
||||
@@ -79,8 +79,8 @@ public class GenericCrafter extends Block{
|
||||
float liquidUsed = Math.min(liquidCapacity, liquidUse * Timers.delta());
|
||||
int itemsUsed = (inputItem == null ? 0 : (int)(1 + inputItem.amount * entity.progress));
|
||||
|
||||
if((!hasLiquids || liquidUsed > entity.liquid.amount) &&
|
||||
(!hasPower || powerUsed > entity.power.amount) &&
|
||||
if((!hasLiquids || entity.liquid.amount >= liquidUsed) &&
|
||||
(!hasPower || entity.power.amount >= powerUsed) &&
|
||||
(inputItem == null || entity.inventory.hasItem(inputItem.item, itemsUsed))){
|
||||
|
||||
entity.progress += 1f / craftTime * Timers.delta();
|
||||
@@ -92,7 +92,8 @@ public class GenericCrafter extends Block{
|
||||
|
||||
if(inputItem != null) tile.entity.inventory.removeItem(inputItem);
|
||||
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)){
|
||||
|
||||
Reference in New Issue
Block a user