mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-02-07 15:12:35 +01:00
Fix NullPointerException in RoomUnit canOverrideTile
This commit is contained in:
parent
8dda7e8111
commit
6caadebe33
@ -806,6 +806,8 @@ public class RoomUnit
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean canOverrideTile(RoomTile tile) {
|
public boolean canOverrideTile(RoomTile tile) {
|
||||||
|
if (tile == null || room == null || room.getLayout() == null) return false;
|
||||||
|
|
||||||
int tileIndex = (room.getLayout().getMapSizeY() * tile.y) + tile.x + 1;
|
int tileIndex = (room.getLayout().getMapSizeY() * tile.y) + tile.x + 1;
|
||||||
return this.overridableTiles.contains(tileIndex);
|
return this.overridableTiles.contains(tileIndex);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user