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