tiles.rc: annotate each tile with its description number
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@820 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
d14121b415
commit
52512c8987
3 changed files with 355 additions and 338 deletions
|
@ -78,6 +78,18 @@ public class TileSpec
|
|||
return bi;
|
||||
}
|
||||
|
||||
public int getDescriptionNumber()
|
||||
{
|
||||
String v = getAttribute("description");
|
||||
if (v != null && v.startsWith("#")) {
|
||||
return Integer.parseInt(v.substring(1));
|
||||
}
|
||||
if (owner != null) {
|
||||
return owner.getDescriptionNumber();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public String [] getImages()
|
||||
{
|
||||
return images.toArray(new String[0]);
|
||||
|
|
Reference in a new issue