(global)

Vars | |
NT | HoS/NTSO-whitelisted players |
---|---|
RARITY_COLOR | Global static list of rarity color associations |
Z4_ACTIVE | Centcom / Earth Stuff Contents: Areas: Main Area Outside Offices Lobby Lounge Garden Power Supply |
action_names | Used to translate internal action names to human-readable names. |
action_verbs | Used for literal input of actions |
admins | Admins ( ["ckey"] = "rank" ) Populated by proc call in world.New() |
all_valid_random_right_arms | Number of tiles where it should try to make a splatter |
antagonists | An associative list of all antagonist IDs, associated with a list of all antagonist datums of that ID. |
area_list_is_up_to_date | The station_areas list is up to date. If something changes an area, make sure to set this to 0 |
area_parallax_render_source_groups | An associative list of parallax render source group types and the corresponding instance of that type. |
biomes | All possible biomes in assoc list as type || instance |
by_cat | contains lists of objects indexed by a category string based on START_TRACKING_CAT / STOP_TRACKING_CAT |
by_type | contains lists of objects indexed by their type based on [START_TRACKING] / [STOP_TRACKING] |
cached_colors | paint cans |
chessboard | |
compid_file | The file holding computer ID information |
do_compid_analysis | Should we be analysing the comp IDs of new clients? |
dont_init_space | When toggled on creating new /turf/space will be faster but they will be slightly broken used when creating new z-levels |
ehjax | EHJAX - Like ajax but for |
fishing_spots | initialised on world/New(), associative list with the format (fishing_atom_type = /datum/fishing_spot) |
flock_signal_unleashed | Has a flock relay been unleashed yet this round |
flocks | associative list of flock names to their flock |
flockstats_global | Global list to handle multiple flocks existing |
input_window_presets | Presets for standard windows |
ircbot | Procs for handling ircbot connectivity and data transfer |
is_blank_string_regex | Returns true if given string is just space characters The explicitly defined entries are various blank unicode characters that don't get included as white space by \s |
key_names | Used to translate bitflags of hotkeys into human-readable names |
keybind_styles | This file is intended to hold all data pertaining to keybind_style datums and related functionality |
light_update_queue | List of items that want to be deleted |
logs | Loooooooooogs |
mapNames | id corresponds to the name of the /obj/landmark/map playerPickable defines whether the map can be chosen by players when voting on a new map. |
material_category_names | Material category names as displayed in fabricators see match_material_pattern() for exact definitions |
mentors | Mentors |
named_color_cache | global cache of all named colors once fetched with a color rgba |
named_colors | global list of all named colors |
oven_recipes | COOKING RECODE |
parallax_enabled | Whether parallax has been enabled or disabled globally. |
phrase_log | This system keeps a logged list of player-created phrases of various categories. The lists are cross-round. Useful for stuff like hallucinations etc. If the number of phrases in a category exceeds src.max_length random phrases get thrown out to reduce the size when saving. Currently logged categories: say - people talking whisper - people whispering pda - pda messages deadsay - ghosts talking ailaw - custom AI laws record - custom radio station record names emote - custom emotes prayer - prayers name-X - player chosen name for X where X is from the set {blob, ai, cyborg, clown, mime, wizard, ...} vehicle - vehicle names (via a bottle of Champagne) sing - people singing pill - custom pill name bottle - custom obttle name voice-mimic - voices used by the changeling mimic voice ability voice-radiostation - voices used by the radio station voice synthesizer telepathy - messages sent through the telepathy genetics ability bot-X - custom bot name, X is from the set {camera, fire, guard, med, sec} (I bet you didn't even know you could rename bots with a pen, huh) name-bee - custom bee / bee larva name name-critter - custom critter name (you can rename those with a pen too, whoa) seed - custom botany seed name paper - stuff people write on papers crayon-queue - crayon queue mode inputs |
planetZLevel | The following is based on GenerateMining.dm |
planet_parallax_render_source_groups | An list of parallax render source group instances that are used within procedurally generated planets. |
portable_machinery | Remote parent |
reagent_shorthands | List of 2 letter shorthands for the reagent, currently only used by the cybernetic hypospray |
roles_to_prefs | Associative list of role defines and their respective client preferences. |
sb_tricks | Types of sounds: AMBIENCE_LOOPING, AMBIENCE_FX_1, and AMBIENCE_FX_2 Holds the associated sound channel we want Determines if we are repeating or not Should the sound set the wait var? pool of precached sounds |
sortInstance | This is a global instance to allow much of this code to be reused. The interfaces are kept separately |
special_admin_observing_verbs | proc/possess, client/proc/generate_poster, client/proc/addpathogens, client/proc/debug_check_possible_reactions, client/proc/dbg_itemspecial, client/proc/dbg_objectprop, |
station_areas | All the accessible areas on the station in one convenient place |
statusGroupLimits | Simple global list of groupname : amount, that tells the system how many effects of a group we can have active at most. See exclusiveGroup. Buffs above the max will not be applied. |
switched_objs | Contains objects in ID-based switched object groups, such as blinds and their switches |
tgui_admin_state | tgui state: admin_state |
tgui_always_state | tgui state: always_state |
tgui_broken_state | tgui state: broken |
tgui_conscious_state | tgui state: conscious_state |
tgui_contained_state | tgui state: contained_state |
tgui_deep_inventory_state | tgui state: deep_inventory_state |
tgui_default_state | tgui state: default_state |
tgui_hands_state | tgui state: hands_state |
tgui_human_adjacent_state | tgui state: human_adjacent_state |
tgui_inventory_state | tgui state: inventory_state |
tgui_not_incapacitated_state | tgui state: not_incapacitated_state |
tgui_not_incapacitated_turf_state | tgui state: not_incapacitated_turf_state |
tgui_notcontained_state | tgui state: notcontained_state |
tgui_observer_state | tgui state: observer_state |
tgui_physical_obscured_state | tgui state: physical_obscured_state |
tgui_physical_state | tgui state: physical_state |
tgui_process | tgui process |
tgui_self_state | tgui state: self_state |
tgui_z_state | tgui state: z_state |
the_automaton | cogwerks spooky automaton thing that kinda just sits there being weird and ominous |
transception_array | Station's transception anrray, used for cargo I/O operations on maps that include one |
triggerVars | This contains the names of the trigger lists on materials. Required for copying materials. Remember to keep this updated if you add new triggers. |
valid_icon_states | Icon states that exist for a given icon ref. Format is valid_icon_states[icon] = list(). Populated by is_valid_icon_state(), used for caching. |
waterflow_enabled | Fluid Object |
whitelistCkeys | Players whomst'd've get allowed if whitelist-only is enabled |
worldgenCandidates | Largely used for handling auto turfs that update their appearance to "connect" to nearby walls Turfs add themselves to this in their New() |
z_level_parallax_render_source_groups | An associative list of each z-level define and its corresponding parallax layer render source group. See code\map\map_settings.dm for the default parallax render sources for each z-level. |
zlevels | List containing all z-level datums indexed by their z coordinate |
Procs | |
ClearBadsmokeRefs | SMOKE SYSTEMS |
FindPromotionCandidates | COMMAND PROMOTIONS |
GetRandomPerimeterTurf | Returns a turf at the edge of a squared circle of specified radius around a thing |
HYPpassplantgenes | This proc generates the name of a produce item |
HeapPathWeightCompare | TODO: Macro this to reduce proc overhead |
IsGuestKey | Returns true if the given key is a guest key |
addTime | Add time to a given BYOND time format |
add_color | adds a named color to the global list given name and RGB color |
affine_color_mapping_matrix | The same thing as [proc/color_mapping_matrix] but with 4 mapped colors. The first color is used as the origin in the affine transform. |
angle2text | Returns the given degree converted to a text string in the form of a direction |
angle_inbetween | Checks if an angle is between two other angles |
angle_to_dir | Transforms a given angle to a cardinal/ordinal direction |
angle_to_vector | Transforms a given angle to vec2 in a list |
applyCableMaterials | Yes hello apparently we need a proc for this because theres a million types of different wires and cables. |
ass_explosion_limb_success | First try to sever their butt If that didn't work, try severing a limb or tail Dont want your tail removed? Keep all your limbs intact! Returns 0 if it cant be severed like this, 1 if it always gets severed, or 2 if it sometimes gets severed |
ass_explosion_message | Returns if the limb is not ass-severable, and a message to the owner about why not returns some flufftext as to why their limb didnt come off. Or came off anyway. |
attack_particle | obj/attackby(var/obj/item/I, mob/user) |
attenuate_for_location | returns 0 to 1 based on air pressure in turf |
bash_explode | BASH explode: Splits a string into string pieces the same way BASH handles this. |
binobj_to_generator | Particle sets contain a "_binobj" variable, which exposes some of its properties, as the /particles/ "datum" is otherwise just a wrapper wih nothing relevant in it. This proc extracts data from a given _binobj value and creates a generator with the same properties. |
blank_or_es | 'they smash' vs 'he smashes' |
blank_or_s | 'they run' vs 'he runs' |
blend_skintone | Blends given rgb values with old human mob skin color (#ffca95) to return a new rgb value |
borkborkbork_parse | !!! !!! |
build_manufacturer_icons | Pre-build the icons for things manufacturers make |
build_syndi_buylist_cache | Builds the entire syndicate buylist cache, retrieved by uplinks. Ideally only executed once during the pre-round |
calculateHeatTransferCoefficient | Returns the thermal conductivity between two materials, based on thermal and electrical conductivity mat property. Thermal conductivity ranges from 0 (perfect insulator) to infinity. Excellent conductors like copper are about 100 |
can_act | Returns true if not incapicitated and unhandcuffed (by default) |
change_ghost_invisibility | Changes ghost invisibility for the round. |
checkTurfPassable | Returns false if there is a dense atom on the turf, unless a custom hueristic is passed. |
check_whitelist | Removes non-whitelisted reagents from the reagents of TA |
ckey_to_mob | A universal ckey -> mob reference lookup proc, adapted from whois() (Convair880). |
ckey_to_mob_maybe_disconnected | Given a ckey finds a mob with that ckey even if they are not in the game. |
cloud_put_bulk | |
color_mapping_matrix | Takes two lists, inp=list(i1, i2, i3), out=(o1, o2, o3). Creates a color matrix which maps color i1 to o2, i2 to o2, i3 to o3. (Ignores alpha values.) Keep the i1, i2, i3 vectors linearly independent. The colors can be either be color hex strings or lists as returned from hex_to_rgb_list. You need to supply all arguments. If you don't care about the third just set i3 = o3 to something linearly independent of i1 and i2. |
concrete_typesof | [/proc/typesof()] but only for concrete (not abstract) types, it caches the result so you don't need to worry about doing that manually so subsequent calls on the same type will be very fast. |
connect_camera_neighbours | The direction we're trying to fill The reciprocal of this direction |
connectdirs_to_byonddirs | converts get_connected_directions_bitflag() diagonal bits to byond direction flags |
copy_overlays | Copies the overlay data from one atom to another |
create_named_colors | called at world startup populates the color list |
csound | Soundcache NEVER use these sounds for modifying. This should only be used for sounds that are played unaltered to the user. @param text name the name of the sound that will be returned @return sound |
dead_player_list | Returns a list of eligible dead players to be respawned as an antagonist or whatever (Convair880). Text messages: 1: alert | 2: alert (chatbox) | 3: alert acknowledged (chatbox) | 4: no longer eligible (chatbox) | 5: waited too long (chatbox) for_antag indicates that we are polling for an antag role and so should exclude antag-banned players |
dir_to_angle | Transforms a cardinal/ordinal direction to an angle |
display_slipup_image | Spawns an image above a patient when you slip up. Only the surgeon sees it. |
doAssetParse | CDN PROCS FOR LIVE SERVERS |
do_hud_offset_thing | adjusts a screen_loc to account for non-32px-width sprites, so they get centered in a HUD slot |
do_slipup | You messed up. Cause damage and spawn some indicators. |
eligible_dead_player_list | Returns a list of eligible dead players that COULD choose to respawn or whatever |
english_list | Returns a list in plain english as a string |
faction_check | Returns TRUE if ourguy is enemies with otherguy FALSE otherwise |
filename_from_path | Gets the filaname from a filesystem path. Optionally strips extension too |
filter_is_character_setup_ringtone | type filter for ringtones that're suposed to be selectable at roundstart |
filtered_concrete_typesof | The same thing but now you can filter the types using a proc. Also cached. The filter proc takes a type and should return 1 if we want to include it and 0 otherwise. That proc should also be pure (always return the same thing for the same arguments) because of the caching. If you want to use non-pure proc do the filtering manually yourself and don't use this. Note that the first call to filtered_concrete_typesof with a given type and filter will be (possibly a lot) slower than doing it manually. The benefit of this proc only shows itself for future calls which are very fast due to caching. |
find_all_by_type | Finds all instance of a type in the world.
Returns a list of the instances if no procedure is given.
Otherwise, calls the procedure for each instance and returns an assoc list of the form list(instance = procedure(instance, arguments...), ...)
procedure_src is the src for the proc call. If it is null, a global proc is called.
If it is the string "instance" the output list will be instead list(instance = instance.procedure(arguments...), ...) |
find_first_by_type | Finds some instance of a type in the world. Returns null if none found. |
find_ghost_by_key | find a ghost mob (or a ghost respawned as critter in vr/afterlife bar) |
find_player | returns a reference to a player datum based on the ckey you put into it |
fireflash | generic proc for creating flashes of hotspot fire falloff is in units of degrees per tile |
fireflash_melting | generic proc for hotspot fire flashes that also melt turf |
fixed_random | pseudorandom number based on x, y in range 0 to 1 |
flatten_list | Flattens a keyed list into a list of it's contents |
flock_speak | how to speak in the flock for speaker, pass: -null to give a general system message -mob to make a mob speak -flock_structure for a structure message involuntary overrides the sentient styling for messages generated by the possessed flock critter |
formatTimeText | Returns time input as mm:ss |
formattedShiftTime | Returns shift time as a string in hh:mm format. Call with TRUE to get time in hh:mm:ss format. |
fromIso8601 | Convert ISO 8601 to BYOND time format |
gas_text_color | Enables debug overlay which counts process_cell() calls per turf (viewable through info-overlays)
Enables debug overlay which counts all atmos operations per turf (viewable through info-overlays)
Puts a list of turfs which get processed a lot into global.hotly_processed_turf for debugging
Returns the color of a given gas ID. |
generate_access_name_lookup | Build the access_name_lookup table, to associate descriptions of accesses with their numerical value. |
getClientFromCkey | Finds a client by ckey, throws exception if not found |
getFlatIcon | Creates a single icon from a given /atom or /image. Only the first argument is required. |
getFusedMaterial | Merges two materials and returns result as new material. |
getFusedTriggers | Fuses two material trigger lists. |
getIconSize | Handles the two states icon_size can be in: basic number, or string in WxH format |
getInterpolatedName | Merges two material names into one. |
getItemIcon | Generates item icons for manufacturers and other things, used in UI dialogs. Sends to client if needed. |
getLineMatrix | Returns the line matrix from a start atom to an end atom, used in creating line objects |
getMatFailString | Returns a string for when a material fail or breaks depending on its material flags. |
getMatFlagString | Translates a material flag into a string. |
getMaterial | Returns one of the base materials by id. |
getOreQualityName | *** MISC *** |
getQualityName | Simply returns a string for a given quality. Used as prefix for objects. |
getRole | Returns a string based on the current job and antag role of the mob e.g. "Staff Assistant [Traitor]" |
getTimeInSecondsSinceTime | Returns the time in seconds since a given timestamp |
get_adjacent_floor | Returns the turf facing the fab for cardinal directions (which should also be the user's turf), but for diagonals it returns a neighbouring turf depending on where you click Just in case you're attacking a corner diagonally. (made initially for lamp manufacturers, probably behaves funky above range 1) |
get_alive_antags_percentage | returns a decimal representing the percentage of alive crew that are also antags |
get_all_accesses | / Heads of staff / Security / Medical / Science Engineering / Civilian Other or gimmick |
get_all_antagonists | Gets a list of all antagonist datums of ID role_id, or of all IDs if no ID is specified. Returns a list of all antagonist datums. If no antagonist datums could be found, returns an empty list. |
get_all_character_setup_ringtones | sets up the list of ringtones players can select through character setup |
get_all_gangs | Returns a list of all gang datums. |
get_all_mobs_in | Returns list of all mobs within an atom. Not cheap! (unlike ur mum) |
get_angle | Returns the angle between two given atoms |
get_assets | Returns either the already-created asset or creates a new one and returns it |
get_average_color | Takes an icon and optionally two non-zero Pixel Intervals and returns the average color of the icon. |
get_dead_crew_percentage | returns a decimal representing the percentage of dead crew (non-observers) to all crew |
get_default_flock | Gimmick flock with infinite compute that lone structures and units automatically connect to |
get_hud_style | Returns hud style preferences of given client/mob |
get_id_card | checks an item for an id card |
get_image_group | Returns the client image group for a given "key" argument. If one doesn't yet exist, creates it. |
get_manifest | Returns the crew manifest, but sorted according to the individual's rank. include_cryo includes a list of individuals in cryogenic storage
Set synd_int_request_device to the object calling the proc to get Syndicate Intelligence. |
get_map_prefabs | Gets all prefabs of a given type. |
get_matches_string | ADMIN HELPER PROCS |
get_nearest_color | returns the name of the color nearest to the given color RGB |
get_nearest_color_datum | returns the named_color datum that is nearest to the given color RGB |
get_one_match | get_one_match attempts to find a type match for a given object.
The function allows customization of the base type, whether to use concrete types,
whether to use only admin spawnable, the comparison procedure, and the sort limit.
The function sorts the matches if a comparison procedure is provided and if the sort limit condition allows it,
then it presents a list of matches for the user to choose from. |
get_ouija_word_list | get_ouija_word_list |
get_parallax_render_source_group | Returns a reference to the parallax render source group datum belonging to either an area or z-level. |
get_path_to | This is the proc you use whenever you want to have pathfinding more complex than "try stepping towards the thing". |
get_preference_for_role | Return the name of a preference variable for the given role define. |
get_random_subtype | Returns a random subtype when an atom has TYPEINFO with a random_subtypes list |
get_singleton | Gets the instance of a singleton type (or a non-singleton type if you decide to use it on one). |
get_standard_skintone | Given user, will proompt user to select skin color from list (or custom) and returns skin tone after blending |
get_type_typeinfo | Retrieves the typeinfo datum for a given type. |
get_uplink_type | Returns a path of a (presumably) valid uplink dependent on the user's mind. |
get_weakref | Gets a weak reference to the given datum. This is a basically a reference that will not prevent garbage collection of the datum. Useful when you don't want to "own" the datum in question. For example a mob holding a reference to its trinket. In that case it doesn't make sense to prevent garbage collection of the trinket. If the trinket gets destroyed in-game we are fine if this weak reference to the trinket turns to null. |
gradientText | Returns span with a color gradient between two given colors of given message |
handleTriggerGenerations | Increases generations on material triggers and handles removal if over the generation cap. |
hasParentMaterial | Searches the parent materials of the given material, up to a given generation, for an id. |
has_or_have | 'they have' vs 'he has' |
he_or_she_dont_or_doesnt | "he doesn't" vs "they don't" |
hes_or_shes | "they're outside" vs "he's outside" |
hex2color_name | Given hex color, returns string name of nearest named color |
his_or_her | 'their cookie' vs 'her cookie' |
hsv_transform_color_matrix | Generates a color matrix which performs an approximation of the HSV-space transform. Hue is in degrees and is applied additively. Saturation is in a 0-1 range and is applied multiplicatively. Value is in a 0-1 range and is applied multiplicatively. |
identify_object | For runtime logs- returns the above plus ref |
illiterateGarbleText | Returns given text replaced entirely by nonsense chars |
in_cone_of_vision | This proc checks if one atom is in the cone of vision of another one. |
in_interact_range | For interacting with stuff. |
initialise_fishing_spots | run on world/New(), clears global.fishing_spots (if it exists) and fills it with the format (fishing_atom_type = /datum/fishing_spot) |
initialize_biomes | Initialize all biomes, assoc as type || instance |
isLeapYear | returns true if the year is divisible by 4, except for years that are divisible by 100. However, years that are divisible by 400 are also leap years. |
isUpper | Returns true if the char you feed it is uppercase. |
isVowel | Returns true if the given string has a vowel |
is_hex | Returns true if given value is a hex value |
is_incapacitated | Returns true if the given mob is incapacitated |
is_music_playing | Approximate check of whether music is playing or not (radio / ad tapes / admin music all count as music here) If music is playing this should return TRUE. But if music stopped playing only recently-ish it can sometimes return TRUE still. In some rare cases it can happen that this has a false negative too so like don't rely on this for anything super important, ok? |
is_or_are | 'they are' vs 'he is' |
isadmin | Returns true if given mob/client/mind is an admin |
istypes | istype but for checking a list of types |
jobban_isbanned | Can be provided with a mob, a raw cache list, or a ckey. Prefer providing a cache if you can't use a mob, as that reduces API load. |
jpsTurfPassable | this is a slight modification of /proc/checkTurfPassable to avoid indirect proc call overhead Returns false if there is a dense atom on the turf, unless a custom hueristic is passed. |
load_config_list | Gets a list of ckeys from a file, ignoring comments/blank lines This could probably be refactored to config files in general, but |
log_object | For logs- returns the thing's name and type. Handles nulls and non-datums fine, might do something weird for savefiles, clients, etc |
log_respawn_event | Logs a player respawning as something from a respawn event, noting if they joined the round as an observer or not Note: should be called BEFORE they are transferred to the new body |
log_tgui | Appends a tgui-related log entry. All arguments are optional. |
make_associative | Make a normal list an associative one |
make_fake_explosion | obj/item/tank/plasma = 2 |
make_player | returns a reference to a player datum, but it tries to make a new one if it cant an already existing one (this is how it persists between connections) |
man_or_woman | 'this man' vs 'this person' |
matchesMaterialRecipe | Checks if a material matches a recipe and returns the recipe if a match is found. returns null if nothing matches it. |
maximal_subtype | Returns the maximal subtype (i.e. the most subby) in a list of given types |
md5_to_more_pronouncable | Takes a hash generated by md5() and turns it into a string of alternating consonants and vowels |
move_element | Move a single element from position from_index within a list, to position to_index |
move_range | Move elements [from_index,from_index+len) to [to_index-len, to_index) |
mult_color_matrix | Takes two 20-length lists, turns them into 5x4 matrices, multiplies them together, and returns a 20-length list |
newline_html_decode | Returns a string with all HTML special characters decoded and replaced with newlines |
newline_html_encode | Returns a string with all HTML special characters encoded and newlines replaced with |
normalize_color_to_matrix | Takes a possible value of the color var and returns a length 20 color matrix doing the same thing.
Available inputs:
null, "#rgb", "#rrggbb", "#rgba", "#rrggbbaa", all forms of color matrices |
normalize_plain_data_list | Recursively normalizes a list of plain_data and primitive values. Plain_data values are converted to lists, recursively. |
o_clock_time | Returns the current timeofday in o'clock format |
pick_map_prefab | Picks a random prefab from given prefab type. Filters the prefabs picked based on the given tags. Choice is performed by a weighted random choice based on the prefab's probability. Prefabs marked as required are always picked first. |
pick_ref | Gives the target mob a reference picker ability and returns the atom picked. Synchronous. |
placeAllPrefabs | |
placeAllRandomRooms | Similar to the prefab runtime checker. The following text is mostly plagiarised from PrefabRuntimeChecker.dm |
playsound_global | Plays a sound to some clients without caring about its source location and stuff.
target can be either a list of clients or a list of mobs or world or an area or a z-level number. |
predecessor_path_in_list | Find predecessor of a type |
prioritize_dead_players | Returns a randomized list of minds with players who joined as observer at the back |
purge_fluid_blacklist | Deletes any reagents that are banned in fluid puddles. |
purge_smoke_blacklist | Deletes any reagents that are banned in smoke clouds. |
qdel | qdel |
radioGarbleText | Returns given text replaced by nonsense chars, excepting HTML tags, on a 40% or given % basis |
random_emoji | Generates a random Unicode emoji that will look ok in the chat |
random_hex | Returns random hex value of length given |
random_nonrestrictedz_turf | Returns a random turf on a non-restricted z-level. |
random_space_turf | Tries to return a random space turf. Tries a given number of times and if it fails it returns null instead. |
random_split | Returns amount evenly distributed random integers that sum to sum |
rc_buildentry | Small helper proc to simplify basic contract entry creation. Accepts the path to the entry datum, and the count (in whatever unit it uses) to require. |
recursive_flist | Lists all files recursively in a given dir, refer to builtin flist() for details |
resource | GENERIC HELPERS FOR BOTH SYSTEMS |
reverse_list_range | Reverses a given list within the given range |
round_start_data | FOR EXPORTING DATA TO A SERVER |
rustg_get_version | Gets the version of rust_g |
rustg_redis_disconnect_rq | Disconnects from a previously connected redis server |
rustg_unix_timestamp | Returns the timestamp as a string |
s_es | Returns the plural based on a number provided. |
sanitize_frequency | Returns f, ensured that it's a valid frequency |
save_flock_stats | In a sensible language, this would be a static class proc. Alas this is DM. This proc saves all the stats for all flocks in this round, and rotates the log so only the last FLOCK_ROUNDS_SAVED flock rounds are stored |
seen_by_camera | Return true if mob is on a turf with camera coverage |
sendItemIcons | Sends all of the item icons to a client. Kinda gross, but whatever. |
sendItemIconsToAll | Sends all item icons to all clients. Used at world startup to preload things. |
send_assets | Sends the list of asset files to client if they're needed |
separate_radio_prefix_and_message | Given a message, returns a list containing the radio prefix and the message, so that the message can be manipulated seperately in various functions. |
setup_z_level_parallax_render_sources | Initialises z_level_parallax_render_source_groups by populating it with z-level parallax render source groups. |
should_diary_log | Check config for whether a message should be logged to the diary |
showLine | Creates and shows a line object. Line object has an "affected" var that contains the cross tiles. |
showadminlist | Shows the calling client admins.txt |
singularity_containment_check | Checks if there is a containment field in each direction from the center turf. If not returns null. If yes returns the distance to the closest field. |
smilify | !!! !!! |
sonic_attack_environmental_effect | Given center turf/atom, range, and list of things to smash, will damage said objects within range of center. Used for sonic grenades and similar. Avoiding C&P Code. |
sortList | sortList - To sort lists via TimSort (in place) |
sortListCopy | Just like /proc/sortList, but return a sorted copy of the given list |
soviet_parse | !!! !!! !!! !!! |
statlog_ticket | FOR LOGGING TO STATS FILE |
stripTextMacros | Removes the special data inserted via use of \improper etc in strings |
strip_prefix | Removes a given prefix from a string. |
subtractTime | Subtract time from a given BYOND time format |
swap_range | Move elements from [from_index, from_index+len) to [to_index, to_index+len) |
text2num_safe | Parses a number except for NaNs and infinities |
tgui_Topic | Middleware for /client/Topic. |
tgui_alert | Creates a TGUI alert window and returns the user's response. |
tgui_color_picker | @file @copyright 2023 @author itsmeow (https://github.com/itsmeow) @license MIT |
tgui_color_picker_async | Creates an asynchronous TGUI color picker window with an associated callback. |
tgui_input_list | Creates a TGUI input list window and returns the user's response. |
tgui_input_list_async | Creates an asynchronous TGUI input list window with an associated callback. |
tgui_input_number | Creates a TGUI window with a number input. Returns the user's response as num | null. |
tgui_input_number_async | Creates an asynchronous TGUI number input window with an associated callback. |
tgui_input_text | Creates a TGUI window with a text input. Returns the user's response. |
tgui_input_text_async | Creates an asynchronous TGUI text input window with an associated callback. |
tidy_net_data | Cleans up data passed in from network packets for display so it doesn't mess with formatting |
time_to_text | Returns the passed decisecond-format time in the form of a text string |
toIso8601 | Convert BYOND time format to ISO 8601 |
total_density | Returns the sum of densities of all atoms in the given turf including the turf itself |
type2parent | Returns the parent type of a given type. Assumes that parent_type was not overriden. |
typecache_filter_list | Rurns a new list with only atoms that are in the typecache list |
typecache_filter_list_reverse | Return a new list with atoms that are not in the typecache list |
typecache_filter_multi_list_exclusion | Similar to typecache_filter_list and typecache_filter_list_reverse but it supports an inclusion list and and exclusion list |
typecacheof | Like typesof() or subtypesof(), but returns a typecache instead of a list. |
ucfirst | Uppercases first letter |
ucfirsts | Uppercases first letter of every word |
ui_describe_reagents | Returns a serialized representation of the reagents of an atom for use with the ReagentInfo TGUI components Note that this is not a built in TGUI proc |
uwutalk | uwutalk |
ve_or_s | "they've had" vs "he's had" |
vector_magnitude | Returns the vector magnitude of an x value and a y value |
vector_to_dir | Transforms a supplied vector x & y to a direction |
weighted_pick | Picks a random element from a list based on a weighting system. |
whodead | Finds whoever's dead. |
whois | Looks up a player based on a string. Searches a shit load of things |
Var Details
NT

HoS/NTSO-whitelisted players
RARITY_COLOR

Global static list of rarity color associations
Z4_ACTIVE

Centcom / Earth Stuff Contents: Areas: Main Area Outside Offices Lobby Lounge Garden Power Supply
Turfs: Outside Concrete & Grass
action_names

Used to translate internal action names to human-readable names.
action_verbs

Used for literal input of actions
admins

Admins ( ["ckey"] = "rank" ) Populated by proc call in world.New()
all_valid_random_right_arms

Number of tiles where it should try to make a splatter
antagonists

An associative list of all antagonist IDs, associated with a list of all antagonist datums of that ID.
area_list_is_up_to_date

The station_areas list is up to date. If something changes an area, make sure to set this to 0
area_parallax_render_source_groups

An associative list of parallax render source group types and the corresponding instance of that type.
biomes

All possible biomes in assoc list as type || instance
by_cat

contains lists of objects indexed by a category string based on START_TRACKING_CAT / STOP_TRACKING_CAT
by_type

contains lists of objects indexed by their type based on [START_TRACKING] / [STOP_TRACKING]
cached_colors

paint cans
chessboard

|\ |\ |\ |\ ___ \ |\ __\ |\ |\ _ \ _ |\ __ |\ |_ \ ___ \ |\ __ \ |\ ____\ |\ \ / __ |_ \
\ \ _|\ \ \\ \ \ /|\ \ _|\ \ _|\ \ \_\ \ \ \ |\ \ \ _|| \ _\ \ /|\ \ |\ \ \ \ _|\ \ _||/|\ ||\ /
\ \ \ \ \ __ \ \ _|/\ __ \ _____ \ \ \|__| \ \ \ __ \ _____ \ \ \ \ \ \ _|/\ \ _ \ \ ___ \ _____ |/ \ \ \ |\ \
\ \ _\ \ \ \ \ \ _|\ ||\ \||\ \ \ \ \ \ \ \ \ \ ||\ \ \ \ \ \ \ _|\ \ \ \ | __||\ \||\ \ \ \ \ _\ \
\ ___\ _\ _\ _____\ \ ___\ \ _\ \ _\ _\ ___\ \ \ _\ \ _\ _\ |___\ \ _\ \ \ _|_\
|____||||||_______|_\_|| ||||||_\ || |_||||||_\\ ||||
||| || ||___|
|\ _|\ __ |\ __ |\ \ / /|\ __ |\ |\ |\ |\ |_ _\ / ___ |\ __ |\ __ |\ ____\ |\ \ |\ |\ __ |\ __ |\ ____\
\ \ _|\ \ |\ \ \ |\ \ \ / / | \ |\ \ \ \ \ _|\ \ \\ | \ _| /__/|_/ /\ \ |\ \ \ |\ \ \ _| \ \ \ \ \ \ \ |\ \ \ |\ \ \ _|
\ \ \ \ \ \\ \ \ \ \ / / \ \ _ \ \ \ \ \ \ \ __ \ \ \ \ ||// / /\ \ \\ \ \ \\ \ \ _ \ \ \ \ \ \ \ __ \ \ _ \ \ \
\ \ _\ \ \\ \ \ _|/ / / \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ ___ / /_/__\ \ \\ \ \ \\ \ \ ___ \ \ \ |__\ \ \ \ \ \ \ \ \ \ _
\ _\ _\ _\ __/ / / \ _\ \ _\ ______\ _\ _\ \ _\\\ _\ _\ _\\ _________\ _\ _\ _\ \ ______
|||||||_/ / |||||__||_______||||| |||||||||||||__________||||||||||____|
||/
compid_file

The file holding computer ID information
do_compid_analysis

Should we be analysing the comp IDs of new clients?
dont_init_space

When toggled on creating new /turf/space will be faster but they will be slightly broken used when creating new z-levels
ehjax

EHJAX - Like ajax but for byond
A framework for browser popups to interact with the byond server, async (client-side)
fishing_spots

initialised on world/New(), associative list with the format (fishing_atom_type = /datum/fishing_spot)
flock_signal_unleashed

Has a flock relay been unleashed yet this round
flocks

associative list of flock names to their flock
flockstats_global

Global list to handle multiple flocks existing
input_window_presets

Presets for standard windows
ircbot

Procs for handling ircbot connectivity and data transfer
is_blank_string_regex

Returns true if given string is just space characters The explicitly defined entries are various blank unicode characters that don't get included as white space by \s
key_names

Used to translate bitflags of hotkeys into human-readable names
keybind_styles

This file is intended to hold all data pertaining to keybind_style datums and related functionality
To add a new keybind: Add it in the right keybind_style below. Then, you need to update action_names to allow the menu to translate into human-readable format. Depending on what you're adding, you might need to update action_verbs as well. Global list holding all of the keybind style datums
light_update_queue

List of items that want to be deleted
logs

Loooooooooogs
mapNames

id corresponds to the name of the /obj/landmark/map playerPickable defines whether the map can be chosen by players when voting on a new map.
material_category_names

Material category names as displayed in fabricators see match_material_pattern() for exact definitions
mentors

Mentors
named_color_cache

global cache of all named colors once fetched with a color rgba
named_colors

global list of all named colors
oven_recipes

COOKING RECODE
parallax_enabled

Whether parallax has been enabled or disabled globally.
phrase_log

This system keeps a logged list of player-created phrases of various categories. The lists are cross-round. Useful for stuff like hallucinations etc. If the number of phrases in a category exceeds src.max_length random phrases get thrown out to reduce the size when saving. Currently logged categories: say - people talking whisper - people whispering pda - pda messages deadsay - ghosts talking ailaw - custom AI laws record - custom radio station record names emote - custom emotes prayer - prayers name-X - player chosen name for X where X is from the set {blob, ai, cyborg, clown, mime, wizard, ...} vehicle - vehicle names (via a bottle of Champagne) sing - people singing pill - custom pill name bottle - custom obttle name voice-mimic - voices used by the changeling mimic voice ability voice-radiostation - voices used by the radio station voice synthesizer telepathy - messages sent through the telepathy genetics ability bot-X - custom bot name, X is from the set {camera, fire, guard, med, sec} (I bet you didn't even know you could rename bots with a pen, huh) name-bee - custom bee / bee larva name name-critter - custom critter name (you can rename those with a pen too, whoa) seed - custom botany seed name paper - stuff people write on papers crayon-queue - crayon queue mode inputs
planetZLevel

The following is based on GenerateMining.dm
planet_parallax_render_source_groups

An list of parallax render source group instances that are used within procedurally generated planets.
portable_machinery

Remote parent
reagent_shorthands

List of 2 letter shorthands for the reagent, currently only used by the cybernetic hypospray
roles_to_prefs

Associative list of role defines and their respective client preferences.
sb_tricks

Types of sounds: AMBIENCE_LOOPING, AMBIENCE_FX_1, and AMBIENCE_FX_2 Holds the associated sound channel we want Determines if we are repeating or not Should the sound set the wait var? pool of precached sounds
sortInstance

This is a global instance to allow much of this code to be reused. The interfaces are kept separately
special_admin_observing_verbs

proc/possess, client/proc/generate_poster, client/proc/addpathogens, client/proc/debug_check_possible_reactions, client/proc/dbg_itemspecial, client/proc/dbg_objectprop,
station_areas

All the accessible areas on the station in one convenient place
statusGroupLimits

Simple global list of groupname : amount, that tells the system how many effects of a group we can have active at most. See exclusiveGroup. Buffs above the max will not be applied.
switched_objs

Contains objects in ID-based switched object groups, such as blinds and their switches
tgui_admin_state

tgui state: admin_state
Checks that the user is an admin, end-of-story.
tgui_always_state

tgui state: always_state
Always grants the user UI_INTERACTIVE. Period.
tgui_broken_state

tgui state: broken
Only checks if an object is not broken, can depend on obj type
tgui_conscious_state

tgui state: conscious_state
Only checks if the user is conscious.
tgui_contained_state

tgui state: contained_state
Checks that the user is inside the src_object.
tgui_deep_inventory_state

tgui state: deep_inventory_state
Checks that the src_object is in the user's deep (backpack, box, toolbox, etc) inventory.
tgui_default_state

tgui state: default_state
Checks a number of things -- mostly physical distance for humans and view for robots.
tgui_hands_state

tgui state: hands_state
Checks that the src_object is in the user's hands.
tgui_human_adjacent_state

tgui state: human_adjacent_state
In addition to default checks, only allows interaction for a human adjacent user.
tgui_inventory_state

tgui state: inventory_state
Checks that the src_object is in the user's top-level (hand, ear, pocket, belt, etc) inventory.
tgui_not_incapacitated_state

tgui state: not_incapacitated_state
Checks that the user isn't incapacitated
tgui_not_incapacitated_turf_state

tgui state: not_incapacitated_turf_state
Checks that the user isn't incapacitated and that their loc is a turf
tgui_notcontained_state

tgui state: notcontained_state
Checks that the user is not inside src_object, and then makes the default checks.
tgui_observer_state

tgui state: observer_state
Checks that the user is an observer/ghost.
tgui_physical_obscured_state

tgui state: physical_obscured_state
Short-circuits the default state to only check physical distance, being in view doesn't matter
tgui_physical_state

tgui state: physical_state
Short-circuits the default state to only check physical distance.
tgui_process

tgui process
Contains a bit of the tgui process code. Copyright (c) 2020 Aleksej Komarov & ZeWaka (minor porting changes) SPDX-License-Identifier: MIT
tgui_self_state

tgui state: self_state
Only checks that the user and src_object are the same.
tgui_z_state

tgui state: z_state
Only checks that the Z-level of the user and src_object are the same.
the_automaton

cogwerks spooky automaton thing that kinda just sits there being weird and ominous
transception_array

Station's transception anrray, used for cargo I/O operations on maps that include one
triggerVars

This contains the names of the trigger lists on materials. Required for copying materials. Remember to keep this updated if you add new triggers.
valid_icon_states

Icon states that exist for a given icon ref. Format is valid_icon_states[icon] = list(). Populated by is_valid_icon_state(), used for caching.
waterflow_enabled

Fluid Object
whitelistCkeys

Players whomst'd've get allowed if whitelist-only is enabled
worldgenCandidates

Largely used for handling auto turfs that update their appearance to "connect" to nearby walls Turfs add themselves to this in their New()
z_level_parallax_render_source_groups

An associative list of each z-level define and its corresponding parallax layer render source group. See code\map\map_settings.dm
for the default parallax render sources for each z-level.
zlevels

List containing all z-level datums indexed by their z coordinate
Proc Details
ClearBadsmokeRefs
SMOKE SYSTEMS
FindPromotionCandidates
COMMAND PROMOTIONS
GetRandomPerimeterTurf
Returns a turf at the edge of a squared circle of specified radius around a thing
HYPpassplantgenes
This proc generates the name of a produce item
HeapPathWeightCompare
TODO: Macro this to reduce proc overhead
IsGuestKey
Returns true if the given key is a guest key
addTime
Add time to a given BYOND time format
add_color
adds a named color to the global list given name and RGB color
affine_color_mapping_matrix
The same thing as [proc/color_mapping_matrix] but with 4 mapped colors. The first color is used as the origin in the affine transform.
angle2text
Returns the given degree converted to a text string in the form of a direction
angle_inbetween
Checks if an angle is between two other angles
angle_to_dir
Transforms a given angle to a cardinal/ordinal direction
angle_to_vector
Transforms a given angle to vec2 in a list
applyCableMaterials
Yes hello apparently we need a proc for this because theres a million types of different wires and cables.
ass_explosion_limb_success
First try to sever their butt If that didn't work, try severing a limb or tail Dont want your tail removed? Keep all your limbs intact! Returns 0 if it cant be severed like this, 1 if it always gets severed, or 2 if it sometimes gets severed
ass_explosion_message
Returns if the limb is not ass-severable, and a message to the owner about why not returns some flufftext as to why their limb didnt come off. Or came off anyway.
attack_particle
obj/attackby(var/obj/item/I, mob/user)
attenuate_for_location
returns 0 to 1 based on air pressure in turf
bash_explode
BASH explode: Splits a string into string pieces the same way BASH handles this.
- Process quoted strings LTR: Apostrophized strings are unparsed. Quoted strings are parsed.
- Insert parsed strings back into the string by using a placeholder for spaces.
- Split the string with the usual space separation method.
- Return list.
binobj_to_generator
Particle sets contain a "_binobj" variable, which exposes some of its properties, as the /particles/ "datum" is otherwise just a wrapper wih nothing relevant in it. This proc extracts data from a given _binobj value and creates a generator with the same properties.
blank_or_es
'they smash' vs 'he smashes'
blank_or_s
'they run' vs 'he runs'
blend_skintone
Blends given rgb values with old human mob skin color (#ffca95) to return a new rgb value
borkborkbork_parse
!!! !!!
build_manufacturer_icons
Pre-build the icons for things manufacturers make
build_syndi_buylist_cache
Builds the entire syndicate buylist cache, retrieved by uplinks. Ideally only executed once during the pre-round
calculateHeatTransferCoefficient
Returns the thermal conductivity between two materials, based on thermal and electrical conductivity mat property. Thermal conductivity ranges from 0 (perfect insulator) to infinity. Excellent conductors like copper are about 100
can_act
Returns true if not incapicitated and unhandcuffed (by default)
change_ghost_invisibility
Changes ghost invisibility for the round.
checkTurfPassable
Returns false if there is a dense atom on the turf, unless a custom hueristic is passed.
check_whitelist
Removes non-whitelisted reagents from the reagents of TA
-
user: the mob that adds a reagent to an atom that has a reagent whitelist
-
TA: Target Atom. The thing that the user is adding the reagent to
ckey_to_mob
A universal ckey -> mob reference lookup proc, adapted from whois() (Convair880).
ckey_to_mob_maybe_disconnected
Given a ckey finds a mob with that ckey even if they are not in the game.
cloud_put_bulk
- Bulk cloud save for saving many key value pairs and/or many ckeys in a single api call
- example input (formatted for readability)
- command add adds a number onto the current value (record must exist in the cloud to update or it won't do anything)
- command replace overwrites the existing record
- {
-
"some_ckey":{
-
"persistent_bank":{
-
"command":"add",
-
"value":42069
-
},
-
"persistent_bank_item":{
-
"command":"replace",
-
"value":"none"
-
}
-
},
-
"some_other_ckey":{
-
"persistent_bank":{
-
"command":"add",
-
"value":1337
-
},
-
"persistent_bank_item":{
-
"command":"replace",
-
"value":"rubber_ducky"
-
}
-
}
- }
color_mapping_matrix
Takes two lists, inp=list(i1, i2, i3), out=(o1, o2, o3). Creates a color matrix which maps color i1 to o2, i2 to o2, i3 to o3. (Ignores alpha values.) Keep the i1, i2, i3 vectors linearly independent. The colors can be either be color hex strings or lists as returned from hex_to_rgb_list. You need to supply all arguments. If you don't care about the third just set i3 = o3 to something linearly independent of i1 and i2.
concrete_typesof
[/proc/typesof()] but only for concrete (not abstract) types, it caches the result so you don't need to worry about doing that manually so subsequent calls on the same type will be very fast.
just don't modify the result of the call directly
OKAY: var/list/hats = concrete_typesof(/obj/item/clothing/head) - /obj/item/clothing/head/hosberet
ALSO OKAY:
var/list/hats = concrete_typesof(/obj/item/clothing/head).Copy()
hats -= /obj/item/clothing/head/hosberet
NOT OKAY:
var/list/hats = concrete_typesof(/obj/item/clothing/head)
hats -= /obj/item/clothing/head/hosberet
connect_camera_neighbours
The direction we're trying to fill The reciprocal of this direction
connectdirs_to_byonddirs
converts get_connected_directions_bitflag()
diagonal bits to byond direction flags
copy_overlays
Copies the overlay data from one atom to another
create_named_colors
called at world startup populates the color list
csound
Soundcache NEVER use these sounds for modifying. This should only be used for sounds that are played unaltered to the user. @param text name the name of the sound that will be returned @return sound
dead_player_list
Returns a list of eligible dead players to be respawned as an antagonist or whatever (Convair880). Text messages: 1: alert | 2: alert (chatbox) | 3: alert acknowledged (chatbox) | 4: no longer eligible (chatbox) | 5: waited too long (chatbox) for_antag indicates that we are polling for an antag role and so should exclude antag-banned players
dir_to_angle
Transforms a cardinal/ordinal direction to an angle
display_slipup_image
Spawns an image above a patient when you slip up. Only the surgeon sees it.
doAssetParse
CDN PROCS FOR LIVE SERVERS
PROCS FOR LOCAL SERVER FALLBACK
do_hud_offset_thing
adjusts a screen_loc to account for non-32px-width sprites, so they get centered in a HUD slot
do_slipup
You messed up. Cause damage and spawn some indicators.
eligible_dead_player_list
Returns a list of eligible dead players that COULD choose to respawn or whatever
english_list
Returns a list in plain english as a string
faction_check
Returns TRUE if ourguy is enemies with otherguy FALSE otherwise
filename_from_path
Gets the filaname from a filesystem path. Optionally strips extension too
filter_is_character_setup_ringtone
type filter for ringtones that're suposed to be selectable at roundstart
filtered_concrete_typesof
The same thing but now you can filter the types using a proc. Also cached. The filter proc takes a type and should return 1 if we want to include it and 0 otherwise. That proc should also be pure (always return the same thing for the same arguments) because of the caching. If you want to use non-pure proc do the filtering manually yourself and don't use this. Note that the first call to filtered_concrete_typesof with a given type and filter will be (possibly a lot) slower than doing it manually. The benefit of this proc only shows itself for future calls which are very fast due to caching.
Example:
proc/filter_is_syndicate(type)
var/obj/fake_instance = type
return initial(fake_instance.is_syndicate)
var/syndie_thing_type = pick(filtered_concrete_typesof(/obj/item, /proc/filter_is_syndicate))
find_all_by_type
Finds all instance of a type in the world.
Returns a list of the instances if no procedure is given.
Otherwise, calls the procedure for each instance and returns an assoc list of the form list(instance = procedure(instance, arguments...), ...)
procedure_src
is the src for the proc call. If it is null, a global proc is called.
If it is the string "instance" the output list will be instead list(instance = instance.procedure(arguments...), ...)
find_first_by_type
Finds some instance of a type in the world. Returns null if none found.
find_ghost_by_key
find a ghost mob (or a ghost respawned as critter in vr/afterlife bar)
find_player
returns a reference to a player datum based on the ckey you put into it
fireflash
generic proc for creating flashes of hotspot fire falloff is in units of degrees per tile
fireflash_melting
generic proc for hotspot fire flashes that also melt turf
fixed_random
pseudorandom number based on x, y in range 0 to 1
flatten_list
Flattens a keyed list into a list of it's contents
flock_speak
how to speak in the flock for speaker, pass: -null to give a general system message -mob to make a mob speak -flock_structure for a structure message involuntary overrides the sentient styling for messages generated by the possessed flock critter
formatTimeText
Returns time input as mm:ss
formattedShiftTime
Returns shift time as a string in hh:mm format. Call with TRUE to get time in hh:mm:ss format.
fromIso8601
Convert ISO 8601 to BYOND time format
gas_text_color
Enables debug overlay which counts process_cell() calls per turf (viewable through info-overlays)
Enables debug overlay which counts all atmos operations per turf (viewable through info-overlays)
Puts a list of turfs which get processed a lot into global.hotly_processed_turf
for debugging
Returns the color of a given gas ID.
This is used only in the gas mixer computer as of now.
generate_access_name_lookup
Build the access_name_lookup table, to associate descriptions of accesses with their numerical value.
getClientFromCkey
Finds a client by ckey, throws exception if not found
getFlatIcon
Creates a single icon from a given /atom or /image. Only the first argument is required.
getFusedMaterial
Merges two materials and returns result as new material.
getFusedTriggers
Fuses two material trigger lists.
getIconSize
Handles the two states icon_size can be in: basic number, or string in WxH format
getInterpolatedName
Merges two material names into one.
getItemIcon
Generates item icons for manufacturers and other things, used in UI dialogs. Sends to client if needed.
getLineMatrix
Returns the line matrix from a start atom to an end atom, used in creating line objects
getMatFailString
Returns a string for when a material fail or breaks depending on its material flags.
getMatFlagString
Translates a material flag into a string.
getMaterial
Returns one of the base materials by id.
getOreQualityName
*** MISC ***
getQualityName
Simply returns a string for a given quality. Used as prefix for objects.
getRole
Returns a string based on the current job and antag role of the mob e.g. "Staff Assistant [Traitor]"
getTimeInSecondsSinceTime
Returns the time in seconds since a given timestamp
get_adjacent_floor
Returns the turf facing the fab for cardinal directions (which should also be the user's turf), but for diagonals it returns a neighbouring turf depending on where you click Just in case you're attacking a corner diagonally. (made initially for lamp manufacturers, probably behaves funky above range 1)
get_alive_antags_percentage
returns a decimal representing the percentage of alive crew that are also antags
get_all_accesses
/ Heads of staff / Security / Medical / Science Engineering / Civilian Other or gimmick
get_all_antagonists
Gets a list of all antagonist datums of ID role_id, or of all IDs if no ID is specified. Returns a list of all antagonist datums. If no antagonist datums could be found, returns an empty list.
get_all_character_setup_ringtones
sets up the list of ringtones players can select through character setup
get_all_gangs
Returns a list of all gang datums.
get_all_mobs_in
Returns list of all mobs within an atom. Not cheap! (unlike ur mum)
get_angle
Returns the angle between two given atoms
get_assets
Returns either the already-created asset or creates a new one and returns it
get_average_color
Takes an icon and optionally two non-zero Pixel Intervals and returns the average color of the icon.
The pixel intervals represent the distance between each pixel scanned on the X/Y axes respectively, and default to 4 for performance. For example, an X interval of 1 and a Y interval of 3 will mean every X coordinate of every 3rd Y coordinate will be scanned.
get_dead_crew_percentage
returns a decimal representing the percentage of dead crew (non-observers) to all crew
get_default_flock
Gimmick flock with infinite compute that lone structures and units automatically connect to
get_hud_style
Returns hud style preferences of given client/mob
get_id_card
checks an item for an id card
get_image_group
Returns the client image group for a given "key" argument. If one doesn't yet exist, creates it.
get_manifest
Returns the crew manifest, but sorted according to the individual's rank. include_cryo includes a list of individuals in cryogenic storage
Set synd_int_request_device
to the object calling the proc to get Syndicate Intelligence.
get_map_prefabs
Gets all prefabs of a given type.
get_matches_string
ADMIN HELPER PROCS
get_nearest_color
returns the name of the color nearest to the given color RGB
get_nearest_color_datum
returns the named_color datum that is nearest to the given color RGB
get_one_match
get_one_match
attempts to find a type match for a given object.
The function allows customization of the base type, whether to use concrete types,
whether to use only admin spawnable, the comparison procedure, and the sort limit.
The function sorts the matches if a comparison procedure is provided and if the sort limit condition allows it,
then it presents a list of matches for the user to choose from.
@param object This is the object for which the function is attempting to find a match.
@param base This is the base type used for matching. All results will be of this type tree.
@param use_concrete_types determines whether the function should respect concrete types for matching.
@param only_admin_spawnable This boolean value determines whether the function should only consider objects that are spawnable by an admin.
@param cmp_proc This is the comparison proc used for sorting matches. This should be a proc that takes two arguments
and returns a boolean. The default value is null
, indicating no comparison procedure is used.
If cmp_proc
is provided and the number of matches is within the sort_limit
, the matches will be sorted using cmp_proc
.
@param sort_limit This parameter defines the upper limit for the number of items to consider during the matching process.
If the number of matches exceeds sort_limit
, they will not be sorted even if cmp_proc
is provided.
If sort_limit
is 0
or null
, there will be no limit and matches will be sorted if cmp_proc
is provided.
@return Returns the path of the selected match if one is chosen. If no matches are found, null
is returned. If the operation is cancelled, FALSE
is returned.
get_ouija_word_list
get_ouija_word_list
get_parallax_render_source_group
Returns a reference to the parallax render source group datum belonging to either an area or z-level.
get_path_to
This is the proc you use whenever you want to have pathfinding more complex than "try stepping towards the thing".
Arguments:
- caller: The movable atom that's trying to find the path
- ends: What we're trying to path to. It doesn't matter if this is a turf or some other atom, we're gonna just path to the turf it's on anyway
- max_distance: The maximum number of steps we can take in a given path to search (default: 30, 0 = infinite)
- mintargetdistance: Minimum distance to the target before path returns, could be used to get near a target, but not right to it - for an AI mob with a gun, for example.
- id: An ID card representing what access we have and what doors we can open. Its location relative to the pathing atom is irrelevant
- simulated_only: Whether we consider turfs without atmos simulation (AKA do we want to ignore space)
- exclude: If we want to avoid a specific turf, like if we're a mulebot who already got blocked by some turf
- skip_first: Whether or not to delete the first item in the path. This would be done because the first item is the starting tile, which can break movement for some creatures.
- cardinal_only: Whether to find only paths consisting of cardinal steps.
- required_goals: How many goals to find to succeed. Null for all.
- do_doorcheck: Whether or not to check if doors are blocked (welded, out of power, locked, etc...)
Returns: List of turfs from the caller to the end or a list of lists of the former if multiple ends are specified. If no paths were found, returns an empty list, which is important for bots like medibots who expect an empty list rather than nothing.
get_preference_for_role
Return the name of a preference variable for the given role define.
Arguments:
- role - role to return a client preference for.
get_random_subtype
Returns a random subtype when an atom has TYPEINFO with a random_subtypes list
get_singleton
Gets the instance of a singleton type (or a non-singleton type if you decide to use it on one).
get_standard_skintone
Given user, will proompt user to select skin color from list (or custom) and returns skin tone after blending
get_type_typeinfo
Retrieves the typeinfo datum for a given type.
Example:
for(var/type in types)
var/typeinfo/atom/typeinfo = get_type_typeinfo(type)
if(!typeinfo.admin_spawnable)
continue
valid_types += type
get_uplink_type
Returns a path of a (presumably) valid uplink dependent on the user's mind.
Arguments:
- target - the mob that will own the uplink.
- uplink - the path of the uplink type that you wish to spawn
get_weakref
Gets a weak reference to the given datum. This is a basically a reference that will not prevent garbage collection of the datum. Useful when you don't want to "own" the datum in question. For example a mob holding a reference to its trinket. In that case it doesn't make sense to prevent garbage collection of the trinket. If the trinket gets destroyed in-game we are fine if this weak reference to the trinket turns to null.
You need to use [/datum/weakref/proc/deref] to get the datum from the weak reference.
gradientText
Returns span with a color gradient between two given colors of given message
handleTriggerGenerations
Increases generations on material triggers and handles removal if over the generation cap.
hasParentMaterial
Searches the parent materials of the given material, up to a given generation, for an id.
Useful if you want to figure out if a given material was used in the making of another material.
Keep in mind that this can be expensive so use it only when you have to.
has_or_have
'they have' vs 'he has'
he_or_she_dont_or_doesnt
"he doesn't" vs "they don't"
should arguably just be 'does_or_doesnt' but i figure this is by far the dominant use of that so I'm rolling them together
hes_or_shes
"they're outside" vs "he's outside"
hex2color_name
Given hex color, returns string name of nearest named color
his_or_her
'their cookie' vs 'her cookie'
hsv_transform_color_matrix
Generates a color matrix which performs an approximation of the HSV-space transform. Hue is in degrees and is applied additively. Saturation is in a 0-1 range and is applied multiplicatively. Value is in a 0-1 range and is applied multiplicatively.
identify_object
For runtime logs- returns the above plus ref
illiterateGarbleText
Returns given text replaced entirely by nonsense chars
in_cone_of_vision
This proc checks if one atom is in the cone of vision of another one.
It uses the following map grid for the check, where each point is an integer coordinate and the seer is at point X: ```
POV -> X * * *
```
A '*' represents a point that is within X's FOV
in_interact_range
For interacting with stuff.
initialise_fishing_spots
run on world/New(), clears global.fishing_spots (if it exists) and fills it with the format (fishing_atom_type = /datum/fishing_spot)
initialize_biomes
Initialize all biomes, assoc as type || instance
isLeapYear
returns true if the year is divisible by 4, except for years that are divisible by 100. However, years that are divisible by 400 are also leap years.
isUpper
Returns true if the char you feed it is uppercase.
isVowel
Returns true if the given string has a vowel
is_hex
Returns true if given value is a hex value
is_incapacitated
Returns true if the given mob is incapacitated
is_music_playing
Approximate check of whether music is playing or not (radio / ad tapes / admin music all count as music here) If music is playing this should return TRUE. But if music stopped playing only recently-ish it can sometimes return TRUE still. In some rare cases it can happen that this has a false negative too so like don't rely on this for anything super important, ok?
is_or_are
'they are' vs 'he is'
isadmin
Returns true if given mob/client/mind is an admin
istypes
istype but for checking a list of types
jobban_isbanned
Can be provided with a mob, a raw cache list, or a ckey. Prefer providing a cache if you can't use a mob, as that reduces API load.
jpsTurfPassable
this is a slight modification of /proc/checkTurfPassable to avoid indirect proc call overhead Returns false if there is a dense atom on the turf, unless a custom hueristic is passed.
load_config_list
Gets a list of ckeys from a file, ignoring comments/blank lines This could probably be refactored to config files in general, but
log_object
For logs- returns the thing's name and type. Handles nulls and non-datums fine, might do something weird for savefiles, clients, etc
log_respawn_event
Logs a player respawning as something from a respawn event, noting if they joined the round as an observer or not Note: should be called BEFORE they are transferred to the new body
log_tgui
Appends a tgui-related log entry. All arguments are optional.
make_associative
Make a normal list an associative one
make_fake_explosion
obj/item/tank/plasma = 2
make_player
returns a reference to a player datum, but it tries to make a new one if it cant an already existing one (this is how it persists between connections)
man_or_woman
'this man' vs 'this person'
matchesMaterialRecipe
Checks if a material matches a recipe and returns the recipe if a match is found. returns null if nothing matches it.
maximal_subtype
Returns the maximal subtype (i.e. the most subby) in a list of given types
md5_to_more_pronouncable
Takes a hash generated by md5() and turns it into a string of alternating consonants and vowels
move_element
Move a single element from position from_index within a list, to position to_index
All elements in the range [1,to_index) before the move will be before the pivot afterwards
All elements in the range [to_index, L.len+1) before the move will be after the pivot afterwards
In other words, it's as if the range [from_index,to_index) have been rotated using a <<< operation common to other languages.
from_index and to_index must be in the range [1,L.len+1] Preserves associations
move_range
Move elements [from_index,from_index+len) to [to_index-len, to_index)
Same as /proc/move_element but for ranges of elements
Preserves associations
mult_color_matrix
Takes two 20-length lists, turns them into 5x4 matrices, multiplies them together, and returns a 20-length list
newline_html_decode
Returns a string with all HTML special characters decoded and
replaced with newlines
newline_html_encode
Returns a string with all HTML special characters encoded and newlines replaced with
normalize_color_to_matrix
Takes a possible value of the color
var and returns a length 20 color matrix doing the same thing.
Available inputs:
null, "#rgb", "#rrggbb", "#rgba", "#rrggbbaa", all forms of color matrices
normalize_plain_data_list
Recursively normalizes a list of plain_data and primitive values. Plain_data values are converted to lists, recursively.
o_clock_time
Returns the current timeofday in o'clock format
pick_map_prefab
Picks a random prefab from given prefab type. Filters the prefabs picked based on the given tags. Choice is performed by a weighted random choice based on the prefab's probability. Prefabs marked as required are always picked first.
Prefab max count is respected. However, note that the count of a prefab is only updated in prefab's applyTo() function.
pick_ref
Gives the target mob a reference picker ability and returns the atom picked. Synchronous.
placeAllPrefabs
- The
placeAllPrefabs()
proc, as the name suggests, places all the prefabs-
on the map, at (3, 3, 1). It overwrites existing objects, mobs, and turfs
-
when doing so. This proc will only work correctly if RUNTIME_CHECKING is
-
defined, as some turfs cannot be replaced using
turf/proc/ReplaceWith()
-
and RUNTIME_CHECKING fixes this.
-
Do not use this proc on a live server.
-
If you run it locally do not move your mob into the location turfs are
-
being placed (your client will be
qdel
'd). -
This proc was designed to be used with totally blank maps, where
-
every tile is either space or trench. UNDERWATER_MAP is used in
-
/proc/filter_underwater_prefab()
to choose underwater or space -
prefabs appropriately, depending on the type of map.
-
Prefabs are found by looking for concrete types of
-
/datum/mapPrefab/mining
. To add a new prefab to be checked, simply -
create a type for it.
-
placeAllRandomRooms
Similar to the prefab runtime checker. The following text is mostly plagiarised from PrefabRuntimeChecker.dm
The proc places all random rooms on the map, at (3, 3, 1).
It overwrites existing objects, mobs, and turfs when doing so.
This proc will only work correctly if RUNTIME_CHECKING is defined,
as some turfs cannot be replaced using turf/proc/ReplaceWith()
and RUNTIME_CHECKING fixes this.
Do not use this proc on a live server.
If you run it locally do not move your mob into the location turfs are
being placed (your client will be qdel
'd).
This proc was designed to be used with totally blank maps, where every tile is either space or trench.
Prefabs are found by looking for concrete types of
/datum/mapPrefab/random_room
. To add a new prefab to be checked, simply
create a type for it.
playsound_global
Plays a sound to some clients without caring about its source location and stuff.
target
can be either a list of clients or a list of mobs or world
or an area or a z-level number.
predecessor_path_in_list
Find predecessor of a type
prioritize_dead_players
Returns a randomized list of minds with players who joined as observer at the back
purge_fluid_blacklist
Deletes any reagents that are banned in fluid puddles.
purge_smoke_blacklist
Deletes any reagents that are banned in smoke clouds.
qdel
qdel
queues a var for deletion by the delete queue processor. if used on /world, /list, /client, or /savefile, it just skips the queue.
radioGarbleText
Returns given text replaced by nonsense chars, excepting HTML tags, on a 40% or given % basis
random_emoji
Generates a random Unicode emoji that will look ok in the chat
random_hex
Returns random hex value of length given
random_nonrestrictedz_turf
Returns a random turf on a non-restricted z-level.
random_space_turf
Tries to return a random space turf. Tries a given number of times and if it fails it returns null instead.
random_split
Returns amount
evenly distributed random integers that sum to sum
rc_buildentry
Small helper proc to simplify basic contract entry creation. Accepts the path to the entry datum, and the count (in whatever unit it uses) to require.
recursive_flist
Lists all files recursively in a given dir, refer to builtin flist() for details
resource
GENERIC HELPERS FOR BOTH SYSTEMS
reverse_list_range
Reverses a given list within the given range
round_start_data
FOR EXPORTING DATA TO A SERVER
rustg_get_version
Gets the version of rust_g
rustg_redis_disconnect_rq
Disconnects from a previously connected redis server
rustg_unix_timestamp
Returns the timestamp as a string
s_es
Returns the plural based on a number provided.
@param number the number to base the judgement off of @param es set this to true if your item's plural ends in "es" @return the plural suffix based on numbers
sanitize_frequency
Returns f, ensured that it's a valid frequency
save_flock_stats
In a sensible language, this would be a static class proc. Alas this is DM. This proc saves all the stats for all flocks in this round, and rotates the log so only the last FLOCK_ROUNDS_SAVED flock rounds are stored
seen_by_camera
Return true if mob is on a turf with camera coverage
sendItemIcons
Sends all of the item icons to a client. Kinda gross, but whatever.
sendItemIconsToAll
Sends all item icons to all clients. Used at world startup to preload things.
send_assets
Sends the list of asset files to client if they're needed
separate_radio_prefix_and_message
Given a message, returns a list containing the radio prefix and the message, so that the message can be manipulated seperately in various functions.
setup_z_level_parallax_render_sources
Initialises z_level_parallax_render_source_groups
by populating it with z-level parallax render source groups.
should_diary_log
Check config for whether a message should be logged to the diary
showLine
Creates and shows a line object. Line object has an "affected" var that contains the cross tiles.
showadminlist
Shows the calling client admins.txt
singularity_containment_check
Checks if there is a containment field in each direction from the center turf. If not returns null. If yes returns the distance to the closest field.
smilify
!!! !!!
sonic_attack_environmental_effect
Given center turf/atom, range, and list of things to smash, will damage said objects within range of center. Used for sonic grenades and similar. Avoiding C&P Code.
sortList
sortList - To sort lists via TimSort (in place)
If you want to not affect the original list, see /proc/sortListCopy
Arguments:
- L - Given list to sort in place (Pass a copy if you want a copy)
- cmp - procpath to compare elements in the list
- associative - whether we are sorting list keys (0: L[i]) or associated values (1: L[L[i]])
- from/toIndex - indexes of the list you want to sort from and to
sortListCopy
Just like /proc/sortList, but return a sorted copy of the given list
soviet_parse
!!! !!! !!! !!!
statlog_ticket
FOR LOGGING TO STATS FILE
stripTextMacros
Removes the special data inserted via use of \improper etc in strings
strip_prefix
Removes a given prefix from a string.
@return The string without the prefix if the prefix was present at the start. If not, the original string is returned.
Note: Non-text inputs will be converted into a string. The procedure is case sensitive.
subtractTime
Subtract time from a given BYOND time format
swap_range
Move elements from [from_index, from_index+len) to [to_index, to_index+len)
Move any elements being overwritten by the move to the now-empty elements, preserving order
Note: if the two ranges overlap, only the destination order will be preserved fully, since some elements will be within both ranges
text2num_safe
Parses a number except for NaNs and infinities
tgui_Topic
Middleware for /client/Topic.
return bool If TRUE, prevents propagation of the topic call.
tgui_alert
Creates a TGUI alert window and returns the user's response.
This proc should be used to create alerts that the caller will wait for a response from. Arguments:
- user - The user to show the alert to.
- message - The content of the alert, shown in the body of the TGUI window.
- title - The of the alert modal, shown on the top of the TGUI window.
- items - The options that can be chosen by the user, each string is assigned a button on the UI.
- timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout.
- autofocus - The bool that controls if this alert should grab window focus. - BROKEN DON'T SET TO FALSE (nulls items, ask zewaka)
- content_window - The name of the part to be used for the alert's content, to be used in lieu of message
- do_wait - waits for user input then returns it. Set to false for asynchronism
- theme - The TGUI theme used for the window.
tgui_color_picker
@file @copyright 2023 @author itsmeow (https://github.com/itsmeow) @license MIT
Creates a TGUI color picker window and returns the user's response.
This proc should be used to create a color picker that the caller will wait for a response from. Arguments:
- user - The user to show the picker to.
- title - The of the picker modal, shown on the top of the TGUI window.
- timeout - The timeout of the picker, after which the modal will close and qdel itself. Set to zero for no timeout.
- autofocus - The bool that controls if this picker should grab window focus.
tgui_color_picker_async
Creates an asynchronous TGUI color picker window with an associated callback.
This proc should be used to create a color picker that invokes a callback with the user's chosen option. Arguments:
- user - The user to show the picker to.
- title - The of the picker modal, shown on the top of the TGUI window.
- callback - The callback to be invoked when a choice is made.
- timeout - The timeout of the picker, after which the modal will close and qdel itself. Set to zero for no timeout.
- autofocus - The bool that controls if this picker should grab window focus.
tgui_input_list
Creates a TGUI input list window and returns the user's response.
This proc should be used to create alerts that the caller will wait for a response from. Arguments:
- user - The user to show the input box to.
- message - The content of the input box, shown in the body of the TGUI window.
- title - The title of the input box, shown on the top of the TGUI window.
- items - The options that can be chosen by the user, each string is assigned a button on the UI.
- default - If an option is already preselected on the UI. Current values, etc.
- timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.
- autofocus - The bool that controls if this alert should grab window focus.
- allowIllegal - Whether to allow illegal characters in items.
- start_with_search - Whether to start with the search bar open ("auto" for automatic, TRUE for yes, FALSE for no).
- capitalize - Whether to capitalize the first letter of each item.
- theme - The TGUI theme used for the window.
tgui_input_list_async
Creates an asynchronous TGUI input list window with an associated callback.
This proc should be used to create inputs that invoke a callback with the user's chosen option. Arguments:
- user - The user to show the input box to.
- message - The content of the input box, shown in the body of the TGUI window.
- title - The title of the input box, shown on the top of the TGUI window.
- items - The options that can be chosen by the user, each string is assigned a button on the UI.
- default - If an option is already preselected on the UI. Current values, etc.
- callback - The callback to be invoked when a choice is made.
- timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.
- autofocus - The bool that controls if this alert should grab window focus.
- allowIllegal - Whether to allow illegal characters in items.
- start_with_search - Whether to start with the search bar open ("auto" for automatic, TRUE for yes, FALSE for no).
- capitalize - Whether to capitalize the first letter of each item.
- theme - The TGUI theme used for the window.
tgui_input_number
Creates a TGUI window with a number input. Returns the user's response as num | null.
This proc should be used to create windows for number entry that the caller will wait for a response from. If tgui fancy chat is turned off: Will return a normal input. If a max or min value is specified, will validate the input inside the UI and ui_act.
Arguments:
- user - The user to show the numbox to.
- message - The content of the numbox, shown in the body of the TGUI window.
- title - The title of the numbox modal, shown on the top of the TGUI window.
- default - The default (or current) value, shown as a placeholder. Users can press refresh with this.
- max_value - Specifies a maximum value. If none is set, it defaults to 1000.
- min_value - Specifies a minimum value. If none is set, it defaults to 0.
- timeout - The timeout of the numbox, after which the modal will close and qdel itself. Set to zero for no timeout.
- round_input - If the number in the numbox should be rounded to the nearest integer.
- theme - The TGUI theme used for the window.
tgui_input_number_async
Creates an asynchronous TGUI number input window with an associated callback.
This proc should be used to create numboxes that invoke a callback with the user's entry.
Arguments:
- user - The user to show the numbox to.
- message - The content of the numbox, shown in the body of the TGUI window.
- title - The title of the numbox modal, shown on the top of the TGUI window.
- default - The default (or current) value, shown as a placeholder. Users can press refresh with this.
- max_value - Specifies a maximum value. If none is set, it defaults to 1000.
- min_value - Specifies a minimum value. If none is set, it defaults to 0.
- callback - The callback to be invoked when a choice is made.
- timeout - The timeout of the numbox, after which the modal will close and qdel itself. Disabled by default, can be set to seconds otherwise.
- round_input - If the number in the numbox should be rounded to the nearest integer.
- theme - The TGUI theme used for the window.
tgui_input_text
Creates a TGUI window with a text input. Returns the user's response.
This proc should be used to create windows for text entry that the caller will wait for a response from. If tgui fancy chat is turned off: Will return a normal input. If max_length is specified, will return stripped_multiline_input.
Arguments:
- user - The user to show the textbox to.
- message - The content of the textbox, shown in the body of the TGUI window.
- title - The title of the textbox modal, shown on the top of the TGUI window.
- default - The default (or current) value, shown as a placeholder.
- max_length - Specifies a max length for input.
- multiline - Bool that determines if the input box is much larger. Good for large messages, laws, etc.
- timeout - The timeout of the textbox, after which the modal will close and qdel itself. Set to zero for no timeout.
- theme - The TGUI theme used for the window.
tgui_input_text_async
Creates an asynchronous TGUI text input window with an associated callback.
This proc should be used to create textboxes that invoke a callback with the user's entry. Arguments:
- user - The user to show the textbox to.
- message - The content of the textbox, shown in the body of the TGUI window.
- title - The title of the textbox modal, shown on the top of the TGUI window.
- default - The default (or current) value, shown as a placeholder.
- max_length - Specifies a max length for input.
- multiline - Bool that determines if the input box is much larger. Good for large messages, laws, etc.
- callback - The callback to be invoked when a choice is made.
- timeout - The timeout of the textbox, after which the modal will close and qdel itself. Disabled by default, can be set to seconds otherwise.
- theme - The TGUI theme used for the window.
tidy_net_data
Cleans up data passed in from network packets for display so it doesn't mess with formatting
time_to_text
Returns the passed decisecond-format time in the form of a text string
toIso8601
Convert BYOND time format to ISO 8601
total_density
Returns the sum of densities of all atoms in the given turf including the turf itself
type2parent
Returns the parent type of a given type. Assumes that parent_type was not overriden.
typecache_filter_list
Rurns a new list with only atoms that are in the typecache list
typecache_filter_list_reverse
Return a new list with atoms that are not in the typecache list
typecache_filter_multi_list_exclusion
Similar to typecache_filter_list and typecache_filter_list_reverse but it supports an inclusion list and and exclusion list
typecacheof
Like typesof() or subtypesof(), but returns a typecache instead of a list.
Arguments:
- path: A typepath or list of typepaths.
- only_root_path: Whether the typecache should be specifically of the passed types.
- ignore_root_path: Whether to ignore the root path when caching subtypes.
ucfirst
Uppercases first letter
ucfirsts
Uppercases first letter of every word
ui_describe_reagents
Returns a serialized representation of the reagents of an atom for use with the ReagentInfo TGUI components Note that this is not a built in TGUI proc
uwutalk
uwutalk
owo-talk version 2. Nyo it's sewious!
ve_or_s
"they've had" vs "he's had"
vector_magnitude
Returns the vector magnitude of an x value and a y value
vector_to_dir
Transforms a supplied vector x & y to a direction
weighted_pick
Picks a random element from a list based on a weighting system.
For example, given the following list: A = 6, B = 3, C = 1, D = 0, A would have a 60% chance of being picked, B would have a 30% chance of being picked, C would have a 10% chance of being picked, and D would have a 0% chance of being picked.
You should only pass integers in.
whodead
Finds whoever's dead.
whois
Looks up a player based on a string. Searches a shit load of things whoa. Returns a list of mob refs.