/tg/ Station 13 - Modules - TypesVar Details - Proc Details

mapping

Vars

adding_new_zlevelTrue when in the process of adding a new Z-level, global locking
biomesAll possible biomes in assoc list as type || instance
critical_planesList of plane masters that are of critical priority
current_mapThe current map config the server loaded at round start.
gravity_by_z_levelshows the default gravity value for each z level. recalculated when gravity generators change. List in the form: list(z level num = max generator gravity in that z level OR the gravity level trait)
lists_to_reserveList of lists of turfs to reserve
loaded_lazy_templateslist of lazy templates that have been loaded
max_plane_offsetThe largest plane offset we've generated so far
multiz_levelslist of all z level indices that form multiz connections and whether theyre linked up or down. list of lists, inner lists are of the form: list("up or down link direction" = TRUE)
plane_offset_blacklistList of planes that do not allow for offsetting
plane_offset_to_trueAssoc list of string plane values to their true, non offset representation
plane_to_offsetAssoc list of string plane to the plane's offset value
render_offset_blacklistList of render targets that do not allow for offsetting
themed_ruinsList of ruins, separated by their theme
true_to_offset_planesAssoc list of true string plane values to a list of all potential offset planess
z_level_to_lowest_plane_offsetList of z level (as number) -> The lowest plane offset in that z stack
z_level_to_plane_offsetList of z level (as number) -> plane offset of that z level Used to maintain the plane cube
z_level_to_stackList of z level (as number) -> list of all z levels vertically connected to ours Useful for fast grouping lookups and such
z_listlist of all z level datums in the order of their z (z level 1 is at index 1, etc.)
z_trait_levelslist of traits and their associated z leves

Procs

add_new_zlevelGenerates a real, honest to god new z level. Will create the actual space, and also generate a datum that holds info about the new plot of land Accepts the name, traits list, datum type, and if we should manage the turfs we create
add_reservation_zlevelAdds a new reservation z level. A bit of space that can be handed out on request Of note, reservations default to transit turfs, to make their most common use, shuttles, faster
generate_offset_listsTakes an offset to generate misc lists to, and a base to start from Use this to react globally to maintain parity with plane offsets
generate_station_area_listGenerates the global station area list, filling it with typepaths of unique areas found on the station Z.
get_connected_levelsTakes a turf or a z level, and returns a list of all the z levels that are connected to it
get_levelReturns the /datum/space_level associated with the given z level.
get_station_centerPrefer not to use this one too often
initialize_biomesInitialize all biomes, assoc as type || instance
initialize_reserved_levelSets up a z level as reserved This is not for wiping reserved levels, use wipe_reservations() for that. If this is called after SSatom init, it will call Initialize on all turfs on the passed z, as its name promises
is_planetaryReturns true if the map we're playing on is on a planet
level_has_all_traitsCheck if levels[z] has all of the specified traits
level_has_any_traitCheck if levels[z] has any of the specified traits
level_traitLook up levels[z].traits[trait]
levels_by_all_traitsGet a list of all z which have all of the specified traits
levels_by_any_traitGet a list of all z which have any of the specified traits
levels_by_traitGet a list of all z which have the specified trait
load_all_away_missionsFor debug purposes, will add every single away mission present in a given directory. You can optionally pass in a string directory to load from instead of the default.
manage_z_levelTakes a z level datum, and tells the mapping subsystem to manage it Also handles things like plane offset generation, and other things that happen on a z level to z level basis
request_turf_block_reservationRequests a /datum/turf_reservation based on the given width, height, and z_size. You can specify a z_reservation to use a specific z level, or leave it null to use any z level.
reserve_turfsSchedules a group of turfs to be handed back to the reservation system's control If await is true, will sleep until the turfs are finished work
run_map_terrain_generationGenerate the turfs of the area
run_map_terrain_populationPopulate the turfs of the area
setup_riversSets up rivers, and things that behave like rivers. So lava/plasma rivers, and chasms It is important that this happens AFTER generating mineral walls and such, since we rely on them for river logic
setup_ruins##setup_ruins
validate_z_level_loadingLightweight proc that just checks to make sure that all of the expected z-levels were loaded. Split out for clarity from load_all_away_missions() Argument "checkable_levels" is just a list of the names (typically the filepaths) of the z-levels we were expected to load, which should correspond to the name on the space level datum.

Var Details

adding_new_zlevel

True when in the process of adding a new Z-level, global locking

biomes

All possible biomes in assoc list as type || instance

critical_planes

List of plane masters that are of critical priority

current_map

The current map config the server loaded at round start.

gravity_by_z_level

shows the default gravity value for each z level. recalculated when gravity generators change. List in the form: list(z level num = max generator gravity in that z level OR the gravity level trait)

lists_to_reserve

List of lists of turfs to reserve

loaded_lazy_templates

list of lazy templates that have been loaded

max_plane_offset

The largest plane offset we've generated so far

multiz_levels

list of all z level indices that form multiz connections and whether theyre linked up or down. list of lists, inner lists are of the form: list("up or down link direction" = TRUE)

plane_offset_blacklist

List of planes that do not allow for offsetting

plane_offset_to_true

Assoc list of string plane values to their true, non offset representation

plane_to_offset

Assoc list of string plane to the plane's offset value

render_offset_blacklist

List of render targets that do not allow for offsetting

themed_ruins

List of ruins, separated by their theme

true_to_offset_planes

Assoc list of true string plane values to a list of all potential offset planess

z_level_to_lowest_plane_offset

List of z level (as number) -> The lowest plane offset in that z stack

z_level_to_plane_offset

List of z level (as number) -> plane offset of that z level Used to maintain the plane cube

z_level_to_stack

List of z level (as number) -> list of all z levels vertically connected to ours Useful for fast grouping lookups and such

z_list

list of all z level datums in the order of their z (z level 1 is at index 1, etc.)

z_trait_levels

list of traits and their associated z leves

Proc Details

add_new_zlevel

Generates a real, honest to god new z level. Will create the actual space, and also generate a datum that holds info about the new plot of land Accepts the name, traits list, datum type, and if we should manage the turfs we create

add_reservation_zlevel

Adds a new reservation z level. A bit of space that can be handed out on request Of note, reservations default to transit turfs, to make their most common use, shuttles, faster

generate_offset_lists

Takes an offset to generate misc lists to, and a base to start from Use this to react globally to maintain parity with plane offsets

generate_station_area_list

Generates the global station area list, filling it with typepaths of unique areas found on the station Z.

get_connected_levels

Takes a turf or a z level, and returns a list of all the z levels that are connected to it

get_level

Returns the /datum/space_level associated with the given z level.

get_station_center

Prefer not to use this one too often

initialize_biomes

Initialize all biomes, assoc as type || instance

initialize_reserved_level

Sets up a z level as reserved This is not for wiping reserved levels, use wipe_reservations() for that. If this is called after SSatom init, it will call Initialize on all turfs on the passed z, as its name promises

is_planetary

Returns true if the map we're playing on is on a planet

level_has_all_traits

Check if levels[z] has all of the specified traits

level_has_any_trait

Check if levels[z] has any of the specified traits

level_trait

Look up levels[z].traits[trait]

levels_by_all_traits

Get a list of all z which have all of the specified traits

levels_by_any_trait

Get a list of all z which have any of the specified traits

levels_by_trait

Get a list of all z which have the specified trait

load_all_away_missions

For debug purposes, will add every single away mission present in a given directory. You can optionally pass in a string directory to load from instead of the default.

manage_z_level

Takes a z level datum, and tells the mapping subsystem to manage it Also handles things like plane offset generation, and other things that happen on a z level to z level basis

request_turf_block_reservation

Requests a /datum/turf_reservation based on the given width, height, and z_size. You can specify a z_reservation to use a specific z level, or leave it null to use any z level.

reserve_turfs

Schedules a group of turfs to be handed back to the reservation system's control If await is true, will sleep until the turfs are finished work

run_map_terrain_generation

Generate the turfs of the area

run_map_terrain_population

Populate the turfs of the area

setup_rivers

Sets up rivers, and things that behave like rivers. So lava/plasma rivers, and chasms It is important that this happens AFTER generating mineral walls and such, since we rely on them for river logic

setup_ruins

##setup_ruins

Sets up all of the ruins to be spawned

validate_z_level_loading

Lightweight proc that just checks to make sure that all of the expected z-levels were loaded. Split out for clarity from load_all_away_missions() Argument "checkable_levels" is just a list of the names (typically the filepaths) of the z-levels we were expected to load, which should correspond to the name on the space level datum.