mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-05 07:00:49 +07:00
plastanium balancing
This commit is contained in:
parent
58c39e14d6
commit
f41212b4d7
@ -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;
|
||||
}};
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user