From f41212b4d71d1a5f239bb3e97e5fd3b1ace63e6d Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 24 Jul 2020 13:42:11 -0400 Subject: [PATCH] plastanium balancing --- core/src/mindustry/content/Blocks.java | 2 +- .../world/blocks/distribution/StackConveyor.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index e68368196b..3ef0d97ffa 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -911,7 +911,7 @@ public class Blocks implements ContentList{ plastaniumConveyor = new StackConveyor("plastanium-conveyor"){{ requirements(Category.distribution, with(Items.plastanium, 1, Items.silicon, 1, Items.graphite, 1)); health = 75; - speed = 3.5f / 60f; + speed = 3f / 60f; itemCapacity = 10; displayedSpeed = 30f; }}; diff --git a/core/src/mindustry/world/blocks/distribution/StackConveyor.java b/core/src/mindustry/world/blocks/distribution/StackConveyor.java index c29960f358..01e335e63c 100644 --- a/core/src/mindustry/world/blocks/distribution/StackConveyor.java +++ b/core/src/mindustry/world/blocks/distribution/StackConveyor.java @@ -27,6 +27,7 @@ public class StackConveyor extends Block implements Autotiler{ public float speed = 0f; public boolean splitOut = true; public float displayedSpeed = 30f; + public float recharge = 2f; public StackConveyor(String name){ super(name); @@ -47,7 +48,7 @@ public class StackConveyor extends Block implements Autotiler{ public void setStats(){ super.setStats(); - stats.add(BlockStat.itemsMoved, displayedSpeed, StatUnit.itemsSecond); + stats.add(BlockStat.itemsMoved, Mathf.round(itemCapacity * speed * 60), StatUnit.itemsSecond); } @Override @@ -166,7 +167,7 @@ public class StackConveyor extends Block implements Autotiler{ @Override public void updateTile(){ // reel in crater - if(cooldown > 0f) cooldown = Mathf.clamp(cooldown - speed * edelta()); + if(cooldown > 0f) cooldown = Mathf.clamp(cooldown - speed * edelta(), 0f, recharge); if(link == -1){ return; @@ -200,7 +201,7 @@ public class StackConveyor extends Block implements Autotiler{ link = -1; items.clear(); - cooldown = 1f; + cooldown = recharge; e.cooldown = 1; } } @@ -249,7 +250,7 @@ public class StackConveyor extends Block implements Autotiler{ @Override public boolean acceptItem(Building source, Item item){ if(this == source) return true; // player threw items - if(cooldown > 0) return false; // still cooling down + if(cooldown > recharge - 1f) return false; // still cooling down return !((state != stateLoad) // not a loading dock || (items.total() > 0 && !items.has(item)) // incompatible items || (items.total() >= getMaximumAccepted(item)) // filled to capacity