strictness: getZoneSizeFor must be called on a zone-center tile
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@844 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
94e9892731
commit
c3e677047a
1 changed files with 3 additions and 4 deletions
|
@ -398,11 +398,10 @@ public class TileConstants
|
|||
|
||||
public static CityDimension getZoneSizeFor(int tile)
|
||||
{
|
||||
assert isZoneCenter(tile);
|
||||
|
||||
TileSpec spec = Tiles.get(tile & LOMASK);
|
||||
if (spec.owner != null) {
|
||||
spec = spec.owner;
|
||||
}
|
||||
return spec.getBuildingSize();
|
||||
return spec != null ? spec.getBuildingSize() : null;
|
||||
}
|
||||
|
||||
public static boolean isConstructed(int tile)
|
||||
|
|
Reference in a new issue