tiles.rc: let zone population be controlled by tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@800 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
51973f75bd
commit
47963b0011
3 changed files with 65 additions and 62 deletions
|
@ -45,6 +45,17 @@ public class TileSpec
|
|||
return images.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public int getPopulation()
|
||||
{
|
||||
String v = getAttribute("population");
|
||||
if (v != null) {
|
||||
return Integer.parseInt(v);
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected void load(String inStr, Properties tilesRc)
|
||||
{
|
||||
Scanner in = new Scanner(inStr);
|
||||
|
|
Reference in a new issue