tiles: annotate industrial zone tiles

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@815 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-09-01 00:26:29 +00:00
parent 4c66df859f
commit 14944850b7
3 changed files with 88 additions and 65 deletions

View file

@ -663,6 +663,19 @@ public class TileConstants
}
public static boolean isIndustrialZone(int tile)
{
int tmp = tile & LOMASK;
TileSpec ts = Tiles.get(tmp);
if (ts != null) {
if (ts.owner != null) {
ts = ts.owner;
}
return ts.getBooleanAttribute("industrial-zone");
}
return false;
}
public static boolean isIndustrialZoneOld(int tile)
{
int tmp = tile & LOMASK;
return (tmp >= INDBASE && tmp < PORTBASE)