This commit is contained in:
Anuken
2021-01-19 09:58:41 -05:00
parent 8fab335b9d
commit d06a74e7a2

View File

@@ -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;