mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 06:51:30 -08:00
Fixed #4335
This commit is contained in:
parent
136c8cfcd2
commit
6ec76409ef
1 changed files with 7 additions and 1 deletions
|
|
@ -267,6 +267,12 @@ public class StackConveyor extends Block implements Autotiler{
|
|||
link = -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int acceptStack(Item item, int amount, Teamc source){
|
||||
if(items.any() && !items.has(item)) return 0;
|
||||
return super.acceptStack(item, amount, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleItem(Building source, Item item){
|
||||
if(items.empty()) poofIn();
|
||||
|
|
@ -301,7 +307,7 @@ public class StackConveyor extends Block implements Autotiler{
|
|||
if(this == source) return true; // player threw items
|
||||
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.any() && !items.has(item)) // incompatible items
|
||||
|| (items.total() >= getMaximumAccepted(item)) // filled to capacity
|
||||
|| (front() == source));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue