Closed juniper-wright closed 11 years ago
private roomstateChange(String args)
{
if(three arguments -- x, y, val)
room[x][y].updateRoomstate(val)
else
room[curr_x][curr_y].updateRoomstate(val)
}
public updateRoomstate(String val)
{
if("+" in val) this.roomstate += val;
else if("-" in val) this.roomstate -= val;
else if(val is parsable to an int) this.roomstate = val;
else return false;
}
Make sure that changing the roomstate either sets the room's _seen to false, or calls:
_rooms[x][y].description(true);
Haven't decided yet.
Function syntax:
roomstate [roomX roomY] stateNum;
This is a feature request for the UtopiaScript parser. References #1.