mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-03 22:21:17 +07:00
Duct consistency
This commit is contained in:
parent
9aae443e72
commit
4cd411d5ee
@ -1034,16 +1034,17 @@ public class Blocks implements ContentList{
|
||||
|
||||
duct = new Duct("duct"){{
|
||||
requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.graphite, 5, Items.copper, 5));
|
||||
speed = 5f;
|
||||
speed = 4f;
|
||||
}};
|
||||
|
||||
ductRouter = new DuctRouter("duct-router"){{
|
||||
requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.graphite, 10, Items.copper, 5));
|
||||
speed = 5f;
|
||||
speed = 4f;
|
||||
}};
|
||||
|
||||
ductBridge = new DuctBridge("duct-bridge"){{
|
||||
requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.graphite, 20, Items.copper, 15));
|
||||
speed = 4f;
|
||||
}};
|
||||
|
||||
//endregion
|
||||
|
@ -25,7 +25,7 @@ public class DuctBridge extends Block{
|
||||
public @Load("@-dir") TextureRegion dirRegion;
|
||||
|
||||
public int range = 4;
|
||||
public float moveDelay = 5f;
|
||||
public float speed = 5f;
|
||||
|
||||
public DuctBridge(String name){
|
||||
super(name);
|
||||
@ -116,12 +116,12 @@ public class DuctBridge extends Block{
|
||||
link.occupied[rotation % 4] = this;
|
||||
if(items.any() && link.items.total() < link.block.itemCapacity){
|
||||
progress += edelta();
|
||||
while(progress > moveDelay){
|
||||
while(progress > speed){
|
||||
Item next = items.take();
|
||||
if(next != null && link.items.total() < link.block.itemCapacity){
|
||||
link.handleItem(this, next);
|
||||
}
|
||||
progress -= moveDelay;
|
||||
progress -= speed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user