dmm_suite
Procs | |
load_map | Construct the model map and control the loading process |
---|---|
parse_grid | Fill a given tile with its area/turf/objects/mobs Variable model is one full map line (e.g /turf/simulated/wall{icon_state = "rock"},/area/mine/dangerous/explored) |
parse_value | Tries to parse the given value_text. Will fallback on the value_text as a string if it fails |
Proc Details
load_map
Construct the model map and control the loading process
WORKING :
- Makes an associative mapping of model_keys with model e.g aa = /turf/simulated/wall{icon_state = "rock"}
- Read the map line by line, parsing the result (using parse_grid)
If measureOnly
is set, then no atoms will be created, and all this will do
is return the bounds after parsing the file
If you need to freeze init while you're working, you can use the spacial allocator's "add_dirt" and "remove_dirt" which will put initializations on hold until you say the word. This is important for loading large maps such as the cyberiad, where atmos will attempt to start before it's ready, causing runtimes galore if init is allowed to romp unchecked.
parse_grid
Fill a given tile with its area/turf/objects/mobs Variable model is one full map line (e.g /turf/simulated/wall{icon_state = "rock"},/area/mine/dangerous/explored)
WORKING :
-
Read the model string, member by member (delimiter is ',')
-
Get the path of the atom and store it into a list
-
a) Check if the member has variables (text within '{' and '}')
-
b) Construct an associative list with found variables, if any (the atom index in members is the same as its variables in members_attributes)
-
Instanciates the atom with its variables
parse_value
Tries to parse the given value_text. Will fallback on the value_text as a string if it fails