Fix stackable furni not working with WIRED Effect: Match Furni Direction

This commit is contained in:
Alejandro 2020-02-27 23:29:23 +02:00
parent 706577f220
commit ae51fa88a5

View File

@ -62,7 +62,7 @@ public class WiredEffectChangeFurniDirection extends InteractionWiredEffect {
RoomTile targetTile = room.getLayout().getTileInFront(room.getLayout().getTile(entry.getKey().getX(), entry.getKey().getY()), entry.getValue().getValue());
int count = 1;
while ((targetTile == null || !targetTile.getAllowStack() || targetTile.state == RoomTileState.INVALID) && count < 8) {
while ((targetTile == null || !targetTile.getAllowStack() || targetTile.state == RoomTileState.INVALID || targetTile.state == RoomTileState.BLOCKED) && count < 8) {
entry.setValue(this.nextRotation(entry.getValue()));
targetTile = room.getLayout().getTileInFront(room.getLayout().getTile(entry.getKey().getX(), entry.getKey().getY()), entry.getValue().getValue());
count++;