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

(global)

Vars

FailsafeFailsafe
MasterStonedMC
SStguiCopyright (c) 2020 Aleksej Komarov SPDX-License-Identifier: MIT

Procs

GibberishTurn text into complete gibberish!
IsAdminGhostIs the passed in mob an admin ghost
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.
_alert_dronesBroadcast a message to all drones in a faction
above_neckWould this zone be above the neck
active_free_borgsSilicon Mob Procs
add_keybindingAdds an instanced keybinding to the global tracker
addtimerCreate a new timer and insert it in the queue
anonymous_ai_nameanonymous_ai_name: generates a corporate random name (but for sillycones). used in admin event tool anonymous names
anonymous_nameanonymous_name: generates a corporate random name. used in admin event tool anonymous names
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
completed_bounty_countSubtype Gens
considered_exiledExiled check
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.
do_mobTimed action involving two mobs, the user and the target.
end_cooldownCallback called by a timer to end an associative-list-indexed cooldown.
find_recordReturns datum/data/record
findnameFind if the message has the real name of any user mob in the mob_list
generate_selectable_speciesGenerates species available to choose in character setup at roundstart
getFlatIconCreate a single [/icon] from a given /atom or [/image].
get_bbox_of_atomsGet a bounding box of a list of atoms.
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_ranged_target_turf_directGet ranged target turf, but with direct targets as opposed to directions
getleftblocksDNA HELPER-PROCS
goonchem_vortexMagical move-wooney that happens sometimes.
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_keybindingsCreates and sorts all the keybinding datums
is_special_characterIs this mob special to the gamemode?
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_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
movespeed_data_null_checkChecks if a move speed modifier is valid and not missing any data
notify_ghostsFancy notifications for ghosts
offer_controlOffer control of the passed in mob to dead player
populate_editable_sign_typesThis proc populates GLOBAL_LIST_EMPTY(editable_sign_types)
printAllCardsPrints all the cards names
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.
ran_zoneReturn the zone or randomly, another valid zone
recursive_organ_check
reject_bad_nameFilters out undesirable characters from names.
reloadAllCardFilesReloads all card files
reset_cooldownProc used by stoppable timers to end a cooldown before the time has ran out.
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.
seedifyFinds and extracts seeds from an object
send2adminchatSends a message to TGS admin chat channels.
send2chatSends a message to TGS chat channels.
send_asset_listSends a list of assets to a client This proc will no longer block, use client.asset_flush() if you to need know when the client has all assets (such as for output()). (This is not required for browse() calls as they use the same message queue as asset sends) client - a client or mob asset_list - A list of asset filenames to be sent to the client. Returns TRUE if any assets were sent.
shake_cameraShake the camera of the person viewing the mob SO REAL!
slurMakes you speak like you're drunk
starsConvert random parts of a passed in message to stars
stutterAdds stuttering to the message passed in
syncChatRegexesCalls syncRegex on all currently owned chatOutput datums
timeleftGet the remaining deciseconds on a timer
to_chatSends a text message to the target.
to_chat_immediateGlobal chat proc. to_chat_immediate will circumvent SSchat and send data as soon as possible.
voice_of_godVOICE OF GOD
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

SStgui

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

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.

IsAdminGhost

Is the passed in mob an admin ghost

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.

_alert_drones

Broadcast a message to all drones in a faction

Arguments:

above_neck

Would this zone be above the neck

active_free_borgs

Silicon Mob Procs

add_keybinding

Adds an instanced keybinding to the global tracker

addtimer

Create a new timer and insert it in the queue

Arguments:

anonymous_ai_name

anonymous_ai_name: generates a corporate random name (but for sillycones). used in admin event tool anonymous names

first letter is always a letter Example name = "Employee Assistant Assuming Delta" Arguments:

anonymous_name

anonymous_name: generates a corporate random name. used in admin event tool anonymous names

first letter is always a letter Example name = "Employee Q5460Z" Arguments:

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

completed_bounty_count

Subtype Gens

Strict Type Gens

Dynamic Gens

Cutoff for Non-Low Priority Bounties

Low Priority Gens

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.

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.

do_after_mob

Timed action involving at least one mob user and a list of targets.

do_mob

Timed action involving two mobs, the user and the target.

end_cooldown

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

Arguments:

This sends a signal reporting the cooldown end.

find_record

Returns datum/data/record

findname

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

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_bbox_of_atoms

Get a bounding box of a list of atoms.

Arguments:

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

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

getleftblocks

DNA HELPER-PROCS

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:

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_keybindings

Creates and sorts all the keybinding datums

is_special_character

Is this mob special to the gamemode?

returns 1 for special characters and 2 for heroes of gamemode

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

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:

offer_control

Offer control of the passed in mob to dead player

Automatic logging and uses pollCandidatesForMob, how convenient

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

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.

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

recursive_organ_check

reject_bad_name

Filters out undesirable characters from names.

reloadAllCardFiles

Reloads all card files

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.

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.

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).

send_asset_list

Sends a list of assets to a client This proc will no longer block, use client.asset_flush() if you to need know when the client has all assets (such as for output()). (This is not required for browse() calls as they use the same message queue as asset sends) client - a client or mob asset_list - A list of asset filenames to be sent to the client. Returns TRUE if any assets were sent.

shake_camera

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

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

stutter

Adds stuttering to the message passed in

syncChatRegexes

Calls syncRegex on all currently owned chatOutput datums

timeleft

Get the remaining deciseconds on a timer

Arguments:

to_chat

Sends a text message to the target.

to_chat_immediate

Global chat proc. to_chat_immediate will circumvent SSchat and send data as soon as possible.

voice_of_god

VOICE OF GOD

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