Move payload blend check to BuildingComp (#6152)
This commit is contained in:
@@ -432,6 +432,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
return block.unloadable;
|
||||
}
|
||||
|
||||
public boolean payloadCheck(int conveyorRotation){
|
||||
return block.rotate && (rotation + 2) % 4 == conveyorRotation;
|
||||
}
|
||||
|
||||
/** Called when an unloader takes an item. */
|
||||
public void itemTaken(Item item){
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public class PayloadConveyor extends Block{
|
||||
|
||||
int ntrns = 1 + size/2;
|
||||
Tile next = tile.nearby(Geometry.d4(rotation).x * ntrns, Geometry.d4(rotation).y * ntrns);
|
||||
blocked = (next != null && next.solid() && !(next.block().outputsPayload || next.block().acceptsPayload)) || (this.next != null && this.next.block.rotate && (this.next.rotation + 2) % 4 == rotation);
|
||||
blocked = (next != null && next.solid() && !(next.block().outputsPayload || next.block().acceptsPayload)) || (this.next != null && this.next.payloadCheck(rotation));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user