jp_dungeonroom
These objects are used to represent a 'room' - a distinct part of the dungeon that is placed at the start, and then linked together. You will quite likely want to create new jp_dungeonrooms. Consult the helpfile for more information
Vars | |
border | The list of walls bordering this room. Anything in this list could be knocked down in order to make a path into the room |
---|---|
centre | The centrepoint of the room |
gen | A reference to the generator using this room |
multiborder | Only used by rooms that have disjoint sets of borders. A list of lists of turfs. The sub-lists are treated like the border turf list |
my_map | The submap for this room |
size | The size of the room. IMPORTANT: ROOMS MAY NOT TOUCH TURFS OUTSIDE range(centre, size). TURFS INSIDE range(centre,size) MAY BE DEALT WITH AS YOU WILL |
turfs | The list of turfs in this room. That should include internal walls. |
walls | The list of walls bordering the room that aren't used for connections into the room. Should include every wall turf next to a floor turf. May include turfs up to range(centre, size+1) |
Procs | |
New | Make a new jp_dungeonroom, size 's', centre 'c', generator 'g' |
finalise | Called on every room after everything has been generated. Use it to pretty up the room, or what-have-you. finalise() is the only other jp_dungeonroom procedure that is allowed to modify turfs in the dungeon. |
getBorder | Return the border walls of this room. |
getCentre | Get various pieces of information about the centrepoint of this room |
getSize | Get the size of this room |
getTurfs | Return the turfs inside of this room |
ok | Returns true if the room is okay to be placed here, false otherwise |
place | Actually place the room on the dungeon. place() is one of the few procedures allowed to actually modify turfs in the dungeon - do NOT change turfs outside of place() or finalise(). This is called /before/ paths are placed, and may be called /before/ any other rooms are placed. If you would like to pretty the room up after basic dungeon geometry is done and dusted, use 'finalise()' |
Var Details
border
The list of walls bordering this room. Anything in this list could be knocked down in order to make a path into the room
centre
The centrepoint of the room
gen
A reference to the generator using this room
multiborder
Only used by rooms that have disjoint sets of borders. A list of lists of turfs. The sub-lists are treated like the border turf list
my_map
The submap for this room
size
The size of the room. IMPORTANT: ROOMS MAY NOT TOUCH TURFS OUTSIDE range(centre, size). TURFS INSIDE range(centre,size) MAY BE DEALT WITH AS YOU WILL
turfs
The list of turfs in this room. That should include internal walls.
walls
The list of walls bordering the room that aren't used for connections into the room. Should include every wall turf next to a floor turf. May include turfs up to range(centre, size+1)
Proc Details
New
Make a new jp_dungeonroom, size 's', centre 'c', generator 'g'
finalise
Called on every room after everything has been generated. Use it to pretty up the room, or what-have-you. finalise() is the only other jp_dungeonroom procedure that is allowed to modify turfs in the dungeon.
getBorder
Return the border walls of this room.
getCentre
Get various pieces of information about the centrepoint of this room
getSize
Get the size of this room
getTurfs
Return the turfs inside of this room
ok
Returns true if the room is okay to be placed here, false otherwise
place
Actually place the room on the dungeon. place() is one of the few procedures allowed to actually modify turfs in the dungeon - do NOT change turfs outside of place() or finalise(). This is called /before/ paths are placed, and may be called /before/ any other rooms are placed. If you would like to pretty the room up after basic dungeon geometry is done and dusted, use 'finalise()'