mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-31 01:44:22 +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));
|
requirements(Category.distribution, ItemStack.with(Items.plastanium, 1, Items.silicon, 1, Items.graphite, 1));
|
||||||
health = 75;
|
health = 75;
|
||||||
speed = 0.04f;
|
speed = 0.04f;
|
||||||
|
recharge = 4f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
armoredConveyor = new ArmoredConveyor("armored-conveyor"){{
|
armoredConveyor = new ArmoredConveyor("armored-conveyor"){{
|
||||||
|
@ -22,6 +22,7 @@ public class CraterConveyor extends Block implements Autotiler{
|
|||||||
private TextureRegion[] regions = new TextureRegion[8];
|
private TextureRegion[] regions = new TextureRegion[8];
|
||||||
|
|
||||||
public float speed = 0f;
|
public float speed = 0f;
|
||||||
|
public float recharge = 4f;
|
||||||
|
|
||||||
public CraterConveyor(String name){
|
public CraterConveyor(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@ -114,7 +115,7 @@ public class CraterConveyor extends Block implements Autotiler{
|
|||||||
@Override
|
@Override
|
||||||
public void updateTile(){
|
public void updateTile(){
|
||||||
// reel in crater
|
// 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
|
// sleep when idle
|
||||||
if(link == -1){
|
if(link == -1){
|
||||||
@ -147,7 +148,8 @@ public class CraterConveyor extends Block implements Autotiler{
|
|||||||
link = -1;
|
link = -1;
|
||||||
items.clear();
|
items.clear();
|
||||||
|
|
||||||
e.cooldown = cooldown = 1;
|
cooldown = recharge;
|
||||||
|
e.cooldown = 1;
|
||||||
e.noSleep();
|
e.noSleep();
|
||||||
bump();
|
bump();
|
||||||
}
|
}
|
||||||
@ -258,7 +260,7 @@ public class CraterConveyor extends Block implements Autotiler{
|
|||||||
@Override
|
@Override
|
||||||
public boolean acceptItem(Tilec source, Item item){
|
public boolean acceptItem(Tilec source, Item item){
|
||||||
if (this == source) return true; // player threw items
|
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
|
return!((blendbit2 != 5) // not a loading dock
|
||||||
|| (items.total() > 0 && !items.has(item)) // incompatible items
|
|| (items.total() > 0 && !items.has(item)) // incompatible items
|
||||||
|| (items.total() >= getMaximumAccepted(item)) // filled to capacity
|
|| (items.total() >= getMaximumAccepted(item)) // filled to capacity
|
||||||
|
Loading…
Reference in New Issue
Block a user