/(global) 
Vars | |
COMPOST_WORM_EAT_AMOUNT | The number of worms influences the rate at which contents are decomposed into compost. |
---|---|
Failsafe | Failsafe |
Master | StonedMC |
SMES_WIRE_FAILSAFES | Cut to disable failsafes, mend to reenable |
SMES_WIRE_GROUNDING | Cut to quickly discharge causing sparks, pulse to only create few sparks |
SMES_WIRE_INPUT | Input wire, cut to disable input, pulse to disable for 60s |
SMES_WIRE_OUTPUT | Output wire, cut to disable output, pulse to disable for 60s |
SMES_WIRE_RCON | Remote control (AI and consoles), cut to disable |
SSdaycycle | Subsystem for updating day/night ambient lighting for sets of z-levels that share a common day/night state. |
SStimer | |
_all_global_event_listeners | This variable is used only for sanity checks during unit tests. It contains a list of all datums with global event registrations. |
_comment_mood_legend | Visual formatting for character info/comments. |
access_cent_general | Central Command |
access_hacked | Antag access |
access_security | Station access |
access_synth | Misc |
all_cables | Tracks all cable instances, so that powernets don't have to look through the entire world all the time |
alphabet | Alphabet a-z. |
alphabet_capital | Alphabet A-Z. |
apophonic_plurals | Words that have a different plural form, and their plural form |
area_blurb_stated_to | This list of names is here to make sure we don't state our descriptive blurb to a person more than once. |
english_loanwords | Used to tell how to make it a plural word and etc. |
hands_topic_state | This state checks if src_object is held in the user's hands (or a cyborg gripper), as well as the default NanoUI interaction. |
mil_branches | Datums for military branches and ranks |
numbers | Numbers 0-9. |
plural_endings_in_ves | Plurals endings in -ves |
plural_endings_with_doubled_letter | Plurals endings in -sses or -zzes |
plural_siblants | Siblants that should end with es |
plural_vocalized_y | Vocalized y sounds that needs to end in -ies when made plural |
plural_words_unchanged | Words that stay the same in plural |
string_slot_flags | Strings which correspond to slot flags, useful for outputting what slot something is. |
syndicate_code_phrase | Code phrase for traitors. |
syndicate_code_response | Code response for traitors. |
underwear | Category Collection Setup |
vowels | Vowels. |
Procs | |
CreateBans | DEBUG |
ReloadThemeCss | Force the light and dark theme css files to be reloaded. Mainly usefule for devs. |
_addtimer | Create a new timer and insert it in the queue. You should not call this directly, and should instead use the addtimer macro, which includes source information. |
all_hearers | Hear Helpers |
all_viewers | View Helpers |
clients_in_range | Range Helpers |
color_matrix_add | Returns a matrix addition of A with B |
color_matrix_contrast | Changes distance colors have from rgb(127,127,127) grey |
color_matrix_identity | Returns the matrix identity |
color_matrix_lightness | Adds/subtracts overall lightness |
color_matrix_multiply | Returns a matrix multiplication of A with B |
color_matrix_rotate_hue | Moves all colors angle degrees around the color wheel while maintaining intensity of the color and not affecting greys |
color_matrix_rotate_x | Rotates around the red axis |
color_matrix_rotate_y | Rotates around the green axis |
color_matrix_rotate_z | Rotates around the blue axis |
color_matrix_saturation | Changes distance hues have from grey while maintaining the overall lightness. Greys are unaffected. |
color_to_full_rgba_matrix | Converts RGB shorthands into RGBA matrices complete of constants rows (ergo a 20 keys list in byond). |
copy_extension | Copy the extension instance on the 'source' and put it on the 'destination'. |
create_area_image | Generate_image function generates image of specified range and location: |
deltimer | Delete a timer |
gaussian | Converts a uniform distributed random number into a normal distributed one since this method produces two random numbers, one is saved for subsequent calls (making the cost negligble for every second call). |
get_default_outfit_backpack | Helpers |
get_mobs_in_analog_radio_ranges | Returns a list of mobs who can hear any of the radios given in @radios Assume all the radios in the list are eligible; we just care about mobs |
get_ordinal_string | Returns a number string with its ordinal suffix th, st, nd, rd |
get_random_uplink_items | Support procs |
get_states_in_icon | get_states_in_icon_cached but it does a copy, so the return value can be mutated. |
get_states_in_icon_cached | A proc for getting an associative list of icon states in an icon. Uses the same cache as check_state_in_icon. Does not copy, MUST NOT BE MUTATED. |
get_surrounding_pressure_differential | Gets the highest and lowest pressures from the tiles in cardinal directions around us, then checks the difference. |
get_transition_edge_corner_turfs | Returns all the turfs from all 4 corners of the transition border of a level. |
get_transition_edge_turfs | Returns all the turfs within a zlevel's transition edge, on a given direction. If include corners is true, the corners of the map will be included. |
get_turf_transition_edge_direction | Returns the a cardinal direction for a turf on the map that's beyond the transition edge |
get_wound_type | WOUND DEFINITIONS |
handle_paper_stack_shared_topics | Handles topic interactions shared by folders and clipboard. |
is_dense_assoc | Is this a dense (all keys have non-null values) associative list with at least one entry? |
is_special_character | ADMIN HELPER PROCS |
listDeepClone | Deep copy/clone everything in the list, or reference things that cannot be cloned. Use with caution. atom_refs_only: If true, the proc will only reference /atom subtypes, and will not clone them. |
number_to_3digits | Given a number, returns a representation fit for a 3-digit display. |
onclose | Registers the on-close verb for a browse window (client/verb/.windowclose) this will be called when the close-button of a window is pressed. |
pass | A do nothing proc used to prevent empty block warnings In hot code (like atmos checks), use EMPTY_BLOCK_GUARD instead. |
play_dtmf_key_sound | Plays a DTMF tone (Telephone key press sound) for any valid telephone key. |
populate_branches | Populate the global branches list from global.using_map |
qdel | Should be treated as a replacement for the 'del' keyword. Datums passed to this will be given a chance to clean up references to allow the GC to collect them. Non-datums passed to this will be hard-deleted. |
send_fax_to_admin | Helper for sending a fax from a fax machine to an admin destination. |
set_scent_by_reagents | Reagents have the following vars, which coorelate to the vars on the standard scent extension: scent, scent_intensity, scent_descriptor, scent_range To add a scent extension to an atom using a reagent's info, where reagent. is the reagent, use set_scent_by_reagents(). |
shared_mimic_edge_get_add_vis_contents | Shared proc to provide the default vis_content for the edge_turf. |
shared_transition_edge_bumped | Handles teleporting an atom that touches a transition edge/loop edge. |
shared_transition_edge_get_coordinates_turf_to_mimic | Returns the turf that's opposite to the specified turf, on the level specified. |
shared_transition_edge_get_valid_level_data | Grab the connected level data for the level connected in the direction the 'T' turf is in. |
stoplag | returns the number of ticks slept |
text_ends_with | Returns true if the text ends with the given sequence of characters. |
text_ends_with_any_of | Returns true if the text ends with ANY of the given sequences of characters. |
text_make_plural | Properly changes the given word (or the last word of the string) into a plural word. Applies a bunch of exceptions from the english language. |
text_starts_with | Returns true if the text starts with the given sequence of characters. |
timeleft | Get the remaining deciseconds on a timer |
Var Details
COMPOST_WORM_EAT_AMOUNT 
The number of worms influences the rate at which contents are decomposed into compost.
Failsafe 
Failsafe
Pretty much pokes the MC to make sure it's still alive.
Master 
StonedMC
Designed to properly split up a given tick among subsystems Note: if you read parts of this code and think "why is it doing it that way" Odds are, there is a reason
SMES_WIRE_FAILSAFES 
Cut to disable failsafes, mend to reenable
SMES_WIRE_GROUNDING 
Cut to quickly discharge causing sparks, pulse to only create few sparks
SMES_WIRE_INPUT 
Input wire, cut to disable input, pulse to disable for 60s
SMES_WIRE_OUTPUT 
Output wire, cut to disable output, pulse to disable for 60s
SMES_WIRE_RCON 
Remote control (AI and consoles), cut to disable
SSdaycycle 
Subsystem for updating day/night ambient lighting for sets of z-levels that share a common day/night state.
SStimer 
Timer Subsystem
Handles creation, callbacks, and destruction of timed events.
It is important to understand the buckets used in the timer subsystem are just a series of doubly-linked lists. The object at a given index in bucket_list is a /datum/timedevent, the head of a list, which has prev and next references for the respective elements in that bucket's list.
_all_global_event_listeners 
This variable is used only for sanity checks during unit tests. It contains a list of all datums with global event registrations.
_comment_mood_legend 
Visual formatting for character info/comments.
access_cent_general 
Central Command
access_hacked 
Antag access
access_security 
Station access
access_synth 
Misc
all_cables 
Tracks all cable instances, so that powernets don't have to look through the entire world all the time
alphabet 
Alphabet a-z.
alphabet_capital 
Alphabet A-Z.
apophonic_plurals 
Words that have a different plural form, and their plural form
area_blurb_stated_to 
This list of names is here to make sure we don't state our descriptive blurb to a person more than once.
english_loanwords 
Used to tell how to make it a plural word and etc.
hands_topic_state 
This state checks if src_object is held in the user's hands (or a cyborg gripper), as well as the default NanoUI interaction.
mil_branches 
Datums for military branches and ranks
Map datums can optionally specify a list of /datum/mil_branch paths. These paths are used to initialize the global mil_branches object, which contains a list of branch objects the map uses. Each branch definition specifies a list of /datum/mil_rank paths, which are ranks available to that branch.
Which branches and ranks can be selected for spawning is specifed in global.using_map and each branch datum definition, respectively.
numbers 
Numbers 0-9.
plural_endings_in_ves 
Plurals endings in -ves
plural_endings_with_doubled_letter 
Plurals endings in -sses or -zzes
plural_siblants 
Siblants that should end with es
plural_vocalized_y 
Vocalized y sounds that needs to end in -ies when made plural
plural_words_unchanged 
Words that stay the same in plural
string_slot_flags 
Strings which correspond to slot flags, useful for outputting what slot something is.
syndicate_code_phrase 
Code phrase for traitors.
syndicate_code_response 
Code response for traitors.
underwear 
Category Collection Setup
vowels 
Vowels.
Proc Details
CreateBans
DEBUG
ReloadThemeCss
Force the light and dark theme css files to be reloaded. Mainly usefule for devs.
_addtimer
Create a new timer and insert it in the queue. You should not call this directly, and should instead use the addtimer macro, which includes source information.
Arguments:
- callback the callback to call on timer finish
- wait deciseconds to run the timer for
- flags flags for this timer, see: code__DEFINES\subsystems.dm
all_hearers
Hear Helpers
all_viewers
View Helpers
clients_in_range
Range Helpers
color_matrix_add
Returns a matrix addition of A with B
color_matrix_contrast
Changes distance colors have from rgb(127,127,127) grey
- 1 is identity. 0 makes everything grey >1 blows out colors and greys
color_matrix_identity
Returns the matrix identity
- 1 0 0 0
- 0 1 0 0
- 0 0 1 0
- 0 0 0 0
color_matrix_lightness
Adds/subtracts overall lightness
- 0 is identity, 1 makes everything white, -1 makes everything black
color_matrix_multiply
Returns a matrix multiplication of A with B
color_matrix_rotate_hue
Moves all colors angle degrees around the color wheel while maintaining intensity of the color and not affecting greys
- 0 is identity, 120 moves reds to greens, 240 moves reds to blues
color_matrix_rotate_x
Rotates around the red axis
color_matrix_rotate_y
Rotates around the green axis
color_matrix_rotate_z
Rotates around the blue axis
color_matrix_saturation
Changes distance hues have from grey while maintaining the overall lightness. Greys are unaffected.
- 1 is identity, 0 is greyscale, >1 oversaturates colors
color_to_full_rgba_matrix
Converts RGB shorthands into RGBA matrices complete of constants rows (ergo a 20 keys list in byond).
copy_extension
Copy the extension instance on the 'source' and put it on the 'destination'.
create_area_image
Generate_image function generates image of specified range and location:
- arguments
target_x
,target_y
,target_z
are target coordinates (requred). range
defines render distance to opposite corner (requred).- lighting determines lighting capturing (optional), suppress_errors suppreses errors and continues to capture (optional).
checker
is a person from which side will be perfored capture check, should be/mob/living
target_ype.
deltimer
Delete a timer
Arguments:
- id a timerid or a /datum/timedevent
gaussian
Converts a uniform distributed random number into a normal distributed one since this method produces two random numbers, one is saved for subsequent calls (making the cost negligble for every second call).
- This will return +/- decimals, situated about mean with standard deviation stddev
- 68% chance that the number is within 1stddev
- 95% chance that the number is within 2stddev
- 98% chance that the number is within 3stddev...etc
get_default_outfit_backpack
Helpers
get_mobs_in_analog_radio_ranges
Returns a list of mobs who can hear any of the radios given in @radios Assume all the radios in the list are eligible; we just care about mobs
get_ordinal_string
Returns a number string with its ordinal suffix th, st, nd, rd
get_random_uplink_items
Support procs
get_states_in_icon
get_states_in_icon_cached but it does a copy, so the return value can be mutated.
get_states_in_icon_cached
A proc for getting an associative list of icon states in an icon. Uses the same cache as check_state_in_icon. Does not copy, MUST NOT BE MUTATED.
get_surrounding_pressure_differential
Gets the highest and lowest pressures from the tiles in cardinal directions around us, then checks the difference.
get_transition_edge_corner_turfs
Returns all the turfs from all 4 corners of the transition border of a level.
get_transition_edge_turfs
Returns all the turfs within a zlevel's transition edge, on a given direction. If include corners is true, the corners of the map will be included.
get_turf_transition_edge_direction
Returns the a cardinal direction for a turf on the map that's beyond the transition edge
get_wound_type
WOUND DEFINITIONS
handle_paper_stack_shared_topics
Handles topic interactions shared by folders and clipboard.
is_dense_assoc
Is this a dense (all keys have non-null values) associative list with at least one entry?
is_special_character
ADMIN HELPER PROCS
listDeepClone
Deep copy/clone everything in the list, or reference things that cannot be cloned. Use with caution. atom_refs_only: If true, the proc will only reference /atom subtypes, and will not clone them.
number_to_3digits
Given a number, returns a representation fit for a 3-digit display.
Assumes that besides the digits themselves, display provides
decimal point on the highest digit, plus (for overflow) and minus signs.
Returns lists indexed by (power of ten)+1, that is, with [1] showing ones,
[2] tens, [3] hundreds.
Valid values are -99
to 99<M>
, with ++<M>
and ---
for over and underflow,
where
onclose
Registers the on-close verb for a browse window (client/verb/.windowclose) this will be called when the close-button of a window is pressed.
This is usually only needed for devices that regularly update the browse window, e.g. canisters, timers, etc.
windowid should be the specified window name e.g. code is : show_browser(user, text, "window=fred") then use : onclose(user, "fred")
Optionally, specify the "ref" parameter as the controlled atom (usually src) to pass a "close=1" parameter to the atom's Topic() proc for special handling. Otherwise, the user mob's machine var will be reset directly.
pass
A do nothing proc used to prevent empty block warnings In hot code (like atmos checks), use EMPTY_BLOCK_GUARD instead.
play_dtmf_key_sound
Plays a DTMF tone (Telephone key press sound) for any valid telephone key.
source
: The atom that's producing the sound.key
: The character of the key pressed.user
: The mob actually pressing the key.user_only
: Whether the sound should be only heard by the user mob. (Sent to the user's client only)- Returns FALSE if the key is invalid, TRUE if the key was valid and we played a sound.
populate_branches
Populate the global branches list from global.using_map
qdel
Should be treated as a replacement for the 'del' keyword. Datums passed to this will be given a chance to clean up references to allow the GC to collect them. Non-datums passed to this will be hard-deleted.
send_fax_to_admin
Helper for sending a fax from a fax machine to an admin destination.
set_scent_by_reagents
Reagents have the following vars, which coorelate to the vars on the standard scent extension: scent, scent_intensity, scent_descriptor, scent_range To add a scent extension to an atom using a reagent's info, where reagent. is the reagent, use set_scent_by_reagents().
shared_mimic_edge_get_add_vis_contents
Shared proc to provide the default vis_content for the edge_turf.
shared_transition_edge_bumped
Handles teleporting an atom that touches a transition edge/loop edge.
shared_transition_edge_get_coordinates_turf_to_mimic
Returns the turf that's opposite to the specified turf, on the level specified.
shared_transition_edge_get_valid_level_data
Grab the connected level data for the level connected in the direction the 'T' turf is in.
stoplag
returns the number of ticks slept
text_ends_with
Returns true if the text ends with the given sequence of characters.
text_ends_with_any_of
Returns true if the text ends with ANY of the given sequences of characters.
text_make_plural
Properly changes the given word (or the last word of the string) into a plural word. Applies a bunch of exceptions from the english language.
text_starts_with
Returns true if the text starts with the given sequence of characters.
timeleft
Get the remaining deciseconds on a timer
Arguments:
- id a timerid or a /datum/timedevent