Fixed #4376
This commit is contained in:
@@ -51,14 +51,14 @@ public class OverflowGate extends Block{
|
||||
Building to = nearby((from + 2) % 4);
|
||||
boolean
|
||||
fromInst = src.block.instantTransfer,
|
||||
canForward = to != null && to.acceptItem(this, item) && to.team == team && !(fromInst && to.block.instantTransfer),
|
||||
canForward = to != null && to.team == team && !(fromInst && to.block.instantTransfer) && to.acceptItem(this, item),
|
||||
inv = invert == enabled;
|
||||
|
||||
if(!canForward || inv){
|
||||
Building a = nearby(Mathf.mod(from - 1, 4));
|
||||
Building b = nearby(Mathf.mod(from + 1, 4));
|
||||
boolean ac = a != null && a.acceptItem(this, item) && !(fromInst && a.block.instantTransfer) && a.team == team;
|
||||
boolean bc = b != null && b.acceptItem(this, item) && !(fromInst && b.block.instantTransfer) && b.team == team;
|
||||
boolean ac = a != null && !(fromInst && a.block.instantTransfer) && a.team == team && a.acceptItem(this, item);
|
||||
boolean bc = b != null && !(fromInst && b.block.instantTransfer) && b.team == team && b.acceptItem(this, item);
|
||||
|
||||
if(!ac && !bc){
|
||||
return inv && canForward ? to : null;
|
||||
|
||||
Reference in New Issue
Block a user