From 737c63da5e6f42118b967d2815d33e02391318a0 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 28 Mar 2018 10:20:42 -0400 Subject: [PATCH] Plastic production system balancing --- core/assets/version.properties | 4 ++-- .../mindustry/content/blocks/CraftingBlocks.java | 9 +++++---- .../mindustry/content/blocks/ProductionBlocks.java | 12 ++++++------ .../blocks/types/production/GenericCrafter.java | 7 ++++--- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/core/assets/version.properties b/core/assets/version.properties index 6f94402b5e..b4d2bd5ca5 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Tue Mar 27 23:35:26 EDT 2018 +#Wed Mar 28 10:18:53 EDT 2018 version=release -androidBuildCode=692 +androidBuildCode=693 name=Mindustry code=3.4 build=custom build diff --git a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java index ddb7b0b233..9ffcd7990f 100644 --- a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java @@ -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; diff --git a/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java b/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java index dc6369b293..a74aeb9802 100644 --- a/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java @@ -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; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/GenericCrafter.java b/core/src/io/anuke/mindustry/world/blocks/types/production/GenericCrafter.java index d386676c9b..aeee08699a 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/production/GenericCrafter.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/GenericCrafter.java @@ -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)){