This commit is contained in:
Anuken
2020-09-22 22:52:55 -04:00
parent 39aeab5f11
commit cf13717cc8
2 changed files with 10 additions and 1 deletions

View File

@@ -276,7 +276,10 @@ public class ItemBridge extends Block{
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 4f, 0.05f); //TODO this is kinda broken, because lerping only happens on a timer
}else{
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 1f, 0.01f);
if(item != null) items.add(item, 1);
if(item != null){
items.add(item, 1);
items.undoFlow(item);
}
}
}
}

View File

@@ -253,6 +253,12 @@ public class ItemModule extends BlockModule{
}
}
public void undoFlow(Item item){
if(flow != null){
cacheSums[item.id] -= 1;
}
}
public void addAll(ItemModule items){
for(int i = 0; i < items.items.length; i++){
add(i, items.items[i]);