mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-28 00:19:57 +07:00
Require 4 loading docks to saturate a belt
Which encourages using them right from the factory, instead of simply connecting it up to a full titanium belt.
This commit is contained in:
parent
32e32ecae2
commit
16a1483f55
@ -914,6 +914,7 @@ public class Blocks implements ContentList{
|
||||
requirements(Category.distribution, ItemStack.with(Items.plastanium, 1, Items.silicon, 1, Items.graphite, 1));
|
||||
health = 75;
|
||||
speed = 0.04f;
|
||||
recharge = 4f;
|
||||
}};
|
||||
|
||||
armoredConveyor = new ArmoredConveyor("armored-conveyor"){{
|
||||
|
@ -22,6 +22,7 @@ public class CraterConveyor extends Block implements Autotiler{
|
||||
private TextureRegion[] regions = new TextureRegion[8];
|
||||
|
||||
public float speed = 0f;
|
||||
public float recharge = 4f;
|
||||
|
||||
public CraterConveyor(String name){
|
||||
super(name);
|
||||
@ -114,7 +115,7 @@ public class CraterConveyor extends Block implements Autotiler{
|
||||
@Override
|
||||
public void updateTile(){
|
||||
// reel in crater
|
||||
if(cooldown > 0f) cooldown = Mathf.clamp(cooldown - speed, 0f, 1f);
|
||||
if(cooldown > 0f) cooldown = Mathf.clamp(cooldown - speed, 0f, recharge);
|
||||
|
||||
// sleep when idle
|
||||
if(link == -1){
|
||||
@ -147,7 +148,8 @@ public class CraterConveyor extends Block implements Autotiler{
|
||||
link = -1;
|
||||
items.clear();
|
||||
|
||||
e.cooldown = cooldown = 1;
|
||||
cooldown = recharge;
|
||||
e.cooldown = 1;
|
||||
e.noSleep();
|
||||
bump();
|
||||
}
|
||||
@ -258,7 +260,7 @@ public class CraterConveyor extends Block implements Autotiler{
|
||||
@Override
|
||||
public boolean acceptItem(Tilec source, Item item){
|
||||
if (this == source) return true; // player threw items
|
||||
if (cooldown > 0f) return false; // still cooling down
|
||||
if (cooldown > recharge - 1f) return false; // still cooling down
|
||||
return!((blendbit2 != 5) // 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