tiles.rc: move pollution values from Java code to tiles.rc
This patch maintains exact values for every tile, even where it is probably wrong. git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@837 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
db6f3fb59c
commit
ed88e75a34
3 changed files with 232 additions and 243 deletions
|
@ -265,34 +265,8 @@ public class TileConstants
|
|||
|
||||
public static int getPollutionValue(int tile)
|
||||
{
|
||||
tile &= LOMASK;
|
||||
|
||||
if (tile < POWERBASE)
|
||||
{
|
||||
if (tile >= HTRFBASE)
|
||||
return 75; //heavy traffic
|
||||
if (tile >= LTRFBASE)
|
||||
return 50; //light traffic
|
||||
|
||||
if (isFire(tile))
|
||||
return 90; //active fire
|
||||
|
||||
if (isRadioactive(tile))
|
||||
return 255; //radioactivity
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (tile <= LASTIND)
|
||||
return 0;
|
||||
|
||||
if (tile < PORTBASE)
|
||||
return 50;
|
||||
|
||||
if (tile <= LASTPOWERPLANT)
|
||||
return 100;
|
||||
|
||||
return 0;
|
||||
TileSpec spec = Tiles.get(tile & LOMASK);
|
||||
return spec != null ? spec.getPollutionValue() : 0;
|
||||
}
|
||||
|
||||
public static boolean isAnimated(int tile)
|
||||
|
|
Reference in a new issue