- treasure = "true" if item[1].get("treasure") else "false"
- obj_str += template.format(i_msg, treasure, longs_str, sounds_str, texts_str)
+ locs = attr.get("locations", ["LOC_NOWHERE", "LOC_NOWHERE"])
+ immovable = attr.get("immovable", False)
+ if type(locs) == str:
+ locs = [locnames.index(locs), -1 if immovable else 0]
+ else:
+ locs = [locnames.index(x) for x in locs]
+ treasure = "true" if attr.get("treasure") else "false"
+ obj_str += template.format(i_msg, locs[0], locs[1], treasure, longs_str, sounds_str, texts_str)