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

(global)

Vars

FailsafeFailsafe
MasterStonedMC
SSacidThe subsystem used to tick /datum/component/acid instances.
SSai_controllersThe subsystem used to tick /datum/ai_controllers instances. Handling the re-checking of plans.
SSai_movementThe subsystem used to tick /datum/ai_movement instances. Handling the movement of individual AI instances
SSambienceThe subsystem used to play ambience to users every now and then, makes them real excited.
SSdiscord
SSid_accessNon-processing subsystem that holds various procs and data structures to manage ID cards, trims and access.
SSrunechat
SStguitgui subsystem
SStime_trackThe reference to the end of round sound that we have chosen.
SStimer

Procs

GibberishTurn text into complete gibberish!
HeapPathWeightCompareTODO: Macro this to reduce proc overhead
WrapAdminProcCallWrapper for proccalls where the datum is flagged as vareditted
___TraitAddDO NOT USE ___TraitAdd OR ___TraitRemove as a replacement for ADD_TRAIT / REMOVE_TRAIT defines. To be used explicitly for callback.
___TraitRemoveDO NOT USE ___TraitAdd OR ___TraitRemove as a replacement for ADD_TRAIT / REMOVE_TRAIT defines. To be used explicitly for callback.
_addtimerCreate 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.
_alert_dronesBroadcast a message to all drones in a faction
above_neckWould this zone be above the neck
actionspeed_data_null_checkChecks if a action speed modifier is valid and not missing any data
active_free_borgsSilicon Mob Procs
add_keybindingAdds an instanced keybinding to the global tracker
add_verbhandles adding verbs and updating the stat panel browser
anonymous_all_playersanonymous_all_players: sets all crewmembers on station anonymous.
baseturfs_string_listA wrapper for baseturf string lists, to offer support of non list values, and a stack_trace if we have major issues
build_chemical_reagent_listThese are used in the reagents subsystem init() and the reagent_id_typos.dm
build_medicine_reagentsJust grab every craftable medicine you can think off
callback_selectRuns a list of callbacks asyncronously, returning only when all have finished
checkCardDatumsChecks the global card list for cards that don't override all the default values of the card datum
checkCardDistributionUsed to test open a large amount of cardpacks
checkCardpacksChecks the passed type list for missing raritys, or raritys out of bounds
check_zoneConvert a PRECISE ZONE into the BODY_ZONE
clearCardsEmpty the rarity cache so we can safely add new cards
cmp_crafting_req_prioritySorts crafting recipe requirements before the crafting recipe is inserted into GLOB.crafting_recipes
color_to_full_rgba_matrixConverts RGB shorthands into RGBA matrices complete of constants rows (ergo a 20 keys list in byond).
considered_exiledExiled check
convert_ph_to_readable_colorConverts the pH into a tgui readable color - i.e. white and black text is readable over it. This is NOT the colourwheel for pHes however.
create_mafia_gameCreates the global datum for playing mafia games, destroys the last if that's required and returns the new.
cultslurMakes you talk like you got cult stunned, which is slurring but with some dark messages
debug_variableGet displayed variable in VV variable list
deltimerDelete a timer
derpspeechConvert a message to derpy speak
do_afterTimed action involving one mob user. Target is optional.
do_after_mobTimed action involving at least one mob user and a list of targets. interaction_key is the assoc key under which the do_after is capped under, and the max interaction count is how many of this interaction you can do at once.
do_mobTimed action involving two mobs, the user and the target. interaction_key is the assoc key under which the do_after is capped under, and the max interaction count is how many of this interaction you can do at once.
end_cooldownCallback called by a timer to end an associative-list-indexed cooldown.
find_reagentReturns reagent datum from typepath
find_recordReturns datum/data/record
findnameFind if the message has the real name of any user mob in the mob_list
firing_squadfiring_squad is a proc for the :B:erforate smite to shoot each individual bullet at them, so that we can add actual delays without sleep() nonsense
first_day_of_monthReturns the first day of the given year and month in number format, from 1 (monday) - 7 (sunday).
flop_animationThis animation should be applied to actual parent atom instead of vc_object.
format_frequencyFormat frequency by moving the decimal.
generate_asset_nameGenerate a filename for this asset The same asset will always lead to the same asset name (Generated names do not include file extention.)
generate_bitfieldsTurns /datum/bitfield subtypes into a list for use in debugging
generate_fishAutomatically generates object of given base path from the behaviour type in loc
generate_selectable_speciesGenerates species available to choose in character setup at roundstart
getFlatIconCreate a single [/icon] from a given /atom or [/image].
get_airlock_overlayOverlay cache. Why isn't this just in /obj/machinery/door/airlock? Because its used just a tiny bit in door_assembly.dm Refactored so you don't have to make a null copy of airlock to get to the damn thing Someone, for the love of god, profile this. Is there a reason to cache mutable_appearance if so, why are we JUST doing the airlocks when we can put this in mutable_appearance.dm for everything
get_allowed_instrument_idsGet all non admin_only instruments as a list of text ids.
get_bbox_of_atomsGet a bounding box of a list of atoms.
get_cached_actionspeed_modifierGrabs a STATIC MODIFIER datum from cache. YOU MUST NEVER EDIT THESE DATUMS, OR IT WILL AFFECT ANYTHING ELSE USING IT TOO!
get_cached_movespeed_modifierGrabs a STATIC MODIFIER datum from cache. YOU MUST NEVER EDIT THESE DATUMS, OR IT WILL AFFECT ANYTHING ELSE USING IT TOO!
get_chem_idReturns reagent datum from reagent name string
get_path_toThis file contains the stuff you need for using JPS (Jump Point Search) pathing, an alternative to A* that skips over large numbers of uninteresting tiles resulting in much quicker pathfinding solutions. Mind that diagonals cost the same as cardinal moves currently, so paths may look a bit strange, but should still be optimal.
get_powernet_info_from_sourceExtracts the powernet and cell of the provided power source
get_random_reagent_idReturns a random reagent object minus blacklisted reagents
get_ranged_target_turf_directGet ranged target turf, but with direct targets as opposed to directions
get_reagent_type_from_product_stringReturns a list of chemical_reaction datums that have the input STRING as a product
get_recipe_from_reagent_productTakes a type in and returns a list of associated recipes
get_temp_change_amountUsed to get the amount of change between two body temperatures
getleftblocksDNA HELPER-PROCS
getlineGet a list of turfs in a line from M to N.
goonchem_vortexMagical move-wooney that happens sometimes.
hex2rgbConverts "#RRGGBB" to list(0xRR, 0xGG, 0xBB)
htmlrendertextPerform a whitespace cleanup on the text, similar to what HTML renderers do
icon2base64Converts an icon to base64. Operates by putting the icon in the iconCache savefile, exporting it as text, and then parsing the base64 from that. (This relies on byond automatically storing icons in savefiles as base64)
init_crafting_recipesInits the crafting recipe list, sorting crafting recipe requirements in the process.
init_keybindingsCreates and sorts all the keybinding datums
ionnumis at the start to prevent us from changing say modes via get_message_mode()
isAdminGhostAIIs the passed in mob an admin ghost WITH AI INTERACT enabled
isAdminObserverIs the passed in mob a ghost with admin powers, doesn't check for AI interact like isAdminGhost() used to
is_ctf_targethey uhhh don't hit anyone behind them
is_special_characterReturns TRUE if the game has started and we're either an AI with a 0th law, or we're someone with a special role/antag datum
item_heal_roboticHeal a robotic body part on a mob
json_deserialize_datumConvert a list of json to datum
json_serialize_datumConvert a datum into a json blob
loadAllCardFilesLoads all the card files
loadCardFileLoads the contents of a json file into our global card list
load_mapShortcut function to parse a map and apply it to the world.
load_poll_dataLoads all current and future server polls and their options to store both as datums.
log_combatLog a combat message in the attack log
log_directed_talkHelper for logging of messages with only one sender and receiver
log_tguiAppends a tgui-related log entry. All arguments are optional.
log_woundlog_wound() is for when someone is attacked and suffers a wound. Note that this only captures wounds from damage, so smites/forced wounds aren't logged, as well as demotions like cuts scabbing over
make_datum_references_listsInitial Building
md5asfileSave file as an external file then md5 it. Used because md5ing files stored in the rsc sometimes gives incorrect md5 results.
md5filepathReturns the md5 of a file at a given path.
message_centcomUsed by communications consoles to message CentCom
message_syndicateUsed by communications consoles to message the Syndicate
message_to_htmlMessage-related procs
movespeed_data_null_checkChecks if a move speed modifier is valid and not missing any data
notify_ghostsFancy notifications for ghosts
nuke_requestUsed by communications consoles to request the nuclear launch codes
offer_controlOffer control of the passed in mob to dead player
pick_n_takePick a random element from the list and remove it from the list.
populate_editable_sign_typesThis proc populates GLOBAL_LIST_EMPTY(editable_sign_types)
printAllCardsPrints all the cards names
print_command_reportIf the announcer overrides alert messages, use that message.
process_teleport_locsGenerate a list of turfs you can teleport to from the areas list
propagate_networkremove the old powernet and replace it with a new one throughout the network.
qdelShould be treated as a replacement for the 'del' keyword.
ran_zoneReturn the zone or randomly, another valid zone
random_bounty
random_fish_typeReturns random fish, using random_case_rarity probabilities.
recursive_organ_check
reject_bad_nameFilters out undesirable characters from names.
reloadAllCardFilesReloads all card files
remove_verbhandles removing verb and sending it to browser to update, use this for removing verbs
reset_cooldownProc used by stoppable timers to end a cooldown before the time has ran out.
return_unused_frequencyreturns a random unused frequency between MIN_FREE_FREQ & MAX_FREE_FREQ if free = TRUE, and MIN_FREQ & MAX_FREQ if FALSE
sanitize_css_class_nameRemoves all non-alphanumerics from the text, keep in mind this can lead to id conflicts
sanitize_frequencyEnsure the frequency is within bounds of what it should be sending/receiving at
sanitize_namereturns nothing with an alert instead of the message if it contains something in the ic filter, and sanitizes normally if the name is fine. It returns nothing so it backs out of the input the same way as if you had entered nothing.
sanitize_ooccolorMakes sure the input color is text with a # at the start followed by 6 hexadecimal characters. Examples: "#ff1234", "#A38321", COLOR_GREEN_GRAY
scramble_message_replace_charsSlightly expensive proc to scramble a message using equal probabilities of character replacement from a list. DOES NOT SUPPORT HTML!
seedifyFinds and extracts seeds from an object
send2adminchatSends a message to TGS admin chat channels.
send2chatSends a message to TGS chat channels.
send2otherserverSends a message to a set of cross-communications-enabled servers using world topic calls
shake_cameraShake the camera of the person viewing the mob SO REAL!
simple_network_name_fixNetwork name should be all caps and no punctuation except for _ and . between domains This does a quick an dirty fix to a network name to make sure it works
siunitFormats a number to human readable form with the appropriate SI unit.
siunit_pressure
slurMakes you speak like you're drunk
starsConvert random parts of a passed in message to stars
string_listCaches lists with non-numeric stringify-able values (text or typepath).
stripped_inputUsed to get a properly sanitized input, of max_length no_trim is self explanatory but it prevents the input from being trimed if you intend to parse newlines or whitespace.
stutterAdds stuttering to the message passed in
techweb_item_boost_checkReturns an associative list of techweb node datums with values of the boost it gives. var/list/returned = list()
tgalertDEPRECATED: USE tgui_alert(...) INSTEAD
tgui_TopicMiddleware for /client/Topic.
tgui_alertCreates a TGUI alert window and returns the user's response.
tgui_alert_asyncCreates an asynchronous TGUI alert window with an associated callback.
tgui_input_listCreates a TGUI input list window and returns the user's response.
tgui_input_list_asyncCreates an asynchronous TGUI input list window with an associated callback.
timeleftGet the remaining deciseconds on a timer
to_chatSends the message to the recipient (target).
to_chat_immediateCircumvents the message queue and sends the message to the recipient (target) as soon as possible.
truncateTruncate a string to the given length
unformat_frequencyOpposite of format, returns as a number
url2htmlloaderReturn html to load a url. for use inside of browse() calls to html assets that might be loaded on a cdn.
valid_window_locationChecks whether the target turf is in a valid state to accept a directional window or other directional pseudo-dense object such as railings.
voice_of_godVOICE OF GOD
weekday_to_isoReturns a string day as an integer in ISO format 1 (Monday) - 7 (Sunday)
woundscanDisplays wounds with extended information on their status vs medscanners
zone2body_parts_coveredFor finding out what body parts a body zone covers, the inverse of the below basically

Var Details

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

SSacid

The subsystem used to tick /datum/component/acid instances.

SSai_controllers

The subsystem used to tick /datum/ai_controllers instances. Handling the re-checking of plans.

SSai_movement

The subsystem used to tick /datum/ai_movement instances. Handling the movement of individual AI instances

SSambience

The subsystem used to play ambience to users every now and then, makes them real excited.

SSdiscord

Discord Subsystem

This subsystem handles some integrations with discord

NOTES:

HOW NOTIFYING WORKS

ROUNDSTART:

  1. The file is loaded and the discord IDs are extracted
  2. A ping is sent to the discord with the IDs of people who wished to be notified
  3. The file is emptied

MIDROUND:

  1. Someone usees the notify verb, it adds their discord ID to the list.
  2. On fire, it will write that to the disk, as long as conditions above are correct

END ROUND:

  1. The file is force-saved, incase it hasn't fired at end round

This is an absolute clusterfuck, but its my clusterfuck -aa07

SSid_access

Non-processing subsystem that holds various procs and data structures to manage ID cards, trims and access.

SSrunechat

Runechat Subsystem

Maintains a timer-like system to handle destruction of runechat messages. Much of this code is modeled after or adapted from the timer subsystem.

Note that this has the same structure for storing and queueing messages as the timer subsystem does for handling timers: the bucket_list is a list of chatmessage datums, each of which are the head of a circularly linked list. Any given index in bucket_list could be null, representing an empty bucket.

SStgui

tgui subsystem

Contains all tgui state and subsystem code.

SStime_track

The reference to the end of round sound that we have chosen.

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 circular doubly-linked lists. The object at a given index in bucket_list is a /datum/timedevent, the head of a circular list, which has prev and next references for the respective elements in that bucket's circular list.

Proc Details

Gibberish

Turn text into complete gibberish!

text is the inputted message, replace_characters will cause original letters to be replaced and chance are the odds that a character gets modified.

HeapPathWeightCompare

TODO: Macro this to reduce proc overhead

WrapAdminProcCall

Wrapper for proccalls where the datum is flagged as vareditted

___TraitAdd

DO NOT USE ___TraitAdd OR ___TraitRemove as a replacement for ADD_TRAIT / REMOVE_TRAIT defines. To be used explicitly for callback.

___TraitRemove

DO NOT USE ___TraitAdd OR ___TraitRemove as a replacement for ADD_TRAIT / REMOVE_TRAIT defines. To be used explicitly for callback.

_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:

_alert_drones

Broadcast a message to all drones in a faction

Arguments:

above_neck

Would this zone be above the neck

actionspeed_data_null_check

Checks if a action speed modifier is valid and not missing any data

active_free_borgs

Silicon Mob Procs

add_keybinding

Adds an instanced keybinding to the global tracker

add_verb

handles adding verbs and updating the stat panel browser

pass the verb type path to this instead of adding it directly to verbs so the statpanel can update Arguments:

anonymous_all_players

anonymous_all_players: sets all crewmembers on station anonymous.

why is this a proc instead of just part of above? events use this as well.

baseturfs_string_list

A wrapper for baseturf string lists, to offer support of non list values, and a stack_trace if we have major issues

build_chemical_reagent_list

These are used in the reagents subsystem init() and the reagent_id_typos.dm

build_medicine_reagents

Just grab every craftable medicine you can think off

callback_select

Runs a list of callbacks asyncronously, returning only when all have finished

Callbacks can be repeated, to call it multiple times

Arguments:

checkCardDatums

Checks the global card list for cards that don't override all the default values of the card datum

checkCardDistribution

Used to test open a large amount of cardpacks

checkCardpacks

Checks the passed type list for missing raritys, or raritys out of bounds

check_zone

Convert a PRECISE ZONE into the BODY_ZONE

clearCards

Empty the rarity cache so we can safely add new cards

cmp_crafting_req_priority

Sorts crafting recipe requirements before the crafting recipe is inserted into GLOB.crafting_recipes

Prioritises /datum/reagent to ensure reagent requirements are always processed first when crafting. This prevents any reagent_containers from being consumed before the reagents they contain, which can lead to runtimes and item duplication when it happens.

color_to_full_rgba_matrix

Converts RGB shorthands into RGBA matrices complete of constants rows (ergo a 20 keys list in byond).

considered_exiled

Exiled check

Checks if the current body of the mind has an exile implant and is currently in an away mission. Returns FALSE if any of those conditions aren't met.

convert_ph_to_readable_color

Converts the pH into a tgui readable color - i.e. white and black text is readable over it. This is NOT the colourwheel for pHes however.

create_mafia_game

Creates the global datum for playing mafia games, destroys the last if that's required and returns the new.

cultslur

Makes you talk like you got cult stunned, which is slurring but with some dark messages

debug_variable

Get displayed variable in VV variable list

deltimer

Delete a timer

Arguments:

derpspeech

Convert a message to derpy speak

do_after

Timed action involving one mob user. Target is optional.

Checks that user does not move, change hands, get stunned, etc. for the given delay. Returns TRUE on success or FALSE on failure. Interaction_key is the assoc key under which the do_after is capped, with max_interact_count being the cap. Interaction key will default to target if not set.

do_after_mob

Timed action involving at least one mob user and a list of targets. interaction_key is the assoc key under which the do_after is capped under, and the max interaction count is how many of this interaction you can do at once.

do_mob

Timed action involving two mobs, the user and the target. interaction_key is the assoc key under which the do_after is capped under, and the max interaction count is how many of this interaction you can do at once.

end_cooldown

Callback called by a timer to end an associative-list-indexed cooldown.

Arguments:

This sends a signal reporting the cooldown end.

find_reagent

Returns reagent datum from typepath

find_record

Returns datum/data/record

findname

Find if the message has the real name of any user mob in the mob_list

firing_squad

firing_squad is a proc for the :B:erforate smite to shoot each individual bullet at them, so that we can add actual delays without sleep() nonsense

Hilariously, if you drag someone away mid smite, the bullets will still chase after them from the original spot, possibly hitting other people. Too funny to fix imo

Arguments:

first_day_of_month

Returns the first day of the given year and month in number format, from 1 (monday) - 7 (sunday).

flop_animation

This animation should be applied to actual parent atom instead of vc_object.

format_frequency

Format frequency by moving the decimal.

generate_asset_name

Generate a filename for this asset The same asset will always lead to the same asset name (Generated names do not include file extention.)

generate_bitfields

Turns /datum/bitfield subtypes into a list for use in debugging

generate_fish

Automatically generates object of given base path from the behaviour type in loc

generate_selectable_species

Generates species available to choose in character setup at roundstart

This proc generates which species are available to pick from in character setup. If there are no available roundstart species, defaults to human.

getFlatIcon

Create a single [/icon] from a given /atom or [/image].

Very low-performance. Should usually only be used for HTML, where BYOND's appearance system (overlays/underlays, etc.) is not available.

Only the first argument is required.

get_airlock_overlay

Overlay cache. Why isn't this just in /obj/machinery/door/airlock? Because its used just a tiny bit in door_assembly.dm Refactored so you don't have to make a null copy of airlock to get to the damn thing Someone, for the love of god, profile this. Is there a reason to cache mutable_appearance if so, why are we JUST doing the airlocks when we can put this in mutable_appearance.dm for everything

get_allowed_instrument_ids

Get all non admin_only instruments as a list of text ids.

get_bbox_of_atoms

Get a bounding box of a list of atoms.

Arguments:

Returns: list(x1, y1, x2, y2)

get_cached_actionspeed_modifier

Grabs a STATIC MODIFIER datum from cache. YOU MUST NEVER EDIT THESE DATUMS, OR IT WILL AFFECT ANYTHING ELSE USING IT TOO!

get_cached_movespeed_modifier

Grabs a STATIC MODIFIER datum from cache. YOU MUST NEVER EDIT THESE DATUMS, OR IT WILL AFFECT ANYTHING ELSE USING IT TOO!

get_chem_id

Returns reagent datum from reagent name string

get_path_to

This file contains the stuff you need for using JPS (Jump Point Search) pathing, an alternative to A* that skips over large numbers of uninteresting tiles resulting in much quicker pathfinding solutions. Mind that diagonals cost the same as cardinal moves currently, so paths may look a bit strange, but should still be optimal.

This is the proc you use whenever you want to have pathfinding more complex than "try stepping towards the thing"

Arguments:

get_powernet_info_from_source

Extracts the powernet and cell of the provided power source

get_random_reagent_id

Returns a random reagent object minus blacklisted reagents

get_ranged_target_turf_direct

Get ranged target turf, but with direct targets as opposed to directions

Starts at atom A and gets the exact angle between A and target Moves from A with that angle, Range amount of times, until it stops, bound to map size Arguments:

get_reagent_type_from_product_string

Returns a list of chemical_reaction datums that have the input STRING as a product

get_recipe_from_reagent_product

Takes a type in and returns a list of associated recipes

get_temp_change_amount

Used to get the amount of change between two body temperatures

When passed the difference between two temperatures returns the amount of change to temperature to apply. The change rate should be kept at a low value tween 0.16 and 0.02 for optimal results. vars:

getleftblocks

DNA HELPER-PROCS

getline

Get a list of turfs in a line from M to N.

Uses the ultra-fast Bresenham Line-Drawing Algorithm.

goonchem_vortex

Magical move-wooney that happens sometimes.

Simulates a vortex that moves nearby movable atoms towards or away from the turf T. Range also determines the strength of the effect. High values cause nearby objects to be thrown. Arguments:

hex2rgb

Converts "#RRGGBB" to list(0xRR, 0xGG, 0xBB)

htmlrendertext

Perform a whitespace cleanup on the text, similar to what HTML renderers do

This is useful if you want to better predict how text is going to look like when displaying it to a user. HTML renderers collapse multiple whitespaces into one, trims prepending and appending spaces, among other things. This proc attempts to do the same thing. HTML5 defines whitespace pretty much exactly like regex defines the \s group, [ \t\r\n\f].

Arguments:

icon2base64

Converts an icon to base64. Operates by putting the icon in the iconCache savefile, exporting it as text, and then parsing the base64 from that. (This relies on byond automatically storing icons in savefiles as base64)

init_crafting_recipes

Inits the crafting recipe list, sorting crafting recipe requirements in the process.

init_keybindings

Creates and sorts all the keybinding datums

ionnum

is at the start to prevent us from changing say modes via get_message_mode()

isAdminGhostAI

Is the passed in mob an admin ghost WITH AI INTERACT enabled

isAdminObserver

Is the passed in mob a ghost with admin powers, doesn't check for AI interact like isAdminGhost() used to

is_ctf_target

hey uhhh don't hit anyone behind them

is_special_character

Returns TRUE if the game has started and we're either an AI with a 0th law, or we're someone with a special role/antag datum

item_heal_robotic

Heal a robotic body part on a mob

json_deserialize_datum

Convert a list of json to datum

json_serialize_datum

Convert a datum into a json blob

loadAllCardFiles

Loads all the card files

loadCardFile

Loads the contents of a json file into our global card list

load_map

Shortcut function to parse a map and apply it to the world.

load_poll_data

Loads all current and future server polls and their options to store both as datums.

log_combat

Log a combat message in the attack log

Arguments:

log_directed_talk

Helper for logging of messages with only one sender and receiver

log_tgui

Appends a tgui-related log entry. All arguments are optional.

log_wound

log_wound() is for when someone is attacked and suffers a wound. Note that this only captures wounds from damage, so smites/forced wounds aren't logged, as well as demotions like cuts scabbing over

Note that this has no info on the attack that dealt the wound: information about where damage came from isn't passed to the bodypart's damaged proc. When in doubt, check the attack log for attacks at that same time TODO later: Add logging for healed wounds, though that will require some rewriting of healing code to prevent admin heals from spamming the logs. Not high priority

Arguments:

make_datum_references_lists

Initial Building

md5asfile

Save file as an external file then md5 it. Used because md5ing files stored in the rsc sometimes gives incorrect md5 results.

md5filepath

Returns the md5 of a file at a given path.

message_centcom

Used by communications consoles to message CentCom

message_syndicate

Used by communications consoles to message the Syndicate

message_to_html

Message-related procs

Message format (/list):

Copyright (c) 2020 Aleksej Komarov SPDX-License-Identifier: MIT

movespeed_data_null_check

Checks if a move speed modifier is valid and not missing any data

notify_ghosts

Fancy notifications for ghosts

The kitchen sink of notification procs

Arguments:

nuke_request

Used by communications consoles to request the nuclear launch codes

offer_control

Offer control of the passed in mob to dead player

Automatic logging and uses pollCandidatesForMob, how convenient

pick_n_take

Pick a random element from the list and remove it from the list.

populate_editable_sign_types

This proc populates GLOBAL_LIST_EMPTY(editable_sign_types)

The first time a pen is used on any sign, this populates GLOBAL_LIST_EMPTY(editable_sign_types), creating a global list of all the signs that you can set a sign backing to with a pen.

printAllCards

Prints all the cards names

print_command_report

If the announcer overrides alert messages, use that message.

process_teleport_locs

Generate a list of turfs you can teleport to from the areas list

Includes areas if they're not a shuttle or not not teleport or have no contents

The chosen turf is the first item in the areas contents that is a station level

The returned list of turfs is sorted by name

propagate_network

remove the old powernet and replace it with a new one throughout the network.

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.

ran_zone

Return the zone or randomly, another valid zone

probability controls the chance it chooses the passed in zone, or another random zone defaults to 80

random_bounty

random_fish_type

Returns random fish, using random_case_rarity probabilities.

recursive_organ_check

reject_bad_name

Filters out undesirable characters from names.

reloadAllCardFiles

Reloads all card files

remove_verb

handles removing verb and sending it to browser to update, use this for removing verbs

pass the verb type path to this instead of removing it from verbs so the statpanel can update Arguments:

reset_cooldown

Proc used by stoppable timers to end a cooldown before the time has ran out.

Arguments:

This sends a signal reporting the cooldown end, passing the time left as an argument.

return_unused_frequency

returns a random unused frequency between MIN_FREE_FREQ & MAX_FREE_FREQ if free = TRUE, and MIN_FREQ & MAX_FREQ if FALSE

sanitize_css_class_name

Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts

sanitize_frequency

Ensure the frequency is within bounds of what it should be sending/receiving at

sanitize_name

returns nothing with an alert instead of the message if it contains something in the ic filter, and sanitizes normally if the name is fine. It returns nothing so it backs out of the input the same way as if you had entered nothing.

sanitize_ooccolor

Makes sure the input color is text with a # at the start followed by 6 hexadecimal characters. Examples: "#ff1234", "#A38321", COLOR_GREEN_GRAY

scramble_message_replace_chars

Slightly expensive proc to scramble a message using equal probabilities of character replacement from a list. DOES NOT SUPPORT HTML!

seedify

Finds and extracts seeds from an object

Checks if the object is such that creates a seed when extracted. Used by seed extractors or posably anything that would create seeds in some way. The seeds are dropped either at the extractor, if it exists, or where the original object was and it qdel's the object

Arguments:

send2adminchat

Sends a message to TGS admin chat channels.

category - The category of the mssage. message - The message to send.

send2chat

Sends a message to TGS chat channels.

message - The message to send. channel_tag - Required. If "", the message with be sent to all connected (Game-type for TGS3) channels. Otherwise, it will be sent to TGS4 channels with that tag (Delimited by ','s).

send2otherserver

Sends a message to a set of cross-communications-enabled servers using world topic calls

Arguments:

shake_camera

Shake the camera of the person viewing the mob SO REAL!

simple_network_name_fix

Network name should be all caps and no punctuation except for _ and . between domains This does a quick an dirty fix to a network name to make sure it works

siunit

Formats a number to human readable form with the appropriate SI unit.

Supports SI exponents between 1e-15 to 1e15, but properly handles numbers outside that range as well. Examples:

siunit_pressure

slur

Makes you speak like you're drunk

stars

Convert random parts of a passed in message to stars

This proc is dangerously laggy, avoid it or die

string_list

Caches lists with non-numeric stringify-able values (text or typepath).

stripped_input

Used to get a properly sanitized input, of max_length no_trim is self explanatory but it prevents the input from being trimed if you intend to parse newlines or whitespace.

stutter

Adds stuttering to the message passed in

techweb_item_boost_check

Returns an associative list of techweb node datums with values of the boost it gives. var/list/returned = list()

tgalert

DEPRECATED: USE tgui_alert(...) INSTEAD

Designed as a drop in replacement for alert(); functions the same. (outside of needing User specified) Arguments:

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:

tgui_alert_async

Creates an asynchronous TGUI alert window with an associated callback.

This proc should be used to create alerts that invoke a callback with the user's chosen option. Arguments:

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:

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:

timeleft

Get the remaining deciseconds on a timer

Arguments:

to_chat

Sends the message to the recipient (target).

Recommended way to write to_chat calls:

to_chat(client,
    type = MESSAGE_TYPE_INFO,
    html = "You have found <strong>[object]</strong>")

to_chat_immediate

Circumvents the message queue and sends the message to the recipient (target) as soon as possible.

truncate

Truncate a string to the given length

Will only truncate if the string is larger than the length and ignores unicode concerns

This exists soley because trim does other stuff too.

Arguments:

unformat_frequency

Opposite of format, returns as a number

url2htmlloader

Return html to load a url. for use inside of browse() calls to html assets that might be loaded on a cdn.

valid_window_location

Checks whether the target turf is in a valid state to accept a directional window or other directional pseudo-dense object such as railings.

Returns FALSE if the target turf cannot accept a directional window or railing. Returns TRUE otherwise.

Arguments:

voice_of_god

VOICE OF GOD

weekday_to_iso

Returns a string day as an integer in ISO format 1 (Monday) - 7 (Sunday)

woundscan

Displays wounds with extended information on their status vs medscanners

zone2body_parts_covered

For finding out what body parts a body zone covers, the inverse of the below basically