/tg/ Station 13 - Modules - Types — Var Details - Proc Details

/(global)

Vars

DebuggerThe debugger instance. This is a GLOBAL_REAL because it initializes before the MC or GLOB. Really only used to check to see if the debugger is enabled or not, and to separate debugger-related code into its own thing.
FailsafeFailsafe
MasterStonedMC
SSaccessoriessubsystem that just holds lists of sprite accessories for accession in generating said sprites. A sprite accessory is something that we add to a human sprite to make them look different. This is hair, facial hair, underwear, mutant bits, etc.
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.
SSarea_contentsResponsible for managing the sizes of area.contained_turfs and area.turfs_to_uncontain These lists do not check for duplicates, which is fine, but it also means they can balloon in size over time as a consequence of repeated changes in area in a space They additionally may not always resolve often enough to avoid memory leaks This is annoying, so lets keep an eye on them and cut them down to size if needed
SSasset_loadingAllows us to lazyload asset datums Anything inserted here will fully load if directly gotten So this just serves to remove the requirement to load assets fully during init
SSauraThe subsystem used to tick auras (/datum/component/aura_healing and /datum/component/damage_aura).
SSautomapperThe AUTOMAPPER
SSban_cacheSubsystem that batches a ban cache list for clients on initialize This way we don't need to do ban checks in series later in the code
SSblood_dryingBlood Drying SS Used as a low priority background system to handling the drying of blood on the ground (basically just handles reducing their bloodiness value over time)
SSburningThe subsystem used to tick /datum/component/burning instances.
SScamerasManages the security cameras and camera chunks
SScharacter_previewStarts character preview drawings, and rebuilds preview mobs in turn when many change at once.
SScliff_fallingSubsystem to handle falling of off cliffs
SSclock_componentThe subsystem used to tick /datum/component/acid instances.
SScustom_sprite_workKeeps the custom sprite editors cheap for the server, whatever a window sends.
SScyborg_layout_savesSaves cyborg layout accounts in tick time other subsystems leave over.
SSdigital_clockThe subsystem used to tick digital clocks
SSdirtMakes the masks mess is drawn with, a piece at a time, in the tick time other subsystems leave over, and keeps the newest of them.
SSdiscord
SSearly_assetsInitializes any assets that need to be loaded ASAP. This houses preference menu assets, since they can be loaded at any time, most dangerously before the atoms SS initializes. Thus, we want it to fail consistently in CI as if it would've if a player opened it up early.
SSescape_menuSubsystem for controlling anything related to the escape menu
SSfishingsubsystem for the fishing minigame processing.
SSfluids
SSfoamThe subsystem responsible for processing foam propagation and effects.
SSgarment_fittingMakes the garment fits bodies wait for, a piece at a time, in the tick time other subsystems leave over.
SSgraffitiThe graffiti on the current map: the art and placements its file keeps, which of them show this round, and the sheet files they show from.
SShyperspace_driftThis subsystem handles the hyperspace shuttle pull movement loops
SSid_accessNon-processing subsystem that holds various procs and data structures to manage ID cards, trims and access.
SSinit_profilerSubsystem exists so we can separately log init time costs from the costs of general operation Hopefully this makes sorting out what causes problems when easier
SSlag_switchThe subsystem for controlling drastic performance enhancements aimed at reducing server load for a smoother albeit slightly duller gaming experience
SSlibraryManages library data, loading bookselves, etc
SSlootingQueues image generation for search objects without icons
SSlow_priority_ai_controllersPlans background controllers that are active when unwatched but not critical
SSmouse_enteredDefers MouseEntered inputs to only apply to the most recently hovered over atom in the tick
SSnewtonian_movementThe subsystem is intended to tick things related to space/newtonian movement, such as constant sources of inertia
SSpathfinderQueues and manages JPS pathfinding steps
SSpoints_of_interestSubsystem for managing all POIs.
SSradioactive_nebulaControls making objects irradiated when Radioactive Nebula is in effect.
SSsinguloprocessVery rare subsystem, provides any active singularities with the timings and seclusion they need to succeed
SSsmokeThe subsystem responsible for processing smoke propagation and effects.
SSspatial_grid
SSspeech_controllerverb_manager subsystem just for handling say's
SSsymphonySafety net for revokes we never heard about.
SStguitgui subsystem
SSticket_pingPings admins every (time chosen in config) for all open tickets/OPFOR applications
SStimer
SSturretsThe subsystem used for portable turrets, as they're relatively more intensive compared to most other machines, so we don't want them hogging tick usage from everything else.
SStutorialsNamespace for housing code relating to giving contextual tutorials to users.
SSverb_managerSSverb_manager, a subsystem that runs every tick and runs through its entire queue without yielding like SSinput. this exists because of how the byond tick works and where user inputted verbs are put within it.
SSwardrobeThis subsystem strives to make loading large amounts of select objects as smooth at execution as possible It preloads a set of types to store, and caches them until requested Doesn't catch everything mind, this is intentional. There's many types that expect to either A: Not sit in a list for 2 hours, or B: have extra context passed into them, or for their parent to be their location You should absolutely not spam this system, it will break things in new and wonderful ways S close enough for government work though. Fuck you goonstation
SSweatherUsed for all kinds of weather, ex. lavaland ash storms.
SSwiremod_compositeThis subsystem is to handle creating and storing composite templates that are used to create composite datatypes for integrated circuits
TracyThe byond-tracy instance. This is a GLOBAL_REAL because it is the VERY FIRST THING to initialize, even before the MC or GLOB.
_bitfield_bot_access_flagsbitfield, used by basic bots, for our access flags
_bitfield_bot_cover_flagsbitfield, used by simple bots, for our access flags
_bitfield_covered_slotsMob covered flags
_bitfield_flags_invItem obscured flags
_bitfield_no_equip_flagsInventory slots that can be blacklisted by a species from being equipped into
_bitfield_obscured_slotsMob obscured flags
_bitfield_transparent_protectionItem coverage flags

Procs

GUIDreturns a GUID like identifier (using a mostly made up record format) guids are not on their own suitable for access or security tokens, as most of their bits are predictable. (But may make a nice salt to one)
GetBestWeaponReturns either the best weapon from the given choices or null if held weapons are better
GetTgsStealthKeyGets TGS's stealth key, generates one if none is found
GibberishTurn text into complete gibberish!
HandleUserlessProcCallHandles a userless proccall, used by circuits.
HandleUserlessSDQLHandles a userless sdql, used by circuits and tgs.
ISOtimereturns timestamp in a sql and a not-quite-compliant ISO 8601 friendly format. Do not use for SQL, use NOW() instead
REF\ref behaviour got changed in 512 so this is necesary to replicate old behaviour. If it ever becomes necesary to get a more performant REF(), this lies here in wait #define REF(thing) (thing && isdatum(thing) && (thing:datum_flags & DF_USE_TAG) && thing:tag ? "[thing:tag]" : text_ref(thing))
RangedReachCheckCalled by IsReachableBy() to check for ranged reaches.
RoundDiagBarDiagnostic HUDs!
WEAKREFCreates a weakref to the given input. See /datum/weakref's documentation for more information.
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.
______qdel_list_wrapperthe underscores are to encourage people not to use this directly.
__check_serialization_semverChecks if the actual semver is equal or later than the wanted semver Must be passed as TEXT; you're probably looking for CHECK_SERIALIZATION_SEMVER, look right above
_add_memory_in_rangeUnless you need to use this for an explicit reason, use the add_memory_in_range macro wrapper.
_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
_animate_filterAuxtools REALLY doesn't know how to handle filters as values; when passed as arguments to auxtools-called procs, they aren't simply treated as nulls - they don't even count towards the length of args. For example, calling some_proc([a filter], foo, bar) from auxtools is equivalent to calling some_proc(foo, bar). Thus, we can't use _animate directly on filters. Use this to perform animation steps on a filter. Consecutive steps on the same filter can be achieved by calling _animate with no target.
_export_loopThe main bit responsible for selling the item. Shared by export_single_item() and export_item_and_contents()
_malf_ai_undo_lockdownFor Lockdown malf AI ability. Opens all doors on the station.
_pick_listAllow me to explain for some reason, if pick() is passed arglist(args) directly and args contains only one list it considers it to be a list of lists this means something like _pick(list) would fail need to do this instead
_queue_verbqueue a callback for the given verb/verblike proc and any given arguments to the specified verb subsystem, so that they process in the next tick. intended to only work with verbs or verblike procs called directly from client input, use as part of TRY_QUEUE_VERB() and co.
_save_mapHey bud don't call this directly, it exists so we can invoke async and prevent the buildmode datum being qdel'd from halting this proc
_stack_tracegives us the stack trace from CRASH() without ending the current proc. Do not call directly, use the stack_trace macro instead.
aas_config_announceAnnounces the provided message with the provided variables and config entry type. Only aas_config_entry_type and variables_map are mandatory. Other args are optional.
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_girder_wall_recipeAdds a new /datum/girder_wall_recipe instance to the given recipe list from the given recipe arguments.
add_image_to_clientAdds an image to a client's .images. Useful as a callback.
add_image_to_clientsLike add_image_to_client, but will add the image from a list of clients
add_keybindingAdds an instanced keybinding to the global tracker
add_lua_editor_variantsGiven a list and a list of its variant hints, appends variants that aren't explicitly required by dreamluau, but are required by the lua editor tgui.
add_messengerRegisters an NTMessenger instance to the list of pda_messengers.
add_minimap_blipCreate a minimap blip on the z-level in question, object is optional, and will tie the blip to the object in question, and will clean up itself if the object in question is deleted
add_personality_mood_to_viewersIterates over all mobs that can see the passed movable and adds specific mood events to them based on their personalities.
add_recipes_to_sublistAdd a list of recipes to an existing recipe sublist.
add_startup_messageAdds a startup message to the splashscreen.
add_to_signaler_investigate_logUsed to add a text log to the signaler investigation log. Do not add to the list directly; if the list is too large it can cause lag when an admin tries to view it.
add_verbhandles adding verbs and updating the stat panel browser
admin_ticket_logUse this proc when an admin takes action that may be related to an open ticket on what what can be a client, ckey, or mob player_message: If the message should be shown in the player ticket panel, fill this out log_in_blackbox: Whether or not this message with the blackbox system. If disabled, this message should be logged with a different proc call
adminscrubRuns STRIP_HTML_SIMPLE and byond's sanitization proc.
adult_items_gated_typesEach adult items family's top types, one line per family. The adult_items_kill_switch unit test checks every concrete subtype.
ai_eye_turf_in_viewAI can also see emotes!
ai_toggle_hidingShared logic for actually flipping a mob's hidden state. Used by both the explicit toggle_hiding leaf and the random_hiding decision leaf.
alert_sound_to_playingThis is quite franlky the most important proc relating to global sounds, it uses area definition to play sounds depending on your location, and respects the players announcement volume. Generally if you're sending an announcement you want to use priority_announce.
alert_to_permissions_elevation_attemptSends a message in the event that someone attempts to elevate their permissions through invoking a certain proc.
all_junctions_of_dirTakes a direction, turns it into all the junctions that it lines up with
alone_in_areaChecks if the mob provided (must_be_alone) is alone in an area
amount2sheetTurns material amount into the number of sheets, returning FALSE if the number is less than SHEET_MATERIAL_AMOUNT
announce_arrivalSend a message in common radio when a player arrives
anyprobchances are 1:value. anyprob(1) will always return true
apply_active_reta_grants_to_cardApplies any currently active RETA grants to a newly created/spawned ID card This should be called when ID cards are created, spawned, or have their trim changed
apply_cyborg_customizationPreference application is separate from model selection, hardware, laws and names.
apply_dynamic_human_appearanceThis exists to apply the icons async, as that cannot be done in Initialize because of possible sleeps.
apply_icon_maskA simple helper proc to apply a mask to an icon Arguments:
apply_matrix_to_colorApplies a color filter to a hex/RGB list color
apply_message_emphasisReplaces player chat emphasis characters with the corresponding HTML tags in the input string.
armor_to_protection_classRounds armor_value down to the nearest 10, divides it by 10 and then converts it to Roman numerals.
armor_to_protection_nameReturns the client readable name of an armor type
assemble_body_markings_from_setBuilds a new collection wearing a marking set: each of its markings on every zone the marking claims, in the set's order.
assert_sortedRuntimes if the passed in list is not sorted
assign_random_nameGenerate a name devices
assoc_to_keysTurns an associative list into a flat list of keys
assoc_to_keys_featuresTurns an associative list into a flat list of keys, but for sprite accessories, respecting the locked variable
assoc_to_valuesTurns an associative list into a flat list of values
at_leastTakes a value, and a threshold it has to at least match returns the correctly signed value max'd to the threshold
atmos_handbooks_initAutomatically populates gas_handbook and reaction_handbook. They are formatted lists containing information regarding gases and reactions they participate in. Structure can be found in TS form at AtmosHandbook.tsx
atmos_scanOutputs a message to the user describing the target's gasmixes.
augment_paint_matrixReturns a recolourable finish's colour matrix for one of its packed states: numeric and 4x4, rows red, green, blue, alpha, as Nova's naga tail builds its (constrict.dm). Never rows of colour strings, which map_colors_inferred() can't flatten for the drawn character preview. Each is built once and kept, by colours, state and alpha, until AUGMENT_PAINT_MATRIX_CACHE_SIZE are kept; then the cache is emptied before the next is added, since a player can apply colours without end. A matrix is cheap to build again, and a limb keeps the one it was given.
autopunct_bareEnsures sentences end in appropriate punctuation (a period if none exist) and that all whitespace-bounded 'i' characters are capitalized. If the sentence ends in chat-flavored markdown for bolds, italics or underscores and does not have a preceding period, exclamation mark or other flavored sentence terminator, add a period. (e.g: 'Borgs are rogue' becomes 'Borgs are rogue.', '+BORGS ARE ROGUE+ becomes '+BORGS ARE ROGUE+.', '+Borgs are rogue~+' is untouched.)
avoid_assoc_duplicate_keystakes an input_key, as text, and the list of keys already used, outputting a replacement key in the format of "[input_key] ([number_of_duplicates])" if it finds a duplicate use this for lists of things that might have the same name, like mobs or objects, that you plan on giving to a player as input
baseturfs_string_listA wrapper for baseturf string lists, to offer support of non list values, and a stack_trace if we have major issues
begin_the_endBegins the process of ending the round via cult narsie win Consists of later called procs (in order of called):
bit_countcounts the number of bits in Byond's 16-bit width field, in constant time and memory!
bitfield_to_listConverts a bitfield to a list of numbers (or words if a wordlist is provided)
blend_colorBlend two colors using the normal blend mode of the CSS compositing algorithm
blend_cutoff_colorsUsed to blend together two different color cutoffs Uses the screen blendmode under the hood, essentially just /proc/blend_screen_color But paired down and modified to work for our color range Accepts the color cutoffs as two 3 length list(0-100,...) arguments
blend_screen_colorBlends together two colors (passed as 3 or 4 length lists) using the screen blend mode Much like multiply, screen effects the brightness of the resulting color Screen blend will always lighten the resulting color, since before multiplication we invert the colors This makes our resulting output brighter instead of darker
blend_weighted_lists
body_marking_collection_from_listThe tolerant loader for the nested shape preferences.json stores: zone -> (marking name -> list(color, emissive)).
body_marking_colors_old_set_namesWhat each of the seven species that had a randomiser of its own could pick, as those get_random_body_markings() overrides were written before get_random_marking_sets() replaced them: a forced set, a fixed list to pick from, or the sets meant for any species or for this one. Kept here, and nowhere in the game, as the reference.
body_marking_colors_scanned_setThe marking set factory as it was before it read each marking's affected_bodyparts: every member against every zone's marking list, in GLOB.body_markings_per_limb order. Colours come from seed_color(), the only colour source there is now, so comparing the two compares which entries land on which zones, in what order.
body_marking_compat_fullSaved marking maps exactly as preferences.json holds them, written out by hand so no loader or serializer change can regenerate them. Every zone wears the fixture's markings (body_marking_fixture.dm), each of which claims all eight zones, in an order no zone list or marking list sorts into, with glow mixed.
body_marking_compat_round_tripLoads a saved marking map the way a character load does and writes it back the way a save does.
body_marking_entries_cache_keyReturns a string standing for a list of entries, in order, with their colours and glow.
body_marking_entries_copyCopies a list of entries into new ones, as deep_copy_list() copied the nested shape.
body_marking_entries_from_listBuilds new entries for one zone from its nested shape: marking name -> list(color, emissive).
body_marking_entries_to_listRebuilds one zone's nested shape from its entries: marking name -> list(color, emissive).
body_marking_rename_retiredRenames retired marking names in the nested shape preferences.json stores, zone by zone and in place, by GLOB.body_marking_renames. A zone holding a retired name and the name it became wears the same art twice, so it keeps one entry: the later one, which drew on top, in its place and colour, glowing if either glowed, as the lower one's glow showed through a top one that didn't glow. A zone with nothing to rename is left as it is.
body_marking_set_types_for_speciesReturns the body marking sets meant for any species or for this one, the "None" set included.
body_marking_sheet_sizeReturns the size of a body marking sheet as "[width]x[height]", read once per sheet. moth_markings.dmi is 45x34, every other sheet 32x32. Null for an icon built at runtime, whose text names no file ("/icon" for every one), so a content key could not tell two apart.
body_marking_sheets_blendReturns whether markings on two sheets can blend into one icon: sheets of one size, and never an icon built at runtime.
body_markings_of_zone_for_speciesThe body markings a zone offers a species: all of them with mismatched parts, otherwise those meant for any species or this one.
body_zone2cover_flagsFor finding out what body parts a body zone covers, the inverse of the below basically
border_diamond_range_turfsReturns the list of turfs around the outside of a center based on RANGE_TURFS()
bug_report_blankWhether a field counts as empty, by the same rule as the reporting service.
bug_report_bridge_originReturns the configured bridge address when it's a loopback one on this machine, the only kind we ever talk to, otherwise null
bug_report_budgetSpends one of a ckey's hourly allowances, mirroring the reporting service's own caps.
bug_report_budget_fillSpends what's left of a ckey's hourly allowance of one kind, for when the reporting service says it's all used.
bug_report_cleanup_temporaryRemoves staged screenshot files a day old or more, at most once an hour.
bug_report_context_snapshotFreezes what the game looked like for a report, as plain values the bridge stores as they are.
bug_report_image_nameWhether a file name is one of the image types the reporting service decodes
bug_report_temporary_pathA fresh generated path for a staged screenshot file, sweeping old ones now and then
bug_report_uses_leftCounts what's left of a ckey's hourly allowance of one kind, forgetting uses over an hour old.
bug_reports_enabledWhether reports go to the reporting bridge, which only ever means the one on this machine
build_chemical_reactions_listsChemical Reactions - Initialises all /datum/chemical_reaction into a list It is filtered into multiple lists within a list. For example: chemical_reactions_list_reactant_index/datum/reagent/toxin/plasma is a list of all reactions relating to plasma For chemical reaction list product index - indexes reactions based off the product reagent type - see get_recipe_from_reagent_product() in helpers For chemical reactions list lookup list - creates a bit list of info passed to the UI. This is saved to reduce lag from new windows opening, since it's a lot of data.
build_exploration_site_ui_dataHelper proc for exploration site listings in ui.
build_mutant_partFactory helper proc for creating and returning a new mutant_bodypart datum.
build_name2neurowarelistSame as build_name2reagentlist() but contains only neuroware reagents.
build_name2neurowarelist_safeSame as build_name2neurowarelist() but omits aphrodisiacs.
build_name2reagentlistBuilds map of reagent name to its datum path
build_planeed_apperance_queueTakes a list of mutable appearances Returns a list in the form: 1 - a list of all mutable appearances that would need to be updated to change planes in the event of a z layer change, alnongside the commands required to properly track parents to update 2 - a list of all parents that will require updating
bulge_adaptivebulge_v4.adaptive(cloth, finish, toned = TRUE): the five kinds f, h, H, s, d as lists of three channels.
bulge_blank_tileA transparent 32x32 tile in one direction, loaded once; copy it with icon() before drawing on it.
bulge_clearanceWhere a skirt's shaft shows through the cloth: the anatomy clearance mask (a /datum/bulge_sheet_state) for an identity, or null when the family has none there. Named as the skirt's shape without its legs, in skirt_clearance.dmi: a clearance is the same on plain and digitigrade legs. With a clearance the anatomy is drawn behind the skirt and, inside the mask, above its cloth; an empty mask shows none of it above.
bulge_clipped_iconReturns a sprite kept only inside a shape's pixels (what a cover draws over itself, kept to a look's cloth): the sprite's frames times the template's union mask (bulge_template_masks()), as one registered icon whose state "" faces all four ways. The image drawing it keeps the sprite's own colour. Cached on the template by sprite and state; null when the state is missing or not 32x32, or the template has no pixels.
bulge_cover_familyThe family a cover garment bulges with, or null.
bulge_cover_layerThe layer a cover garment is drawn at: an underclothes accessory's own, else its drawn appearance's.
bulge_cover_printedWhether a cover garment's own print carries onto its bulge.
bulge_cover_slotThe overlays_standing slot a cover garment is drawn in, or null.
bulge_cut_cover_flapReturns the cover garment with a flap cut away: its sprite with every pixel of the flap made transparent (the lifted part of a revealing skirt's hem), as one registered icon whose state "" faces all four ways; nothing is cut facing north. One flap serves every garment with that hem. Cached like a patch; null when the sprite is not a 32x32 resource or has no such state.
bulge_cut_cover_patchReturns a loincloth with its lifted flap cut away: its sprite kept only where the cut's keep mask (bulge_patch_keep()) is opaque, as one registered icon whose state "" faces all four ways. Only the mask's alpha is used, so the wearer's own garment pixels stay. Cached like a patch; null when the sprite is not a 32x32 resource or has no such state.
bulge_cut_forThe cut a cover of family is drawn with under a hard penis of this identity: a revealing skirt's flap (a /datum/bulge_print_template) or a loincloth's derived cut (a /datum/bulge_sheet_state); null when it is drawn whole.
bulge_cut_spriteA sprite cut by a flap (/datum/bulge_print_template) or by a loincloth's derived cut (/datum/bulge_sheet_state), or null.
bulge_decode_templateDecodes a sheet state into a print template, once per sheet and state: each pixel facing south, east and west with its kind, read from its fixed grey (a kind map), or as cloth (a mask, when mask). North is never read: it is empty in every template sheet. A state saved with one direction is read facing south every way, as getFlatIcon() treats one. The template's key names its sheet and state, so no two sheets can share a cached template.
bulge_derive_cutCuts a cover by a keep mask (see bulge_cut_cover_flap() and bulge_cut_cover_patch()), uncached: the sprite times the keep mask.
bulge_derive_drapeDerives a loincloth's drape, as bulge_drape_name() names it, by the approved rule: facing east the flap's top edge follows the penis from its hinge, up to BULGE_DRAPE_REACH columns, then the rest of the flap hangs past the tip or, from a penis reaching further, drops over its side; facing west the same, mirrored; facing south the flap's top and hem rows where the loincloth's own sprite has cloth. Kept for the round, by its name, with the decoded templates; pixels in the order bulge_decode_template() reads a sheet. Arguments as bulge_drape_name().
bulge_derive_largeDerives a shape past small_cap from the penis and testicle sprites by the approved rule, in whole numbers: the cloth the bulge pushes out, as a kind map, or with mask the anatomy it leaves bare, as a white mask (null where it covers the whole penis). Pixels facing south, east and west, in the order bulge_decode_template() reads a sheet, as the sheet states it replaced held them; facing east and west, every penis shape but the human one takes amendments to that rule (see below), and its mask is what the amended cloth leaves bare. The kind map is kept for the round, by its name, with the decoded templates; the mask is not (bulge_exposed() keeps the tile drawn from it). Arguments as bulge_large_name(): owner is the family whose shapes past small_cap these are.
bulge_derive_print_patchDerives a printed patch (see bulge_print_patch()), uncached.
bulge_drapeThe drape a hard loincloth hangs over the penis, as a kind map derived the first time (bulge_derive_drape()), or null where it has none.
bulge_drape_nameThe name of a loincloth's drape: "[drapes][penis shape][sprite size]", "_untoned" as bulge_large_name(), and "_flat" from the family's flat_tip_from on a shape that grows past size 4.
bulge_drawn_leafThe drawn sprite of a worn appearance: the appearance itself, or the first child of the KEEP_TOGETHER root build_worn_icon() nests separate overlays under. Null when it draws none.
bulge_drawn_rootThe first visible appearance of a drawn slot (a slot holds one, or a list with emissive roots beside them).
bulge_exposedThe anatomy a bulge past the family's small_cap leaves bare, as a white mask (a /datum/bulge_sheet_state): the derived state of the bulge_shape() of the same identity, its tile drawn from the pixels bulge_derive_large() derives for it. Null where nothing shows, the shape covering the whole penis. Arguments as bulge_shape().
bulge_family_sizeThe size a family draws a bulge of size at: its own up to its cap for the form, the cap past it; 0 for none.
bulge_flapThe flap a revealing skirt cuts away from its cover when hard, as a decoded mask (a /datum/bulge_print_template, every pixel cloth) for bulge_cut_cover_flap(), or null when the family cuts none. Named as the skirt's hard shape, in skirt_flaps.dmi.
bulge_flap_keepA flap's keep mask: opaque white over the whole 32x32 tile in all four directions except the flap's own pixels, which are transparent. Built once per flap (GLOB.bulge_flap_keeps), so a cut costs one multiply.
bulge_four_wayA sprite's state as an icon with four directions, frame 1: a state with one direction is its south view every way, as getFlatIcon() treats one. Null when the state is missing or not 32x32.
bulge_hcy_rawbulge_v4._hcy_raw: HCY to unclamped RGB fractions.
bulge_hcy_to_rgbbulge_v4.hcy_to_rgb: drops chroma by bisection until the colour fits, then rounds half to even.
bulge_held_sizeWhat the underwear under a look's cover (bulge_restraint()) leaves of the look. Underwear always takes precedence: it holds the penis in, unless its own look would show some of it at this size and arousal, the anatomy its exposed mask leaves bare (briefs from size 5, long johns' tip hard from size 5) or a loincloth's drape when hard. bulge_resolve() and bulge_wanted_cut() both decide by it, so a cover is drawn cut only for a look that shows the penis through it.
bulge_hue_numeratorA colour's hue in sixths of a turn times its chroma, in [0, 6 * chroma): the hue as an exact fraction over chroma.
bulge_is_accessoryWhether a child of a uniform's drawn sprite is one of its accessories (get_accessory_overlays()): drawn in the accessory's worn state, whichever file the wearer's species draws it from.
bulge_large_nameThe name of a shape past small_cap: "[shapes][form][size][legs][penis shape]", "_untoned" for a shape whose untoned sprites have shapes of their own, drawn without skin tones; the size as bulge_large_size(). Legs are digitigrade only where the family has digitigrade versions of that form.
bulge_large_sizeThe size whose shape a bulge past small_cap draws: past size 6, a penis whose sprite has stopped growing (its size affix cap, with skin tones when toned) keeps size 6's shape.
bulge_loincloth_cutThe cut a hard loincloth takes under its drape (a derived /datum/bulge_sheet_state named "[drapes]cut[hem]", whose keep mask says what of the garment stays inside the cut window), or null. The cut follows the drape: at the lowest row its drape reaches facing south, or, for a drape that stays above the hem rows there (a tentacle's stub), the family's lifted_hem. Its keep mask (bulge_patch_keep()) is cut from the loincloth's own sprite as the approved previews cut it: facing south the flap's columns below the hem go, facing east and west the flap's two columns from its hinge row down, facing north nothing. Arguments as bulge_drape().
bulge_mask_showsWhether a mask shows anything. A skirt's anatomy clearance can be empty (the shaft shows behind the skirt and none of it above), and anatomy masked by an empty one would be a fully transparent icon, derived and sent for nothing. Read once per state, from its frames facing south, east and west (north is empty in every template sheet); a derived mask has no sheet, and always shows something (bulge_exposed()).
bulge_mask_tileA mask placed on the 32x32 tile, in all four directions: transparent outside the mask. Built once per state (GLOB.bulge_mask_tiles), kept on the server and never sent: drawn from pixels when given (a derived mask's pixels as a template, as bulge_derive_large() derives them and bulge_exposed() passes them before it returns the mask), else from the mask's sheet.
bulge_masked_iconReturns anatomy restricted to a mask: an icon state's frames kept only where a white mask is opaque (the bare part of a penis past a family's small_cap, or what of it shows above a skirt), as one registered icon whose state "" faces all four ways. The image drawing it keeps the anatomy's own colour, so one masked copy serves every colouring. Cached by its inputs; null when the state is missing or not 32x32.
bulge_memo_listThe slots list memo[first], created on first use with slots empty slots.
bulge_memo_slotsThe slots list memo[first][second], created on first use with slots empty slots.
bulge_mirrorvalue folded into first..last as between two mirrors, the ends not repeated, so alternating stripes keep alternating across the fold.
bulge_nearest_runThe index in runs (flat ascending (first, last) pairs) of the run nearest value; the first of equals.
bulge_over_signatureWhat a worn cover draws over its own sprite (overlays, from bulge_over_overlays()), as one string: each overlay after the first on the float plane. Null for none. An icon built at run time (mess baked on the cover) has no name of its own, so it goes in by reference, after DIRT_PRIVATE_KEY: each one is new, so the look's key, the chest's, keeps its images on the wearer rather than in tg's shared limb_icon_cache (limb_icons_for()).
bulge_palette_exceptionThe palettes this float32 port computes one off in a channel from the approved values (computed in float64), with the approved palette to use instead: 71 channels in 38 (colour, finish) pairs, all where float64 lands on the other side of a half (#afafaf's shade is exactly 136.5). Found by sweeping every colour the approved palettes were made for, the 4,096-colour grid of multiples of 17 and 760 garment colours, natively against them; every other one of their 218,520 channels the float32 computation gives exactly. A change to the arithmetic above needs that sweep again. Null when the computation stands.
bulge_palette_textA GAGS palette as one string, as its producer joins a list; null for anything that is no palette.
bulge_patch_keepA loincloth cut's keep mask: opaque white over the whole 32x32 tile in all four directions, except the pixels the cut takes away. Built once per cut (GLOB.bulge_patch_keeps) from erased, those pixels facing south, north, east and west (lists of indices, row * 32 + column + 1 from the top left), which bulge_loincloth_cut() derives and passes before it returns the cut; asked for again, without erased, it is the one built then.
bulge_penis_stateThe state of a penis shape's sprite a shape past small_cap is derived from, as the approved previews chose it: drawn in front, hard or half hard, skin-toned where the sprite has that and the shape is drawn toned, at sprite_size or the largest smaller size the sprite has. Null where it has none.
bulge_print_colourThe colour of a patch pixel (rgb() text) from the garment pixel the rule chose (GetPixel() text): the pixel itself for cloth, or the pixel under the kind's translucent white or black. A partly transparent garment pixel gives its colour; patches are opaque.
bulge_print_patchReturns the printed patch for a garment sprite under a bulge template: one registered icon whose state "" faces south, east and west (north stays empty), drawn over the garment where the bulge pushes it out. Derived the first time and cached; null when the sprite has no print to carry, or is not a 32x32 resource.
bulge_printed_patchA printed garment's precoloured patch past its family's small_cap (a /datum/bulge_sheet_state, drawn as it is), or null when its prints there are derived or it has none: the patch drawn for the penis shape's profile where the sheet has one (the human penis's name with the shape's icon state appended, and "_untoned" after it first for a shape drawn without skin tones whose untoned sprites draw differently), else the human penis's. None for a penis shape that draws the family's small_cap shape there (bulge_shape_size(): the tentacles, a shape past its print_cap), which keeps that shape's print. Arguments as bulge_shape(); with no penis shape, the human penis's.
bulge_register_iconRegisters an icon built at run time in the resource cache, as tg's derived icons are. The GetPixel() makes BYOND finish its deferred icon operations first, as GAGS does before it caches an icon.
bulge_rgb_to_hcybulge_v4.rgb_to_hcy: colorsys hue in degrees, chroma and Rec. 601 luma in 0-100, from 0-255 channels.
bulge_round_half_evenPython's round(): a half goes to the even neighbour.
bulge_shapeThe shape a garment of family bulges with, as a kind map (a /datum/bulge_print_template), or null where the family has none. Decoded the first time, or past small_cap derived (bulge_derive_large()); then a few list reads.
bulge_shape_ownerThe family whose shape, anatomy clearance or flap a family draws at a size up to its small_cap: itself, or the family it names by design for that form (half_shapes_of, hard_shapes_of), except at the hard sizes in own_sizes, the family's own of that kind (own_shape_sizes, own_clearance_sizes or own_flap_sizes).
bulge_shape_sizeThe size whose shape a family draws for a bulge of size on a penis shape: bulge_family_size(), except that past the family's small_cap, where shapes follow the penis shape, a shape with none of its own (bulge_hyper FALSE, the tentacles) draws the family's small_cap shape, as any other shape draws at that size, and so does a shape past its print_cap (Nondescript (Alt), Tapered (Alt) and Hemi (Alt)); 0 for none.
bulge_shape_whereWhere a family's shape for an identity is (see bulge_shape()), or null when the family has none there. Where the family has a precoloured printed patch (bulge_printed_patch()), the patch is drawn instead: no shape (the look shows the anatomy the shape of large_shapes_of leaves bare, under the patch: bulge_resolve()). The sheet is chosen by the garment's own family (a skirt reads skirt_shapes.dmi whichever family owns the shape), and a family named by half_shapes_of, hard_shapes_of or large_shapes_of is followed one level only: it must own its shapes. Past small_cap the shape has no sheet: the derived state named as bulge_large_name() names it.
bulge_sheet_stateThe one /datum/bulge_sheet_state for a sheet's state, or null when the sheet has no such state; with no sheet (icon_file null), the one for the derived state of that name.
bulge_sizeThe bulge size, 1 to 8, of a penis this long in inches: past 36 inches the penis sprite's own size thresholds (penis/get_sprite_size_string()) carry on, at 37, 49, 57 and 65 inches.
bulge_size_for_lengthBulges: a covered penis, at least half hard, draws the cloth it pushes out over the garment covering it.
bulge_sprite_pixelsOne direction of a sprite the shapes past small_cap are derived from, frame 1, read once and kept for the round (as many as the sprites have states and directions): its opaque pixels row by row from the top, as flat (index, luminance) pairs. The index is row * 32 + column + 1, rows and columns from 0 at the top left; the luminance is that of the pixel tinted with the skin tone, in thousandths, plus one. A penis or testicle sprite is read inside the window those draw in (BULGE_SPRITE_*), a loincloth's (whole) all of it. Null where it has no opaque pixel, or no such state.
bulge_sprite_sizeThe size affix, 1 to 7, the game draws a penis this long with (penis/get_sprite_size_string()), within cap.
bulge_template_masksDerives the white masks an adaptive bulge of a template draws (see /datum/bulge_print_template/var/mask_cloth), once per template: one registered icon per kind it has pixels of, and one of all its kinds together. Their state "" faces all four ways; north stays empty. The palette is the client's tint on them, so a recolour derives nothing.
bulge_towardbulge_v4.toward: turns a hue toward a target by at most amount degrees.
bulge_two_printsWhether two pixels (GetPixel() text) are different colours of a print (red and yellow, red and white) rather than one colour lighter or darker (black and its shine): one has chroma 30 or more and the other not, or both do and their hues are 25 degrees or more apart. Hues are compared as exact fractions, never as floating point; so a hue difference of exactly 25 degrees counts as two prints here, where the preview's colorsys floats may land a hair below 25 and call it one (no approved garment comes near a tie: the smallest margin in the corpus is 1.87 degrees).
bulge_white_tileA white 32x32 tile in one direction, loaded once; copy it with icon() before drawing on it.
calculate_light_offsetReturns a list of x and y offsets to apply to our visual lighting position
calculate_projectile_angle_and_pixel_offsetsCalculates the pixel offsets and angle that a projectile should be launched at.
calculate_tgm_header_indexGenerates a key matching our index
callback_on_everyone_on_zInvokes a callback on every living mob on the provided z level.
callback_selectRuns a list of callbacks asyncronously, returning only when all have finished
can_be_headrevChecks if someone is valid to be a headrev
can_hear_radio_ttsChecks if the passed mob can hear radio TTS
can_seeStep-towards method of determining whether one atom can see another. Similar to viewers() note: this is a line of sight algorithm, view() does not do any sort of raycasting and cannot be emulated by it accurately
capitalizeReturns a string with the first word of the string capitalized.
capitalize_wordCapitalizes the first symbol in a passed string. Unsafe when used with BYOND string macros, use capitalize() instead!
censor_ic_filter_for_pdasGiven a pda message, will replace any match in the message with grawlixs.
center_imageCenter's an image. Only run this on float overlays and not physical Requires: The Image The x dimension of the icon file used in the image The y dimension of the icon file used in the image eg: center_image(image_to_center, 32,32) eg2: center_image(image_to_center, 96,96)
character_preview_animationA look's animation, for a walk: its facings' patches, as one iconforge recipe, and the steps the page shows them in. flats is each facing's flat icon, stamped whether one flat walked facing UP serves them all (see uni_icon_facings_json()), and width and height the canvas they share.
character_preview_drawing_under_wayWhether iconforge is drawing a character preview now, which letting go of what it keeps would spoil. tg's asset loader asks too, as it lets go on every fire once its queue has emptied. A drawing whose proc was killed stops counting after CHARACTER_PREVIEW_JOB_TIMEOUT.
character_preview_effectsWhat the page draws over the character preview's drawing, because a flatten leaves it out: the rows tg's height filters move, and the mob's transform (body size). Takes the drawing's frame height and how far its tile sits above the frame's bottom (the "y" the page gets). Returns the page's keys for them, left out when the mob has neither:
character_preview_flat_boxA flat icon's canvas, list(x1, y1, width, height): where its lower left pixel sits, counted from the flattened look's own (1, 1), and its size. A grown canvas says so itself; any other is its icon's, at (1, 1).
character_preview_glowA look's glow, flattened facing dir onto box, its drawing's canvas as list(x1, y1, width, height) from the look's own lower left pixel, or null when nothing in it glows. always draws it whatever it holds, blank if nothing, for a facing whose drawing's other facings glow.
character_preview_glow_test_bodyA preview body from preferences: lit is a lizard with emissive eyes and a glowing chest marking.
character_preview_glow_test_lit_pixelsHow many of a glow's pixels light what is under them: red (blooming) or green, through any blockers.
character_preview_map_pixel_moveHow one displacement map pixel moves its row: -1, 0 or 1 as character_preview_map_rows() has them, or null when it moves it sideways or by part of a pixel.
character_preview_map_rowsHow a displacement map moves each of its rows, from the bottom: -1 when a row shows the row below, 1 the row above, 0 itself. FALSE for a map that isn't a tile wide, or whose rows don't each move whole and as one. tg's heights use a handful of shared maps, so each is read once.
character_preview_rowsThe runs of frame rows that the mob's displacement filters move, as character_preview_effects() gives them, or null if there are none or one moves more than whole rows. Filters run in the order tg keeps them, each map centred on the tile and then moved by its own offset.
character_preview_turns_itselfWhether something redraws a mob when it turns, so each facing of it has to be walked on its own.
character_preview_walkA look's facings as iconforge recipes, on one canvas that grows to fit parts that reach past the mob's tile, like big ears and wings: list("recipes" = facing -> recipe, "height" = canvas rows, "x" and "y" = how far the canvas reaches left of and below the tile).
chastity_flavourSends optional server-owned flavour text. A checkout without private config sends no message.
chatter_speakWe're going to take a list that dictates the pace of speech, and a sentence fragment to say Then say() that fragment at that pace You can pass in a starting delay to wait before speaking the next sound
check_asay_linksChecks a given message to see if any of the words are something we want to treat specially, as detailed below.
check_atom_crushableCan this atom be curshed by the vending machine Arguments
check_behindChecks to see if atom/source is behind atom/target
check_holidaysChecks that the passed holiday is located in the global holidays list.
check_pda_message_against_filterChecks a PDA message against the IC/Soft IC filter. Returns TRUE if the message should be sent. Notifies the user passed in arguments if the message matched either filter.
check_target_facingsReturns the direction that the initiator and the target are facing
check_teleport_validValidates that the teleport being attempted is valid or not
check_topdown_validityChecks if a passed in MA or atom is allowed to have its current plane/layer matchup
check_wall_itemCheck if there is already a wall item on the turf loc floor_loc = floor tile in front of the wall dir_toward_wall = direction from the floor tile in front of the wall towards the wall check_external = truthy if we should be checking against items coming out of the wall, rather than visually on top of the wall.
check_whitelistChecks whether someone's whitelisted or not. Will return FALSE if the whitelist hasn't been loaded yet (which shouldn't normally happen).
check_zoneConvert a PRECISE ZONE into the BODY_ZONE
chem_splashThe basic chemical bomb proc. Combines a set of reagent holders into one holder and reacts it. If there are any reagents left over it spreads them across the surrounding environment. The maximum volume of the holder is temporarily adjusted to allow for reactions which increase total volume to work at full effectiveness. The maximum volume of the holder is then reset to its original value.
circle_rangeReturns all atoms present in a circle around the center
circle_range_turfsReturns a list of turfs around a center based on RANGE_TURFS()
circle_viewReturns all atoms present in a circle around the center but uses view() instead of range() (Currently not used)
circle_view_turfsReturns a list of turfs around a center based on view()
claim_nova_import_promptOne non-yielding claim enforces both cooldowns; persistent clients survive reconnects.
cleanup_expired_reta_grantCleans up an expired RETA grant from the active grants registry
cleanup_ghostsGives a farewell message and deletes the ghosts produced by a ghost portal structure.
cleanup_overmind_blobsClean up blob references after overmind is destroyed - called asynchronously to avoid blocking Destroy()
clear_owned_masked_leg_iconsRelease owned metadata when the existing masked-leg cache is explicitly cleared.
clear_status_display_biohazardClear specific emergency types
clear_status_display_emergencyClear a specific emergency type from status displays emergency_type: The specific type to clear ("biohazard", "lockdown", "radiation", etc.) If emergency_type is null, clears ALL emergencies
clip_pubic_hairReturns pubic hair clipped to the bare skin under a baring underwear: each of its pixels is kept only where the body is drawn, the chest and legs, and outside the underwear's span in its row, from the underwear's leftmost pixel there to its rightmost, each direction on its own. The hair's colour is the overlay's, so it's left out: made once a round for each hair state, underwear sprite and body, a cached resource.
clockwork_sayCauses the mob or movable in question to speak a message; it assumes that the message is already translated to ratvar speech using text2ratvar()
cmp_assoc_list_namePassed a list of assoc lists, sorts them by the list's "name" keys.
cmp_autowiki_fish_sources_contentSort the autowiki fish entries by their weight. However, duds always come first.
cmp_bodypart_by_body_part_ascOrders bodyparts by their body_part value, ascending.
cmp_camera_ctag_ascOrders cameras by their c_tag ascending
cmp_client_coloursSorts client colors based on their priority
cmp_crafting_req_prioritySorts crafting recipe requirements before the crafting recipe is inserted into GLOB.crafting_recipes
cmp_custom_sprite_region_layerOrders custom_sprite_region_map()'s images by layer, lowest first. sort_list() is stable, so region order holds within a layer.
cmp_dirt_parts_drawnSorts parts lowest drawn first: the higher layer number draws under.
cmp_dirt_underclothes_drawnSorts underclothes from dirt_underclothes_sprites() lowest first: the higher layer number draws under.
cmp_fish_fluidOrders fish types following this order (freshwater -> saltwater -> anadromous -> sulphuric water -> any water -> air) If both share the same required fluid type, they'll be ordered by name instead.
cmp_heretic_knowledgeOrders heretic knowledge by priority
cmp_mob_healthOrders mobs by health
cmp_port_order_ascOrders by integrated circuit weight
cmp_preview_region_costOrders regions by what all their patches would take, cheapest first.
cmp_rped_sortSorts stock parts based on tier
cmp_species_family_orderSorts species family types by sort_order, lowest first.
cmp_uplink_category_descOrders by uplink category weight
cmp_vending_pricesOrders vending products by their price
color_to_full_rgba_matrixConverts RGB shorthands into RGBA matrices complete of constants rows (ergo a 20 keys list in byond). if return_identity_on_fail is true, stack_trace is called instead of CRASH, and an identity is returned.
color_transformConstructs a transformer, with optional color multiply pre-added.
colorize_stringGets a color for a name, will return the same color for a given string consistently within a round.atom
compare_listcompare two lists, returns TRUE if they are the same
condo_flat_renderFlattens a loaded room to a clean top-down icon: floors then objects, no lighting or parallax planes (those are what turn the picture into garbage).
condo_force_areasMoves every reserved tile into a fresh /area/misc/condo so the room links up correctly.
condo_preview_asset_nameAsset name for an interior from its map path (".../alleyway.dmm" -> "condo_alleyway.png").
condo_sanitize_lamp_colorA valid "#rrggbb" lamp color or "" (default) - never trusts a raw client string.
condo_skip_turfTRUE for turfs we don't want in the picture: the empty space around the room and the yellow cordon tiles the maps use as a boundary.
condo_validate_custom_mapLoads the template once into a temp reservation to confirm it loads + has a condo door, fixes its areas in the process, then frees it. Returns TRUE if it's usable.
considered_afkChecks if a player is considered AFK
considered_aliveChecks if the passed mind has a mob that is "alive"
considered_escapedChecks if the passed mind is considered "escaped".
considered_exiledExiled check
construct_phobia_regexCreates a regular expression to match against the given phobia Capture group 2 = the scary word Capture group 3 = an optional suffix on the scary word
convert_integer_to_wordsTakes an integer up to 999,999,999 and returns it in words. Works with negative numbers and 0.
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.
coords2turfConverts a list of coordinates, or an assosciative list if passed, into a turf by calling locate(x, y, z) based on the values in the list
copy_appearance_filter_overlaysCopies the passed /appearance, returns a /mutable_appearance
cosmic_trail_based_on_passiveIf we are a cosmic heretic, this will return the appropriate effect trail based on our passive level. returns the default trail otherwise
count_by_typereturn the amount of items of the same type inside a list
cracker_reactions_listGlobal proc to build up the list of co2 cracker reactions
create_announcement_divInserts a span styled message into an alert box div
create_atmos_zoneCreate an atmos zone (Think ZAS), similiar to [proc/detect_room] but it ignores walls and turfs which are non-[atmos_can_pass]
create_basketball_gameCreates the global datum for playing basketball games, destroys the last if that's required and returns the new.
create_cosmic_fieldCreates a cosmic field at a given loc
create_ctf_gameCreates a CTF game with the provided team ID then returns a reference to the new controller. If a controller already exists provides a reference to it.
create_delusionHelper to give the passed mob the ability to create a delusion hallucination (even a custom one). Returns a list of arguments - pass these to _cause_hallucination to cause the desired hallucination
create_girder_wall_recipesReturns a list of newly created /datum/girder_wall_recipe instances from the given wall type lists.
create_glass_stylesConstructs a nested list of glass style singletons
create_mafia_gameCreates the global datum for playing mafia games, destroys the last if that's required and returns the new.
create_ooc_announcement_divInserts a span styled message into an OOC alert style div
create_random_booksCreate a random book or books.
create_random_puzzgridReturns a random puzzgrid from config. If config is empty, or no valid puzzgrids can be found in time, will return null.
create_separatist_nation
create_strippable_listCreates an assoc list of keys to /datum/strippable_item
create_uplink_salesSelects a set number of unique items from the uplink, and deducts a percentage discount from them
credits_to_spacecashTakes an amount of credit and returns a list of space cash typepaths that are equivalent to that amount. For example, if you passed 450 credits, it would return a list with a c200, another c200, and a c50 space cash stack typepath. You can then use the list to new() all the types provided if you wanted to give a player that amount in space cash.
cult_ending_helperSelects cinematic to play as part of the cult end depending on the outcome then ends the round afterward called either when narsie eats everyone, or when [/proc/begin_the_end()] reaches its conclusion
cure_curse_of_babelMainly so admin triggered tower of babel can be undone
custom_hair_appendage_nameAn appendage name as saved: tags, stray angle brackets, backslashes and control characters removed, spaces collapsed, at most CUSTOM_SPRITE_MAX_APPENDAGE_NAME characters. Null when nothing is left.
custom_hair_appendage_viewsAn appendage's painted views, re-encoded canonically. Unreadable and empty views are left out.
custom_hair_appendages_exportAppendages in export form: every view and emission setting spelled out, keyed as saved. Null without any.
custom_hair_appendages_validateA drawing's appendages as they are saved, keyed "1", "2", "3" in order, or null when none are left.
custom_hair_appendages_validate_strictStrictly validates a style file's appendages, as custom_style_validate_drawing() does its views. Nothing is salvaged, and messages never repeat uploaded text.
custom_hair_try_on_imageThe hat a try-on puts on the preview: its worn sprite on the head layer, placed as the body places head items.
custom_hair_try_on_mask_rowsWhere a try-on hat's hair mask keeps and trims paint on the hair canvas: per view, height rows, top row first, of eight hex digits. Each digit is four pixels, the leftmost in its high bit: set where the mask keeps paint, clear where it trims. That's a quarter of a character a pixel, and the window sends these with every rebuild. The mask is lowered by the hairstyle's y_offset and carried upward as its top row, as it is on the paint itself. Cached.
custom_hair_try_on_ui_dataThe window's Try on hats for a hair canvas height tall, drawn lift off the tile, over a hairstyle lifted y_offset. The window crops its "Hats that cover it" chips from the front views itself: BYOND exports an icon smaller than a tile padded out to 32 by 32.
custom_hair_try_on_viewsA try-on hat as the hair canvas shows it, per view: its worn sprite placed against paint drawn lift = list(x, z) off the tile. Data URLs, cached.
custom_limb_markings_validateZone drawings keep the existing codec; discard unknown zones and independently copy each valid drawing.
custom_marking_partnerThe other half of an arm/hand pair, which share one limb, or null.
custom_marking_zone_limbThe bodypart that carries a marking zone's paint.
custom_marking_zone_overlay_typeThe overlay identity for a marking zone, so zone, hand and taur paint on one bodypart stay independent.
custom_marking_zone_widthA zone's own drawing width: the taur spans the wide canvas, everything else the body's 32 pixels.
custom_sprite_all_viewsThe drawing's own view list, then each appendage's: live references, so writes change the drawing.
custom_sprite_appearance_drawingAppearance copies honor the master preference without changing saved layer settings, appendages' included.
custom_sprite_append_maskAdds paint's glow mask (glowing) or blocker mask to overlays for the facings whose emissive setting matches, placed like visible. Adds nothing when no facing matches. Dropped heads and limbs face South.
custom_sprite_apply_region_resultsPuts every region's drawing and base markings on a body, then redraws it once.
custom_sprite_apply_round_styleChanges a live body's round appearance for one drawing target.
custom_sprite_apply_round_stylesChanges a live body's round appearance for several drawings, redrawing it once.
custom_sprite_background_tilesNova's character preview backgrounds as tiles for the custom editors' background swatches.
custom_sprite_blank_iconA blank in every editable direction, including bald hairstyles without an icon state. Insert() alone leaves an empty icon reporting 0x0, so seed its dimensions from the blank.
custom_sprite_body_draw_maskRow strings keep the wire payload small and test the same silhouette used by rendering. wrist gives a hand its wrist band.
custom_sprite_body_draw_mask_keyWhat custom_sprite_body_draw_mask() draws a zone's silhouette from, as text: the canvas, the zone, and the icons and states of the limbs that draw it. The same key draws the same mask, so it stands for the mask's rows in other keys.
custom_sprite_body_silhouetteCompose geometry in the canvas frame without stretching or changing the body's origin. wrist gives a hand its wrist band.
custom_sprite_boxes_recipeA blank tile with these iconforge transforms applied in order, such as DrawBox boxes, as a recipe, or null for none.
custom_sprite_cache_putKeep runtime caches bounded. Callers treat cached icons/lists as immutable.
custom_sprite_canvas_boundsFull canvas for hair and facial hair; per-view locks are applied separately.
custom_sprite_canvas_codeA palette index as digits characters of CUSTOM_SPRITE_INDEX_ALPHABET, most significant first.
custom_sprite_colorA colour as #rrggbb lowercase, or null when the text isn't exactly that.
custom_sprite_compat_sidecarA whole account sidecar as the branch wrote it, one slot with every key, and what loading it must give back.
custom_sprite_compat_v1Old-format drawings as the branch's own writer stored them, built without any codec proc so a codec change can't regenerate them. v1, two colours: pixel (0,0) is colour 1 and (1,0) colour 2 in the Front view; 1,022 empty pixels follow (68 runs of 15 and one of 2).
custom_sprite_compat_v1_legacy_emissivev1 as an even older save wrote it: one emissive flag for every view, an explicit filter, a solid Front view (68 runs of 15 and one of 4).
custom_sprite_compat_v2v2, all 63 colours in the Front view's first row, a solid Back view of colour 63, per-view emission.
custom_sprite_compat_v3v3, the 64-wide taur zone, one colour everywhere in the Front view (136 runs of 15 and one of 8).
custom_sprite_compat_v4v4, a tall hair canvas: first and last Front pixels are colour 1; Back is solid colour 2.
custom_sprite_compose_regionsBuilds the whole-body canvas from each region's saved drawing.
custom_sprite_cover_charThe mark that names looks[index] in cover rows: 1 to 9, then a to z.
custom_sprite_cover_labelsThe looks' labels in mark order, for the window's tooltip.
custom_sprite_cover_looksThe looks that can hide paint: the hair, every mutant part drawn on the body, each piece of underwear and, given a wearer, each item they have on. Each look carries its images, offset the way get_limb_icon() draws them, the highest layer it draws on and a label for the window; worn items are also marked worn. Looks come lowest layer first, so stamping them in order leaves the topmost part at each pixel. Parts behind the body, hidden parts, the taur body (which carries its own paint) and emissive images are left out. key, when given, collects what each look is drawn from and where it lands, so rows flattened from these looks can be cached by geometry.
custom_sprite_cover_rowsOne view of the cover looks as rows of marks: "0" where nothing covers, else the mark of the topmost look (custom_sprite_cover_char(N) for looks[N]). Only images drawn after above_layer count, so the same looks serve body paint and hand paint. bounds (0-based, inclusive x0, y0, x1, y1) limits the pixel reads to the drawable box; outside it is clear. With cache_key (from custom_sprite_cover_looks), the same look reuses its rows across rebuilds and editors.
custom_sprite_cover_wornWhich looks, in mark order, are worn items (1) rather than parts of the body (0), for the window's tooltip.
custom_sprite_covered_positionsWhere a region's paint in one view sits under a different limb or outside every region.
custom_sprite_decode_gridReject before expanding, and stop at the supported pixel count even for hostile runs.
custom_sprite_direction_signatureOne view's pixels as color text, so two drawings compare by what they show, not palette order. Appendages' pixels in that view follow the hair's.
custom_sprite_directional_maskInclude explicit blank frames: a missing facing would fall back to the South mask.
custom_sprite_draw_recipesDraws recipes with iconforge, a picture each, on the main thread: a few tenths of a millisecond per picture, where getFlatIcon() takes several for one view of a body. Each PNG goes to publish, a data URL of it when there's none. Returns view -> what publish made of it.
custom_sprite_drawing_pixelsOne drawing's pixels as colors, row-major from the top left.
custom_sprite_emissive_maskReuse the visible paint's placement; shared worn/bodypart preparation owns pose transforms.
custom_sprite_emissive_settingsOlder drawings used one boolean; each view now owns its own saved choice.
custom_sprite_encode_gridEach run is a hex length (1-f), followed by one palette-index character. Coordinates are row-major from the top left, matching SpriteEditor.
custom_sprite_extend_upA copy of a 32-row icon grown to height rows, its top row repeated upward, so hair masks and gradients carry on over tall paint.
custom_sprite_flat_iconClip in body coordinates before flattening can expand a wide or offset overlay's origin. A tall canvas reaches above the tile, and shift_x and shift_z move the whole window the way a lifted hairstyle moves the paint drawn over it.
custom_sprite_forget_picturesDeletes the pictures kept under a name, and under any name it begins.
custom_sprite_grid_args_validGrids are 32 rows of 32 or 64 pixels, or CUSTOM_SPRITE_TALL_HEIGHT rows of 32, indexing a palette of 1 to CUSTOM_SPRITE_MAX_COLORS colors.
custom_sprite_hair_canvas_heightThe hair canvas a base look asks for: tall for custom hair over the tall bald base, otherwise 32 rows.
custom_sprite_hair_cover_keyThe look the head's hair images were built from: those icons are generated at runtime and can't be keyed by path.
custom_sprite_hair_liftWhere a body's hair, and custom hair painted over it, are drawn from the tile, as list(x, z) pixels. A hairstyle drawn above the head, such as Afro (Huge), lifts both, as the species' hair offset does. style names a hairstyle other than the body's own.
custom_sprite_hand_silhouetteA hand's own pixels plus, with wrist, a short band of the arm just above them, so hand paint can't climb the arm.
custom_sprite_hashContent identity of a whole drawing, "empty" for none.
custom_sprite_heightTall hair drawings are version 4; every other drawing is 32 rows.
custom_sprite_history_jumpClamps an undo or redo step count to what a window can ask for. Anything else passes through for the history to refuse.
custom_sprite_hydratePaints a drawing into a workspace's frames, centred on a wider canvas and at the bottom of a taller one.
custom_sprite_icon_boundsInclusive bounds in the editor's top-left coordinate system.
custom_sprite_icon_rowsEach view of a 32-row icon as row strings from the top, width characters each: "0" where it's clear and "1" where it has a pixel. With ids (colour -> region character) a pixel reads as its colour's region instead, and a blend as the region custom_sprite_region_fallback() finds in ordered.
custom_sprite_index_valuesCUSTOM_SPRITE_INDEX_ALPHABET character -> its palette index. "0" is transparent.
custom_sprite_insert_marking_iconsAdds each zone's native marking once to the same cached sheet used by hair preferences.
custom_sprite_lifted_hair_test_topThe topmost painted pixel of a hairstyle's front view, as list(x, y) counted from the bottom left.
custom_sprite_limb_appearanceA body without its hair, so nothing hanging off the head covers the limb being drawn on.
custom_sprite_limb_stateRaw limb geometry, using exactly the state selection in get_limb_icon().
custom_sprite_live_packageThe recipient's live style for one target. Hair includes the whitelisted base hair look.
custom_sprite_live_package_fromThe live form of an applied package: emission follows the body's current permission.
custom_sprite_live_packagesThe recipient's live look for every drawing a salon target covers, by style key.
custom_sprite_marking_iconsImmutable per-zone marking classes, shared by character setup and tattoo editors.
custom_sprite_mask_boundsEach view's paintable area padded by one pixel, from row-string masks.
custom_sprite_mask_pixelsThe pixels a compact stroke mask of size characters marks, or null when it is another size, which custom_sprite_mask_points() refuses unread, or a character isn't in the alphabet.
custom_sprite_mask_pointsA stroke's points from its compact mask: CUSTOM_SPRITE_INDEX_ALPHABET characters, six canvas pixels each, row-major from the top left, lowest bit first. A whole view fits in one short string, so a long stroke reaches the server as one message instead of a point list tgui splits into many. With allowed, the mask's six-pixel slots in the same layout, each character is cut down to the pixels its slot allows as it is read, which checks the points for a canvas that paints only those.
custom_sprite_mask_tablesReads compact stroke masks by character code, which text2ascii() takes far faster than copytext() cuts a character.
custom_sprite_merge_cover_rowsOne view's cover rows with each pixel judged against the layer its own region's paint draws on.
custom_sprite_native_marking_iconsFull-size mirror sprite classes for markings whose sheet is larger than a tile. The ordinary 32x32 markings reuse their picker sprite. Kept beside the picker in the same preferences asset, so hovering requests no drawing.
custom_sprite_obstructing_overlayWhether a bodypart overlay hangs over the limb's paint: every mutant part except the taur body, which carries its own paint, and a moth chest's extra arms.
custom_sprite_packages_hashOne content hash for a set of packages, so a change to any of them shows.
custom_sprite_paint_iconCalled by debounced previews and appearance rendering, never by the per-stroke UI payload. Throwaway drawings skip the cache.
custom_sprite_palette_colorsThe colours a saved or uploaded palette offers, canonical and lowercase.
custom_sprite_picture_iconA drawn PNG as a native icon, for reading its pixels.
custom_sprite_picture_pathWhere custom_sprite_draw_recipes() keeps the picture of one view drawn under a name; size is "[width]x[height]".
custom_sprite_picture_urlA drawn PNG as the data URL a window shows.
custom_sprite_pixel_hashTint and emissive settings affect appearances, not the drawing's raw pixels.
custom_sprite_pixels_drawingEncodes one region's pixels as a canonical, literal-color drawing.
custom_sprite_placement_keyWhere an image lands when flattened: its offsets and layer. Its art is keyed separately.
custom_sprite_present_regionsThe marking regions this body can be painted on right now, in draw order.
custom_sprite_preview_appearanceA body's look with worn overlays added, captured so its views can be flattened one at a time.
custom_sprite_preview_heightThe rows a body's pictures need: taller while its hair drawing reaches above the head, and taller again for a hairstyle drawn above it, such as Afro (Huge). style names a hairstyle other than the body's own.
custom_sprite_preview_widthThe canvas width a body's previews are flattened at: a taur organ widens it.
custom_sprite_private_viewOne region's pixels in one view, copied on first write, since decoded pixels may be shared with the caller's cache.
custom_sprite_region_colorRegion N's ID color. Regions paint nothing else, so a pixel of this color is unambiguous.
custom_sprite_region_fallbackThe region that dominates one blended pixel, as its region character.
custom_sprite_region_id_drawingA solid drawing of region N's ID color across one editing mask, or null when the mask is empty.
custom_sprite_region_mapWhich region owns each canvas pixel, in every view.
custom_sprite_region_maskThe paintable mask of a region map: every pixel an unlocked region owns. locked holds region characters.
custom_sprite_region_ownerThe region owning a canvas pixel (0-based), or null.
custom_sprite_region_pixelOne region's color at a canvas pixel, or null.
custom_sprite_region_positionWhere a canvas pixel falls in one region's own drawing, which may be narrower than the canvas. 0 when outside it.
custom_sprite_region_signatureA cheap fingerprint of one marking zone's live look: its paint's hash and its native markings.
custom_sprite_region_visibleWhat the game shows at a canvas pixel: its owner's paint, with a hand's paint over its arm's.
custom_sprite_render_viewsFront, Back, Right and Left data URLs of a captured look, without flipping any view, from one walk. Each picture's PNG goes through the callback when one is given, in GLOB.cardinals order, and is kept under name when one is given; see custom_sprite_draw_recipes().
custom_sprite_reopen_test_drawingA version 1 drawing with one pixel painted at x, y in its Front view.
custom_sprite_resize_drawingFits canonical paint to a larger canvas: centered on a wide one, at the bottom of a tall one, so it keeps its place on the body. Refuses shrinking, so no paint can be lost.
custom_sprite_run_textOne index character repeated run times (1-15), cut from a string built once per character.
custom_sprite_salon_changesRegion labels a set of packages changes, in body order. Hair packages name none.
custom_sprite_salon_choose_draftAsks which retained draft to reopen. Sleeps on the prompt.
custom_sprite_salon_claim_requestClaims the recipient's single incoming prompt and the pair's request cooldown.
custom_sprite_salon_draft_keyWhere an artist keeps their draft for one drawing target on one person.
custom_sprite_salon_dummyBuilds a private preview body from a live body's current appearance.
custom_sprite_salon_export_liveSends a player their own live look for a salon target: one file for hair, a whole-body file for a tattoo.
custom_sprite_salon_keysStyle keys a salon target covers: the hair target itself, or every marking zone.
custom_sprite_salon_labelWhat salon work on a target is called. A zone names where a tattoo is; without one it's the whole body's.
custom_sprite_salon_open_draftReopens a retained draft for its artist, rebinding the artist's body and tool.
custom_sprite_salon_previousStyle key -> a copy of the look each of a target's drawings had before its last salon change, for those that have one. keys limits it.
custom_sprite_salon_requestAsks a recipient to start custom work, then opens the artist's editor. Sleeps on prompts.
custom_sprite_salon_request_restoreAsks a recipient to restore the looks they had before their last salon change. Sleeps.
custom_sprite_salon_restore_choicesWhat Restore previous offers for several previous looks: the whole body, then each region by name. Label -> style keys.
custom_sprite_salon_restore_problemWhy an artist can't start restoring previous looks, or null. keys limits which looks count.
custom_sprite_salon_resumeResumes a retained draft from a tool's self-use action. Sleeps only when asking which one.
custom_sprite_salon_sessionThe artist's retained draft for one drawing target on one person, or null.
custom_sprite_salon_sessions_forEvery draft this artist has, newest last.
custom_sprite_salon_sessions_for_toolThe drafts this tool can resume.
custom_sprite_salon_start_problemReturns why an artist can't start work on a recipient, or null when they can.
custom_sprite_salon_start_restoreShows the recipient previous looks to restore, in the mirror. keys limits them to the chosen ones.
custom_sprite_salon_target_problemWhy a drawing target can't be worked on. Markings without a zone mean the whole body. Addresses the recipient when they're doing the work.
custom_sprite_salon_tool_menuOffers new custom work or restoration of the previous round style, then starts the request. Sleeps.
custom_sprite_sample_hair_paletteBake effective hair color into source shades; gradients already supply their own RGB.
custom_sprite_sample_paletteSample the most frequent opaque shades from all four authored directions.
custom_sprite_self_mirrorWhether someone can see the parts of themselves they can't look at directly.
custom_sprite_shadeA sampled shade multiplied by a colour's channels, exactly as painted hair shades have always been built. Not custom_sprite_tint_color(): that rounds as the window does, and recolours match paint by these exact values.
custom_sprite_sidecar_pathThe drawing sidecar beside a preferences.json path, or null when the path has no directory.
custom_sprite_silhouetteWhite RGB and original alpha: multiplying by this clips without darkening the paint.
custom_sprite_split_regionsSplits the canvas back into each region's drawing, changing only what was edited.
custom_sprite_tall_hair_test_drawingA 32 by 48 hair drawing with one pixel painted, in every view. Rows count down from the top.
custom_sprite_tall_hair_test_short_drawingA 32 by 32 hair drawing painted in every view, once in its top row and once in its bottom row.
custom_sprite_taur_overlayThe taur organ owns its visible body; its two leg placeholders have no paintable pixels.
custom_sprite_taur_paint_test_drawingA 64 by 32 taur-zone drawing painted solid in one color, in every view.
custom_sprite_taur_silhouetteNative taur geometry in its centered 64 by 32 frame, shared by editing and rendering.
custom_sprite_test_canvas_mismatchReturns where the window's canvas, as an update encodes it, differs from the drawing: the first pixel of a view it carries that doesn't decode to the pixel there, or null when every one does, as a whole encode would.
custom_sprite_test_close_pixelWhether two GetPixel() results are the same colour to within the rounding iconforge and BYOND's icon procs differ by.
custom_sprite_test_drawingA version 1 drawing painted solid with palette index shade in every view.
custom_sprite_test_front_drawingA drawing with one painted pixel, in the Front view only.
custom_sprite_test_hidden_pixelA pixel a region's own mask covers but a different limb owns on the canvas, as list(direction, x, y), or null.
custom_sprite_test_lit_pixelsPixels of a picture that light what is under them on the emissive plane, red or green, as list("x,y").
custom_sprite_test_open_region_pixelThe middle of a region's pixels in a view that nothing drawn over the body covers, as list(x, y), or null.
custom_sprite_test_paint_regionPaints one pixel a region owns with the first color the canvas offers.
custom_sprite_test_paintable_pointThe first pixel this draft may paint in one view.
custom_sprite_test_pool_colorsSaves up to count distinct colors across the body's regions in the Front view, a few per region, and returns how many it placed.
custom_sprite_test_region_drawingA drawing with the same pixels in every view. Points are list(x, y, "#rrggbb").
custom_sprite_test_region_fixtureChest owns x 0-3, the left arm 4-7 and the left hand 8-9 on the first row.
custom_sprite_test_region_pixelThe first canvas pixel a region owns in one view, as list(x, y), or null.
custom_sprite_test_region_rowsA region map whose first row is first_row (padded with "0") in every view; every other row is empty.
custom_sprite_test_region_seamA front-view pixel of upper right above a pixel of lower, as list(x, y) of the upper one, or null.
custom_sprite_test_region_workspaceA region workspace over two regions on the first row: "1" at x 0-3, "2" at x 4-7.
custom_sprite_test_remove_sidecarDeletes a sidecar's primary, backup and staging files.
custom_sprite_test_same_pixelsWhether two icons have the same pixels in every cardinal view of their 32 by 32 area.
custom_sprite_test_selection_placementThe compact placement the selection tool sends for a temporary picture or a final drop.
custom_sprite_test_taurThe real external organ path, including its hidden leg slots and matrixed sprite layers.
custom_sprite_test_wide_drawingA version 3 taur-zone drawing whose every row is row (64 indexes), solid colour 1 by default.
custom_sprite_tint_colorMatch the Custom palette's frontend multiplication and nearest-integer channel rounding.
custom_sprite_transaction_pixelsHow many pixels a stroke or placement touches, from what the window sent, before any validation.
custom_sprite_underwear_looksEach piece of underwear the body shows, as a look of its own: underwear, bra, undershirt and socks.
custom_sprite_validateReconstruct a bounded, canonical payload. Missing directions are ordinary empty canvases. Only hair passes allow_appendages; other drawings lose any.
custom_sprite_versionWide canvases are version 3 and tall ones version 4. Otherwise version 1 holds up to 15 colors and version 2 the rest.
custom_sprite_view_recipesA look in custom_sprite_flat_icon()'s window, facing each of the editors' views, from one universal icon walk: view -> iconforge recipe. custom_sprite_draw_recipes() draws them.
custom_sprite_widthThe format owns the canvas dimensions; legacy drawings always remain 32 by 32.
custom_sprite_worn_looksWhat the wearer has on, a look for each worn item, labelled by its name. Held items are left out.
custom_sprite_worn_overlaysThis body's worn clothing overlays, in layer order. Held items are left out.
custom_sprite_zone_coveredReturns whether worn clothing covers a marking zone.
custom_sprites_after_importImports replace the character identities, so an old slot's drawings cannot carry across.
custom_style_apply_base_markingsChange only this limb/hand's native markings and its DNA snapshot. The caller redraws the body.
custom_style_apply_hair_contextApplies a whitelisted hair look to a live or preview body.
custom_style_body_export_textWhole-body export: every region's drawing and base markings in one file.
custom_style_copy_markingsCopy record arrays without deep_copy_list() turning their list values into associative keys.
custom_style_copy_packageCanonical packages own every drawing, native context and marking record they carry.
custom_style_copy_previousKeep each previous package's native record array independent and JSON-serializable.
custom_style_emissive_problemWhy a drawing's or appendage's emission settings are refused, finishing "The drawing's ...", or null when they're fine or absent.
custom_style_export_drawingA drawing in export form: all four views and their emission settings, or null for empty art.
custom_style_export_textThe export format always includes all four views and their emission settings.
custom_style_file_labelThe download name for a package: custom-hair-style, custom-facial-hair-style, custom-tattoo- or custom-markings.
custom_style_gradient_keyThe gradient key a head target stores under.
custom_style_hair_accessoriesThe accessory list a head target draws on.
custom_style_hair_color_mapMaps painted hair shades from one base hair look to another.
custom_style_hair_gradientsThe gradient list a head target draws from.
custom_style_hair_preference_typesEvery preference a head target's base look is saved in: its fields, plus head hair's opacity toggle.
custom_style_hair_shadesThe hairstyle's shades tinted by a hair look's color, in sampling order and without merging. Palettes dedupe these; recolors need the positions to line up between two looks.
custom_style_hair_slot_dataReturns an updated copy of a character's save data, or null when that slot has no data.
custom_style_hair_targetWhether a drawing target is head hair or facial hair.
custom_style_has_emissionWhether any view of a drawing glows.
custom_style_keyThe key a style is stored under: the target, or markings:zone.
custom_style_live_hair_contextA body's live base look for a head target, read from its head when it has one.
custom_style_marking_conflictReturns the marking a region's rows already wear that keeps another off it: one of its exclusion group. The preview and saving set a region through set_zone_from_list(), which drops the second marking of a group, so the editor refuses it first.
custom_style_marking_dataConvert validated records back into the native marking renderer's ordered map.
custom_style_marking_entriesOrdered, portable records for native markings: a limb's or a collection zone's entries, or a zone's saved nested shape.
custom_style_markings_slot_dataCopy a character's saved native markings and replace exactly the selected zone, including Clear.
custom_style_matchesCompare a legacy drawing-only package with the base markings it would preserve.
custom_style_normal_colorA colour as the preference writer stores it, black when invalid.
custom_style_normal_opacityKeep explicit opacity, including fully opaque hair on naturally translucent species.
custom_style_packageA canonical package that owns copies of its drawing, hair look and markings.
custom_style_package_hashContent identity for proposals, rotations and unchanged checks.
custom_style_paint_outsideReturns the first view with paint outside the destination's allowed pixels.
custom_style_parseParses an uploaded style file into a package.
custom_style_previous_validatePrevious styles are trusted disk data, but still pass the strict package validator.
custom_style_read_fileA file's text, or null when it's missing or larger than max_bytes.
custom_style_receiveAsks a player for a style file and parses it. This sleeps while the file dialog is open.
custom_style_recolor_drawingRewrites literal-color paint through a color map, keeping every pixel where it is.
custom_style_rewrite_markingsRewrites a limb's native marking records. Markings are stored by name, so one limb can't wear the same marking twice, and their order is kept.
custom_style_sendSends one package to a client as a downloaded file.
custom_style_send_bodySends a whole-body style to a client as a downloaded file.
custom_style_send_textSends export text to a client as a downloaded file.
custom_style_spawned_slot_problemReturns why a body's style can't be saved to the selected character slot, or null when it can.
custom_style_test_cleanupDeletes the preference and sidecar files a test wrote to folder.
custom_style_test_exportThe export text of a package holding drawing for target and zone.
custom_style_test_facial_styleThe name of the first facial hairstyle that has a sprite.
custom_style_test_folderA fresh temporary folder for one test's preference and sidecar files.
custom_style_test_hairA complete base hair look for packages.
custom_style_test_markingsTwo distinct native markings make order, independent field types and duplicate checks observable.
custom_style_test_sidecarA sidecar store whose last verified contents match the file written for a save test.
custom_style_test_spacescount spaces, the same text as repeat_string(count, " ") but built by doubling: appending one character at a time makes a 160 KiB file take most of a minute.
custom_style_test_two_color_drawingTwo colors, split evenly, so a recolor can be checked on both the palette and the pixels.
custom_style_transfer_beginClaims the account's single transfer slot and starts the relevant cooldown.
custom_style_transfer_endReleases the account's transfer slot.
custom_style_unknown_keyReturns the first unsupported key, or null when every key is allowed.
custom_style_validate_bodyStrictly validates a whole-body style: one region package per zone it contains.
custom_style_validate_drawingStrictly validates one drawing. Unlike custom_sprite_validate(), nothing is salvaged.
custom_style_validate_hairStrictly validates the whitelisted base hair look carried by hair styles.
custom_style_validate_markingsStrictly validates the ordered native markings for one supported limb. A name a marking merge retired validates as the marking that draws it now (GLOB.body_marking_renames), as a save's migration renames it. Stored data (trusted) leaves out, and logs, a marking its limb no longer offers, where an upload is refused.
custom_style_validate_packageValidates a package's structure: one drawing target, plus its optional native context.
cut_relative_directionTakes a screen_loc string and cut out any directions like NORTH or SOUTH
cyborg_accessory_color_channelsReturns the color channels an accessory's art uses at this size and arousal state, by channel number
cyborg_accessory_effective_sizeReturns the requested size when the accessory has art for it, or else the first size it has
cyborg_accessory_metadataReturns what the editor shows for a part's sprite - its color channels and its sizes, with a thumbnail of each unless include_icons is off
cyborg_accessory_renderReturns a part's colored art as an icon and its base64, or null when it has none. Cached, up to 128 images and 2 MiB
cyborg_accessory_size_valuesReturns the sizes an accessory has art for, cached by slot and choice. The caller gets its own copy
cyborg_animation_anchorReturns the still frame a chassis's parts are placed against in this direction and pose, or null when it has no authored animation
cyborg_animation_framesAuthored anchor data is generated offline; runtime never scans marker pixels.
cyborg_animation_mapOne pixel per native frame, encoding a literal anchor translation after part transforms. Only catalog descriptors reach this cache; player colors and placement are not cache keys.
cyborg_appearance_model_idDisplay names and mutable icon states are deliberately not identities.
cyborg_appearance_modelsAppearance previews/defaults also support bodies obtained through antagonist roles.
cyborg_body_visuals_visibleRendering and examine share this - death, a disguise or being tipped over hide the parts, lockdown and stuns do not. A redraw passes the chassis's catalog entry it already has
cyborg_build_appearanceGenerates only the changed appearance, never creates organs or reads preferences. Returns null when no part shows
cyborg_canonical_model_idCanonicalize stored IDs too, so old variant defaults remain usable.
cyborg_customization_after_importImports replace every character, so the old layouts go and the uploaded ones take their place.
cyborg_direct_accessoriesThe silicon-only accessories of a slot by name, null for a slot without any - these donor sheets never enter human accessory selection
cyborg_direct_accessory_renderReturns a silicon-only accessory's colored art as an icon and its base64, or null when it has none. Keeps the last 32
cyborg_dynamic_accessory_has_sizeWhether a genital accessory has art at this size, in any layer or color channel
cyborg_dynamic_accessory_suffixNative icon operations and bounded immutable outputs replace donor per-pixel loops. Reuses Meridian accessories: no physical organ or bodypart overlay is constructed.
cyborg_effective_base_sizeReturns the body size a chassis can show for the requested one, 1 when it isn't eligible. Small chassis never shrink and wide or tall ones stop at 1.6
cyborg_identity_import_sanitize_slotImport-only migration of donor identity keys. Layouts are read separately into the sidecar.
cyborg_identity_loreReturns the character's silicon model lore, or the fallback when it has none
cyborg_identity_modelOnly cyborgs use the new fields; AI and other silicon preferences retain their behavior.
cyborg_identity_textReads the silicon-specific text first without copying a human field into it.
cyborg_interaction_participantDeliberately small interaction capability surface for cyborgs. Visual anatomy does not grant organs, hands, toy handling, vore, or any lewd interaction. Whether a mob can take part in the interaction menu - humans and cyborgs
cyborg_layout_account_full_messageWhat the editor says while saving a character would take the account past CYBORG_LAYOUT_MAX_SIDECAR_BYTES.
cyborg_layout_action
cyborg_layout_apply_placement
cyborg_layout_choicesOld presets inherit character choices; newer presets carry their selected parts.
cyborg_layout_codec_elementElement index of a decoded list, or null past its end.
cyborg_layout_codec_parseA save text's JSON, or null when the text is not a save of this format.
cyborg_layout_codec_trimDrops unset trailing elements, which decoding reads as unset.
cyborg_layout_codec_trim_textDrops unset trailing elements from a list of element texts, as cyborg_layout_codec_trim() does before encoding.
cyborg_layout_copy_encodedA deep copy of a layout whose parts keep the save text of the parts they copy. A part without text in encoded_parts is encoded here, once for it and its copy.
cyborg_layout_decodeThe normalized tree for a save text, or null when the text is not a save of this format.
cyborg_layout_decode_advancedReturns a part's overrides by key from their flat pairs, skipping key indices we don't know
cyborg_layout_decode_for_bodyWhat a body takes from a save text: its active layout and one model default, as cyborg_layout_decode() gives them, without decoding the rest. Null when the text is not a save of this format.
cyborg_layout_decode_overrideReturns an override from its header and values, with its arousal states unless it is one
cyborg_layout_decode_partReturns a part's fields from its mask and values, or null for an untouched part
cyborg_layout_decode_slotsReturns an encoded layout's parts by slot. Untouched parts are left out, for normalizing to fill in
cyborg_layout_defaultReturns a new layout tree with default parts and no presets or model defaults
cyborg_layout_default_entryReturns a new part entry with every field at its default
cyborg_layout_default_slotsReturns a new layout with every part slot at its defaults
cyborg_layout_default_sprite_sizeReturns the sprite size a slot's parts start at
cyborg_layout_edit_positionMaterialize just the edited view group, preserving legacy fallback elsewhere.
cyborg_layout_encodeThe save text for a character slot, built from the save text of each part.
cyborg_layout_encode_advancedReturns a part's overrides as flat key index and override pairs, or null when it has none
cyborg_layout_encode_entryA preset or model default as save text: its name or chassis, its layout, and its chassis or linked preset. A layout found in cached_parts keeps its text, and its parts' texts for copies of it; see cyborg_layout_encode(). Presets and defaults are only ever replaced whole, so most saves find all but one of them there.
cyborg_layout_encode_overrideAn arousal state writes every field it has: there each one overrides its pose, whatever the value.
cyborg_layout_encode_partFields are read the way cyborg_layout_normalize_entry() reads them, so leaving one out decodes to the same value.
cyborg_layout_encode_slotsA layout's parts as save text, in cyborg_layout_supported_slots() order. See cyborg_layout_encode() for the caches.
cyborg_layout_from_storedThe editable tree for whatever a slot holds: save text, an older nested tree, or nothing.
cyborg_layout_import_is_futureWhether a stored or uploaded slot comes from a newer build. It is kept as it is and never rewritten.
cyborg_layout_normalizeA layout tree in its canonical form, or the default tree when raw is not one.
cyborg_layout_normalize_advancedReturns a part's overrides in canonical form. An import also expands donor pose-wide entries to each direction
cyborg_layout_normalize_advanced_entryReturns one override with only the fields it sets, bounded, or null when it sets none. Arousal states can't nest, so they pass allow_arousal FALSE
cyborg_layout_normalize_entryReturns a part entry in canonical form, every field bounded and filled in, or the slot's defaults when raw isn't a list
cyborg_layout_normalize_slotsReturns a layout with every part slot normalized, defaults filling the missing ones
cyborg_layout_numberReturns a number clamped to its range and rounded to its step, or the default when it isn't one. Text numbers are read too
cyborg_layout_override_fieldsOverride fields in header bit order, with what the editor fills a new override with.
cyborg_layout_sidecar_pathThe cyborg layout sidecar beside a preferences.json path, or null when the path has no directory.
cyborg_layout_slot_full_messageWhat the editor says while a character's setups are past CYBORG_LAYOUT_MAX_SLOT_BYTES.
cyborg_layout_sprite_sizeReturns a sprite size clamped to the allowed range, or the slot's default when it isn't a number
cyborg_layout_supported_advanced_keysSave texts store overrides by their place here, so only append.
cyborg_layout_supported_slotsSave texts store parts by their place here, so only append. Every caller shares the list, so none may change it
cyborg_layout_text_is_futureWhether a save text comes from a newer format. Every format starts with its version, so this needs no decode.
cyborg_layouts_from_importLayouts carried by an uploaded preferences file, keyed by character slot. Read before pass one sanitation.
cyborg_message_interaction_actUses only authored non-lewd messages. It never invokes the human effects path.
cyborg_message_interaction_allowedWhether actor may use an interaction on target when a cyborg is one of them - a cyborg only cheers, a human may also beckon and pat
cyborg_message_interaction_contract_is_safeWhether an interaction is a plain non-lewd message with no parts, effects, sounds or requirements beyond a free hand
cyborg_mirror_placementWhether a part's placement is mirrored - a wide chassis facing west, unless the part opts out
cyborg_model_catalogCached descriptors contain resources and copied lists only; temporary models have no host.
cyborg_model_legacy_idDonor keys are accepted only when exactly one current descriptor matches.
cyborg_occlusion_maskReturns a chassis's occlusion mask - its family's mask icon and the state its poses add their suffix to - or null when it has none
cyborg_part_capabilityReturns whether a part slot is configured, turned on and showing on the borg right now
cyborg_part_sprite_directionReturns the direction of a part's art - a wide chassis facing north may reuse its south art
cyborg_preferences_forGET_CLIENT can resolve to a real /client or the unit-test client interface.
cyborg_preview_animationA bounded frame sequence for the visible model only. No periodic server UI updates.
cyborg_preview_bodyBody previews use immutable resources, never world mobs. A bounded FIFO caches PNGs.
cyborg_preview_layersReturns the editor preview's part layers without their art, placed as the live renderer places them.
cyborg_preview_referenceExisting one-tile mannequin artwork, fixed at normal body scale in the frontend.
cyborg_resolve_placementPure geometry shared by creator/live rendering. Input has already been normalized.
cyborg_runtime_actor_is_ownerThe runtime backend shares this actor/slot gate with its self-management UI.
cyborg_selectable_modelsNormal in-round selection stays restricted to its existing departments.
cyborg_sprite_preferencesPart slot -> the preference that holds its sprite. Every caller shares the list, so none may change it
cyborg_test_run_queued_saveRuns the save SScyborg_layout_saves would run for store on its next fire. Returns FALSE while none is due.
cyborg_visual_anatomy_examine_linesThese descriptions mirror already-rendered visual layers. They do not imply an organ or interaction capability.
cyborg_visuals_allowedWhether or not these preferences allow cyborg parts at all - the server config, the ERP master toggle and the genitals toggle
day_of_monthReturns the day (mon, tues, wen...) in number format, 1 (monday) - 7 (sunday) from the passed in date (year, month, day) All inputs are expected indexed at 1
debug_hallucination_weighted_listDebug proc for getting the total weight of the random_hallucination_weighted_list
debug_variableGet displayed variable in VV variable list
deep_compare_listCompares 2 lists, returns TRUE if they are the same
deep_copy_listCopies a list, and all lists inside it recusively Does not copy any other reference type
deep_copy_list_altA version of deep_copy_list that actually supports associative list nesting: list(list(list("a" = "b"))) will actually copy correctly.
default_ui_stateThe sane defaults for a UI such as a computer or a machine.
delete_all_SS_and_recreate_masterDelete all existing SS to basically start over
deliver_meridian_theme_artHands a client its MeridianOS theme's art: the files first, waiting for them to arrive, then their stylesheet to its open windows and its lobby, which load it as they hear of it. For the lobby as it starts and for a theme picked while windows are open; a window that opens later gets the art with its other assets (/datum/tgui/send_assets()).
delta_to_angleCalculate the angle produced by a pair of x and y deltas
deltimerDelete a timer
deprecise_zoneTakes a zone and returns its "parent" zone, if it has one.
derive_body_marking_speciesGives every marking in a marking set the species of its sets: the union of their recommended_species, or any species when one of them names none. A marking in no set keeps the species it declares. Runs once both lists are built, so a set and its markings never disagree about who may wear them. Only choices and validation read the result, never loading or drawing.
determine_drafted_knowledgeEach heretic has a few drafted knowledges within their heretic knowledge tree. This is not during the knowledge tree creation because we want to know what path our heretic picks so we filter out dupe knowledges. Also generates shop knowledges as their validation is shared. Modifies shop_list and final_draft that are provided in the arguments.
diagonally_blockedcheck if 2 diagonal turfs are blocked by dense objects
diff_appearancesTakes two appearances as args, prints out, logs, and returns a text representation of their differences Including suboverlays
dir2offsetReturns a list(x, y), being the change in position required to step in the passed in direction
dir_to_all_junctionsTakes a direction, turns it into all the junctions that contain it
dirt_add_runAdds one run to a role's in one direction.
dirt_aim_boundsReturns how far past its zone's heights a streak may end, for the zones whose streaks stay in them: list(zone = h). Off target they read as a U, bars or socks. You should NEVER modify it.
dirt_aim_insetReturns how many pixels a clamped streak end's or a capped drip's bound moves in: odd on one side of a pair, 0 or 2 on the other, so the sides keep to different rows. It stays under the room the streak or drip starts with inside its bound, so a streak never shrinks to nothing and a drip never runs up. Without the room an odd one moves 1 px out where that's allowed (the knee); elsewhere it stays on the bound.
dirt_aim_insideReturns a streak's end pulled back along the streak until its height lies between two bounds: list(theta, h). The streak keeps its own taper.
dirt_aim_zonesReturns each aim zone's areas, where its shots land: list(zone = list(list(limb, lowest theta, highest theta, lowest h, highest h), ...)). You should NEVER modify it.
dirt_baked_iconReturns runs baked into one four-direction RGBA icon on a blank state, registered in the resource cache as bulge_register_icon() registers an icon built at run time, or null when they draw nothing. Each run is one DrawBox() in its role's tint colour, at the tint's alpha times the run's level, rounded to 8 bits.
dirt_body_partsReturns the parts a body draws that take mess, lowest drawn first: the pecs guide if its chest takes one, then each genital drawn (dirt_part_drawn()).
dirt_body_parts_keyReturns a body's parts as one line of text, with what they're drawn for and at what layers, to tell when a change to them may shape its mess otherwise.
dirt_build_template_nowBuilds a dirt template at once, for tests and for anything that can't wait for a subsystem.
dirt_cleanupReturns a mask cleaned up: a lone film pixel goes, a lone core softens to body, and a pixel whose role none of its neighbours share takes the role three of them share. Flecks stay.
dirt_container_overReturns a container of a baked mess image just over a genital's or a taur body's images: at the layer and offsets of the last sprite among them, the one drawn over the others, kept together. It isn't nested in that sprite: the sprite is coloured, which its overlays would take, and a filter on it doesn't reach them.
dirt_cover_fadesReturns how near a mask's pixels lie to what's worn over them, where they fade out: alist(index = 1 beside it, or 2 one pixel further), for the pixels drawn that it leaves bare. Steps are up, down and across.
dirt_cover_layersReturns the overlays_standing slots whose sprites cover skin mess, so it fades out beside them: the underclothes and the garments. You should NEVER modify it.
dirt_cover_spritesReturns the sprites a body draws over its skin, from what it wears: list(list(icon, icon state), ...), in dirt_cover_layers() order.
dirt_covering_thicknessReturns how thick a covering feature lies on a pixel: film at most on the outline, and in profile broken by noise on the outline and beside it, to nothing, haze or film. Highlights aren't broken.
dirt_despeckleReturns a mask without lone pixels, which read harshly: a lone film or haze pixel goes, and a lone body or core pixel becomes film with a haze ring where the surface reaches. A film or haze hole with three dark neighbours fills with body: it read as a chip or a scar. Glints and flecks are highlights and stay.
dirt_drawn_indexesReturns the indexes of a mask's drawn pixels, in row-major order.
dirt_drawn_rolesReturns the roles runs are drawn in, one to a pixel, in the order they're baked: haze is film at half (dirt_role_runs()). You should NEVER modify it.
dirt_eye_readsReturns what a body's eyes and its human head are drawn from as dirt_zone_sources_match() reads them against zone sources: list(the head, its limb_id, whether it draws eyes, the eyes, their sheet, their state).
dirt_eyes_unchangedReturns whether a body's eyes and its human head are drawn from what they were when dirt_eye_reads() read them, read as it reads them without making a list.
dirt_footprintReturns the pixels features draw on in one view before the raster's cleanups, as alist(index = TRUE): where any of them lies thick enough for film. A feature hidden in profile is left out there.
dirt_footprint_touchesReturns whether any of a footprint's pixels lies within DIRT_RUN_GAP px of another's, in both axes: no skin between.
dirt_fresh_variantReturns a variant of a zone's mess none of some splats on that zone has, at random, or any once they have them all.
dirt_human_zone_pixelsReturns a zone's pixels on the plain human template, facing the way that shows it (dirt_zone_facing()): the body pixels whose limb, angle and height lie in one of the zone's aim areas (dirt_aim_zones()). Null until SSdirt has built that direction of the template in the background (/datum/controller/subsystem/dirt/proc/human_surface()). Each zone is read once a round. You should NEVER modify the list it returns.
dirt_index_rangeReturns list(1, 2, ... count), made once for each count. You should NEVER modify it.
dirt_level_showsReturns whether a level shows anything new on the body over level 1's shot: a pixel the kept runs and drops draw that level 1's doesn't, beside either. A lone one would go.
dirt_lobe_rasteriseReturns mess following a rounded part's form (breasts, pecs, the butt, testicles, the vulva), from the "lobe:aimed_::" stream. A ragged blob lands on a lobe's upper slope, and at levels 2 and 3 its drip runs down the lobe keeping its place across each row as the lobe widens and narrows, to a bead at the under-curve. Level 3 adds a smaller blob with a short drip, and breaks the drips into beads. A pair's other lobe takes a smaller blob, clear of the first lobe's rows (level with it, the pair read as a bra). Opaque cores, a highlight per drop, a grey underside, a translucent fringe, all on the part's own pixels.
dirt_lobe_row_atReturns the row a fraction of the way down a lobe, 0 its top and 1 its bottom, not rounded.
dirt_lobe_shapeReturns a lobe's shape: list(its indexes, TRUE on each of its pixels, alist(row = list(leftmost column, rightmost column)), its rows from the top).
dirt_lobesReturns a rounded part's lobes, each a list of indexes in row-major order: each side of DIRT_PART_MIDLINE where the view shows both (front or back, the vulva excepted), else the whole part. A lobe under 4 px holds none.
dirt_lower_zonesReturns the zones below the waist: the groin, the thighs and the butt. You should NEVER modify it.
dirt_mask_directionsReturns the directions a mask is made in, in the order its pieces go. You should NEVER modify it.
dirt_measure_metricsReturns alist(limb = list(degrees per pixel, h per pixel)), measured from the plain human template facing south, then facing east for a limb the south view lacks. A limb's diameter is its median row width; its length, its rows.
dirt_mergeReturns masks merged into one: on each pixel the thickest wins, by role rank and then thickness, and the first mask keeps a full tie. All the splats on one surface make one mask this way, oldest first. A splat below the top level leaves out each of its pieces that comes within DIRT_RUN_GAP px of an earlier splat's: piled on, splats filled into one sheet. A top-level splat keeps everything: it covers.
dirt_merge_with_partsReturns a surface's splats in one direction merged with the parts drawn under and over it. Each splat leaves out the pixels of the rounded parts on its zone (dirt_part_rounded()): straight streaks carried onto a breast read as blocks. Then each part drawn under the surface takes each splat on its zone in its own pixels (dirt_part_field()), merged in after the splats and keeping every piece, as a top-level splat does. A part drawn over the surface takes its share on itself, so its field isn't drawn here.
dirt_mess_amount_levelsReturns how many levels a shot's amount adds where it lands: 1 for a normal shot, 2 for a heavy one, and straight to DIRT_MESS_MAX_LEVEL for a huge one.
dirt_mess_baked_imageReturns an image of a surface's baked mess, drawn as it is: its colours and alpha are in its pixels (dirt_baked_icon()).
dirt_mess_carriersReturns the carriers of a person's mess: their own, then each worn item's.
dirt_mess_entryReturns a zone's entry in a shot's list of where to aim: "On their chest".
dirt_mess_evictTakes a person's oldest splats off until they carry DIRT_MESS_MAX_SPLATS at most, counting their skin, their parts and their worn items. It draws nothing: the caller draws each carrier it returns, and each part.
dirt_mess_garmentReturns the worn item a shot at a zone lands on, or null for the skin: the outermost of the head, mask, suit and uniform slots whose body_parts_covered includes the zone's part (the chest for the chest, stomach and back; the groin for the groin and butt; the legs for the thighs). The face is covered when the mouth is, by the item covering it. Underclothes never count: they aren't items. Through a wall portal only the uniform counts, while it's drawn: the relay copies it and no suit (lower_body_only()), so a coat over the lower body leaves the shot to what the relay shows under it. A skirt the relay leaves out (wall_relay_skips_uniform()) leaves it to the underclothes or the skin.
dirt_mess_inset_imageReturns an image drawing cloth's baked mess over a garment, kept to the garment's own pixels by BLEND_INSET_OVERLAY inside the worn KEEP_TOGETHER wrapper build_worn_icon() makes. It floats, and on a garment drawn on the body's own tile it isn't offset, so the bulge redraws it over its cloth too (bulge_over_cloth()).
dirt_mess_landPuts a mess on a person where a shot was aimed (dirt_mess_place()), when the portal shows a zone that lands.
dirt_mess_landableReturns whether dirt_mess_land() lands a shot at a zone: the zones dirt_mess_zones() lists, and DIRT_ZONE_COCK, which dirt_mess_regions() offers through a one-part portal and which lands on the penis alone.
dirt_mess_placePuts a mess where a shot at a zone lands on a person (dirt_mess_surface()) as /datum/component/dirtiness/proc/add_mess() does, and on each part drawn over that surface which the zone reaches (dirt_body_parts()), a splat of the same variant in its own slot. A back shot on a taur also puts one in its taur body's slot (dirt_taur_takes_pools()), unless a taur suit takes it, whose own splat draws the pools. DIRT_ZONE_COCK lands on the penis alone, while it draws its front image. Then it takes the oldest splats off past DIRT_MESS_MAX_SPLATS, and only then draws each garment that changed and the person, once, so the masks asked for are the ones kept.
dirt_mess_regionsReturns the zones a shot on a person can aim at, in dirt_mess_zones() order.
dirt_mess_role_tintsReturns the mess's tints, indexed by DIRT_ROLE_* define, each list(colour, alpha from 0 to 1), as dirt_baked_icon() takes them. Pearl white, translucent where thin and near opaque where thick, a light grey underside that sets drops apart on pale skin, and a white highlight. Haze is the film's colour at half its alpha, drawn as film at half coverage. You should NEVER modify it.
dirt_mess_splat_rasteriseReturns mess aimed at a taur body's back in one direction, from the "splat:aimed_back:taur:" and DIRT_MESS_TAUR_SEED streams: broken pools along the back line (dirt_taur_back_region()), ragged underneath, drips of uneven length off them, an opaque core, a highlight per drop and a translucent fringe, all on the taur body's pixels. Level 1 is one drop; levels 2 and 3 two pools, level 3's heavier. A drop or pool that comes beside the rider's mess, or under it where a line would carry on down, is left out whole: a pool beside it read as one straight line across both bodies. Its levels don't nest: each is drawn from the streams on its own.
dirt_mess_surfaceReturns the carrier a shot at a zone lands on, and the underclothes it lands on: list(/datum/component/dirtiness, a DIRT_UNDERCLOTHES_* define or null). The outermost garment over the zone takes it (dirt_mess_garment()), else the underclothes that cover it, held by the person, else the skin.
dirt_mess_zonesReturns the zones a shot can be aimed at on a person, in the order they're offered: face, chest, stomach, back, groin, thighs, butt. You should NEVER modify it.
dirt_metricReturns how far one pixel reaches on a limb: list(degrees round it, h along it). It's measured once, as the reference generator measures it, and serves every body, so marks keep one size whatever the body and the direction.
dirt_metric_directionsReturns the directions dirt_measure_metrics() reads, the only ones its template needs. You should NEVER modify it.
dirt_metric_sourcesReturns the plain human template's sprites, which dirt_metric() is measured from: no eyes, no mouth guard. You should NEVER modify it.
dirt_neighbour_tableReturns each pixel's neighbours on a canvas, in the order the reference generator visits them: right, left, below, above, those off the canvas left out. Built once per canvas size. You should NEVER modify it.
dirt_noise_hashReturns a lattice point's noise value, from 0 to 1 in steps of 1/255.
dirt_packed_thicknessesReturns the thicknesses packed so far, indexed by their code + 1 (dirt_thickness_code()). You should NEVER modify it.
dirt_parity_case_blockReturns a corpus case as the text the reference generator writes for it: "case ", then the case's lines, each ending in a newline, the last one too.
dirt_parity_facing_partsReturns the parts a body case places under or over its surface in one facing: each entry of its "under_parts" or "over_parts" is a part's name, placed so in every facing, or "name@NE", placed so in the facings it names.
dirt_parity_number_textReturns a number, or a list of numbers joined by single spaces, as the reference writes them: whole numbers in full, never in scientific notation.
dirt_parity_partsReturns corpus parts as the game reads a genital: each a /datum/dirt_part_source of its states, every layer's together, its sheet loaded from its path.
dirt_parity_random_linesReturns a random case's lines: one per integer call, in order, all from one stream.
dirt_parity_surface_linesReturns one direction of a surface as three grids, one line per row, one after the other:
dirt_parity_taurReturns a corpus taur kind as the game reads a taur body (/datum/dirt_taur_source): each layer's states, its sheet loaded from its path.
dirt_parity_taur_linesReturns what each pixel of a taur canvas shows as one grid, one line per row, one glyph per pixel: "B" the taur body's behind layer, "A" its adjacent layer, "r" the rider, "U" its front under clothes layer, "F" its front layer, "O" its front over layer, "." none.
dirt_parity_templateReturns a corpus template, built as the game builds a body's the first time it's asked for and shared after that.
dirt_parity_zone_sourcesReturns a corpus template as the zone sources dirt_zone_sources() gives a body: each zone's sheet, loaded from its path, and state, the eyes' sheet and states, and whether the head is a human's.
dirt_part_body_levelReturns the level of a splat's mess on the body where parts take a share of it: down by 2 where a penis, testicles or vulva does, else by 1 where any part does, never under 1. A part takes a share in a direction where it has pixels. The top level stays: the body keeps its glaze, still off the rounded parts' pixels, and the parts draw theirs at DIRT_PART_MAX_LEVEL.
dirt_part_drawnReturns the source a genital is drawn as now, its organ slot filled in and each state's layer read from its image, or null while it draws none: hidden (dirt_shown()), a device drawn in its place, a bulge look drawn for it, no sprite in the layers mess reads it from (a taur's penis draws only behind the body), or a kind that takes no share.
dirt_part_fieldReturns one splat's mess on a part's pixels, which keeps every piece where it merges with others: lobes on a rounded part, a bead behind the tip on the penis. Its fields have levels 1 to DIRT_PART_MAX_LEVEL, so a splat past it draws at it. A field rests on its arguments alone, and every mask its splat is on draws it again, so the newest DIRT_PART_FIELDS are kept, packed.
dirt_part_fringeLays a part's translucent fringe: film on each of the part's pixels beside its solid mess, up, down or across, that holds none yet.
dirt_part_indexReturns a pixel's index on a 32x32 canvas, or null off it.
dirt_part_kindReturns what a genital is drawn as for mess: a DIRT_PART_* define, or null for one that takes no share (the anus, the womb). The breasts organ is pecs when it's built from a pecs accessory.
dirt_part_layersReturns the layers mess reads a kind of genital from, as the reference generator draws it (its own parts take every one): the butt's front and back (ADJ) images, every other kind's front image alone. You should NEVER modify it.
dirt_part_ownReturns the pixels a part takes its share on in one direction, as indexes in row-major order: its own. The pecs guide keeps to where the chest shows. The vulva, too small for a lobe of its own, also takes the ring of visible pixels round them (the body's, and the parts') when it lies on skin, but never on cloth.
dirt_part_rasteriseReturns mess on a part too small to round, the penis: a bead just behind its tip (its pixel farthest from where it joins the body) with a highlight and a grey underside, the tip itself translucent (over the whole end it read as a white cap); at levels 2 and 3 a run back from the tip and a drop or two along the part; a translucent fringe inside it. Drawn from the "part:aimed_:" stream, on its pixels only.
dirt_part_roundedReturns whether a kind of part is rounded, so its mess follows its form in lobes (dirt_lobe_rasterise()) and the body's own mess leaves its pixels out: every kind but the penis, which takes a bead behind its tip.
dirt_part_source_ofReturns a genital's images as a part source, every layer's colour layers' states together with the layer each draws at, or null when none draws a sprite. Emissives and texture holders are left out.
dirt_part_zoneReturns the zone whose shots a kind of part takes a share of: the chest for breasts and pecs, the butt for the butt, the groin for the rest.
dirt_parts_keyReturns parts' keys as one line of text, to key masks by: each with where it draws against a surface in each direction, when one is given.
dirt_pecs_guideReturns the source of the plain pecs' shape a human chest without breasts takes mess in, an undrawn guide (Muscular pecs and breasts are the breasts organ, drawn), or null for any other chest. You should NEVER modify it.
dirt_perm_tableReturns the table the noise hashes lattice points through: 0 to 255, shuffled by the "dirt:perm" stream.
dirt_pieces_nearReturns TRUE on each pixel of a mask's pieces, 8-connected, that come within DIRT_RUN_GAP px of a taken pixel.
dirt_pixel_spanReturns how many degrees a pixel of a row spans: the turn to the pixels beside it in the row, or a limb's own at least.
dirt_pixel_zonesReturns the zones a template pixel's flags name (DIRT_PIXEL_ZONE()), each keyed to its own place: zones[place] is a zone and zones[zone] its place. They're the zones dirt_zone_owners() gives pixels, those of dirt_zone_draw_order(). A pixel holds its zone in 4 bits, 0 for none, so there are 15 at most. You should NEVER modify it.
dirt_pixels_from_drawnReturns a mask made again from its drawn pixels.
dirt_pool_clearReturns whether a pool's columns keep more than 2 px from every column of the pools kept before it.
dirt_pool_drawDraws a role on a pool pixel of the taur body, where the role drawn there doesn't outrank it: never off the taur body's pixels.
dirt_pool_putLays a solid role on a pool pixel, noting it as the drop or pool's own if nothing was laid there before.
dirt_portal_showsReturns whether a portal shows the part of its occupant a zone lies on: through a one-part portal only DIRT_ZONE_COCK, through a wall the groin and the butt (its relay draws no legs), and anything with no portal.
dirt_ragged_edgesBreaks a covering mask's flat edges, and returns it: no top or bottom edge runs flat along one row for more than 2 px. Cut level, a sheet read as clipped at a region, an apron, a back patch, a bib. At irregular spots along a flat stretch, film runs on 1 to 3 px below a bottom edge, or rises 1 px over a top edge. It only adds film, on bare skin or haze of the chest and the legs, so what's under it and the highlights stay. What's solid is read before anything is added, so the mask is changed where it is.
dirt_ragged_freeReturns whether a covering mask's flat edge may run on over a pixel: bare skin or haze on the surface, where the chest or a leg shows.
dirt_rasterise_aimedReturns mess aimed at a zone, drawn on one direction of a body: levels 1 to level, each from the deposit's same draws, merged by role rank with the later level winning a tie, then despeckled. A highlight, once drawn, stays: a later run beside it folded it in. The top level then breaks its flat edges, and keeps every pixel of level 3 as it was drawn, at its role or a darker one.
dirt_rasterise_levelReturns one level of a deposit drawn on one direction of a body. The first feature, in list order, to lie thickest on a pixel picks its role. Nothing goes on an eye, the pixels beside it or a human mouth, and an eye's diagonals take film at most. Cloth draws its rim a role lighter, so a garment keeps its outline, though a contact point keeps its tone. Then bare legs streak, lone pixels go, and on skin nothing smaller than 2 px stays.
dirt_role_ranksReturns each role's rank, indexed by its DIRT_ROLE_* define: where masks or levels meet, the higher rank keeps the pixel. You should NEVER modify it.
dirt_role_runsAdds a mask's horizontal runs in one direction to each role's: list(icon y, first icon x, last icon x, level). A run is a role's pixels side by side in one row at one level, how much of each pixel it covers out of 255: DIRT_MASK_SOLID, or DIRT_MASK_HALF for haze, drawn as film. A pixel beside what's worn over it keeps a share of its level: its fade ring over DIRT_FADE_RINGS + 1.
dirt_runs_apartReturns a level's features with the runs and drops this view leaves out taken out, and its run plan with them. In the plan's order, each run or drop stays only if it keeps DIRT_RUN_GAP px of skin from level 1's shot and from every one kept before it: side by side they filled into a sheet. The two hung from level 1's shot and drop always stay. Then each kept run's carry-on stays where it keeps as clear, and level 2's carry-on from the first drop where level 2 shows nothing new in the zone's main facing. The plan holds the top run level's set, so every level keeps the same ones.
dirt_runs_keyReturns an MD5 of what runs draw, the same for runs that draw the same pixels: each role's runs in each direction, in a fixed order, with their levels.
dirt_shown_runsReturns a surface's runs, as dirt_role_runs() lays them: alist(DIRT_ROLE_* define = alist(direction = runs)).
dirt_skin_besidesReturns the body zones whose sprites a limb skin mess draws on checks besides its own (ready_skin_masks()): for the chest the arms, which bring their hands and which no limb skin mess draws on draws (the chest checks the eyes too); for the rest none. You should NEVER modify it.
dirt_skin_rulesMakes a mask as skin takes goo, and returns it: no pixel without a neighbour, since a lone body dot reads as a mole and nothing smaller than 2 px stays. Goo keeps its core: flattened, it read as body paint.
dirt_skin_streaksStreaks bare legs in a mask rather than coating them, and returns it: a solid coat up a bare shin reads as boots. Body pixels more than 2.5 px up a leg mostly thin to film, in clumps about a limb wide. Each pixel is judged on its own, so the mask is changed where it is.
dirt_skin_zonesReturns the body zones of the limbs skin mess draws on: the head, the chest and the legs, where aimed mess lands. You should NEVER modify it.
dirt_slot_layerReturns the layer a worn slot's garment draws at, which its mess lies on, against which parts draw over or under it.
dirt_slot_redrawReturns what to draw again on a body for an item in a slot: a DIRT_REDRAW_* flag, or NONE.
dirt_split_partsReturns parts split by where they draw against a surface in one direction: list(those under it, whose share is drawn in its masks, those over it, whose share is drawn on themselves).
dirt_spread_noiseReturns two octaves of value noise, stretched back out to cover 0 to 1 (summed noise bunches round 0.5).
dirt_sprite_facingsReturns the directions a sprite has pixels in, any opacity counting, as SOUTH, NORTH, EAST and WEST flags: none for a sprite that isn't 32x32. A direction dirt_sprite_pixels() holds is taken from it; any other is read only as far as its first pixel. Parts' layers are worked out from these whenever a body with mess is drawn, so they're kept for far more sprites than whole reads are, in SSdirt.sprite_facings.
dirt_sprite_keyReturns text naming a sprite's icon: a file's path, or the reference of an icon made at run time, whose text is empty or its type.
dirt_sprite_pixelsReturns the pixels a sprite covers in one direction, any opacity counting, as indexes in row-major order on a canvas width across and 32 tall: none for a sprite of another size. Templates and outfits share sprites (every human head, its eyes, a jumpsuit), so each sprite's direction is read once and kept in SSdirt.sprite_reads, the least lately read dropped first. You should NEVER modify the list it returns.
dirt_sprite_read_keyReturns the key dirt_sprite_pixels() keeps a sprite's direction under.
dirt_sprite_showsReturns whether a 32x32 sprite has a pixel in one direction, any opacity counting, reading only as far as its first. Rows go from the middle down, then up from it: parts lie in the canvas's middle and lower rows.
dirt_sprite_zone_pixelsReturns which of a zone's pixels a sprite covers, read at those pixels only, facing the way that shows the zone. Kept for each sprite and zone, the oldest dropped past DIRT_COVERAGE_READS. A sprite that isn't 32x32 covers none. You should NEVER modify the list it returns.
dirt_sprites_keyReturns sprites as one line of text, to key masks by and to tell outfits apart.
dirt_surface_partsReturns the parts a surface's splats reach, lowest drawn first: those on a zone one of the splats is on. Where each draws against the surface is worked out in each direction (/datum/dirt_part_source/proc/under()).
dirt_surface_rowsReturns a surface's pixels grouped by limb and row, so a feature is weighed only on the rows it can reach: alist(limb = list(list(row, lowest h, highest h, indexes), ...)), rows from the top. Built once for each surface. You should NEVER modify it.
dirt_taur_back_regionReturns the pixels of a taur body mess aimed at its back reaches in one direction: a band 3 px deep under the back line the view shows. None facing south (the band there is the rider's waist, which read as underwear); facing north, the columns whose top lies within 2 px below the back's middle height; in profile, the columns whose top lies within 1 px of it, less the 30% at the far end (a white tuft at the tail) and the 2 beside the rider's waist (the groin).
dirt_taur_blankReturns a 64x32 blank, for masks on the taur canvas. You should NEVER modify it.
dirt_taur_fittedReturns whether a garment is drawn on its wearer's taur body as a taur suit: a sprite spanning the 64x32 taur canvas, the body's own tile in its middle, which takes the taur body's pools.
dirt_taur_ownersReturns what each pixel of the taur canvas shows in one direction: the EXTERNAL_* layer of the taur body drawn last over it, DIRT_TAUR_RIDER where the rider (the body, 16 px in) is drawn over the taur body, or null, as dirt_taur_stack() stacks them.
dirt_taur_poolsReturns a back shot's pools on a taur body in one direction: dirt_mess_splat_rasterise() on the pixels the taur body shows, keeping clear of the rider's mess there.
dirt_taur_sourceReturns a person's taur body as mess reads it, drawn or hidden (a taur suit hides it), or null without one.
dirt_taur_stackReturns what a taur canvas shows, lowest first, as the reference stacks a taur under its rider: the taur body's behind and adjacent layers, the rider, then its front layers. You should NEVER modify it.
dirt_taur_takes_poolsReturns whether a back shot on a person also lands along their taur body's back: they have a taur body of a kind with a back (dirt_read_source(): not Big Legs), it draws now, and the surface the shot lands on isn't a garment drawn over the whole taur canvas (a taur suit), which takes the pools itself (/datum/component/dirtiness/proc/ready_taur_cloth_masks()).
dirt_template_keyReturns the key of the template zone sources build: an MD5 of every sprite they name, in draw order, the eyes and whether the head is a human's. Bodies drawn from the same sprites share it.
dirt_thickness_codeReturns the code a thickness packs as in /datum/dirt_pixels/proc/drawn(), from 0: its place among the thicknesses packed so far this round. A mask's thicknesses come from a handful of values.
dirt_underclothes_by_rulesReturns which underclothes a shot at a zone lands on before the human template is built: the topmost piece covering it by the rules underclothes follow elsewhere, or null. Underwear covers the groin and butt, an undershirt or bra the chest, and an undershirt the stomach and back too. A piece also covers what it hides (dirt_underclothes_hides()).
dirt_underclothes_hidesReturns whether the underclothes rules say a piece hides a zone outright: an undershirt that hides the groin (a corset, a leotard) the groin and butt, underwear that hides the breasts (a one-piece swimsuit) the chest.
dirt_underclothes_keyReturns the key a person's mess on one piece of underclothes is kept under: the slot and the accessory, so it stays with that piece while it's off.
dirt_underclothes_onReturns which underclothes a shot at a zone lands on, or null for the skin. Each piece is judged by its sprite against the zone's pixels on the plain human template (dirt_human_zone_pixels()), so every body is judged on the human shape and nothing waits on its own template.
dirt_underclothes_spritesReturns a body's underclothes as drawn, lowest first: list(list(DIRT_UNDERCLOTHES_* define, icon, icon state, accessory name), ...). Each is drawn as get_underwear_overlays() draws it, fitted to the body, a revealing loincloth with its flap cut away while the bulge cuts it (bulge_cut_worn()), and they stack by their accessories' layers, then in that proc's order.
dirt_underclothes_wornReturns the underclothes a body draws, each its own surface: alist(DIRT_UNDERCLOTHES_* define = its /datum/sprite_accessory/clothing), as get_underwear_overlays() picks them.
dirt_value_noiseReturns smooth value noise from 0 to 1: the four lattice points round a sample, blended with a smoothstep. Each point is dirt_noise_hash()'s, its chain's seed steps taken once and each column's step once, for the four.
dirt_worn_shiftReturns where a worn garment's wrapper has its wearer's own tile, as list(pixels right, pixels up): build_worn_icon() centres the wrapper on the garment's worn dimensions, then moves it by its worn offsets, so masks drawn on the body go back by both. list(0, 0) for a 32x32 garment without offsets; list(16, 0) for a 64x32 taur suit, moved 16 px left.
dirt_zone_cover_flagsReturns the body_parts_covered flag each zone below the face lies under: list(zone = flag). You should NEVER modify it.
dirt_zone_draw_orderReturns the zones a body's limb sprites come from, in the order the body draws them: get_all_limbs() order, which for every carbon is its species' bodypart_overrides sorted by body_part (/datum/species/New()), so the chest, the head, the legs and the arms, each hand straight after its arm. Zone sources are alists, which keep no order, so they're always read in this one.
dirt_zone_facingReturns the direction a zone is judged from, the one that shows it: north for the back and butt, south for the rest.
dirt_zone_layerReturns the layer of the surface a shot at a zone would land on: the garment's over it, DIRT_UNDERCLOTHES_LAYER where underclothes take it, else DIRT_SKIN_LAYER.
dirt_zone_limbsReturns the limb each zone's pixels lie on: list(zone = DIRT_LIMB_* define). An arm runs on into its hand. You should NEVER modify it.
dirt_zone_ownersReturns the zone each pixel shows in one direction, as the body draws its limb images: a list of one zone or null per pixel. The images draw the lowest layer first and in draw order within a layer, and the last one drawn over a pixel owns it: the legs' lower halves (BODYPARTS_LOW_LAYER), then the limbs and the legs' upper halves (BODYPARTS_LAYER), then the hands (BODYPARTS_HIGH_LAYER). handle_masking() splits each leg between its halves with leg_masks.dmi, so the far leg goes under everything in profile.
dirt_zone_pixelsReturns each drawn zone's sprite pixels in one direction: list(zone = indexes from dirt_sprite_pixels()), zones in draw order.
dirt_zone_sourcesReturns the sprites a body's dirt template is built from, as get_limb_icon() draws them: alist(zone = list(icon file, icon state)) for each drawn limb and each hand, "eyes" = list(icon file, left state, right state) when the head draws eyes, and "human_head" = whether the head is a human's. Stumps, invisible limbs and a taur's hidden legs draw no sprite of their own, so they're left out.
dirt_zone_sources_drawableReturns whether every limb sprite zone sources name is in its sheet. The eyes aren't checked: a missing eye state draws no eye, so the face is left unguarded as the body shows it.
dirt_zone_sources_matchReturns whether a body draws the sprites zone sources name, as dirt_zone_sources() reads them, without building them: the sheet and state of each limb in some zones and of its hand, the eyes, and whether the head is a human's. Skin mess asks it only when what a limb is drawn from has changed since it last matched (skin_reads); a worn garment's mess, a taur body's or taur suit's pools and the vulva's ring of skin ask it on every draw.
dirt_zone_underclothesReturns the kinds of underclothes that belong on each zone, in the order they take a tied shot there: list(zone = list of DIRT_UNDERCLOTHES_* defines). You should NEVER modify it.
disambiguate_clientTakes an argument which could be either a ckey, /client, or IRC marker, and returns a client if possible Returns [EXTERNAL_PM_USER] if an IRC marker is detected Otherwise returns null
disease_air_spread_walkHelper for checking if there is an air path between two turfs
diseasescanChecks the individual for any diseases that are visible to the scanner, and displays the diseases in the attacked to the attacker.
dispatch_announcement_to_playersProc that just dispatches the announcement to our applicable audience. Only the announcement is a mandatory arg. should_play_sound can also be a callback, if you want to only play the sound to specific players.
display_cornersMakes all lighting corners visible, debug to aid in understanding
display_energyFormat an energy value in prefixed joules. Arguments
display_power*Format a power value in prefixed watts.
do_admin_sparksCreates non-interactive rainbow sparks at the given source location
do_afterTimed action involving one mob user. Target is optional.
do_chem_smokeHelper to quickly create a cloud of reagent smoke reagent_type can accept a list of reagents, optionally as a key-value pair with values overriding reagent_volume if not null
do_foamProc to quickly spawn foam reagent_type can accept a list of reagents, optionally as a key-value pair with values overriding reagent_volume if not null
do_portal_spawnSpawns a portal storm that spawns in sentient/non sentient mobs portal_appearance is a list in the form (turf's plane offset + 1) -> appearance to use
do_salon_workA do_after() for the finishing touches that plays the tool's work sound, and the tattoo machine's hum, until it ends either way.
do_smokeA helper proc used to spawn small puffs of smoke.
do_sweepSweep objects in the direction we're facing towards our direction Arguments
drawn_appearancesReturns every appearance drawn in an overlay layer, each before what it holds.
drawn_underclothesReturns the appearance a test human's only underclothes are drawn as. Their layer also holds what their worn emissives are drawn with (prepare_worn_emissive_overlays()), which has no sprite.
drawn_worn_spriteReturns the sprite a test human's worn item is drawn as in one of its overlay layers: the first appearance drawn there with an icon. The layer also holds what the item's emissives are drawn with (prepare_worn_emissive_overlays()).
drop_hair_trimmingsDrops a pile of hair cuttings, coloured from the hair that was just cut off.
ducting_layer_checkFinds a duct or plumbing machinery located at the destination
dump_in_spaceDump a movable in a random valid spacetile
dump_stackReturns an ordered list of all our parent procs, highest to deepest.
duplicate_object
dviewVersion of view() which ignores darkness, because BYOND doesn't have it (I actually suggested it but it was tagged redundant, BUT HEARERS IS A T- /rant).
dyn_explosionUsing default dyn_ex scale:
emissive_appearanceProduces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the EMISSIVE_COLOR.
emissive_blockerProduces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the EM_BLOCK_COLOR.
emissive_branch_litWhether an emissive-plane branch glows anywhere. An emissive's colour is a matrix whose constant row turns it red (blooming) or green; BYOND keeps a blocker's, which only multiplies, as plain black. inherited is the colour the branch takes from above it.
emissive_branchesWhat of a look glows in the dark, for the pages that show it with the lights off.
emissive_branches_litWhether any of emissive_branches() glows, rather than only blocking.
emissive_holderemissive_branches() of look in a holder that get_flat_uni_icon() draws as the emissive plane holds them, placed as they are on the look: its layer and facing, and a blank tile of its own at the look's lower left, where the look's own icon is. Null when there are none.
emissive_tri_bool_listReturns a cached emissive boolean list for mutant bodyparts. You should NEVER modify these lists, always use Copy() if you have to.
end_cooldownCallback called by a timer to end an associative-list-indexed cooldown.
end_message_delaySimply resets the message delay and the recent messages list, to ensure that recent messages can be sent again. Is called on a one second timer after a delay is set, from /obj/machinery/telecomms/broadcaster/receive_information()
ending_helperHelper to set the round to end asap. Current usage Cult round end code
endswithReturns TRUE if the input_text ends with the ending
energy_to_powerConverts the joule to the watt, assuming SSmachines tick rate. Arguments
engaged_role_play_checkChecks if a player meets certain conditions to exclude them from event selection. Returns FALSE if the player is considered ineligible for the event
english_listReturns a list in plain english as a string
expand_three_digit_colorGiven a 3 character color (no hash), converts it into #RRGGBB (with hash)
expand_weightsTakes a weighted list (see above) and expands it into raw entries This eats more memory, but saves time when actually picking from it
explosionMakes a given atom explode.
export_single_itemIt works like export_item_and_contents(), however it ignores the contents. Meaning only exported_atom will be valued.
failed_narsie_summonSummon failed, time to work backwards
fast_split_stackSplits a stack. we don't use /obj/item/stack/proc/split_stack because Byond complains that should only be called asynchronously. This proc is also more faster because it doesn't deal with mobs, copying evidences or refreshing atom storages Has special internal uses for e.g. by the material container & RPED
female_cut_over_pecsReturns the female cut a garment gets on wearer, as wear_female_version() takes its flags: flags themselves, unless the wearer has pecs, which keep the torso out of it. Then only the lower body is shaped: FEMALE_UNIFORM_LOWER_ONLY where the cut would take in the crotch, or null, no cut at all, where it would shape only the torso. Pecs of any shape count, whether they show or not.
female_lower_cut_maskReturns the mask a FEMALE_UNIFORM_LOWER_ONLY cut is drawn through: masking_helpers.dmi's full cut, less the pixels its torso-only cut shares with it, so it shapes the lower body alone. Made with each new cut, which wear_female_version() caches.
fill_grid_from_iconCopies the pixel colors from the passed in icon I to the 2d list grid
fill_holidaysFills the holidays list if applicable, or leaves it an empty list.
fill_with_onesGiven a list, return a copy where values without defined weights are given weight 1. For example, fill_with_ones(list(A, B=2, C)) = list(A=1, B=2, C=1) Useful for weighted random choices (loot tables, syllables in languages, etc.)
filter_appearance_recursiveRecursively applies a filter to a passed in static appearance, returns the modified appearance
filter_chain_stepKeeps the steps in the correct order. Arguments:
filter_name_icHelper proc to check if a name is valid for the IC filter
findTrueKeyTakes a stealthed ckey as input, returns the true key it represents
find_functional_ntnet_relayChecks whether NTNet is available by ensuring at least one relay exists and is operational.
find_last_punctuationFind what punctuation is at the end of the input, returns it. Ignores emphasis (|, +, _)
find_maintenance_spawnFinds us a generic maintenance spawn location.
find_mod_themeSimple proc to search through mod_themes global to return a theme
find_obstruction_free_locationFind an obstruction free turf that's within the range of the center. Can also condition on if it is of a certain area type.
find_recordReturns the first record in the list that matches the name
find_safe_turfAttempts to find a "safe" floor turf within some given z-levels
find_space_spawnFinds us a generic spawn location in space.
find_vent_spawnsFinds us all suitable vent spawn locations on the station.
findnameFind if the message has the real name of any user mob in the mob_list
finish_equip_mobA utility function for /datum/strippable_items to finish equipping an item to a mob.
finish_unequip_mobA utility function for /datum/strippable_items to finish unequipping an item from a mob.
fire_curse_handTorment the target with a frightening hand
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_nameFind the first name of a mob from a passed string with regex
fit_garment_framesFits a garment's state in place: each direction, and each animation frame, is fitted on its own (fit_garment_view()), the front views last (GARMENT_FIT_PIECE_VIEW()).
fit_garment_viewFits one view of a garment's state in place, one direction's animation frame (/datum/garment_fit_view), and draws it back over the state's own when the fit changes it. A state's views are numbered direction by direction (S, N, E, W), and frame by frame within each. Its arms' sleeves are judged from its frame's front view (garment_front_sleeves()), which must still be the garment's own: fit the front views last.
flash_colorFlash a color on the passed mob
flick_overlay_globalAdd an image to a list of clients and calls a proc to remove it after a duration
force_apc_arcingSet all APCs to start (or stop) arcing
forced_throw_vortexMagical move-wooney but it always throws you that happens sometimes, adapted from goonchem_vortex
format_frequencyFormat frequency by moving the decimal.
format_textProperly format a string of text by using replacetext()
full_capitalizeReturns a string with the first letter of each word capitialized
gags_to_universal_iconConverts a GAGS atom to a universal icon by generating blend operations.
garment_colour_hueReturns a colour's hue as the sleeve modes judge it (garment_sleeve_mode()), in whole degrees from 0 to 359, or -1 for a grey: one whose channels spread less than percent percent of its brightest one, black included.
garment_colours_kinWhether a shaded sleeve may step a pixel from colour source to the darker colour, keeping to source's family. A colour is lit when its brightest channel is at least SLEEVE_LIT_MIN, and dark otherwise. It may when:
garment_fit_cache_slotReturns the list a garment fit is cached in, under its own last key, by the keys before it, making each level as it goes.
garment_fit_templatesReturns the limb templates garments are fitted with, read from fitting/fit_templates.json the first time they're asked for: SSgarment_fitting reads them as the server starts. The file is compiled into the resource file, so a server has it wherever it runs.
garment_fit_upper_coreReturns the upper third, by rows, of a limb template's baseline pixels: on an arm, what a sleeve covers and a strap over the shoulder doesn't. The sleeve test reads it (/datum/garment_fit_view/proc/apply_bands(), garment_front_sleeves()).
garment_frame_countReturns how many animation frames a garment's state has, counted from its front view, up to GARMENT_FIT_MAX_FRAMES.
garment_front_sleevesReturns which of a garment's fitted arms it has a sleeve over, judged from its front view, where the arms show whole: fitted arm -> whether the garment covers at least half of the upper third of the arm's baseline pixels there. A short sleeve covers the upper arm and counts, where a strap over the shoulder covers a pixel or two of it. Every view's fit uses it (/datum/garment_fit_view/proc/apply_bands()). Null when no arm is fitted.
garment_metadataReturns fitting/garment_metadata.json's sheets, by path, read the first time they're asked for: SSgarment_fitting reads them as the server starts. See garment_sheet_metadata().
garment_near_greyWhether a colour is a near-grey: its channels spread less than twice SLEEVE_GREY_PERCENT percent of its brightest one, black included. A greyscale garment's own faintly blue shading falls either side of the grey line, but is near-grey.
garment_pec_flexReturns a pec flex's templates, as garment_pec_templates() holds them under flexes: its frame delays, and its shapes, each shape's templates by view on each of its frames. Null for a sheet that isn't a pec flex's, like a jiggle's, or none.
garment_pec_templatesReturns the templates tops are fitted to pecs with, read from fitting/pec_templates.json and fitting/pec_flex_templates.json the first time they're asked for, as the limb templates are.
garment_sheet_metadataReturns what garment fitting knows of a sheet without reading its pixels, from fitting/garment_metadata.json: sleeves, its states whose own sleeves pick shaded sleeves -> TRUE, and colours, for each state whose fits read whole views, those views' colours as fit_garment_view() takes them, or null for a view read from its pixels. Null for a sheet it doesn't know, like a generated icon, or one that changed after the file was written: those are read from their pixels.
garment_sleeve_modeReturns the mode a worn garment is fitted in when it doesn't set its own, picked from its sleeves in its front view.
gas_mixture_parser
gather_z_level_informationReturns all necessary z-level information. Argument append_grid allows the user to see a table showing all of the z-level linkages, which is only visible and useful in-game.
generateStealthCkeyHands back a stealth ckey to use, guarenteed to be unique
generate_adjacent_directionsEncodes connectivity between border objects Returns a list accessable by a border object's dir, the direction between it and a target, and a target Said list will return the direction the two objects connect, if any exists (if the target isn't a border object and the direction is fine, return the inverse of the direction in use)
generate_and_hash_rsc_filegenerates a filename for a given asset. like generate_asset_name(), except returns the rsc reference and the rsc file hash as well as the asset name (sans extension) used so that certain asset files don't have to be hashed twice
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_autowiki_outputReturns a string of the autowiki output file
generate_bitfieldsTurns /datum/bitfield subtypes into a list for use in debugging
generate_changeling_meteorReceives a mob candidate, transforms them into a changeling, and hurls them at the station inside of a changeling meteor
generate_chemwiki_lineGenerate the big list of reagent based reactions. style='background-color:#FFEE88;'|{{anchor|Synthetic-derived growth factor}}Synthetic-derived growth factor▮
generate_clockcult_scripturesGenerate all scriptures in a global assoc of name:ref. Only needs to be done once
generate_cult_rune_typesReturns an associated list of rune types. [rune.cultist_name] = [typepath]
generate_customizable_racesGenerates races available to choose in character setup at roundstart, yet not playable on the station.
generate_filter_immune_stringGenerates a static string appended to the venom milker's description, detailing which reagents available to the venom quirk will not be transformed into /datum/reagent/generic_milked_venom.
generate_generator_indexCreates generator__id => type map.
generate_hallucination_weighted_listGenerates the global weighted list of random hallucinations.
generate_heretic_starting_knowledgeModifies the 2 lists provided in the arguments and sets it up so the heretic can actually start researching stuff. Specifically generates the tier 1-4 knowledges + start ones for each path as well for the preview (should probably be moved to use the actual list of per-path researches) Importantly, this adds HKT_NEXT's for the starting knowledges so the heretic's next researches are considered valid
generate_holiday_racesEvery species with a holiday of its own that the roundstart races config doesn't already allow: id -> holiday.
generate_icon_alpha_maskHelper proc to generate a cutout alpha mask out of an icon.
generate_items_insideCreates new items inside an atom based on a list
generate_lazy_template_mapIterates through all lazy template datums that exist and returns a list of them as an associative list of key -> instance.
generate_map_list_from_directoryReturns a list of all maps to be found in the directory that is passed in.
generate_milkable_venom_listGenerates a static list of /datum/reagent that will not be transformed into /datum/reagent/generic_milked_venom upon being milked by a venom milker.
generate_number_stringsGenerates and returns a list of both arabic and roman numerals for 1 through 99
generate_quirk_constant_dataConstructs [GLOB.all_quirk_constant_data] by iterating through a typecache of pregen data, ignoring abstract types, and instantiating the rest.
generate_random_nameGenerate a random name based off of one of the roundstart languages
generate_random_name_species_basedGenerate a random name based off of a species This will pick a name from the species language, and avoid picking common if there are alternatives
generate_reagents_taste_messageReturns what the reagents in our given list taste like
generate_seed_data_fromReturns a list of seed data generated from the given seeds. Filling the "name", "icon" and "icon_state" fields of the data is the caller's responsibility.
generate_selectable_species_and_languagesGenerates species available to choose in character setup at roundstart
generate_space_underlayGenerates a space underlay for a turf This provides proper lighting support alongside just looking nice Accepts the appearance to make "spaceish", and the turf we're doing this for
generate_taur_clothingProc to generate a taur variation of clothes, with the intent of caching them. It is meant for suits and uniforms at the moment, to cut out the bottom half so that it doesn't look too out of place.
generate_unique_announcement_headerProc that just generates a custom header based on variables fed into priority_announce() Will return a string.
generate_wound_series_collectionGenerates [wound_series_collections] by iterating through all pregen_data. Refer to the mentioned list for documentation
generate_wound_static_dataConstructs [GLOB.all_wound_pregen_data] by iterating through a typecache of pregen data, ignoring abstract types, and instantiating the rest.
genital_option_labelReverse lookup: the label whose define matches the current value, or null.
getReturns the atom type in the specified loc
getFlatIconCreate a single /icon from a given /atom or /image.
get_abstract_branch_descendantsReturns a list of concrete types under abstract sub-branches of root
get_abstract_typesReturns a list of all abstract typepaths for all datums
get_active_player_countCounts active players who are playing in the round
get_active_player_listGet active players who are playing in the round
get_adjacent_areasReturns a list of all areas that are adjacent to the center atom's area, clear the list of nulls at the end.
get_adjacent_open_areasReturns a list with all the adjacent areas by getting the adjacent open turfs
get_adjacent_open_turfsReturns a list with all the adjacent open turfs. Clears the list of nulls in the end.
get_adjacent_turfsReturns a list of all turfs that are adjacent to the center atom's turf, clear the list of nulls at the end.
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_all_antag_flagsReturns a list of all antag flags that are available to the player
get_all_slotsGet all possible organ slots by checking every organ, and then store it and give it whenever needed
get_allowed_instrument_idsGet all non admin_only instruments as a list of text ids.
get_angleCalculate the angle between two movables and the west|east coordinate
get_angle_rawAngle between two arbitrary points and horizontal line same as /proc/get_angle
get_announcement_systemReturns a random announcement system that is operational, has the specified config entry, signal can reach source and radio supports any channel in list. All args are optional.
get_anomaly_protectionCalculates mob effect protection returns NO_ANOMALY_PROTECTION if not human, returns calculated protection otherwise higher returning number means less protection
get_antag_mindsReturns MINDS of the assigned antags of given type/subtypes Supplying no antag type grants all minds with antag datums
get_area_nameReturns the name of the area the atom is in
get_areas_in_rangeReturns a list with the names of the areas around a center at a certain distance Returns the local area if no distance is indicated Returns an empty list if the center is null
get_armor_by_typeGets an armor type datum using the given type by formatting it into the expected datum tag
get_atom_on_turfReturns the top-most atom sitting on the turf. For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
get_bbox_of_atomsGet a bounding box of a list of atoms.
get_blood_typeReturns the blood_type datum that corresponds to the string id key in GLOB.blood_types
get_blueprint_dataget_blueprint_data Gets a list of turfs around a central turf and gets the blueprint data in a list Args:
get_bulge_paletteThe adaptive palette of a cloth colour in a finish (BULGE_FINISH_*): five "#rrggbb" strings, cloth, light, highlight, shade and deep shade, or null for no colour. One shared list per (colour, finish): never change it.
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_cardinal_dirGet the cardinal direction between two atoms
get_chasm_categoryReturns a key to store, remove and access fallen mobs depending on the z-level. This stops rescuing people from places that are waaaaaaaay too far-fetched.
get_chat_togglesGet the given client's chat toggle prefs.
get_chem_idReturns reagent datum from reagent name string
get_closest_atomReturns the closest atom of a specific type in a list from a source
get_color_from_blood_listReturns the hex color string, or a color matrix, of a given blood_type datum given an assoc list of blood_DNA e.g. ("Unknown Blood Type", "*X")
get_consistent_feature_entryTakes in an accessory list and returns the first entry from that list, ensuring that we dont return SPRITE_ACCESSORY_NONE in the process.
get_corresponding_wound_typeSearches through all wounds for any of proper type, series, and biostate, and then returns a single one via pickweight. Is able to discern between, say, a flesh slash wound, and a metallic slash wound, and will return the respective one for the provided limb.
get_ctf_voting_controllerReturns the existing /datum/ctf_voting_controller for the given ID, or makes one
get_customizable_racesGets a list of all customizable races on roundstart.
get_decoration_color_from_patternProc to return colors for recoloring atoms based on a pattern and the position of the atom. Primarily used by holidays
get_display_icon_forGets the relevant universal icon for an atom, when displayed in TGUI. (see: icon_state_preview) Supports GAGS items and colored items.
get_dist_euclideanReturns the distance between two atoms
get_dummy_savefileGets a dummy savefile for usage in icon generation. Savefiles generated from this proc will be empty.
get_dynamic_human_appearanceCreates a human with the given parameters and returns an appearance of it
get_edge_target_turfReturns the turf located at the map edge in the specified direction relative to target_atom used for mass driver
get_element_by_varreturn first thing in L which has var/varname == value this is typecaste as list/L, but you could actually feed it an atom instead. completely safe to use
get_emote_sound_from_listGets an emote sound from a specific list of sounds. Supports lists and genders. Used by emote datums for default sounds, and tongues, masks etc. for overrides.
get_first_open_turf_in_areaIterates over all turfs in the target area and returns the first non-dense one
get_flat_existing_human_iconA simpler version of get_flat_human_icon() that uses an existing human as a base to create the icon. Does not feature caching yet, since I could not think of a good way to cache them without having a possibility of using the cached version when we don't want to, so only use this proc if you just need this flat icon generated once and handle the caching yourself if you need to access that icon multiple times, or refactor this proc to feature caching of icons.
get_flat_human_icon
get_flat_uni_icongetFlatIcon for /datum/universal_icons Still fairly slow for complex appearances due to filesystem operations. Try to avoid using it grow: the canvas fits every overlay, nested ones where they really are; see flat_x1.
get_frozenwake_puzzle_areaProc used to check if get_area returns the frozenwake puzzle area.
get_garment_fitReturns the garment fit to these muscle sizes and pecs, made the first time it's asked for.
get_general_adminwho_informationProc that gathers adminwho information for a general player, which will only give information if an admin isn't AFK, and handles potential fakekeying. Will return a list of strings.
get_hearLike view but bypasses luminosity check
get_hear_turfsget_hear that only gets turfs so we can use as_anything
get_hearers_in_LOSReturns a list of movable atoms that are hearing sensitive in view_radius and line of sight to source the majority of the work is passed off to the spatial grid if view_radius > 0 because view() isnt a raycasting algorithm, this does not hold symmetry to it. something in view might not be hearable with this. if you want that use get_hearers_in_view() - however thats significantly more expensive
get_hearers_in_looc_range
get_hearers_in_radio_rangesReturns a list of mobs who are in hearing range of every radio in the list of radios given
get_hearers_in_radio_ranges_track_radiosReturns a list of mobs who can hear any of the radios given in the given radio list, indexed by the radio. More expensive than get_hearers_in_radio_ranges()
get_hearers_in_rangeThe exact same as get_hearers_in_view, but not limited by visibility. Does no filtering for traits, line of sight, or any other such criteria. Filtering is intended to be done by whatever calls this function.
get_hearers_in_viewreturns every hearaing movable in view to the turf of source not taking into account lighting useful when you need to maintain always being able to hear something if a sound is emitted from it and you can see it (and youre in range). otherwise this is just a more expensive version of get_hearers_in_LOS().
get_holiday_racesSpecies that are roundstart races only during a holiday, as an assoc list of id to holiday.
get_icon_dimensionsReturns a list containing the width and height of an icon file
get_icon_dimensions_pureReturns a list containing the width and height of an icon file, without using rustg for pure function calls
get_icon_dmi_pathgiven an icon object, dmi file path, or atom/image/mutable_appearance, attempts to find and return an associated dmi file path. a weird quirk about dm is that /icon objects represent both compile-time or dynamic icons in the rsc, but stringifying rsc references returns a dmi file path ONLY if that icon represents a completely unchanged dmi file from when the game was compiled. so if the given object is associated with an icon that was in the rsc when the game was compiled, this returns a path. otherwise it returns ""
get_job_hud_iconReturns the (isolated) security HUD icon for the given job.
get_lineGet a list of turfs in a line from starting_atom to ending_atom.
get_linked_admin_nameProc that will return the applicable display name, linkified or not, based on the input client reference.
get_linked_z_angleGets the angle between two linked z-levels. Returns an angle (in degrees) if the z-levels are crosslinked/neighbors, or null if they are not.
get_linked_z_levels_in_rangeGets all connected z-levels within a given manhattan distance of center.
get_liquid_color_factorReturns the LIQUID_COLOR_FACTOR_* that a pool of this LIQUID_SURFACE_* class scales its mix colour by.
get_liquid_reagent_lookReturns what liquids read off a reagent type, worked out once per type.
get_liquid_surfaceReturns the surface a pool of these reagents draws.
get_list_of_adminsProc that returns a list of cliented admins. Remember that this list can contain nulls! Also, will return null if we don't have any admins.
get_loc_from_mouseposConverts mouse-pos control coordinates to a specific turf location on the map.
get_lone_liquid_colorReturns the colour of a pool holding only one reagent type, at any volume above 0, worked out once per type.
get_matching_bitflagsReturns null if no such field exists, a list of all matching flags by name otherwise
get_messenger_nameGet the display name of a messenger instance
get_minimap_blips_in_areaReturns minimap blips matching a tag that are within distance tiles of target_turf on the same z-level.
get_minimap_for_zGets the /datum/minimap for a Z-level - generating it if it hasn't been yet.
get_mob_admin_traitsReturns only traits that apply to mobs
get_mob_by_ckeyreturns a mob type controlled by a specified ckey
get_mob_by_keyReturn the mob type that is being controlled by a ckey
get_mob_or_brainmobReturns the occupant mob or brain from a specified input
get_most_experiencedFrom a list of players (minds, mobs or clients), finds the one with the highest playtime (either from a specific role or overall living) and returns it. If playtime tracking is disabled, just returns the first player in the list.
get_nested_locsReturns a list of all locations (except the area) the movable is within.
get_officer_departmentReturns the department a new officer should go to: the least populated one, favoring their preference on ties.
get_offset_target_turfreturns turf relative to target_atom offset in dx and dy tiles, bound to map limits
get_open_turf_in_dirReturns the open turf next to the center in a specific direction
get_path_by_slotReturns a generic path of the object based on the slot
get_path_toThis is the proc you use whenever you want to have pathfinding more complex than "try stepping towards the thing". If no path was found, returns an empty list, which is important for bots like medibots who expect an empty list rather than nothing. It will yield until a path is returned, using magic
get_perceived_radiation_dangerGets the perceived "danger" of radiation pulse, given the threshold to the target. Returns a RADIATION_DANGER_* define, see code/__DEFINES/radiation.dm
get_perimeterGet a list of turfs in a perimeter given the center_atom and radius. Automatically rounds down decimals and does not accept values less than positive 1 as they don't play well with it. Is efficient on large circles but ugly on small ones Uses Jesko`s method to the midpoint circle Algorithm.
get_pixel_anglefor getting the angle when animating something's pixel_x and pixel_y
get_pixel_distanceFinds the distance between two atoms, in pixels
centered = FALSE counts from turf edge to edge
centered = TRUE counts from turf center to turf center
of course mathematically this is just adding world.icon_size on again
get_player_clientReturns a client from a mob, mind or client
get_powernet_info_from_sourceExtracts the powernet and cell of the provided power source
get_preferences_in_priority_orderReturns a flat list of preferences in order of their priority
get_protean_chest_componentGets the protean chest component from a mob. Returns null if not protean.
get_protean_modsuit-- Helper procs -- Gets the protean modsuit from a mob's chest component. Returns null if not protean or no modsuit.
get_rand_frequencyget a random frequency.
get_rand_frequency_low_rangeget_rand_frequency but lower range.
get_random_coinGets a random coin excluding the blocked type and including extra coins which aren't pathed like coins.
get_random_drinkGets a random drink excluding the blocked type
get_random_foodGet a random food item exluding the blocked ones
get_random_hallucinationSelect a random hallucination from the hallucination pool
get_random_jumpskirtReturns a random, acceptable jumpskirt typepath
get_random_jumpsuitReturns a random, acceptable jumpsuit typepath
get_random_manualGets a random manuel book type excluding certain banned books
get_random_neurowareReturns a random neuroware reagent type. Excludes aphrodisiac reagents.
get_random_reagent_idReturns a random reagent object, with the option to blacklist reagents.
get_random_station_turfReturns a random turf on the station
get_random_valid_hallucination_subtypeGets a random subtype of the passed hallucination type that has a random_hallucination_weight > 0. If no subtype is passed, it will get any random hallucination subtype that is not abstract and has weight > 0. This can be used instead of picking from the global weighted list to just get a random valid hallucination.
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_round_default_lawsetA getter that sets up the round default if it has not been yet.
get_safe_random_station_turfReturns a random turf on the station, excludes dense turfs (like walls) and areas that have valid_territory set to FALSE
get_safe_random_station_turf_equal_weightReturns a random department of areas to pass into get_safe_random_station_turf() for more equal spawning.
get_sane_item_typesUsed for random item gen to try and generate a list of types that arent weird parent types and similar
get_selectable_speciesGets a list of all species id's available to choose in roundstart.
get_sensitive_adminwho_informationProc that gathers adminwho information for admins, which will contain information on if the admin is AFK, readied to join, etc. Only arg is a list of clients to use. Will return a list of strings.
get_sfxUsed to convert a SFX define into a .ogg so we can add some variance to sounds. If soundin is already a .ogg, we simply return it
get_size_in_tilesReturns the size of the sprite in tiles. Takes the icon size and divides it by the world icon size (default 32). This gives the size of the sprite in tiles.
get_small_overlayFikou's fix for making toast alerts look nice - resets offsets, transforms to fit
get_sorted_areasReturns a sorted version of GLOB.areas, by name
get_species_page_idsEvery species the species page offers, as an assoc list of id to TRUE.
get_species_page_rendersDraws every species on the species page facing each way, without uniform and then in it, as list("body" = entries, "uniform" = entries) in insert_icon()'s entry format. Both sheets take their half from the one drawing, and later callers wait for the first to finish.
get_swarm_path_toPOTENTIALLY cheaper version of get_path_to This proc generates a path map for the end atom's turf, which allows us to cheaply do pathing operations "at" it Generation is significantly SLOWER then get_path_to, but if many things are/might be pathing at something then it is much faster Runs the risk of returning an suboptimal or INVALID PATH if the delay between map creation and use is too long
get_synthesizable_reagent_subtypesReturns a list of all subtypes of base_type reagent that can be synthesized. If none qualify, returns an empty list — caller should handle fallback.
get_teleport_locReturns location. Returns null if no location was found.
get_temp_change_amountUsed to get the amount of change between two body temperatures
get_turf_pixelLets the turf this atom's ICON appears to inhabit it takes into account: Pixel_x/y Matrix x/y NOTE: if your atom has non-standard bounds then this proc will handle it, but: if the bounds are even, then there are an even amount of "middle" turfs, the one to the EAST, NORTH, or BOTH is picked this may seem bad, but you're at least as close to the center of the atom as possible, better than byond's default loc being all the way off) if the bounds are odd, the true middle turf of the atom is returned
get_valid_bitflagsReturns an associative list of bitflag name -> number for all valid bitflags in the passed in field
get_valid_screen_locationReturns a valid location to place a screen object without overflowing the viewport
get_valid_teleport_turfCheck for turfs within range of the center turf and perform simple checks to see which is a valid teleportation target. If so, add it to a list to pick the final destination from at the end.
get_visual_offsetReturns how visually "off" the atom is from its source turf as a list of x, y (in pixel steps) it takes into account: Pixel_x/y Matrix x/y Icon width/height
get_vox_glove_colorGloves have no leg/foot sample point. Use their most common visible source color.
give_admin_popupTries to give the target an admin popup. If it fails, will send the error to the passed admin.
give_feline_taurMakes a human a feline taur, the taur whose tail is drawn separately, and returns its taur body.
goonchem_vortexMagical move-wooney that happens sometimes.
graffiti_anchor_forReturns where graffiti painted on a turf lives across rounds: a station anchor, the turf's coordinates and area, and its graffiti_surface_kind() as its surface.
graffiti_anchor_resolveReturns the turf an anchor names this round, when it is still the kind of surface the graffiti was painted on.
graffiti_anchor_waitsWhether an anchor that doesn't resolve is only waiting, so the round isn't counted as a miss: no system has registered a resolver for its kind this round.
graffiti_art_decodeDecodes an art, such as one read from a map file, when it can be drawn: a one- or two-tile width, a palette of 1 to GRAFFITI_FLAT_MAX_COLORS colours, and a grid and glow mask that both cover every pixel.
graffiti_art_glow_kindReturns which of an art's painted pixels glow, which decides its emissive overlays.
graffiti_art_hashReturns an art's content identity, which tiles showing the same art share.
graffiti_art_iconReturns an art drawn as an icon, which every tile showing that art shares. Its paint shows at its real alpha (graffiti_drawn_colors()).
graffiti_art_pixelsCounts an art's painted pixels.
graffiti_blank_iconReturns a new transparent icon one or two tiles wide.
graffiti_blendBlends a colour over another as placed graffiti shows them, in their real alphas: GRAFFITI_ALPHA_CEILING for opaque paint and its own for translucent paint. The standard "over" operator gives the alpha and the colour, and an alpha that reaches the ceiling is stored opaque.
graffiti_clean_textCleans player text for a piece's name, description or layer names, so that cleaning it again changes nothing.
graffiti_clip_recordReturns a decoded art or layer with paint left only where a poster takes it.
graffiti_colorReturns a colour in its canonical graffiti form: lowercase #rrggbb when its alpha reaches GRAFFITI_ALPHA_CEILING, the alpha placed graffiti draws opaque paint at, and #rrggbbaa below it, raised to GRAFFITI_ALPHA_FLOOR when lower. So a stored colour's real alpha is the ceiling when it has seven characters, and its own alpha when it has nine.
graffiti_copy_pieceReturns a copy of a canonical piece that shares no list with it, such as one to hand on from a library, which keeps its own. deep_copy_list() would turn the list of layers into an associative list.
graffiti_credit_painterMarks graffiti as a painter's work as they finish a piece on it: their hidden print, and once only the art element, which every piece stacked on a tile, or sprayed over a poster, shares.
graffiti_decode_flatDecodes a flat art grid that graffiti_encode_flat() wrote. Hostile input is refused before anything is expanded, and decoding stops at pixel_count whatever the runs claim.
graffiti_default_paletteReturns the colours the graffiti editor offers before a piece has its own: black and Endesga-32's greys, hues, browns and skin tones, a few pastels, then neons for glow layers.
graffiti_draw_iconDraws pixels on a new icon as horizontal runs, one DrawBox() for each run of one colour.
graffiti_drawn_colorsReturns colours as placed graffiti draws them, in their real alphas: opaque ones at GRAFFITI_ALPHA_CEILING, so the surface shows through, and translucent ones at their own, which is below it. None draws above the ceiling.
graffiti_drop_loose_paintDrops for good the paint a stopping piece has placed, both halves of a two-tile one, when a tile of it offers no surface now, as a pane loosened under it leaves one: a loose pane drops the piece in progress whole. Graffiti finished there stays.
graffiti_editor_forOpens a graffiti editor for a player, ending any editor they already have. A surface session shakes the can.
graffiti_editor_test_beginPoints the graffiti registry and libraries at the scratch directory, with the test account's library empty.
graffiti_editor_test_endEnds the test account's graffiti editor, takes the test ckey back off its painter, and puts the registry, the library directory and the account's library and cooldowns back.
graffiti_editor_test_painterPuts a painter for the test account beside a wall, holding an uncapped spray can.
graffiti_editor_test_pasteReturns a one-pixel green paste on the bottom layer's top row, as the editor's window sends pasted paint it drops.
graffiti_editor_test_strokeReturns a one-pixel pencil stroke on the bottom layer's top row, as the editor's window sends it.
graffiti_emissive_overlaysReturns the overlays that light an art's glowing paint on the emissive plane and let its other paint block the glow of whatever lies beneath it.
graffiti_encode_flatEncodes palette indices as a flat art grid.
graffiti_encode_pieceReturns a canonical piece as the text Export writes, format and version first.
graffiti_exportSends a saved piece to a player as a downloaded file. custom_style_send_text() claims the account's transfer slot and export cooldown, which custom styles share.
graffiti_file_keyReturns text made safe to name a file or directory with.
graffiti_flat_codesReturns the characters a flat grid writes, built once, so encoding looks each run's characters up instead of cutting text and calling custom_sprite_canvas_code() for every run, and the glow of art that glows nowhere at each width.
graffiti_flattenFlattens a piece's layers into one art, or only as much of them as a paint job has revealed.
graffiti_flatten_recordsFlattens decoded layers into one art, or only as much of them as a paint job has revealed. Nothing is encoded or decoded on the way, so it is graffiti_flatten() for layers already decoded.
graffiti_glow_iconReturns an art's glow mask: white wherever its paint glows, as opaque as the paint is drawn there.
graffiti_importLets a player import a graffiti piece file into their library as a new piece. This sleeps while the file dialog is open.
graffiti_json_decodeDecodes a graffiti file's JSON, such as a piece's or a map's, as hostile input, without validating what it holds.
graffiti_layer_recordsDecodes a piece's layers for graffiti_merge_arts(), each against the piece's whole palette, glowing on every pixel or on none. A paint job keeps its piece's records, so its steps never decode the layers again.
graffiti_libraryReturns an account's library, loading it from its file when it isn't loaded, as on first use or after it unloaded.
graffiti_library_checkReturns a piece in the canonical form a library keeps, or why a library can't keep it.
graffiti_library_deleteDeletes an account's library, file and all, as an admin purge does. A library still held elsewhere is emptied and can't write its file back.
graffiti_library_flushWrites the library changes the write pacing still holds back, as the round ends or the world stops.
graffiti_library_pacedPaces an account's next graffiti library write by the one just made: a player's waits GRAFFITI_LIBRARY_WRITE_PACE times as long as it took, and at least a second, and a change the server makes is held back as long.
graffiti_library_pathReturns where an account's library file lives, in a directory named by the ckey's first character.
graffiti_library_test_resetPoints the graffiti library directory at root, then forgets the test account's library and its write pacing and deletes the scratch directory, so a test starts and ends with no library files.
graffiti_library_unloadUnloads an account's library as its owner disconnects, unless something still holds it: an editor session or a paint job of the account's, a write the pacing holds back, or an import or export under way. An editor or paint job that ends, and a held write once made, ask again while the owner is away; an import or export doesn't, so its library waits for the owner's next disconnect or the reboot. graffiti_library() loads it again when it is next wanted, under a newer revision.
graffiti_library_write_dueWhether a player may write their graffiti library now, starting a second's wait if so. Each write rewrites and checks the whole file, so the account's saves, imports and exports share the wait, which is kept beside its style transfer cooldowns, and each write lengthens it by its cost (graffiti_library_paced()).
graffiti_library_write_waitReturns how long until an account's graffiti library may be written again.
graffiti_merge_artsMerges arts of one width into one, bottom to top.
graffiti_merge_fingerprintReturns a fingerprint of what merging gives: the alpha ceiling and the hash of one fixed merge of opaque and translucent paint, glowing and not, made once. The map file keeps it beside its stack cache, so a cache written before merges changed is set aside rather than show stacks under keys today's merges wouldn't give.
graffiti_new_sheetReturns a new sprite sheet for icons of one width. BYOND can't remove a state, so the blank's own transparent state, "", stays beside the states added to it.
graffiti_palette_packPacks canonical colours into one string of nine-character #rrggbbaa entries, the form placed art keeps its palette in.
graffiti_palette_unpackUnpacks a palette graffiti_palette_pack() wrote. Only its lowercase spelling is read, so an art has one packed form and one hash.
graffiti_poster_lookReturns what a poster offers graffiti, read from its icon pixel by pixel: the pixels it shows, which alone take paint, and the poster itself as an art, for the editor's window to draw beneath the canvas. Kept for each icon and state; a poster drawn at runtime, as a wanted poster is, is read each time.
graffiti_poster_test_strokeReturns a one-pixel pencil stroke on the bottom layer, as the editor's window sends it.
graffiti_receiveAsks a player for a graffiti piece file and decodes it. This sleeps while the file dialog is open.
graffiti_register_anchor_resolverLets a system that loads its own spaces, such as condos, place graffiti in them: its anchors are resolved through callback, called with the anchor and returning a turf or null.
graffiti_registry_releaseTakes the graffiti of one unloading space off its tiles and keeps it dormant, still in the map file. Call it before the space's turfs change: a decal whose turf stops taking graffiti first loses its graffiti for good.
graffiti_registry_test_beginEmpties the graffiti registry and points it at a scratch map file, with its sheets in the scratch directory too.
graffiti_registry_test_endEmpties the graffiti registry, takes the test room down (graffiti_test_room()), puts the registry's test settings back and deletes the scratch directory. The registry points at the current map's own file again but stays frozen, so nothing the rest of a test round does is written over it.
graffiti_release_mergesLets the decals of a piece's tiles go of their merges once its painter stops painting there (release_merges()).
graffiti_resume_anchorReturns the anchor a stopped piece resumes on: its left tile's, with the kind of surface its paint went on, which a window fastened over floor paint since doesn't change.
graffiti_resume_placementsReturns the placements a stopped paint job or freehand session left on a surface, to resume them there: those with its placement id on the tile and, for a two-tile piece, on the tile to its right. They resume only on the same map and the same tile, and only while every tile that showed paint still shows it.
graffiti_resume_tileReturns the tile a stopped paint job or freehand session left its paint on, the only one it resumes on: the left tile of the placements with its placement id that still show on this map.
graffiti_reveal_boundsReturns how much of a piece shows once a paint job has revealed some of its strips, as graffiti_flatten() takes it.
graffiti_reveal_unitsReturns how a paint job reveals a piece: in strips GRAFFITI_REVEAL_STRIP pixels wide, left to right across each layer in turn, from the bottom layer up.
graffiti_shakePlays a spray can's shake, as a freehand session or a paint job starts.
graffiti_sheet_addAdds an icon to a sprite sheet as a state of its own, replacing any state of that name.
graffiti_sheet_pathReturns where one of a map's sprite sheet files lives.
graffiti_split_wideSplits a wide art into the arts of its two tiles.
graffiti_sprayPlays the spray sound where paint lands, at most once a clip, however often a sprayer paints.
graffiti_static_stationWhether a turf is the station as the map built it, the only place graffiti goes: a station level's turf in a station area, neither a shuttle's nor the holodeck's, and outside every map template loaded on the station this round, such as a random room. Other levels, bitrunning and reserved space, ruins and the like take none. A system that loads spaces of its own, such as condos, registers an anchor resolver for them instead (graffiti_register_anchor_resolver()).
graffiti_station_levelsReturns the station levels in ascending order.
graffiti_station_ordinalReturns where a z level falls among the station levels, which anchors keep instead of the z level itself.
graffiti_station_zReturns the station level at an anchor's ordinal.
graffiti_surface_fullWhether adding a piece would exceed the tile's stack. Resuming a piece already there needs no new slot.
graffiti_surface_kindReturns the kind of surface a turf offers graffiti: a wall, the glass of a full-tile window fastened down on it, or a floor with ground. A loose full-tile window still covers its floor, and a directional window changes nothing.
graffiti_surface_okWhether a turf takes graffiti: a wall, a floor with ground, or a full-tile window fastened down on it, on the static station (graffiti_static_station()).
graffiti_test_artReturns a one-tile art with one or two red pixels.
graffiti_test_camerasCounts the cameras on the station levels.
graffiti_test_chunk_turfsReturns tiles of the test room (graffiti_test_room()) that take graffiti under a station anchor, all in one of the 16-tile chunks build_sheets() packs together, the same ones every call.
graffiti_test_counts_matchWhether a graffiti workspace's colour counts hold what its layers do, read pixel by pixel.
graffiti_test_dense_artReturns a one-tile art painted on every pixel, no two neighbours alike, from forty colours, every other pixel glowing, so its composite and glow mask take as many runs as a tile's art can. The same index gives the same art.
graffiti_test_floorsReturns floors of the test room (graffiti_test_room()), where graffiti gets a station anchor.
graffiti_test_golden_pieceReturns a fixed piece for the flattened-bytes test: an opaque red base on rows 1-30, a translucent green glowing layer on rows 9-16 and a translucent white unlit one on rows 13-20, so it blends translucent over opaque and translucent over translucent, and its glow is mixed.
graffiti_test_index_problemCompares the registry's index of each account's placements with a scan of the placements themselves.
graffiti_test_mountedWhether anything wall-mounted is on a wall or on the turfs beside it, where it may hang from the wall.
graffiti_test_pieceA raw piece as Export writes it: an opaque and a translucent pixel at the top left of an unlit layer, under a glowing layer with one translucent pixel at the bottom right.
graffiti_test_placementFinds a placement by its id.
graffiti_test_roomReturns the room the graffiti tests paint in, built the first time a test asks and taken down by graffiti_registry_test_end(): walls round floors, with a row of GRAFFITI_TEST_ROOM_ROW walls across them, built on empty space of a station level and moved into a station area, so its every tile takes graffiti under a station anchor. No map is relied on to have such walls, as the unit test map, runtimestation_minimal, is all space. The room sits inside one of the 16-tile chunks build_sheets() packs together.
graffiti_test_room_endTakes the graffiti test room down, if a test put it up: deletes all a test left in it, then turns it back into the space of the space area it was.
graffiti_test_wallsReturns walls side by side, west to east, in the test room (graffiti_test_room()), each between two floors so that turning one into a floor opens no room to space, and with nothing wall-mounted on it or around it. The same walls come back every call.
graffiti_tile_decalReturns the custom graffiti decal of the surface a turf offers now.
graffiti_trim_wideNarrows a two-tile piece to one tile when no layer paints its right tile, as a wide canvas left blank there saves.
graffiti_unix_timeReturns the current unix time in whole seconds, as the ten-digit text libraries store and sort. BYOND numbers can't hold it exactly.
graffiti_unlit_glowReturns the glow of art that glows nowhere, as graffiti_encode_flat() writes it and decoded, which graffiti_flat_codes() makes once for each width, so decoded arts that glow nowhere share one list.
graffiti_validate_pieceStrictly validates a library piece, as Export writes it and Import reads it. Nothing is salvaged, and messages never repeat uploaded text.
graffiti_wide_okWhether a two-tile piece fits with its left half on a turf: the turf and the one to its east both take graffiti, on the static station, and are of one kind, both walls, both floors or both windows, which draw their graffiti differently.
graffiti_window_ofReturns the full-tile window fastened down on a turf, whose glass takes graffiti. Directional windows never do.
grawlixGenerate a grawlix string of length of the text argument.
greatest_common_factorTakes a list of numbers as input, returns the highest value that is cleanly divides them all Note: this implementation is expensive as heck for large numbers, I only use it because most of my usecase Is < 10 ints
hallucination_pulseEmits a hallucinating pulse around the passed atom. Affects everyone in the passed radius except for those with TRAIT_MADNESS_IMMUNE. This affects blind players.
has_blood_flagChecks if any of the passed blood types have certain blood flags
haunt_outburstTakes a given area and chance, applying the haunted_item component to objects in the area.
healthscanhealthscan returns a list of everything a health scan should give to a player. Examples of where this is used is Health Analyzer and the Physical Scanner tablet app. Args: user - The person with the scanner target - The person being scanned mode - Uses SCANNER_CONDENSED or SCANNER_VERBOSE to decide whether to give a list of all individual limb damage advanced - Whether it will give more advanced details, such as husk source. tochat - Whether to immediately post the result into the chat of the user, otherwise it will return the results.
hidden_slots_to_inventory_slotsConvers HIDEX to ITEM_SLOT_X, should be phased out in favor of using latter everywhere later
holosynth_drop_unkept_itemsDrops everything the holosynth has equipped except items in the slots they get to keep (ID + pockets).
honkerblastUnleashes a honkerblast similar to the honkmech weapon, but with more granular control.
hsv2rgbConverts a list storing hsva into an rgb color
htmlrendertextPerform a whitespace cleanup on the text, similar to what HTML renderers do
husk_toned_sheetReturns an icon sheet toned the way a husk is drawn.
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)
icon2htmlgenerate an asset for the given icon or the icon of the given appearance for [thing], and send it to any clients in target. Arguments:
icon_existsChecks whether a given icon state exists in a given icon file. If file and state both exist, this will return TRUE - otherwise, it will return FALSE.
icon_exists_or_screamFunctions the same as /proc/icon_exists(), but with the addition of a stack trace if the specified file or state doesn't exist.
icon_metadataReturns rustg-parsed metadata for an icon, universal icon, or DMI file, using cached values where possible Returns null if passed object is not a filepath or icon with a valid DMI file
icon_states_fastCached, rustg-based alternative to icon_states()
icon_transformer_from_listReverse operation of /datum/icon_transformer/to_list()
iconforge_drawnA drawing is done: a character preview's, or share of one for a smaller picture, like the custom sprite editors'. iconforge keeps every image it makes until it is told to let them go, and a look is hardly ever drawn twice, so what it keeps only grows, by 80 to 330 KB a look. Every CHARACTER_PREVIEW_CLEANUP_EVERY looks' worth it lets go, once no character preview is under way: one under way would come out empty. Until then new previews wait, for a tick or two, and the last preview under way lets go when it is done. Spritesheets being made let go themselves once they are done, so it waits for them to finish.
inLineOfSightCalculate if two atoms are in sight, returns TRUE or FALSE
init_ExportsCalled when the global exports_list is empty, and sets it up.
init_blood_typesInitializes the list of blood type singletons
init_chemical_reagent_listInitialises all /datum/reagent into a list indexed by reagent id
init_crafting_recipesInits crafting recipe lists
init_crafting_recipes_atomsInits atoms used in crafting recipes
init_discountable_packsCaled when the global discount pack list is initialized
init_fitness_definition_sheetsReturns GLOB.fitness_definition_sheets.
init_fitness_limb_familiesReturns GLOB.fitness_limb_families, built from the size subtypes.
init_fitness_limb_sheetsReturns GLOB.fitness_limb_sheets. Sheets are files, so it is built here rather than written as a list literal.
init_gas_id_to_canisterReturns a map of canister id to its type path
init_hotspot_reactionsReturns reactions which will contribute to a hotspot's size.
init_keybindingsCreates and sorts all the keybinding datums
init_language_holder_prototypesInits the global list of language holder prototypes.
init_loadout_categoriesInits the global list of loadout category singletons Also inits loadout item singletons
init_main_girder_wall_recipesInitializes the main, false and tram wall types using three lists of wall types.
init_material_girder_wall_recipesInitializes the normal and false girder material wall recipes using two lists of material wall types.
init_pirate_gangsinitializes the pirate gangs glob list, adding all subtypes that can roll today.
init_plant_traitsInits GLOB.plant_traits
init_random_ship_eventsInitializes the random ship events glob list, adding all subtypes that can roll this shift.
init_subtypesCreates every subtype of prototype (excluding prototype and abstract types) and adds it to list L. If no list/L is provided, one is created.
init_subtypes_w_path_keysFunctions like init_subtypes, but uses the subtype's path as a key for easy access If no list/L is provided, one is created.
initialize_starting_knowledgeReturns a list of all heretic knowledge TYPEPATHS that have route set to PATH_START.
int_to_wordsTakes a 1, 2 or 3 digit number and returns it in words. Don't call this directly, use convert_integer_to_words() instead.
invert_HTML_colourInverts the colour of an HTML string
ion_numPicks a string of symbols to display as the law number for hacked or ion laws is at the start to prevent us from changing say modes via get_message_mode()
isAdminGhostAIReturns TRUE/FALSE on whether the mob is an Admin Ghost AI. This requires this snowflake check because AI interact gives the access to the mob's client, rather than the mob like everyone else, and we keep it that way so they can't accidentally give someone Admin AI access.
isAdminObserverIs the passed in mob a ghost with admin powers, doesn't check for AI interact like isAdminGhost() used to
is_adminReturns if the given client is an admin, REGARDLESS of if they're deadminned or not.
is_banned_fromChecks client ban cache or, if it doesn't exist, queries the DB ban table to see if the player's ckey is banned from at least one of the provided roles.
is_color_darkGiven a color in the format of "#RRGGBB", will return if the color is dark.
is_color_dark_with_saturationGiven a color in the format of "#RRGGBB", will return if the color is dark. Value is mixed with Saturation and Brightness from HSV.
is_convertable_to_cultReturns whether the given mob is convertable to the blood cult
is_ctf_targetProc that identifies if something is a valid target for CTF related checks, checks if an object is a ctf barrier or has ctf component if they are a player.
is_factual_sprite_accessoryThis will check if SSaccessories.sprite_accessories[mutant_part]?[part_name] is associated with sprite accessory with factual TRUE.
is_file_typeVerifys wether a string or file ends with a given file type
is_file_type_in_listVerifys wether a string or file ends with a given file type.
is_guest_keyReturns whether or not a player is a guest using their ckey as an input
is_ic_filteredGiven a text, will return what word is on the IC filter, with the reason. Returns null if the message is OK.
is_ic_filtered_for_pdasGiven a text, will return what word is on the IC filter, ignoring words allowed on the PDA, with the reason. Returns null if the message is OK.
is_infiltrator_docked_at_syndiebaseReturns whether or not syndicate operatives escaped.
is_matching_baitHelper proc that checks if a bait matches identifier from fav/disliked bait list
is_mononymFind whitespace or dashes in the passed string with regex and returns TRUE if found
is_mutation_restricted_for_quirksHelper proc to check if a mutation is restricted by any of the given quirk names Returns TRUE if the mutation is restricted (not allowed), FALSE otherwise
is_mutation_restricted_for_speciesHelper proc to check if a mutation is restricted for a given species Returns TRUE if the mutation is restricted (not allowed), FALSE otherwise
is_on_a_planetChecks if the passed non-area atom is on a "planet".
is_ooc_filteredGiven a text, will return what word is on the OOC filter, with the reason. Returns null if the message is OK.
is_path_in_listChecks for specific paths in a list.
is_plain_bodypart_maskWhether a bodypart appearance is a standard glow/blocker sprite that can move into a shared emissive boundary. Inset husk blood, other composite effects and prepared boundaries keep their own roots.
is_plain_bodypart_spriteWhether a bodypart appearance draws the same nested in an unshifted holder as it does on the mob: floating, default blending, and not reaching past its parent with KEEP_APART or RESET_* flags. Iconless holders such as inner ears and MOD textures qualify; their contents are unchanged.
is_safe_turfChecks to see if a given turf is a "safe" location. Being safe requires the following to be true:
is_soft_ic_filteredGiven a text, will return what word is on the soft IC filter, with the reason. Returns null if the message is OK.
is_soft_ic_filtered_for_pdasGiven a text, will return what word is on the soft IC filter, ignoring words allowed on the PDA, with the reason. Returns null if the message is OK.
is_soft_ooc_filteredGiven a text, will return that word is on the soft OOC filter, with the reason. Returns null if the message is OK.
is_source_facing_targetCompare source's dir, the clockwise dir of source and the anticlockwise dir of source To the opposite dir of the dir returned by get_dir(target,source) If one of them is a match, then source is facing target
is_symphony_whitelistedAdmission check: allow access when enforcement is disabled; deny on a database failure. Use symphony_whitelist_lookup() when the caller must distinguish a denial from an outage.
is_type_in_listChecks for specific types in a list.
is_type_on_turfChecks whether or not a particular typepath or subtype of it is present on a turf
is_uppercaseChecks if the passed string is all uppercase, ignoring punctuation and numbers and symbols
is_valid_dmi_filegiven a text string, returns whether it is a valid dmi icons folder path
is_valid_srcCheck if a datum has not been deleted and is a valid source
is_valid_z_level
is_wire_toolIs the passed item a tool that would interact with wires?
is_within_radio_jammer_rangeChecks if a given atom is in range of a radio jammer, returns TRUE if it is.
ishumanbasicReturns if the given target is a human. Like, a REAL human. Not a moth, not a felinid (which are human subtypes), but a human.
iso_to_weekdayReturns an integer in ISO format 1 (Monday) - 7 (Sunday) as a string day
isolate_lightHides all the lights around a source temporarially, for the sake of figuring out how bad a light bleeds (Except for turf lights, because they're a part of the "scene" and rarely modified)
isvineimmuneUsed to determine whether the mob is immune to actions by the vine. Use cases: Stops vine from attacking itself, other plants.
join_admin_ranksTakes a list of rank names and joins them with +
json_deserialize_datumConvert a list of json to datum
json_serialize_datumConvert a datum into a json blob
keep_hairstyleWrites a hairstyle to the character slot this body spawned from, and saves it to disk.
kvpify_listConverts a list into a list of assoc lists of the form ("key" = key, "value" = value) so that list keys that are themselves lists can be fully json-encoded and that unique objects with the same string representation do not produce duplicate keys that are clobbered by the standard JavaScript JSON.parse function
language_understanding_sampleA sample line in a language, as heard by someone who follows this much of it. Kept, so a level's sample stays put.
last_nameFind the last name of a mob from a passed string with regex
lavaland_equipment_pressure_checkCheck if the turf pressure allows specialized equipment to work
lawid_to_typereturns the law datum with the lawid in question, law boards and law datums should share this id.
level_announceSends an announcement about the level changing to players. Uses the passed in datum and the subsystem's previous security level to generate the message.
library_updatedIncrements every time WE update the library db table, causes all existing consoles to repull when they next check
lightningboltthis is the actual bolt effect and damage, made into its own proc because it is used elsewhere
list_clear_empty_weakrefsRemoves any empty weakrefs from the list Returns TRUE if the list had empty refs, FALSE otherwise
list_clear_nullsRemoves any null entries from the list Returns TRUE if the list had nulls, FALSE otherwise
list_holy_successorsCreate a list of the holy successors mobs from GLOB.holy_successors weakref list
living_player_countReturns the amount of currently living players
load_admin_ranksLoads admin ranks. Return a list containing the backup data if they were loaded from the database backup json
load_admins(Re)Loads the admin list. returns TRUE if database admins had to be loaded from the backup json
load_adventuresLoads all adventures from DB
load_default_map_configProc that simply loads the default map config, which should always be functional.
load_mapHelper and recommened way to load a map file
load_map_configProc handling the loading of map configs. Will return the default map config using /proc/load_default_map_config if the loading of said file fails for any reason whatsoever, so we always have a working map for the server to run. Arguments:
load_poll_dataLoads all current and future server polls and their options to store both as datums.
load_whitelistLoads the whitelist. Tries to load it from the database if enabled, otherwise will load it from the legacy whitelist.txt file as normal.
load_whitelist_legacyLoads the whitelist with the legacy way of loading it (from the whitelist.txt file).
loadout_list_to_datumsTakes a list of paths (such as a loadout list) and returns a list of their singleton loadout item datums
log_accessLogging for logging in & out of the game, with error messages.
log_adminGeneral logging for admin actions
log_admin_circuitLogging for admin actions on or with circuits
log_admin_privateGeneral logging for admin actions
log_adminsayLogging for AdminSay (ASAY) messages
log_assetLogging for loading and caching assets
log_atmosLogs the contents of the gasmix to the game log, prefixed by text
log_attackGeneric attack logging
log_blood_wormLogs blood worm events like entering/leaving a host.
log_bomberLogging for bombs detonating
log_borer_evolutionLogging for borer evolutions
log_changeling_powerLogging for changeling powers purchased
log_chatLogging for chatting on modular computer channels
log_combatLog a combat message in the attack log
log_commentLogging for newscaster comments
log_configLogging for config errors Rarely gets called; just here in case the config breaks.
log_creatorThis logs character creator changes in debug.log
log_directed_talkHelper for logging of messages with only one sender and receiver (i.e. mind links)
log_dsayLogging for DeachatSay (DSAY) messages
log_dynamicLogging for dynamic procs
log_emoteLogging for emotes
log_filterLogs to the filter log with the given message, match, and scope
log_gameLogging for generic/unsorted game messages
log_heretic_knowledgeLogging for heretic powers learned
log_internet_requestLogging for music requests
log_job_debugLogging for job slot changes
log_law_changeAdds something to the law change log
log_luaLogging for lua scripting
log_malf_upgradesLogging for upgrades purchased by a malfunctioning (or combat upgraded) AI
log_manifestLogging for player manifest (ckey, name, job, special role, roundstart/latejoin)
log_mappingLogging for mapping errors
log_mechaLogging for mech actions
log_minimap_drawingLogging for drawing on minimap
log_oocLogging for messages sent in OOC
log_paperLogging for writing made on paper
log_pdaLogging for PDA messages sent
log_perfLogging for game performance
log_played_namesAdds the new names to the player's played_names list on their /datum/persistent_client for use of admins. ckey should be their ckey, and data should be an associative list with the keys being the names they played under and the values being the unique mob ID tied to that name.
log_player_image_creationLog the creation of an image by a player
log_prayerLogging for prayed messages
log_qdelLogging for hard deletes
log_radio_emoteLogging for emotes sent over the radio
log_researchPuts the text into the research html file, not log. See [INVESTIGATE_RESEARCH] for [/atom/proc/investigate_log]
log_retaRequest Emergency Temporary Access - RETA System Provides temporary department access when Requests Console emergency calls are made. Helper function for RETA-specific logging
log_sayLogging for generic spoken messages
log_shuttleLogging for shuttle actions
log_speech_indicatorsLogging for speech indicators.
log_spellbookLogging for wizard powers learned
log_spyLogs bounties completed by spies and their rewards
log_sqlLogging for DB errors
log_subtleThis logs subtle emotes in game.log
log_subtlerThis logs subtler emotes in game.log, if the conflig flag in config\nova\config_nova.txt is true.
log_suspicious_loginWrites to a special log file if the log_suspicious_login config flag is set, which is intended to contain all logins that failed under suspicious circumstances.
log_telecommsLogging for speech taking place over comms, as well as tcomms equipment
log_tguiAppends a tgui-related log entry. All arguments are optional.
log_toolLogging for tool usage
log_topicLogging for world/Topic
log_traitorLogging for traitor objectives
log_transportLogging for transport (tram/elevator) actions
log_ttsLogging for TTS
log_uplinkLogging for items purchased from a traitor uplink
log_virusLogging for the creation and contraction of viruses
log_voteLogging for OOC votes
log_whisperLogging for whispered messages
log_worldLog to both DD and the logfile.
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
los_checkLine of sight check! Spawns a dummy object and then iterates through each turf to see if it's blocked by something not handled by pass_args. Contains a mid_los_check, meant to be overriden by subtypes. args:
lowercase_titleEnsures text does not start with capital letters.
make_associativeMake a normal list an associative one
make_bodyUses stripped down and bastardized code from respawn character
make_datum_reference_lists//Initial Building/////
make_into_clownHelper proc that handles making someone into a clown after a bananium nuke goes off.
make_knowledge_idID's are not unique, the same knowledge with the same type in the same shop will always have the same ID.
make_mutable_appearance_directionalTakes an input mutable appearance, returns a copy of it with the hidden flag flipped to avoid inheriting dir from what it's drawn on This inheriting thing is handled by a hidden flag on the /image (MAs are subtypes of /image)
make_tupleReturns the name of the mathematical tuple of same length as the number arg (rounded down).
marking_fur_colorsReturns the three mutant colours a marking can follow, as a body's DNA features hold them: what a new marking, a preset or a colour reset gives it.
markings_baseline_fillBuilds the fixture's marking map in the nested shape a savefile holds: zone -> (marking name -> list(color, emissive)).
markings_baseline_is_glowingTells a glowing emissive appearance from an emissive blocker, which shares its plane.
markings_baseline_marking_colorsOne fixed colour per fixture marking, so no signature ever depends on a mutant colour roll.
markings_baseline_marking_namesFixtures the body marking tests share: the markings a test body wears and their colours, the standard and merge fills, a rendered icon's pixel signature and the emissive glow check. Their names come from the before/after baselines the markings datumisation was measured with. The markings the fixture wears. Each one claims all eight marking zones and ships art for every one of them plus both leg shapes, so no case falls back to a sheet's default frame and hides a difference. Named explicitly rather than read out of GLOB.body_markings_per_limb, whose order can change.
markings_baseline_signatureReduces a rendered icon to one comparison key.
markings_merge_fixture_colorThe one colour every marking of the merge fixture wears.
markings_merge_fixture_fillBuilds the merge fixture's marking map, in the same nested shape as markings_baseline_fill(): the same three markings on every zone, all in one colour and all glowing. Each zone's markings then run together in colour and in glow, which the standard fixture, three colours with one glow per zone, never does. Its tests draw a zone's same-coloured markings, and its glows, as one.
material_insertion_animationCreates a mutable appearance with the material color applied for its insertion animation into an autolathe or techfab Arguments
md5asfileSave file as an external file then md5 it. Used because md5ing files stored in the rsc sometimes gives incorrect md5 results. https://www.byond.com/forum/post/2611357
merge_body_marking_runDraws a run of markings, or of glows, with its first appearance as drawn into the output list, a dropped limb's image of it included: that appearance takes the run's blended icon and keeps its own colour, alpha, layer, plane, flags and facing, so it draws what the run's appearances drew one on another.
meridian_theme_artReturns the art asset a MeridianOS theme draws with outside tgui's bundle, or null for a theme whose art is all in it.
message_centcomUsed by communications consoles to message CentCom
message_syndicateUsed by communications consoles to message the Syndicate
message_to_htmlMessage-related procs
metal_transmuteChange the material type of an object or turf, but with visuals and effects related to the material
minor_announceSends a minor annoucement to players. Minor announcements are large text, with the title in red and message in white. Only mobs that can hear can see the announcements.
mix_colors_by_volumeReturns the volume-weighted RGB mean of a colour to volume list, as "#rrggbb" with alpha ignored, or null when it holds no volume.
mix_liquid_colorReturns the volume-weighted RGB mean of a reagent type to volume list, as "#rrggbb".
mix_opacity_from_reagent_listReturns the volume-weighted liquid_opacity of a reagent type to volume list, from 0 (clear) to 1 (opaque).
mob_only_listenersA filter to be applied to get_hearers_in_x, that removes any non-mob hearers, converting them to their relevant mob if one exists (such as dullahan heads). Modifies input list.
mobs_in_area_typeTakes: list of area types Returns: all mobs that are in an area type
modular_persistence_account_keyNormalizes an admitted or cryo account key, including aghost's prefix. An absent key has no save identity.
mouse_angle_from_clientReturns an angle in degrees relative to the position of the mouse and that of the client eye.
move_elementMove 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] This will preserve associations ~Carnie
move_rangeMove elements [from_index,from_index+len) to [to_index-len, to_index) Same as moveElement but for ranges of elements This will preserve associations ~Carnie
movespeed_data_null_checkChecks if a move speed modifier is valid and not missing any data
mutable_appearance
narsie_apocalypseThird crew last second win check and flufftext for [/proc/begin_the_end()]
narsie_end_begin_checkFirst crew last second win check and flufftext for [/proc/begin_the_end()]
narsie_end_second_checkSecond crew last second win check and flufftext for [/proc/begin_the_end()]
narsie_last_second_winCalled only if the crew managed to destroy narsie at the very last second for [/proc/begin_the_end()]
narsie_start_destroy_stationsecurity level and shuttle lockdowns for [/proc/begin_the_end()]
next_list_itemReturns the next item in a list
notify_all_banned_playersNotifies all banned players about their ban and gives them a link to appeal from the config. If it was a server ban, it also kicks them.
notify_ghostsFancy notifications for ghosts
nuke_gibHelper proc that handles gibbing someone who has been nuked.
nuke_requestUsed by communications consoles to request the nuclear launch codes
objectify"Turns" people into objects. Really, we just add them to the contents of the item.
offer_controlOffer control of the passed in mob to dead player
offer_to_keep_hairstyleAsks the freshly cut recipient whether to keep the style beyond this round.
offset_to_screen_locTakes a list in the form (x_offset, y_offset) And converts it to a screen loc string Accepts an optional view string/size to force the screen_loc around, so it can't go out of scope
oncloseRegisters the on-close verb for a browse window (client/verb/windowclose) this will be called when the close-button of a window is pressed.
overlays2textConverts an overlay list into text for debug printing Of note: overlays aren't actually mutable appearances, they're just appearances Don't have access to that type tho, so this is the best you're gonna get
painting_pixels_from_iconThe painting store's pixel string: every pixel of the drawing, row by row, as the canvas grid writes them.
painting_store_failureBuild the common failure envelope used by the DM transaction queue and native calls.
params2screenpixelConverts a screen loc param to a x,y coordinate pixel on the screen.
parse_caught_click_modifiersReturns a turf based on text inputs, original turf and viewing client
parse_slot_flagsReturns a list of strings for a given slot flag.
parse_zoneReturn a string for the specified body zone. Should be used for parsing non-instantiated bodyparts, otherwise use /obj/item/bodypart/var/plaintext_zone
partially_block_emissivesTakes a non area atom and a threshold Makes it block emissive with any pixels with more alpha then that threshold, with the rest allowing the light to pass Returns a list of objects, automatically added to your vis_contents, that apply this effect QDEL them when appropriate
passA do nothing proc
path_map_passalongWe generate a path for the passed in callbacks, and then pipe it over
pathfinding_finishedUses funny pass by reference bullshit to take the output created by pathfinding, and insert it into a return list We'll be able to use this return list to tell a sleeping proc to continue execution
pathwalkTakes a directory and returns every file within every sub directory. If extensions_filter is provided then only files that end in that extension are given back. If extensions_filter is a list, any file that matches at least one entry is given back.
peekReturns the top (last) element from the list, does not remove it from the list. Stack functionality.
permissive_sanitize_nameMuch more permissive version of reject_bad_name(). Returns a trimmed string or null if the name is invalid. Allows most characters except for IC chat prohibited words.
phase_filterCool filter that I'm using for some of this :)))
pick_closest_pathReturns a chosen path that is the closest to a list of matches
pick_holy_successorChooses a valid holy successor from GLOB.holy_successor weakref list and sets things up for them to be the new high priest
pick_nPicks n items from a list. The same index will not be chosen more than once. e.g. pick_n(list_of_stuff, 10) would return a list of 10 items from the list, chosen randomly.
pick_n_takePick a random element from the list and remove it from the list.
pick_recursiveSimilar to pick_weight_recursive, except without the weight part, meaning it should hopefully not take up as much computing power for things that don't +need+ weights.
pick_weightPicks 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.
pick_weight_recursiveLike pick_weight, but allowing for nested lists.
pick_weight_take
pick_weighted_lawsetreturns a law datum based off of config. will never roll asimov as the weighted datum if the station has a unique AI.
piglatin_sentenceruns piglatin_word() proc on each word in a sentence. preserves caps and punctuation
piglatin_wordtakes "word", and returns it piglatinized.
pixel_offset_turfTakes a turf, and a list of x and y pixel offsets and returns the turf that the offset position best lands in
play_cinematicPlays a cinematic, duh. Can be to a select few people, or everyone.
play_fov_effectPlays a visual effect representing a sound cue for people with vision obstructed by FOV or blindness
playsoundplaysound is a proc used to play a 3D sound in a specific range. This uses SOUND_RANGE + extra_range to determine that.
playsound_if_prefplaysound_if_pref is similar to playsound but it doesn't play for ghosts, and checks for prefs. This is useful if we have something like the organic interface content, which everyone may not want to hear.
playsoundtokenCreates a soundtoken datum (a sound that updates for movement). allowed_listeners is an optional list of mobs that are the only ones that can hear this sound ever. sound_length is an optional length of the sound. Things like TTS need to pass this since we can't dynamically grab the length in that case.
podspawnOne proc for easy spawning of pods in the code to drop off items before whizzling (please don't proc call this in game, it will destroy you)
poll_holidayTakes a holiday datum, a starting month, ending month, max amount of days to test in, and min/max year as input Returns a list in the form list("yyyy/m/d", ...) representing all days the holiday runs on in the tested range
popReturns the top(last) element from the list and removes it from the list (typical stack function)
populate_editable_sign_typesThis proc populates GLOBAL_LIST_EMPTY(editable_sign_types)
populate_interaction_instancesGlobal loading procs
populate_reta_job_trimsPopulates the job trims list for RETA system
populate_rtd_datumsLazy-initialize the datum field on all the designs
populate_virtual_areasConstructs the list of virtual areas
power_failDisables power in most station APCs temporarily
power_failureCauses a power failure across the station.
power_restoreRestores power to all rooms on the station.
power_restore_quickA quicker version of /proc/power_restore that only handles recharging SMESs.
power_to_energyConverts the watt to the joule, assuming SSmachines tick rate.
prefix_zeros_to_numberReturns a text string containing N prefixed with a series of zeros with length equal to max_zeros minus log(10, N), rounded down.
prefs_import_admin_backupStaff backups are retained until explicitly removed; never overwrite a numbered backup after a gap.
prefs_import_backupPlayer backups rotate independently of retained staff/legacy backups.
prefs_import_clean_assoc_pathsWe just guarantee the shape, the owning loaders resolve them.
prefs_import_clean_loadoutThe UI encodes and caps these, the load path doesn't, so we redo it here.
prefs_import_clean_loadout_presetsloadout_lists is preset -> path -> details, so unwrap a level first.
prefs_import_clean_text_listLists consumed as text/type names by raw loaders must not carry numeric indexes or nested collections.
prefs_import_invalidate_cacheAfter successful replacement, old UI/disconnect callbacks must only write to memory.
prefs_import_pass1Pass 1. Retains character migration inputs. Player imports may only replace player-owned root fields. Supplying local_player_data enables the player allowlist; staff may still restore a complete backup.
prefs_import_player_rootRegistered preferences plus raw player settings and inputs still used by supported migrations.
prefs_import_prevalidateStructural checks. Returns an error string, or null if it's fine.
prefs_import_read_uploadShared upload validation. Policy-specific metadata filtering happens after this succeeds. Returns an error, or the decoded tree and byte count; never logs uploaded JSON or decoder exceptions.
prefs_import_replaceWrite and verify the candidate before touching the destination. Returns an error, or null on success.
prefs_import_strip_empty_keysPass 1 and native migrations produce unique path keys; copy only to remove empty keys, preserving shared lists.
prefs_import_strip_empty_loadout_keysMigration leaves null keys behind, and sanitize_loadout_list stack_traces on them.
prefs_import_tree_too_deepCheck depth iteratively so a deeply nested upload cannot overflow the call stack.
prepare_bodypart_overlaysPrepares the final bodypart or hair slot, where direct glow/blocker masks already have their centering and height adjustments. Each mask moves inside a neutral emissive boundary so rotation does not depend on icon size; masks sharing a plane and layer share one boundary. Plain visible sprites sharing a layer share one holder. Only the mob's top-level overlays count toward MAX_ATOM_OVERLAYS, and a matrixed accessory otherwise spends a sprite and a mask per colour slot on every layer it draws.
prepare_explosion_turfsReturns a list of turfs in X range from the epicenter Returns in a unique order, spiraling outwards This is done to ensure our progressive cache of blast resistance is always valid This is quite fast
prepare_infuser_entriesGlobal proc that sets up each /datum/infuser_entry sub-type as singleton instances in a list, and returns it.
prepare_lua_editor_listIntermediate step for preparing lists to be passed into the lua editor tgui. Resolves weakrefs, converts some values without a standard textual representation to text, and can handle self-referential lists and potential duplicate output keys.
pretty_string_from_reagent_listInput a reagent_list, outputs pretty readable text! Default output will be formatted as
preview_animated_leavesThe animated icon states a flat icon draws, and where: list(list(leaf, x, y), ...), with the leaf's lower left pixel at (x, y) of the flat's own canvas. In a walk's recipes only crops move what is already drawn; an animated leaf that anything else would move is left out, and drawn still.
preview_animation_differenceWhite where two icons, each split by preview_animation_split(), differ, and black where they don't.
preview_animation_fewer_stepsThe same steps, with only keep after the first: dropped evenly, each kept one shown for the time of those after it.
preview_animation_frames_atWhat frame each of a region's leaves shows time ms into its animation: leaf number -> frame.
preview_animation_mark_framesMarks animated leaves in a detached to_list() recipe, using their source identities to keep shared leaves on the same track. The source tree and its transformer lists remain untouched.
preview_animation_readingA reading of an animated icon state, or null for one that is drawn still without reading it.
preview_animation_splitAn icon as two opaque icons that differ wherever it does: its colours, and its alpha in grey. Uses up source.
preview_animation_stepsA region's animation as steps, list(list(start, ms), ...): from the start, each time any of its leaves shows something new, when, and for how long, in ms. The leaves start together and come round together once all their loops have, or at CHARACTER_PREVIEW_ANIMATION_MAX_PERIOD. The first step is every leaf's first frame, the facing as drawn; see preview_animation_frames_at() for the others.
preview_animation_tokensA recipe marked for patches, split where each fills in its own numbers: the pieces between, and in place of each number a code for it: 0 for the facing's dir, a leaf's number for its frame, and -1 to -4 for the crop's x1, y1, x2 and y2.
preview_animation_trackOne leaf's frames in a facing, as the steps of preview_animation_steps() read them: list("leaf" = its number, "frames" = each frame it shows in turn, "starts" = when each starts, in ms, "shows" = whether each looks different from the one before it, the first from the last, "cycle" = how long they take in all).
preview_state_animatedWhether an icon state has more than one frame, from its file's metadata, remembered by file and state.
previous_list_itemReturns the previous item in a list
print_command_reportPrint a report to all the communications consoles, and optionally send an announcement to players about it. This is used for the roundstart report, but can also be used for other reports in the future.
print_holidayDoes the same as /proc/poll_holiday, but prints the output to admins instead of returning it
print_language_listHelper proc to print a list of languages in a human readable format
priority_announceMake a big red text announcement to
process_chat_colorConverts a given color to comply within a smaller subset of colors to be used in runechat. If a color is outside the min/max saturation or lum, it will be set at the nearest value that passes validation.
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.
radiation_pulseSends out a pulse of radiation, eminating from the source. Radiation is performed by collecting all radiatables within the max range (0 means source only, 1 means adjacent, etc), then makes their way towards them. A number, starting at 1, is multiplied by the insulation amounts of whatever is in the way (for example, walls lowering it down). If this number hits equal or below the threshold, then the target can no longer be irradiated. If the number is above the threshold, then the chance is the chance that the target will be irradiated. As a consumer, this means that max_range going up usually means you want to lower the threshold too, as well as the other way around. If max_range is high, but threshold is too high, then it usually won't reach the source at the max range in time. If max_range is low, but threshold is too low, then it basically guarantees everyone nearby, even if there's walls and such in the way, can be irradiated. You can also pass in a minimum exposure time. If this is set, then this radiation pulse will not irradiate the source unless they have been around any radioactive source for that period of time. The chance to get irradiated diminishes over range, and from objects that block radiation. Assuming there is nothing in the way, the chance will determine what the chance is to get irradiated from half of max_range. Example: If chance is equal to 30%, and max_range is equal to 8, then the chance for a thing to get irradiated is 30% if they are 4 turfs away from the pulse source.
ran_zoneReturn the zone or randomly, another valid zone
random_bounty
random_colourReturns a random color picked from a list, has 2 modes (0 and 1), mode 1 doesn't pick white, black or gray
random_fish_typeReturns random fish, using random_case_rarity probabilities.
random_human_blood_typeReturns one of the human blood types at random, weighted by their rarity
random_nukecodeReturns a string for a random nuke code
random_stepForces the atom to take a step in a random direction
randomize_humanFully randomizes everything about a human, including DNA and name.
randomize_human_normieRandomizes a human, but produces someone who looks exceedingly average (by most standards).
ranks_from_rank_nameConverts a rank name (such as "Coder+Moth") into a list of /datum/admin_rank
ratvar2textReverts ravarian styling and rot13 in text.
rcd_result_with_memoryProduces a new RCD result from the given one if it can be calculated that the RCD should speed up with the remembered form.
rcd_scanGlobal proc that generates RCD hologram in a range.
read_sheetDebug proc, for when lighting sheets fuck up Accepts the sheet (2 or 3 (multiz) dimensional list of lighting values at some offset) alongside x and y delta values and the sheet's "offset", which is the amount required to ensure everything indexes at 1 Optionally, you can pass similar values for multiz stuff
reagent_explodeGeneric explosions/failures
realize_appearance_queueTakes a list of appearnces, makes them mutable so they can be properly vv'd and inspected
reciprocal_addTakes two values x and y, and returns 1/((1/x) + y) Useful for providing an additive modifier to a value that is used as a divisor
recoil_cameraHelper proc for a similar function to shake_camera, expect this one kicks the camera back at an opposite angle rather then skake_camera's irratic jittering.
recover_all_SS_and_recreate_masterRecreate all SSs which will still cause data survive due to Recover(), the new Master will then find and take them from global.vars
recurseExists to trigger infinite recursion runtimes in testing
recursive_list_resolveReturns a list with all weakrefs resolved
recursive_list_resolve_elementHelper for recursive_list_resolve()
recursive_loc_checkRecursively checks if an item is inside a given type/atom, even through layers of storage. Returns the atom if it finds it.
reebe_station_warningTells the station that there's a clockie portal, along with making it usable by all
refresh_jukebox_songsRecache the songs from config then force replace all the songs.
reject_bad_chattextThe procedure to check the text of the entered text on ntnrc_client.dm
reject_bad_nameFilters out undesirable characters from names.
reject_bad_textReturns the text if properly formatted, or null else.
relay_to_list_and_observersSends a message to everyone within the list, as well as all observers.
remove_clunky_diagonalsProcesses a path (list of turfs), removes any diagonal moves that would lead to a weird bump
remove_diagonalsProcesses a path (list of turfs), removes any diagonal moves
remove_erp_thingsIf the "Remove ERP Interaction" config is disabled, remove ERP things from various lists
remove_faded_filtersRemoves filters once they've faded out, skipping any that were replaced in the meantime
remove_image_from_clientRemoves an image from a client's .images. Useful as a callback.
remove_image_from_clientsLike remove_image_from_client, but will remove the image from a list of clients
remove_messengerUnregisters an NTMessenger instance from the pda_messengers table.
remove_non_dm_variantsGiven a list and a list of its variant hints, removes any list key/values that are represent lua values that could not be directly converted to DM.
remove_synth_defib_traumaGlobal timer proc used in defib.dm. Removes the temporary trauma caused by being defibbed as a synth.
remove_verbhandles removing verb and sending it to browser to update, use this for removing verbs
rename_arearename_area Renames an area to the given new name, updating all machines' names and firedoors to properly ensure alarms and machines are named correctly at all times. Args:
render_species_facingsAdds a render of the dummy facing each way to entries, in the page's turning order.
replace_icon_legsCuts the legs (y 1-11) off a worn icon and staples new_legs on.
request_z_pillarReturns a z pillar to insert turfs into
reset_cooldownProc used by stoppable timers to end a cooldown before the time has ran out.
reset_religionIt's time to kill GLOB Reset religion to its default state so the new chaplain becomes high priest and can change the sect, armor, weapon type, etc Also handles the selection of a holy successor from existing crew if multiple chaplains are on station.
reset_religious_sectRemoves any existing religious sect from chaplains, allowing another to be selected
resolve_ai_icon_syncA form of resolve_ai_icon that is guaranteed to never sleep. Not always accurate, but always synchronous.
reta_find_and_grant_accessFinds eligible responders and grants them temporary access
reta_get_user_departmentGets the department string for a user based on their job
reta_get_user_department_by_nameGets the standardized department string from a console department name
reta_init_configInitialize RETA config values
reta_on_cooldownChecks if an origin department is on cooldown for calling a target department
reta_push_ui_updatesPushes UI updates to all consoles in the same origin department
reta_set_cooldownSets a cooldown for an origin department calling a target department
reta_track_callTracks recent emergency calls for multiple department analysis
retrieve_ban_cacheGets the ban cache of the passed in client If the cache has not been generated, we start off a query If we still have a query going for this request, we just sleep until it's received back
return_atmos_handbooksReturns an assoc list of the gas handbook and the reaction handbook. For UIs, simply do data += return_atmos_handbooks() to use.
return_escape_shuttleDocks the emergency shuttle back to the station and resets its state
return_generator_argsreturns the arguments given to a generator and manually extracts them from the internal byond object returns:
return_unused_frequencyreturns a random unused frequency between MIN_FREE_FREQ & MAX_FREE_FREQ if free = TRUE, and MIN_FREQ & MAX_FREQ if FALSE
reverse_rangereplaces reverseList ~Carnie
rgb2hsvConverts an rgb color into a list storing hsva Exists because it's useful to have a guaranteed alpha value
round_blood_for_hudA helper for getting the appropriate icon state for the blood hud.
round_timestampReturns timestamp since the round started, AKA Pay Time (PT)
rustg_get_versionGets the version of rust_g
rustg_git_commit_dateReturns the date of the given revision using the provided format. Defaults to returning %F which is YYYY-MM-DD.
rustg_git_commit_date_headReturns the formatted datetime string of HEAD using the provided format. Defaults to returning %F which is YYYY-MM-DD. This is different to rustg_git_commit_date because it only needs the logs directory.
rustg_sound_lengthProvided a static RSC file path or a raw text file path, returns the duration of the file in deciseconds as a float.
rustg_unix_timestampReturns the timestamp as a string
safe_read_prefSafely read a given preference datum from a given client.
sample_fabric_colourThe cloth colour of a worn sprite, as the approved previews sample it: every opaque pixel of rows 21-24, columns 12-18 facing south (GetPixel() x 13-19, y 11-8), tinted (each tint rounds half to even), stable-sorted by Rec. 601 luma; the upper median. Cached by file, state, tints and source revision; a sprite that is neither a file nor text is sampled without being cached. Null when nothing opaque is there.
sanitizeRuns byond's html encoding sanitization proc, after replacing new-lines and tabs for the # character.
sanitize_alt_job_titlesKeep only entries whose job title and alternative title are text. get_alt_job_title() handles job validation; SSjob may not be initialized while preferences load.
sanitize_augment_colorsReturns colors lowercased when it is four "#rrggbb" colours run together, else null. It runs only as a save loads and on the editor's actions, so its regex is made each time rather than kept.
sanitize_colorMakes sure the input color is text with a # at the start followed by 6 hexadecimal characters. Examples: "#ff1234", "#A38321", COLOR_GREEN_GRAY
sanitize_css_class_nameRemoves all non-alphanumerics from the text, keep in mind this can lead to id conflicts
sanitize_filepathSanitizes the name of each node in the path.
sanitize_frequencyEnsure the frequency is within bounds of what it should be sending/receiving at
sanitize_language_understandingSaved levels read back: known language types only, each snapped to a step and kept within range. Null if none.
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.
scale_liquid_colorReturns a mixed pool colour scaled by its surface class's LIQUID_COLOR_FACTOR_*, as "#rrggbb".
scramble_message_replace_charsSlightly expensive proc to scramble a message using equal probabilities of character replacement from a list. DOES NOT SUPPORT HTML!
screen_loc_to_offsetTakes a screen loc string in the format "+-left-offset:+-pixel,+-bottom-offset:+-pixel" Where the :pixel is optional, and returns A list in the format (x_offset, y_offset) We require context to get info out of screen locs that contain relative info, so NORTH, SOUTH, etc
screen_loc_to_turfAlmost identical to the params_to_turf(), but unused (remove?)
screen_textReturn an object with a new maptext (not currently in use)
seedRuinsLoads the ruins for a given z level. @param z_levels The z levels to load ruins on. @param budget The budget to spend on ruins. Compare against the cost of the ruins in /datum/map_template/ruin. @param whitelist A list of areas to allow ruins to be placed in. @param potentialRuins A list of ruins to choose from. @param clear_below Whether to clear the area below the ruin. Used for multiz ruins. @param mineral_budget The budget to spend on ruins that spawn ore vents. Map templates with vents have that defined by mineral_cost. @param mineral_budget_update What type of ore distribution should spawn from ruins picked by this cave generator? This list is copied from ores_spawned.dm into SSore_generation.ore_vent_minerals. @param ruin_type The type of ruins that are spawning (ZTRAIT_SPACE_RUINS, ZTRAIT_ICE_RUINS, ZTRAIT_LAVA_RUINS, etc.) @param immediate_load If TRUE, loads the placed ruins' maps in right away instead of leaving them queued in SSmapping.reserved_ruins for terrain generation to run first. Only safe to use outside of the roundstart mapping init sequence, once terrain generation has already finished.
seedifyFinds and extracts seeds from an object
select_hallucination_typeHelper to give the passed mob the ability to select a hallucination from the list of all hallucination subtypes.
semver_to_listConverts a semver string into a list of numbers
send2adminchatAsynchronously sends a message to TGS admin chat channels.
send2chatAsynchronously sends a message to TGS chat channels.
send2otherserverSends a message to a set of cross-communications-enabled servers using world topic calls
send_clock_messageSend sent_message to all other clock cultists and ghosts from the user
send_department_oocValidates and sends a message to a departmental OOC channel.
send_exported_mapA procedure for saving DMM text to a file and then sending it to the user. Arguments:
send_fax_to_areaSends a fax to a fax machine in an area! fax_area is a type, where all subtypes are also queried. If multiple machines, one is randomly picked If force is TRUE, we send a droppod with a fax machine and fax the message to that fax machine
send_ooc_announcementSends a div formatted chat box announcement
send_status_display_alertSend an emergency alert signal to all status displays alert_type: The picture state to display ("biohazard", "lockdown", "radiation", etc.)
send_status_display_biohazard_alertSend a biohazard alert signal to all status displays
send_status_display_lockdown_alertSend a lockdown alert signal to all status displays
send_status_display_radiation_alertSend a radiation alert signal to all status displays
send_supply_pod_to_areaEasily send a supplypod to an area
send_tip_of_the_roundSends a round tip to a target. If selected_tip is null, a random tip will be sent instead (5% chance of it being silly). Tips that starts with the @ character won't be html encoded. That's necessary for any tip containing markup tags, just make sure they don't also have html characters like <, > and ' which will be garbled.
send_to_observersSends a message to all dead and observing players, if a source is provided a follow link will be attached.
send_to_playing_playerssends a whatever to all playing players; use instead of to_chat(world, where needed)
serialize_antag_nameSerializes an antag name to be used for preferences UI
server_timestampReturns UTC timestamp with the specifified format, with optionally deciseconds or optional IC time (year offset), AKA Nanotrasen Standard Time (NST)
set_area_machinery_titleRenames all machines in a defined area from the old title to the new title. Used when renaming an area to ensure that all machiens are labeled the new area's machine. Args:
set_dynamic_human_appearanceThis proc gets an argument of a target and runs
set_network_broadcast_statusSets the camera network status on all entertainment monitors. A way to force a network to a status if you are unsure of the current state.
set_new_religious_sectSets a new religious sect used by all chaplains int he round
set_owned_masked_leg_iconsPublish or evict a finalized masked-leg pair and its exact native dimensions together. The caller must finish icon mutation before publishing. Existing cache entries are immutable. Retain the replacement before releasing the old pair, including when they share icons. Raw cache writes/removals must use this proc so metadata does not outlive its owning cache.
set_protean_modsuitSets the protean modsuit on a mob's chest component. Returns TRUE on success.
setup_clockwork_researchReturns a list of every initialized clockwork research datum
setup_mod_themesGlobal proc that sets up all MOD themes as singletons in a list and returns it.
setup_round_default_lawsfirst called when something wants round default laws for the first time in a round, considers config returns a law datum that GLOB._round_default_lawset will be set to.
shake_cameraShake the camera of the person viewing the mob SO REAL! Takes the mob to shake, the time span to shake for, and the amount of tiles we're allowed to shake by in tiles Duration isn't taken as a strict limit, since we don't trust our coders to not make things feel shitty. So it's more like a soft cap.
sheet2amountTurns number of sheets into material amount, returning FALSE if the number is <= 0
sheets_from_valueConvert a raw material amount into "SHEET_MATERIAL_AMOUNT", or "* N", with rounding rules.
should_border_obj_smoothHelper proc for smoothing border objects. Return this from smoothing_allowed() to get the desired effect Indexes into some global lists that encode direction bullshit
should_have_space_before_emoteReturns a boolean based on whether or not the string contains a comma or an apostrophe, to be used for emotes to decide whether or not to have a space between the name of the user and the emote.
should_visual_organ_apply_toSome sanity checks, but mostly to check if the person has their preference/dna set to load
shuffleRandomize: Return the list in a random order
shuffle_inplacesame as shuffle, but acts on list in place, and returns same list
silent_alertSends a silent alert message to certain crew members' PDAs
siunitFormats a number to human readable form with the appropriate SI unit.
siunit_isolatedFormats a number into a list representing the si unit. Access the coefficient with [SI_COEFFICIENT], and access the unit with [SI_UNIT].
siunit_pressure
slice_off_turfsReturns a slice of a list of turfs, defined by the ones that are inside the inner/outer angle's bounds
sm_gas_dataReturn a list info of the SM gases. Can only run after init_sm_gas
snap_language_understandingA level snapped to a whole step, between the least allowed and all of it.
sortInsert
sortMerge
sortTim
sort_keyfor sorting clients or mobs by ckey
sort_listsort any value in a list
sort_mobsOrders mobs by type then by name. Accepts optional arg to sort a custom list, otherwise copies GLOB.mob_list.
sort_namesuses sort_list() but uses the var's name specifically. This should probably be using mergeAtom() instead
sort_recordSpecifically for record datums in a list.
spanning_screen_locReturns a screen_loc format for a tiling screen objects from start and end positions. Start should be bottom left corner, and end top right corner.
spawn_random_shipSpawns the random ship proper, with the follow-up effects, if you've set any up.
spawn_reebeSpawn reebe with the appropriate fanfare after sacrificing a blood cultist
special_list_filterReturns a list with items filtered from a list that can call callback
species_family_idThe id the species page knows a family by: the last part of its typepath.
species_has_fitness_limbsReturns whether a species' own limbs have fitness subtypes, which is when its characters get a muscle size and definition.
species_page_heightA dummy's flat render with the rows its height filters move moved in it, as the game draws them, so a species shorter or taller than average stands as high on the page as in the round. A flatten leaves filters out.
spiral_rangesimilar function to range(), but with no limitations on the distance; will search spiralling outwards from the center
spiral_range_turfssimilar function to RANGE_TURFS(), but will search spiralling outwards from the center (like the above, but only turfs)
split_colorGiven a color in the format of "#RRGGBB" or "#RRGGBBAA", gives back a 4 entry list with the number values of each
split_worn_emissive_branchesReturn the emissive-only tree, or null if nothing changed. visible_resultWORN_EMISSIVE_VISIBLE_RESULT receives the visible tree (null for a moved mask leaf). The caller reuses this single return slot throughout the traversal; each node consumes its child's result immediately. Unchanged branches retain their original appearances and allocate no lists. Nested cross-plane masks escape the mob's KEEP_TOGETHER group. Moving the plane boundary to a sibling root lets BYOND inherit the mob transform normally, without baking a pose into the cache. Only floating equipment masks are moved; absolute-layer effects and other planes retain their behavior.
spread_reagentsExposes all accessible atoms within some distance of an epicenter to some reagents. Does not clear the source reagent holder; that must be done manually if it is desired.
starsConvert random parts of a passed in message to stars
start_broadcasting_networkAdds a camera network to all entertainment monitors.
start_unequip_mobA utility function for /datum/strippable_items to start unequipping an item from a mob.
started_narsie_summonWhen narsie begins to be summoned, slowly dim the saturation of parallax and starlight
starts_with_anyReturns TRUE if the input_text starts with any of the beginnings
stifledFor when you're only able to speak a limited amount of words phrase - the string to convert definitive_limit - the amount of words to limit the phrase to, optional
stop_broadcasting_networkRemoves a camera network from all entertainment monitors.
stoplagreturns the number of ticks slept
string_listCaches lists with non-numeric stringify-able values (text or typepath).
strip_appearance_underlaysStrips all underlays on a different plane from an appearance. Returns the stripped appearance.
strip_htmlRuns STRIP_HTML_SIMPLE and sanitize.
strip_html_fullRuns STRIP_HTML_FULL and sanitize.
strip_outer_punctuationRemoves all punctuation sequences from the beginning and the end of the input string. Includes emphasis (|, +, _) and whitespace. Anything punctuation in the middle of the input will be maintained.
stripped_inputUsed to get a properly sanitized input. Returns null if cancel is pressed.
stripped_multiline_inputUsed to get a properly sanitized input in a larger box. Works very similarly to stripped_input.
summon_eventsTriggers Summon Events from [user]. If Summon Events has already been triggered, speeds up the event timer.
summon_ghostsTriggers Summon Ghosts from [user].
summon_gunsTriggers Summon Guns from [user]. Can optionally be passed [survivor_probability], to set the chance of creating survivalists. If Summon Guns has already been triggered, gives out guns to everyone again.
summon_magicTriggers Summon Magic from [user]. Can optionally be passed [survivor_probability], to set the chance of creating survivalists. If Summon Magic has already been triggered, gives out magic to everyone again.
swap_rangeMove 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 ~Carnie
symphony_address_allowedTRUE if a topic from this sender is allowed to run.
symphony_agoHow long ago a stamp was. DisplayTimeText already says "right now", and "right now ago" reads wrong.
symphony_apply_discord_adminsRuns after load_admins() clears and rebuilds local/SQL holders, which take precedence.
symphony_ban_minutesBan length in minutes, 0 being permanent.
symphony_bannable_rolesShared by the panel's role list and ban validation.
symphony_discord_admin_sync_enabledDiscord admin grants require both the module and admin sync flags.
symphony_enforce_kickRecheck a revoke after its grace period, then return the player to the lobby. A failed query leaves them in the round; the periodic sweep retries when the database recovers.
symphony_has_ingame_roleQuery a linked account for an in-game role grant. Returns TRUE/FALSE, or null when the database cannot answer. Unlinked accounts return FALSE.
symphony_holds_whitelist_roleCheck a current role entitlement, bypassing the admission cache. Unlike admission, perks and imports require an enabled module and a confirmed grant.
symphony_ingame_role_ckeysReturn role holders as ckey -> TRUE, an empty list for no holders, or null on query failure.
symphony_invalidate_whitelist_cacheInvalidate one account immediately after a role change.
symphony_note_panelRemember who called, so the status verb can compare the two halves.
symphony_request_community_banQueue propagation of an existing local ban to the other servers.
symphony_resolve_roleThe ban cache is case sensitive, so match the caller's text to the stored title.
symphony_revokeAnnounce a revoke, block pending admission, and schedule enforcement after the grace period.
symphony_seed_whitelist_cacheCache a confirmed TRUE/FALSE result from a notification or bulk query. Advancing the epoch prevents an older in-flight query from overwriting this answer.
symphony_validate_ready_playersMay sleep. Display and signal handlers must continue to use the cache-only gate.
symphony_version_verdictWhich half is behind, if either. needs/wants are what the panel asked for.
symphony_whitelist_cache_peekReturn cached TRUE/FALSE, or null for a miss. Never queries or sleeps.
symphony_whitelist_lookupReturn a cached whitelist answer, querying on a miss. May sleep. Database failures return null and are never cached; FALSE is a confirmed denial. Use symphony_whitelist_cache_peek() in display and signal handlers that cannot sleep.
symphony_write_ban_noteWorld topics have no usr, which create_message() requires, so insert the note directly.
techweb_point_display_genericHelper proc to turn an associative list of points into a more human readable format.
test_whiteship_sizesHelper proc that tests to ensure all whiteship templates can spawn at their docking port, and logs their sizes This should be a unit test, but too much of our other code breaks during shuttle movement, so not yet, not yet.
text2ratvarTakes english and applies ratvarian styling rules (and rot13) to it.
tg_alertDEPRECATED: USE tgui_alert(...) INSTEAD
tgm_encodeTakes a constant, encodes it into a TGM valid string
tgui_TopicMiddleware for /client/Topic.
tgui_alertCreates a TGUI alert window and returns the user's response.
tgui_color_pickerCreates a TGUI color picker window and returns the user's response.
tgui_input_checkboxes
tgui_input_keycomboCreates a TGUI window with a key input. Returns the user's response as a full key with modifiers, eg ShiftK.
tgui_input_listCreates a TGUI input list window and returns the user's response.
tgui_input_numberCreates a TGUI window with a number input. Returns the user's response as num | null.
tgui_input_textCreates a TGUI window with a text input. Returns the user's response.
time_to_twelve_hourConverts a time expressed in deciseconds (like world.time) to the 12-hour time format. the format arg is the format passed down to time2text() (e.g. "hh:mm" is hours and minutes but not seconds). the timezone is the time value offset from the local time. It's to be applied outside time2text() to get the AM/PM right.
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.
toggle_blooperGlobally toggles bloopers on/off
toggle_department_oocEnables or disables a channel and notifies its listeners when the state changes.
toggle_id_ctfProc that handles toggling and unloading CTF.
tool_behaviour_namereturns an ic name of the tool needed Arguments:
trimReturns a string with reserved characters and spaces before the first word and after the last word removed.
truncateTruncate a string to the given length
try_move_adjacentTries to move an atom to an adjacent turf, return TRUE if successful
turf_peelBehaves like the orange() proc, but only looks in the outer range of the function (The "peel" of the orange). This is useful for things like checking if a mob is in a certain range, but not within a smaller range.
type_english_listReturns a list of atom types in plain english as a string of each type name
typecache_filter_listreturns a new list with only atoms that are in the typecache list
typecache_filter_list_reversereturn a new list with atoms that are not in the typecache list
typecache_filter_multi_list_exclusionsimilar to typecache_filter_list and typecache_filter_list_reverse but it supports an inclusion list and and exclusion list
typecacheofLike typesof() or subtypesof(), but returns a typecache instead of a list.
ui_status_only_livingReturns a UI status such that the dead will be able to watch, but not interact.
ui_status_silicon_has_accessReturns a UI status such that silicons will be able to interact with whatever they would have access to if this was a machine. For example, AIs can interact if there's cameras with wireless control is enabled.
ui_status_user_has_free_handsReturns a UI status such that those without blocked hands will be able to interact, but everyone else can only watch.
ui_status_user_insideReturn UI_INTERACTIVE if the user is inside the target atom, whether they can see it or not. Return UI_CLOSE otherwise.
ui_status_user_is_abledReturns a UI status such that users with debilitating conditions, such as being dead or not having power for silicons, will not be able to interact. Being dead will disable UI, being incapacitated will continue updating it, and anything else will make it interactive.
ui_status_user_is_adjacentReturns a UI status such that users adjacent to source will be able to interact, far away users will be able to see, and anyone farther won't see anything. Dead users will receive updates no matter what, though you likely want to add a [ui_status_only_living] check for finer observer interactions.
ui_status_user_is_advanced_tool_userReturns a UI status such that advanced tool users will be able to interact, but everyone else can only watch.
ui_status_user_is_conscious_and_lying_downReturns UI_INTERACTIVE if the user is conscious and lying down. Returns UI_UPDATE otherwise.
ui_status_user_strictly_adjacentReturn UI_INTERACTIVE if the user is strictly adjacent to the target atom, whether they can see it or not. Return UI_CLOSE otherwise.
unformat_frequencyOpposite of format, returns as a number
uni_icon_facings_jsonTurns a flat icon walked with get_flat_uni_icon(target, UP) into its recipe for each facing, as iconforge entry JSON: facing name -> recipe.
unique_listReturn a list with no duplicate entries
unique_list_in_placesame as unique_list, but returns nothing and acts on list in place (also handles associated values properly)
unpack_garment_coloursReturns a view's colours, colour -> how many of its pixels have it, from the "rrggbb:count,..." form garment_sheet_metadata() holds them in.
unvalidated_client_errorProc that just logs whenever an uninitialized client tries to do something before they have fully gone through New(). Intended to be used in conjunction with the VALIDATE_CLIENT_INITIALIZATION() macro, but can be dropped anywhere when we look at the fully_created var on /client.
updateToolTipUpdates a user's tooltip to show new title/contents.
update_all_doors_reta_lightsUpdates RETA lighting for all doors in the game
update_all_security_hudsUpdates the visual security huds on all mobs in GLOB.human_list
update_matching_security_hudsUpdates the visual security huds on all mobs in GLOB.human_list that match the name passed to it.
updatetimedelayUpdate the delay on an existing LOOPING timer Will come into effect on the next process
urangeultra range (no limitations on distance, faster than range for distances > 8); including areas drastically decreases performance
url2htmlloaderReturn html to load a url. for use inside of browse() calls to html assets that might be loaded on a cdn.
valid_build_directionChecks whether the target turf is in a valid state to accept a directional construction such as windows or railings.
valid_direct_subtypesofLike valid_subtypesof(), but excludes concrete descendants of abstract sub-branches
valid_direct_typesofLike valid_typesof(), but excludes concrete descendants of abstract sub-branches
valid_painting_idAccept only the lowercase 32-character hexadecimal identities used for painting paths.
valid_subtypesofLike subtypesof, but automatically excludes abstract typepaths
valid_typesofLike typesof, but automatically excludes abstract typepaths
validate_suppression_statusCheck if the delam suppression setup is valid on the map
view_to_pixelsTakes a string or num view, and converts it to pixel width/height in a list(pixel_width, pixel_height)
visible_hallucination_pulseEmits a hallucinating pulse around the passed atom. Affects everyone in the passed radius who can view the center, except for those with TRAIT_MADNESS_IMMUNE, or those who are blind.
weakrefify_listReturns a copy of the list where any element that is a datum is converted into a weakref
wear_female_versionModifies a sprite slightly to conform to female body shapes
web_soundTakes an input from either proc/play_web_sound or the request manager and runs it through yt-dlp and prompts the user before playing it to the server.
weekday_to_isoReturns a string day as an integer in ISO format 1 (Monday) - 7 (Sunday)
weight_class_to_textReturns a string based on the weight class define used as argument
window_flashFlash the window of a player
world_topic_log_parametersRedact the decoded credential, covering every parameter encoding accepted by authentication.
worn_frame_delaysReturns an animated worn state's frame delays, read from its sheet, or null when the sheet isn't a file on disk, like a generated icon, or has no such state.
woundscanDisplays wounds with extended information on their status vs medscanners
write_mapProcedure for converting a coordinate-selected part of the map into text for the .dmi format
zebra_typecacheofLike typesof() or subtypesof(), but returns a typecache instead of a list. This time it also uses the associated values given by the input list for the values of the subtypes.

Var Details

Debugger

The debugger instance. This is a GLOBAL_REAL because it initializes before the MC or GLOB. Really only used to check to see if the debugger is enabled or not, and to separate debugger-related code into its own thing.

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

SSaccessories

subsystem that just holds lists of sprite accessories for accession in generating said sprites. A sprite accessory is something that we add to a human sprite to make them look different. This is hair, facial hair, underwear, mutant bits, etc.

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.

SSarea_contents

Responsible for managing the sizes of area.contained_turfs and area.turfs_to_uncontain These lists do not check for duplicates, which is fine, but it also means they can balloon in size over time as a consequence of repeated changes in area in a space They additionally may not always resolve often enough to avoid memory leaks This is annoying, so lets keep an eye on them and cut them down to size if needed

SSasset_loading

Allows us to lazyload asset datums Anything inserted here will fully load if directly gotten So this just serves to remove the requirement to load assets fully during init

SSaura

The subsystem used to tick auras (/datum/component/aura_healing and /datum/component/damage_aura).

SSautomapper

The AUTOMAPPER

This is a subsystem designed to make modular mapping far easier.

It does two things: Loads maps from an automapper config and loads area spawn datums for simpler items.

The benefits? We no longer need to have _nova maps and can have a more unique feeling map experience as each time, it can be different.

Please note, this uses some black magic to interject the templates mid world load to prevent mass runtimes down the line.

LIMITED SUPPORT FOR NON-STATION LEVELS(until someone adds a better Z level handling system for this)

SSban_cache

Subsystem that batches a ban cache list for clients on initialize This way we don't need to do ban checks in series later in the code

SSblood_drying

Blood Drying SS Used as a low priority background system to handling the drying of blood on the ground (basically just handles reducing their bloodiness value over time)

SSburning

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

SScameras

Manages the security cameras and camera chunks

SScharacter_preview

Starts character preview drawings, and rebuilds preview mobs in turn when many change at once.

Rebuilding the preferences preview mob applies every preference to it: 10 to 40 ms that can't be split. tg rebuilds it inside every action that changes it, twice in some, and many players changing their characters at once ran every tick over, which every player on the server felt.

With character setup open, a change only marks the mob stale and asks the window for a drawing, which rebuilds it first, once for everything an action changed. This starts the drawing in its next fire, in the tick time other subsystems leave over, and the drawing rebuilds the mob then and there if nothing waits ahead of it and the rebuild fits in what is left of the tick, as it nearly always does; one that doesn't fit still goes then while such rebuilds stay within CHARACTER_PREVIEW_OVERRUN_BUDGET. Otherwise the mob waits its turn in the queue, which the fires that follow work through. Changes that come while it waits go into the one rebuild, and the page shows its loader once the wait is long enough to see. Without a window, the mob is rebuilt at once, as tg does.

SScliff_falling

Subsystem to handle falling of off cliffs

SSclock_component

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

SScustom_sprite_work

Keeps the custom sprite editors cheap for the server, whatever a window sends.

Window actions only change the draft and note what needs drawing. Views, previews and resource rebuilds are drawn afterwards by SScustom_sprite_work, once for a burst of actions, in tick time other subsystems leave over, so no window can hold up a tick however fast it sends actions. The work that costs tens of milliseconds a time, resource rebuilds, new editors and previews of a previous saved style, is paced per player across all their editors by /datum/custom_sprite_pace, and across players by the subsystem: what such work runs past the ends of ticks stays within CUSTOM_SPRITE_OVERRUN_BUDGET.

SScyborg_layout_saves

Saves cyborg layout accounts in tick time other subsystems leave over.

Editor actions and their debounce only change the draft and ask for a save. Here the draft is encoded into its character and the account's file written, once per account in the order they asked, with whatever the draft holds by then. An account writes at most once per CYBORG_LAYOUT_SAVE_SPACING, and all saves together take at most CYBORG_SAVE_BUDGET ms of each second: a save can't be split, so what one runs over comes out of the next. It only fires while accounts are waiting.

SSdigital_clock

The subsystem used to tick digital clocks

SSdirt

Makes the masks mess is drawn with, a piece at a time, in the tick time other subsystems leave over, and keeps the newest of them.

Masks asked for that aren't made yet are queued here (masks_for()), behind the template of the body they're drawn on if that isn't built yet (template_for()), and behind the plain human template, queued at init, which every mark is sized by (dirt_metric()) and underclothes are judged on. Each fire works through the queue in order until the tick runs short. Finished masks go in masks, and each body that drew without them meanwhile, if it's still around, is drawn again at the end of the fire (redraw_dirt()). Masks asked for again while they wait are the same job, which only notes another body to draw again. A job that fails is cached as failed, and isn't queued again while that's kept.

DIRT_MASKS_DEFERRED turns the queue on: without it every mask is made as it's asked for.

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

SSearly_assets

Initializes any assets that need to be loaded ASAP. This houses preference menu assets, since they can be loaded at any time, most dangerously before the atoms SS initializes. Thus, we want it to fail consistently in CI as if it would've if a player opened it up early.

SSescape_menu

Subsystem for controlling anything related to the escape menu

SSfishing

subsystem for the fishing minigame processing.

SSfluids

Fluid Subsystem

A subsystem that processes the propagation and effects of a particular fluid.

Both fluid spread and effect processing are handled through a carousel system. Fluids being spread and fluids being processed are organized into buckets. Each fresh (non-resumed) fire one bucket of each is selected to be processed. These selected buckets are then fully processed. The next fresh fire selects the next bucket in each set for processing. If this would walk off the end of a carousel list we wrap back to the first element. This effectively makes each set a circular list, hence a carousel.

SSfoam

The subsystem responsible for processing foam propagation and effects.

SSgarment_fitting

Makes the garment fits bodies wait for, a piece at a time, in the tick time other subsystems leave over.

A garment drawn on a body fitted in a way no garment like it has been yet is drawn as it is, and its fit queued here (/datum/garment_fit_job/proc/start()). Each fire works through the queue in order, one view of one direction's frame at a time, until the tick runs short. A finished fit goes in the cache it was queued for, and each body that drew the garment meanwhile, if it's still around, has that slot drawn again at the end of the fire, once however many of its fits finished. A fit asked for again while it waits is the same fit, which only notes another body to draw again.

GARMENT_FITS_DEFERRED turns the queue off, and a dummy never uses it: every fit is then made as its garment is drawn.

It reads the fitting's templates and sheet metadata as the server starts, so no fit in a round pays for reading them.

SSgraffiti

The graffiti on the current map: the art and placements its file keeps, which of them show this round, and the sheet files they show from.

Each placement is kept as one JSON string, json_encode() of list("anchor", "art" = its art's hash, "ckey", "who", "at", "pid", "half", "miss"), and read with unpack(). A piece's name and description stay in its painter's library. A placement that lasts only this round has a null anchor, "round_only" and its turf's "x", "y" and "z".

SShyperspace_drift

This subsystem handles the hyperspace shuttle pull movement loops

SSid_access

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

SSinit_profiler

Subsystem exists so we can separately log init time costs from the costs of general operation Hopefully this makes sorting out what causes problems when easier

SSlag_switch

The subsystem for controlling drastic performance enhancements aimed at reducing server load for a smoother albeit slightly duller gaming experience

SSlibrary

Manages library data, loading bookselves, etc

SSlooting

Queues image generation for search objects without icons

SSlow_priority_ai_controllers

Plans background controllers that are active when unwatched but not critical

SSmouse_entered

Defers MouseEntered inputs to only apply to the most recently hovered over atom in the tick

SSnewtonian_movement

The subsystem is intended to tick things related to space/newtonian movement, such as constant sources of inertia

SSpathfinder

Queues and manages JPS pathfinding steps

SSpoints_of_interest

Subsystem for managing all POIs.

SSradioactive_nebula

Controls making objects irradiated when Radioactive Nebula is in effect.

SSsinguloprocess

Very rare subsystem, provides any active singularities with the timings and seclusion they need to succeed

SSsmoke

The subsystem responsible for processing smoke propagation and effects.

SSspatial_grid

Spatial Grid

a gamewide grid of spatial_grid_cell datums, each "covering" SPATIAL_GRID_CELLSIZE ^ 2 turfs. each spatial_grid_cell datum stores information about what is inside its covered area, so that searches through that area dont have to literally search through all turfs themselves to know what is within it since view() calls are expensive, and so is iterating through stuff you dont want. this allows you to only go through lists of what you want very cheaply.

you can also register to objects entering and leaving a spatial cell, this allows you to do things like stay idle until a player enters, so you wont have to use expensive view() calls or iteratite over the global list of players and call get_dist() on every one. which is fineish for a few things, but is k * n operations for k objects iterating through n players.

currently this system is only designed for searching for relatively uncommon things, small subsets of /atom/movable. dont add stupid shit to the cells please, keep the information that the cells store to things that need to be searched for often

The system currently implements two different "classes" of spatial type

The first exists to support important_recursive_contents. So if a client is inside a locker and the locker crosses a boundary, you'll still get a signal from the spatial grid. These types are SPATIAL_GRID_CONTENTS_TYPE_HEARING and SPATIAL_GRID_CONTENTS_TYPE_CLIENTS

The second pattern is more paired down, and supports more wide use. Rather then the object and anything the object is in being sensitive, it's limited to just the object itself Currently only SPATIAL_GRID_CONTENTS_TYPE_ATMOS uses this pattern. This is because it's far more common, and so worth optimizing

SSspeech_controller

verb_manager subsystem just for handling say's

SSsymphony

Safety net for revokes we never heard about.

SStgui

tgui subsystem

Contains all tgui state and subsystem code.

SSticket_ping

Pings admins every (time chosen in config) for all open tickets/OPFOR applications

SStimer

Timer Subsystem

Handles creation, callbacks, and destruction of timed events.

It is important to understand the buckets used in the timer subsystem are just a series of doubly-linked lists. The object at a given index in bucket_list is a /datum/timedevent, the head of a list, which has prev and next references for the respective elements in that bucket's list.

SSturrets

The subsystem used for portable turrets, as they're relatively more intensive compared to most other machines, so we don't want them hogging tick usage from everything else.

SStutorials

Namespace for housing code relating to giving contextual tutorials to users.

SSverb_manager

SSverb_manager, a subsystem that runs every tick and runs through its entire queue without yielding like SSinput. this exists because of how the byond tick works and where user inputted verbs are put within it.

see TICK_ORDER.md for more info on how the byond tick is structured.

The way the MC allots its time is via TICK_LIMIT_RUNNING, it simply subtracts the cost of SendMaps (MAPTICK_LAST_INTERNAL_TICK_USAGE) plus TICK_BYOND_RESERVE from the tick and uses up to that amount of time (minus the percentage of the tick used by the time it executes subsystems) on subsystems running cool things like atmospherics or Life or SSInput or whatever.

Without this subsystem, verbs are likely to cause overtime if the MC uses all of the time it has allotted for itself in the tick, and SendMaps uses as much as its expected to, and an expensive verb ends up executing that tick. This is because the MC is completely blind to the cost of verbs, it can't account for it at all. The only chance for verbs to not cause overtime in a tick where the MC used as much of the tick as it allotted itself and where SendMaps costed as much as it was expected to is if the verb(s) take less than TICK_BYOND_RESERVE percent of the tick, which isn't much. Not to mention if SendMaps takes more than 30% of the tick and the MC forces itself to take at least 70% of the normal tick duration which causes ticks to naturally overrun even in the absence of verbs.

With this subsystem, the MC can account for the cost of verbs and thus stop major overruns of ticks. This means that the most important subsystems like SSinput can start at the same time they were supposed to, leading to a smoother experience for the player since ticks aren't riddled with minor hangs over and over again.

SSwardrobe

This subsystem strives to make loading large amounts of select objects as smooth at execution as possible It preloads a set of types to store, and caches them until requested Doesn't catch everything mind, this is intentional. There's many types that expect to either A: Not sit in a list for 2 hours, or B: have extra context passed into them, or for their parent to be their location You should absolutely not spam this system, it will break things in new and wonderful ways S close enough for government work though. Fuck you goonstation

SSweather

Used for all kinds of weather, ex. lavaland ash storms.

SSwiremod_composite

This subsystem is to handle creating and storing composite templates that are used to create composite datatypes for integrated circuits

See: https://en.wikipedia.org/wiki/Composite_data_type

Tracy

The byond-tracy instance. This is a GLOBAL_REAL because it is the VERY FIRST THING to initialize, even before the MC or GLOB.

_bitfield_bot_access_flags

bitfield, used by basic bots, for our access flags

_bitfield_bot_cover_flags

bitfield, used by simple bots, for our access flags

_bitfield_covered_slots

Mob covered flags

_bitfield_flags_inv

Item obscured flags

_bitfield_no_equip_flags

Inventory slots that can be blacklisted by a species from being equipped into

_bitfield_obscured_slots

Mob obscured flags

_bitfield_transparent_protection

Item coverage flags

Proc Details

GUID

returns a GUID like identifier (using a mostly made up record format) guids are not on their own suitable for access or security tokens, as most of their bits are predictable. (But may make a nice salt to one)

GetBestWeapon

Returns either the best weapon from the given choices or null if held weapons are better

GetTgsStealthKey

Gets TGS's stealth key, generates one if none is found

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.

HandleUserlessProcCall

Handles a userless proccall, used by circuits.

Arguments:

HandleUserlessSDQL

Handles a userless sdql, used by circuits and tgs.

Arguments:

ISOtime

returns timestamp in a sql and a not-quite-compliant ISO 8601 friendly format. Do not use for SQL, use NOW() instead

REF

\ref behaviour got changed in 512 so this is necesary to replicate old behaviour. If it ever becomes necesary to get a more performant REF(), this lies here in wait #define REF(thing) (thing && isdatum(thing) && (thing:datum_flags & DF_USE_TAG) && thing:tag ? "[thing:tag]" : text_ref(thing))

RangedReachCheck

Called by IsReachableBy() to check for ranged reaches.

RoundDiagBar

Diagnostic HUDs!

WEAKREF

Creates a weakref to the given input. See /datum/weakref's documentation for more information.

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.

______qdel_list_wrapper

the underscores are to encourage people not to use this directly.

__check_serialization_semver

Checks if the actual semver is equal or later than the wanted semver Must be passed as TEXT; you're probably looking for CHECK_SERIALIZATION_SEMVER, look right above

_add_memory_in_range

Unless you need to use this for an explicit reason, use the add_memory_in_range macro wrapper.

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

_animate_filter

Auxtools REALLY doesn't know how to handle filters as values; when passed as arguments to auxtools-called procs, they aren't simply treated as nulls - they don't even count towards the length of args. For example, calling some_proc([a filter], foo, bar) from auxtools is equivalent to calling some_proc(foo, bar). Thus, we can't use _animate directly on filters. Use this to perform animation steps on a filter. Consecutive steps on the same filter can be achieved by calling _animate with no target.

_export_loop

The main bit responsible for selling the item. Shared by export_single_item() and export_item_and_contents()

_malf_ai_undo_lockdown

For Lockdown malf AI ability. Opens all doors on the station.

_pick_list

Allow me to explain for some reason, if pick() is passed arglist(args) directly and args contains only one list it considers it to be a list of lists this means something like _pick(list) would fail need to do this instead

I hate this timeline

_queue_verb

queue a callback for the given verb/verblike proc and any given arguments to the specified verb subsystem, so that they process in the next tick. intended to only work with verbs or verblike procs called directly from client input, use as part of TRY_QUEUE_VERB() and co.

returns TRUE if the queuing was successful, FALSE otherwise.

_save_map

Hey bud don't call this directly, it exists so we can invoke async and prevent the buildmode datum being qdel'd from halting this proc

_stack_trace

gives us the stack trace from CRASH() without ending the current proc. Do not call directly, use the stack_trace macro instead.

aas_config_announce

Announces the provided message with the provided variables and config entry type. Only aas_config_entry_type and variables_map are mandatory. Other args are optional.

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_girder_wall_recipe

Adds a new /datum/girder_wall_recipe instance to the given recipe list from the given recipe arguments.

add_image_to_client

Adds an image to a client's .images. Useful as a callback.

add_image_to_clients

Like add_image_to_client, but will add the image from a list of clients

add_keybinding

Adds an instanced keybinding to the global tracker

add_lua_editor_variants

Given a list and a list of its variant hints, appends variants that aren't explicitly required by dreamluau, but are required by the lua editor tgui.

add_messenger

Registers an NTMessenger instance to the list of pda_messengers.

add_minimap_blip

Create a minimap blip on the z-level in question, object is optional, and will tie the blip to the object in question, and will clean up itself if the object in question is deleted

add_personality_mood_to_viewers

Iterates over all mobs that can see the passed movable and adds specific mood events to them based on their personalities.

add_recipes_to_sublist

Add a list of recipes to an existing recipe sublist.

Arguments:

add_startup_message

Adds a startup message to the splashscreen.

Arguments:

add_to_signaler_investigate_log

Used to add a text log to the signaler investigation log. Do not add to the list directly; if the list is too large it can cause lag when an admin tries to view it.

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:

admin_ticket_log

Use this proc when an admin takes action that may be related to an open ticket on what what can be a client, ckey, or mob player_message: If the message should be shown in the player ticket panel, fill this out log_in_blackbox: Whether or not this message with the blackbox system. If disabled, this message should be logged with a different proc call

adminscrub

Runs STRIP_HTML_SIMPLE and byond's sanitization proc.

adult_items_gated_types

Each adult items family's top types, one line per family. The adult_items_kill_switch unit test checks every concrete subtype.

ai_eye_turf_in_view

AI can also see emotes!

ai_toggle_hiding

Shared logic for actually flipping a mob's hidden state. Used by both the explicit toggle_hiding leaf and the random_hiding decision leaf.

alert_sound_to_playing

This is quite franlky the most important proc relating to global sounds, it uses area definition to play sounds depending on your location, and respects the players announcement volume. Generally if you're sending an announcement you want to use priority_announce.

alert_to_permissions_elevation_attempt

Sends a message in the event that someone attempts to elevate their permissions through invoking a certain proc.

all_junctions_of_dir

Takes a direction, turns it into all the junctions that it lines up with

alone_in_area

Checks if the mob provided (must_be_alone) is alone in an area

amount2sheet

Turns material amount into the number of sheets, returning FALSE if the number is less than SHEET_MATERIAL_AMOUNT

Arguments:

announce_arrival

Send a message in common radio when a player arrives

anyprob

chances are 1:value. anyprob(1) will always return true

apply_active_reta_grants_to_card

Applies any currently active RETA grants to a newly created/spawned ID card This should be called when ID cards are created, spawned, or have their trim changed

apply_cyborg_customization

Preference application is separate from model selection, hardware, laws and names.

apply_dynamic_human_appearance

This exists to apply the icons async, as that cannot be done in Initialize because of possible sleeps.

apply_icon_mask

A simple helper proc to apply a mask to an icon Arguments:

apply_matrix_to_color

Applies a color filter to a hex/RGB list color

apply_message_emphasis

Replaces player chat emphasis characters with the corresponding HTML tags in the input string.

You do NOT (and SHOULD not) need to use on anything that isn't direct user input, as this is designed solely to transform user input. Just put in the HTML tags yourself.

Returns the transformed input, which may have no change if no emphasis characters are present.

armor_to_protection_class

Rounds armor_value down to the nearest 10, divides it by 10 and then converts it to Roman numerals.

Arguments:

armor_to_protection_name

Returns the client readable name of an armor type

Arguments:

assemble_body_markings_from_set

Builds a new collection wearing a marking set: each of its markings on every zone the marking claims, in the set's order.

A marking's zones come in GLOB.body_markings_per_limb order, as scanning those lists for its name gave them, and each marking starts in the colour its color_mode seeds. A member sharing an exclusion group with an earlier member stays off the zones that one took.

Arguments:

Returns:

assert_sorted

Runtimes if the passed in list is not sorted

assign_random_name

Generate a name devices

Creates a randomly generated tag or name for devices or anything really it keeps track of a special list that makes sure no name is used more than once

args:

assoc_to_keys

Turns an associative list into a flat list of keys

assoc_to_keys_features

Turns an associative list into a flat list of keys, but for sprite accessories, respecting the locked variable

assoc_to_values

Turns an associative list into a flat list of values

at_least

Takes a value, and a threshold it has to at least match returns the correctly signed value max'd to the threshold

atmos_handbooks_init

Automatically populates gas_handbook and reaction_handbook. They are formatted lists containing information regarding gases and reactions they participate in. Structure can be found in TS form at AtmosHandbook.tsx

atmos_scan

Outputs a message to the user describing the target's gasmixes.

Gets called by analyzer_act, which in turn is called by tool_act. Also used in other chat-based gas scans.

augment_paint_matrix

Returns a recolourable finish's colour matrix for one of its packed states: numeric and 4x4, rows red, green, blue, alpha, as Nova's naga tail builds its (constrict.dm). Never rows of colour strings, which map_colors_inferred() can't flatten for the drawn character preview. Each is built once and kept, by colours, state and alpha, until AUGMENT_PAINT_MATRIX_CACHE_SIZE are kept; then the cache is emptied before the next is added, since a player can apply colours without end. A matrix is cheap to build again, and a limb keeps the one it was given.

The red, green and blue rows are the colours each packed channel draws in: paint, accent and frame for the _paint state, lights and the two untinted shines for the _glow state. A channel's shade scales its colour, so a pixel packed at half red draws half the paint colour.

Arguments:

Returns:

autopunct_bare

Ensures sentences end in appropriate punctuation (a period if none exist) and that all whitespace-bounded 'i' characters are capitalized. If the sentence ends in chat-flavored markdown for bolds, italics or underscores and does not have a preceding period, exclamation mark or other flavored sentence terminator, add a period. (e.g: 'Borgs are rogue' becomes 'Borgs are rogue.', '+BORGS ARE ROGUE+ becomes '+BORGS ARE ROGUE+.', '+Borgs are rogue~+' is untouched.)

avoid_assoc_duplicate_keys

takes an input_key, as text, and the list of keys already used, outputting a replacement key in the format of "[input_key] ([number_of_duplicates])" if it finds a duplicate use this for lists of things that might have the same name, like mobs or objects, that you plan on giving to a player as input

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

begin_the_end

Begins the process of ending the round via cult narsie win Consists of later called procs (in order of called):

bit_count

counts the number of bits in Byond's 16-bit width field, in constant time and memory!

bitfield_to_list

Converts a bitfield to a list of numbers (or words if a wordlist is provided)

blend_color

Blend two colors using the normal blend mode of the CSS compositing algorithm

blend_cutoff_colors

Used to blend together two different color cutoffs Uses the screen blendmode under the hood, essentially just /proc/blend_screen_color But paired down and modified to work for our color range Accepts the color cutoffs as two 3 length list(0-100,...) arguments

blend_screen_color

Blends together two colors (passed as 3 or 4 length lists) using the screen blend mode Much like multiply, screen effects the brightness of the resulting color Screen blend will always lighten the resulting color, since before multiplication we invert the colors This makes our resulting output brighter instead of darker

blend_weighted_lists

body_marking_collection_from_list

The tolerant loader for the nested shape preferences.json stores: zone -> (marking name -> list(color, emissive)).

A marking stored as a bare colour, the legacy shape, loads as that colour without glow; a missing colour or glow reads as sanitize_hexcolor()'s default and 0, and extra fields are ignored. Zones outside GLOB.marking_zones, zones that aren't lists and names missing from GLOB.body_markings are dropped. Anything that isn't a list, null included, loads as no markings. Nothing else is checked: markings of one exclusion group load side by side, and a zone may hold more than MAXIMUM_MARKINGS_PER_LIMB, as saved.

Arguments:

Returns:

body_marking_colors_old_set_names

What each of the seven species that had a randomiser of its own could pick, as those get_random_body_markings() overrides were written before get_random_marking_sets() replaced them: a forced set, a fixed list to pick from, or the sets meant for any species or for this one. Kept here, and nowhere in the game, as the reference.

Arguments:

Returns:

body_marking_colors_scanned_set

The marking set factory as it was before it read each marking's affected_bodyparts: every member against every zone's marking list, in GLOB.body_markings_per_limb order. Colours come from seed_color(), the only colour source there is now, so comparing the two compares which entries land on which zones, in what order.

Arguments:

body_marking_compat_full

Saved marking maps exactly as preferences.json holds them, written out by hand so no loader or serializer change can regenerate them. Every zone wears the fixture's markings (body_marking_fixture.dm), each of which claims all eight zones, in an order no zone list or marking list sorts into, with glow mixed.

body_marking_compat_round_trip

Loads a saved marking map the way a character load does and writes it back the way a save does.

body_marking_entries_cache_key

Returns a string standing for a list of entries, in order, with their colours and glow.

A collection's cache_key_for_zone() and a limb holding entries of its own both build their strings here, so the same markings give the same string either way.

Arguments:

Returns:

body_marking_entries_copy

Copies a list of entries into new ones, as deep_copy_list() copied the nested shape.

Arguments:

Returns:

body_marking_entries_from_list

Builds new entries for one zone from its nested shape: marking name -> list(color, emissive).

Arguments:

Returns:

body_marking_entries_to_list

Rebuilds one zone's nested shape from its entries: marking name -> list(color, emissive).

Arguments:

Returns:

body_marking_rename_retired

Renames retired marking names in the nested shape preferences.json stores, zone by zone and in place, by GLOB.body_marking_renames. A zone holding a retired name and the name it became wears the same art twice, so it keeps one entry: the later one, which drew on top, in its place and colour, glowing if either glowed, as the lower one's glow showed through a top one that didn't glow. A zone with nothing to rename is left as it is.

Arguments:

Returns:

body_marking_set_types_for_species

Returns the body marking sets meant for any species or for this one, the "None" set included.

Arguments:

Returns:

body_marking_sheet_size

Returns the size of a body marking sheet as "[width]x[height]", read once per sheet. moth_markings.dmi is 45x34, every other sheet 32x32. Null for an icon built at runtime, whose text names no file ("/icon" for every one), so a content key could not tell two apart.

Arguments:

body_marking_sheets_blend

Returns whether markings on two sheets can blend into one icon: sheets of one size, and never an icon built at runtime.

Arguments:

body_markings_of_zone_for_species

The body markings a zone offers a species: all of them with mismatched parts, otherwise those meant for any species or this one.

body_zone2cover_flags

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

border_diamond_range_turfs

Returns the list of turfs around the outside of a center based on RANGE_TURFS()

bug_report_blank

Whether a field counts as empty, by the same rule as the reporting service.

Only Unicode's whitespace and the zero width no-break space count as nothing, and steps that are only their numbers count as nothing too. We don't use trimtext(), it also takes the zero width space. Arguments:

bug_report_bridge_origin

Returns the configured bridge address when it's a loopback one on this machine, the only kind we ever talk to, otherwise null

bug_report_budget

Spends one of a ckey's hourly allowances, mirroring the reporting service's own caps.

Returns 0 when there was one to spend, otherwise how long until one frees up. They live for the round, so a reconnect doesn't refill them. Arguments:

bug_report_budget_fill

Spends what's left of a ckey's hourly allowance of one kind, for when the reporting service says it's all used.

Arguments:

bug_report_cleanup_temporary

Removes staged screenshot files a day old or more, at most once an hour.

DreamDaemon processes can overlap on one data folder, and a day is longer than any capture or upload lives, so only files that old go. A file we can't date stays for an operator to look at. Finished requests delete their own files at once. Arguments:

bug_report_context_snapshot

Freezes what the game looked like for a report, as plain values the bridge stores as they are.

Nothing here can yield, so the round, mob and build are the ones the reporter saw. Arguments:

bug_report_image_name

Whether a file name is one of the image types the reporting service decodes

bug_report_temporary_path

A fresh generated path for a staged screenshot file, sweeping old ones now and then

bug_report_uses_left

Counts what's left of a ckey's hourly allowance of one kind, forgetting uses over an hour old.

Arguments:

bug_reports_enabled

Whether reports go to the reporting bridge, which only ever means the one on this machine

build_chemical_reactions_lists

Chemical Reactions - Initialises all /datum/chemical_reaction into a list It is filtered into multiple lists within a list. For example: chemical_reactions_list_reactant_index/datum/reagent/toxin/plasma is a list of all reactions relating to plasma For chemical reaction list product index - indexes reactions based off the product reagent type - see get_recipe_from_reagent_product() in helpers For chemical reactions list lookup list - creates a bit list of info passed to the UI. This is saved to reduce lag from new windows opening, since it's a lot of data.

build_exploration_site_ui_data

Helper proc for exploration site listings in ui.

build_mutant_part

Factory helper proc for creating and returning a new mutant_bodypart datum.

Arguments:

Returns:

build_name2neurowarelist

Same as build_name2reagentlist() but contains only neuroware reagents.

build_name2neurowarelist_safe

Same as build_name2neurowarelist() but omits aphrodisiacs.

build_name2reagentlist

Builds map of reagent name to its datum path

build_planeed_apperance_queue

Takes a list of mutable appearances Returns a list in the form: 1 - a list of all mutable appearances that would need to be updated to change planes in the event of a z layer change, alnongside the commands required to properly track parents to update 2 - a list of all parents that will require updating

bulge_adaptive

bulge_v4.adaptive(cloth, finish, toned = TRUE): the five kinds f, h, H, s, d as lists of three channels.

Arguments:

bulge_blank_tile

A transparent 32x32 tile in one direction, loaded once; copy it with icon() before drawing on it.

bulge_clearance

Where a skirt's shaft shows through the cloth: the anatomy clearance mask (a /datum/bulge_sheet_state) for an identity, or null when the family has none there. Named as the skirt's shape without its legs, in skirt_clearance.dmi: a clearance is the same on plain and digitigrade legs. With a clearance the anatomy is drawn behind the skirt and, inside the mask, above its cloth; an empty mask shows none of it above.

bulge_clipped_icon

Returns a sprite kept only inside a shape's pixels (what a cover draws over itself, kept to a look's cloth): the sprite's frames times the template's union mask (bulge_template_masks()), as one registered icon whose state "" faces all four ways. The image drawing it keeps the sprite's own colour. Cached on the template by sprite and state; null when the state is missing or not 32x32, or the template has no pixels.

Arguments:

bulge_cover_family

The family a cover garment bulges with, or null.

bulge_cover_layer

The layer a cover garment is drawn at: an underclothes accessory's own, else its drawn appearance's.

bulge_cover_printed

Whether a cover garment's own print carries onto its bulge.

bulge_cover_slot

The overlays_standing slot a cover garment is drawn in, or null.

bulge_cut_cover_flap

Returns the cover garment with a flap cut away: its sprite with every pixel of the flap made transparent (the lifted part of a revealing skirt's hem), as one registered icon whose state "" faces all four ways; nothing is cut facing north. One flap serves every garment with that hem. Cached like a patch; null when the sprite is not a 32x32 resource or has no such state.

Arguments:

bulge_cut_cover_patch

Returns a loincloth with its lifted flap cut away: its sprite kept only where the cut's keep mask (bulge_patch_keep()) is opaque, as one registered icon whose state "" faces all four ways. Only the mask's alpha is used, so the wearer's own garment pixels stay. Cached like a patch; null when the sprite is not a 32x32 resource or has no such state.

Arguments:

bulge_cut_for

The cut a cover of family is drawn with under a hard penis of this identity: a revealing skirt's flap (a /datum/bulge_print_template) or a loincloth's derived cut (a /datum/bulge_sheet_state); null when it is drawn whole.

bulge_cut_sprite

A sprite cut by a flap (/datum/bulge_print_template) or by a loincloth's derived cut (/datum/bulge_sheet_state), or null.

bulge_decode_template

Decodes a sheet state into a print template, once per sheet and state: each pixel facing south, east and west with its kind, read from its fixed grey (a kind map), or as cloth (a mask, when mask). North is never read: it is empty in every template sheet. A state saved with one direction is read facing south every way, as getFlatIcon() treats one. The template's key names its sheet and state, so no two sheets can share a cached template.

bulge_derive_cut

Cuts a cover by a keep mask (see bulge_cut_cover_flap() and bulge_cut_cover_patch()), uncached: the sprite times the keep mask.

bulge_derive_drape

Derives a loincloth's drape, as bulge_drape_name() names it, by the approved rule: facing east the flap's top edge follows the penis from its hinge, up to BULGE_DRAPE_REACH columns, then the rest of the flap hangs past the tip or, from a penis reaching further, drops over its side; facing west the same, mirrored; facing south the flap's top and hem rows where the loincloth's own sprite has cloth. Kept for the round, by its name, with the decoded templates; pixels in the order bulge_decode_template() reads a sheet. Arguments as bulge_drape_name().

bulge_derive_large

Derives a shape past small_cap from the penis and testicle sprites by the approved rule, in whole numbers: the cloth the bulge pushes out, as a kind map, or with mask the anatomy it leaves bare, as a white mask (null where it covers the whole penis). Pixels facing south, east and west, in the order bulge_decode_template() reads a sheet, as the sheet states it replaced held them; facing east and west, every penis shape but the human one takes amendments to that rule (see below), and its mask is what the amended cloth leaves bare. The kind map is kept for the round, by its name, with the decoded templates; the mask is not (bulge_exposed() keeps the tile drawn from it). Arguments as bulge_large_name(): owner is the family whose shapes past small_cap these are.

bulge_derive_print_patch

Derives a printed patch (see bulge_print_patch()), uncached.

bulge_drape

The drape a hard loincloth hangs over the penis, as a kind map derived the first time (bulge_derive_drape()), or null where it has none.

Arguments (positional):

bulge_drape_name

The name of a loincloth's drape: "[drapes][penis shape][sprite size]", "_untoned" as bulge_large_name(), and "_flat" from the family's flat_tip_from on a shape that grows past size 4.

bulge_drawn_leaf

The drawn sprite of a worn appearance: the appearance itself, or the first child of the KEEP_TOGETHER root build_worn_icon() nests separate overlays under. Null when it draws none.

bulge_drawn_root

The first visible appearance of a drawn slot (a slot holds one, or a list with emissive roots beside them).

bulge_exposed

The anatomy a bulge past the family's small_cap leaves bare, as a white mask (a /datum/bulge_sheet_state): the derived state of the bulge_shape() of the same identity, its tile drawn from the pixels bulge_derive_large() derives for it. Null where nothing shows, the shape covering the whole penis. Arguments as bulge_shape().

bulge_family_size

The size a family draws a bulge of size at: its own up to its cap for the form, the cap past it; 0 for none.

bulge_flap

The flap a revealing skirt cuts away from its cover when hard, as a decoded mask (a /datum/bulge_print_template, every pixel cloth) for bulge_cut_cover_flap(), or null when the family cuts none. Named as the skirt's hard shape, in skirt_flaps.dmi.

bulge_flap_keep

A flap's keep mask: opaque white over the whole 32x32 tile in all four directions except the flap's own pixels, which are transparent. Built once per flap (GLOB.bulge_flap_keeps), so a cut costs one multiply.

bulge_four_way

A sprite's state as an icon with four directions, frame 1: a state with one direction is its south view every way, as getFlatIcon() treats one. Null when the state is missing or not 32x32.

bulge_hcy_raw

bulge_v4._hcy_raw: HCY to unclamped RGB fractions.

bulge_hcy_to_rgb

bulge_v4.hcy_to_rgb: drops chroma by bisection until the colour fits, then rounds half to even.

bulge_held_size

What the underwear under a look's cover (bulge_restraint()) leaves of the look. Underwear always takes precedence: it holds the penis in, unless its own look would show some of it at this size and arousal, the anatomy its exposed mask leaves bare (briefs from size 5, long johns' tip hard from size 5) or a loincloth's drape when hard. bulge_resolve() and bulge_wanted_cut() both decide by it, so a cover is drawn cut only for a look that shows the penis through it.

Arguments:

Returns:

bulge_hue_numerator

A colour's hue in sixths of a turn times its chroma, in [0, 6 * chroma): the hue as an exact fraction over chroma.

bulge_is_accessory

Whether a child of a uniform's drawn sprite is one of its accessories (get_accessory_overlays()): drawn in the accessory's worn state, whichever file the wearer's species draws it from.

bulge_large_name

The name of a shape past small_cap: "[shapes][form][size][legs][penis shape]", "_untoned" for a shape whose untoned sprites have shapes of their own, drawn without skin tones; the size as bulge_large_size(). Legs are digitigrade only where the family has digitigrade versions of that form.

bulge_large_size

The size whose shape a bulge past small_cap draws: past size 6, a penis whose sprite has stopped growing (its size affix cap, with skin tones when toned) keeps size 6's shape.

bulge_loincloth_cut

The cut a hard loincloth takes under its drape (a derived /datum/bulge_sheet_state named "[drapes]cut[hem]", whose keep mask says what of the garment stays inside the cut window), or null. The cut follows the drape: at the lowest row its drape reaches facing south, or, for a drape that stays above the hem rows there (a tentacle's stub), the family's lifted_hem. Its keep mask (bulge_patch_keep()) is cut from the loincloth's own sprite as the approved previews cut it: facing south the flap's columns below the hem go, facing east and west the flap's two columns from its hinge row down, facing north nothing. Arguments as bulge_drape().

bulge_mask_shows

Whether a mask shows anything. A skirt's anatomy clearance can be empty (the shaft shows behind the skirt and none of it above), and anatomy masked by an empty one would be a fully transparent icon, derived and sent for nothing. Read once per state, from its frames facing south, east and west (north is empty in every template sheet); a derived mask has no sheet, and always shows something (bulge_exposed()).

bulge_mask_tile

A mask placed on the 32x32 tile, in all four directions: transparent outside the mask. Built once per state (GLOB.bulge_mask_tiles), kept on the server and never sent: drawn from pixels when given (a derived mask's pixels as a template, as bulge_derive_large() derives them and bulge_exposed() passes them before it returns the mask), else from the mask's sheet.

bulge_masked_icon

Returns anatomy restricted to a mask: an icon state's frames kept only where a white mask is opaque (the bare part of a penis past a family's small_cap, or what of it shows above a skirt), as one registered icon whose state "" faces all four ways. The image drawing it keeps the anatomy's own colour, so one masked copy serves every colouring. Cached by its inputs; null when the state is missing or not 32x32.

Arguments:

bulge_memo_list

The slots list memo[first], created on first use with slots empty slots.

bulge_memo_slots

The slots list memo[first][second], created on first use with slots empty slots.

bulge_mirror

value folded into first..last as between two mirrors, the ends not repeated, so alternating stripes keep alternating across the fold.

bulge_nearest_run

The index in runs (flat ascending (first, last) pairs) of the run nearest value; the first of equals.

bulge_over_signature

What a worn cover draws over its own sprite (overlays, from bulge_over_overlays()), as one string: each overlay after the first on the float plane. Null for none. An icon built at run time (mess baked on the cover) has no name of its own, so it goes in by reference, after DIRT_PRIVATE_KEY: each one is new, so the look's key, the chest's, keeps its images on the wearer rather than in tg's shared limb_icon_cache (limb_icons_for()).

bulge_palette_exception

The palettes this float32 port computes one off in a channel from the approved values (computed in float64), with the approved palette to use instead: 71 channels in 38 (colour, finish) pairs, all where float64 lands on the other side of a half (#afafaf's shade is exactly 136.5). Found by sweeping every colour the approved palettes were made for, the 4,096-colour grid of multiples of 17 and 760 garment colours, natively against them; every other one of their 218,520 channels the float32 computation gives exactly. A change to the arithmetic above needs that sweep again. Null when the computation stands.

bulge_palette_text

A GAGS palette as one string, as its producer joins a list; null for anything that is no palette.

bulge_patch_keep

A loincloth cut's keep mask: opaque white over the whole 32x32 tile in all four directions, except the pixels the cut takes away. Built once per cut (GLOB.bulge_patch_keeps) from erased, those pixels facing south, north, east and west (lists of indices, row * 32 + column + 1 from the top left), which bulge_loincloth_cut() derives and passes before it returns the cut; asked for again, without erased, it is the one built then.

bulge_penis_state

The state of a penis shape's sprite a shape past small_cap is derived from, as the approved previews chose it: drawn in front, hard or half hard, skin-toned where the sprite has that and the shape is drawn toned, at sprite_size or the largest smaller size the sprite has. Null where it has none.

bulge_print_colour

The colour of a patch pixel (rgb() text) from the garment pixel the rule chose (GetPixel() text): the pixel itself for cloth, or the pixel under the kind's translucent white or black. A partly transparent garment pixel gives its colour; patches are opaque.

bulge_print_patch

Returns the printed patch for a garment sprite under a bulge template: one registered icon whose state "" faces south, east and west (north stays empty), drawn over the garment where the bulge pushes it out. Derived the first time and cached; null when the sprite has no print to carry, or is not a 32x32 resource.

Arguments:

bulge_printed_patch

A printed garment's precoloured patch past its family's small_cap (a /datum/bulge_sheet_state, drawn as it is), or null when its prints there are derived or it has none: the patch drawn for the penis shape's profile where the sheet has one (the human penis's name with the shape's icon state appended, and "_untoned" after it first for a shape drawn without skin tones whose untoned sprites draw differently), else the human penis's. None for a penis shape that draws the family's small_cap shape there (bulge_shape_size(): the tentacles, a shape past its print_cap), which keeps that shape's print. Arguments as bulge_shape(); with no penis shape, the human penis's.

bulge_register_icon

Registers an icon built at run time in the resource cache, as tg's derived icons are. The GetPixel() makes BYOND finish its deferred icon operations first, as GAGS does before it caches an icon.

bulge_rgb_to_hcy

bulge_v4.rgb_to_hcy: colorsys hue in degrees, chroma and Rec. 601 luma in 0-100, from 0-255 channels.

bulge_round_half_even

Python's round(): a half goes to the even neighbour.

bulge_shape

The shape a garment of family bulges with, as a kind map (a /datum/bulge_print_template), or null where the family has none. Decoded the first time, or past small_cap derived (bulge_derive_large()); then a few list reads.

Arguments (positional; every one a scalar or a typepath):

bulge_shape_owner

The family whose shape, anatomy clearance or flap a family draws at a size up to its small_cap: itself, or the family it names by design for that form (half_shapes_of, hard_shapes_of), except at the hard sizes in own_sizes, the family's own of that kind (own_shape_sizes, own_clearance_sizes or own_flap_sizes).

bulge_shape_size

The size whose shape a family draws for a bulge of size on a penis shape: bulge_family_size(), except that past the family's small_cap, where shapes follow the penis shape, a shape with none of its own (bulge_hyper FALSE, the tentacles) draws the family's small_cap shape, as any other shape draws at that size, and so does a shape past its print_cap (Nondescript (Alt), Tapered (Alt) and Hemi (Alt)); 0 for none.

bulge_shape_where

Where a family's shape for an identity is (see bulge_shape()), or null when the family has none there. Where the family has a precoloured printed patch (bulge_printed_patch()), the patch is drawn instead: no shape (the look shows the anatomy the shape of large_shapes_of leaves bare, under the patch: bulge_resolve()). The sheet is chosen by the garment's own family (a skirt reads skirt_shapes.dmi whichever family owns the shape), and a family named by half_shapes_of, hard_shapes_of or large_shapes_of is followed one level only: it must own its shapes. Past small_cap the shape has no sheet: the derived state named as bulge_large_name() names it.

bulge_sheet_state

The one /datum/bulge_sheet_state for a sheet's state, or null when the sheet has no such state; with no sheet (icon_file null), the one for the derived state of that name.

bulge_size

The bulge size, 1 to 8, of a penis this long in inches: past 36 inches the penis sprite's own size thresholds (penis/get_sprite_size_string()) carry on, at 37, 49, 57 and 65 inches.

bulge_size_for_length

Bulges: a covered penis, at least half hard, draws the cloth it pushes out over the garment covering it.

One renderer, on the penis's own bodypart overlay. A body update asks the overlay whether it draws (can_draw_on_bodypart()); a covered penis then resolves its look (look.dm) and keeps it, memoised by the scalars it was resolved from, so an update that changed none of them compares a few vars and reuses the look. The look's key stands in for the penis's own render key, so the chest's limb icon cache holds a drawn bulge like any other limb image, and its images are built only when that key changes (get_overlay()).

What a look draws, at the cover's layer: just above the cover, and, for anatomy shown behind it, just below (BULGE_ABOVE_COVER, BULGE_BEHIND_COVER), whatever layer the penis itself is set to draw at.

bulge_sprite_pixels

One direction of a sprite the shapes past small_cap are derived from, frame 1, read once and kept for the round (as many as the sprites have states and directions): its opaque pixels row by row from the top, as flat (index, luminance) pairs. The index is row * 32 + column + 1, rows and columns from 0 at the top left; the luminance is that of the pixel tinted with the skin tone, in thousandths, plus one. A penis or testicle sprite is read inside the window those draw in (BULGE_SPRITE_*), a loincloth's (whole) all of it. Null where it has no opaque pixel, or no such state.

bulge_sprite_size

The size affix, 1 to 7, the game draws a penis this long with (penis/get_sprite_size_string()), within cap.

bulge_template_masks

Derives the white masks an adaptive bulge of a template draws (see /datum/bulge_print_template/var/mask_cloth), once per template: one registered icon per kind it has pixels of, and one of all its kinds together. Their state "" faces all four ways; north stays empty. The palette is the client's tint on them, so a recolour derives nothing.

bulge_toward

bulge_v4.toward: turns a hue toward a target by at most amount degrees.

bulge_two_prints

Whether two pixels (GetPixel() text) are different colours of a print (red and yellow, red and white) rather than one colour lighter or darker (black and its shine): one has chroma 30 or more and the other not, or both do and their hues are 25 degrees or more apart. Hues are compared as exact fractions, never as floating point; so a hue difference of exactly 25 degrees counts as two prints here, where the preview's colorsys floats may land a hair below 25 and call it one (no approved garment comes near a tie: the smallest margin in the corpus is 1.87 degrees).

bulge_white_tile

A white 32x32 tile in one direction, loaded once; copy it with icon() before drawing on it.

calculate_light_offset

Returns a list of x and y offsets to apply to our visual lighting position

calculate_projectile_angle_and_pixel_offsets

Calculates the pixel offsets and angle that a projectile should be launched at.

Arguments:

calculate_tgm_header_index

Generates a key matching our index

callback_on_everyone_on_z

Invokes a callback on every living mob on the provided z level.

callback_select

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

Callbacks can be repeated, to call it multiple times

Arguments:

can_be_headrev

Checks if someone is valid to be a headrev

can_hear_radio_tts

Checks if the passed mob can hear radio TTS

can_see

Step-towards method of determining whether one atom can see another. Similar to viewers() note: this is a line of sight algorithm, view() does not do any sort of raycasting and cannot be emulated by it accurately

capitalize

Returns a string with the first word of the string capitalized.

capitalize_word

Capitalizes the first symbol in a passed string. Unsafe when used with BYOND string macros, use capitalize() instead!

censor_ic_filter_for_pdas

Given a pda message, will replace any match in the message with grawlixs.

center_image

Center's an image. Only run this on float overlays and not physical Requires: The Image The x dimension of the icon file used in the image The y dimension of the icon file used in the image eg: center_image(image_to_center, 32,32) eg2: center_image(image_to_center, 96,96)

character_preview_animation

A look's animation, for a walk: its facings' patches, as one iconforge recipe, and the steps the page shows them in. flats is each facing's flat icon, stamped whether one flat walked facing UP serves them all (see uni_icon_facings_json()), and width and height the canvas they share.

What moves in a facing is split into regions: leaves whose boxes overlap move together, on one timeline, and apart each keeps its own, so a quick flap and a slow flick don't make one long animation between them. Every patch is the whole look at a step, drawn by iconforge and cropped to its region; they go side by side, top aligned, into one image, "moving".

Returns null when nothing moves; otherwise list("json" = the "moving" iconforge entry, in pieces that join into "moving":recipe, "facings" = facing -> list(list("box" = list(x, y, width, height) of the region, from the canvas's top left, "steps" = list(list(the patch's left edge in "moving", or -1 for the facing as drawn, ms shown), ...)), ...)). Either way, "pending" = TRUE if a state it shows waits to be read, so it moves only in a later drawing.

character_preview_drawing_under_way

Whether iconforge is drawing a character preview now, which letting go of what it keeps would spoil. tg's asset loader asks too, as it lets go on every fire once its queue has emptied. A drawing whose proc was killed stops counting after CHARACTER_PREVIEW_JOB_TIMEOUT.

character_preview_effects

What the page draws over the character preview's drawing, because a flatten leaves it out: the rows tg's height filters move, and the mob's transform (body size). Takes the drawing's frame height and how far its tile sits above the frame's bottom (the "y" the page gets). Returns the page's keys for them, left out when the mob has neither:

The page applies both to the drawing it already has, so a new height or body size needs no new drawing.

character_preview_flat_box

A flat icon's canvas, list(x1, y1, width, height): where its lower left pixel sits, counted from the flattened look's own (1, 1), and its size. A grown canvas says so itself; any other is its icon's, at (1, 1).

character_preview_glow

A look's glow, flattened facing dir onto box, its drawing's canvas as list(x1, y1, width, height) from the look's own lower left pixel, or null when nothing in it glows. always draws it whatever it holds, blank if nothing, for a facing whose drawing's other facings glow.

character_preview_glow_test_body

A preview body from preferences: lit is a lizard with emissive eyes and a glowing chest marking.

character_preview_glow_test_lit_pixels

How many of a glow's pixels light what is under them: red (blooming) or green, through any blockers.

character_preview_map_pixel_move

How one displacement map pixel moves its row: -1, 0 or 1 as character_preview_map_rows() has them, or null when it moves it sideways or by part of a pixel.

character_preview_map_rows

How a displacement map moves each of its rows, from the bottom: -1 when a row shows the row below, 1 the row above, 0 itself. FALSE for a map that isn't a tile wide, or whose rows don't each move whole and as one. tg's heights use a handful of shared maps, so each is read once.

character_preview_rows

The runs of frame rows that the mob's displacement filters move, as character_preview_effects() gives them, or null if there are none or one moves more than whole rows. Filters run in the order tg keeps them, each map centred on the tile and then moved by its own offset.

character_preview_turns_itself

Whether something redraws a mob when it turns, so each facing of it has to be walked on its own.

character_preview_walk

A look's facings as iconforge recipes, on one canvas that grows to fit parts that reach past the mob's tile, like big ears and wings: list("recipes" = facing -> recipe, "height" = canvas rows, "x" and "y" = how far the canvas reaches left of and below the tile).

One walk serves all four facings, stamped with each; see uni_icon_facings_json(). A mob something redraws when it turns, like a head whose worn feature offsets move glasses and hats to the side it faces (golems, Teshari), is turned and walked once per facing instead, each walk cropped to the canvas that fits all four.

With glow, a look with something that glows also gets "glow_recipes": each facing's glow on the same canvas; see character_preview_glow(). A look with nothing that glows draws no more than it would without.

With animate, a look with something animated also gets "animation": its patches and their steps; see character_preview_animation().

chastity_flavour

Sends optional server-owned flavour text. A checkout without private config sends no message.

chatter_speak

We're going to take a list that dictates the pace of speech, and a sentence fragment to say Then say() that fragment at that pace You can pass in a starting delay to wait before speaking the next sound

Checks a given message to see if any of the words are something we want to treat specially, as detailed below.

There are 3 cases where a word is something we want to act on

  1. Admin pings, like @adminckey. Pings the admin in question, text is not clickable
  2. Datum refs, like @0x2001169 or @mob_23. Clicking on the link opens up the VV for that datum
  3. Ticket refs, like #3. Displays the status and ahelper in the link, clicking on it brings up the ticket panel for it. Returns a list being used as a tuple. Index ASAY_LINK_NEW_MESSAGE_INDEX contains the new message text (with clickable links and such) while index ASAY_LINK_PINGED_ADMINS_INDEX contains a list of pinged admin clients, if there are any.

Arguments:

check_atom_crushable

Can this atom be curshed by the vending machine Arguments

check_behind

Checks to see if atom/source is behind atom/target

check_holidays

Checks that the passed holiday is located in the global holidays list.

Returns a holiday datum, or null if it's not that holiday.

check_pda_message_against_filter

Checks a PDA message against the IC/Soft IC filter. Returns TRUE if the message should be sent. Notifies the user passed in arguments if the message matched either filter.

check_target_facings

Returns the direction that the initiator and the target are facing

check_teleport_valid

Validates that the teleport being attempted is valid or not

check_topdown_validity

Checks if a passed in MA or atom is allowed to have its current plane/layer matchup

check_wall_item

Check if there is already a wall item on the turf loc floor_loc = floor tile in front of the wall dir_toward_wall = direction from the floor tile in front of the wall towards the wall check_external = truthy if we should be checking against items coming out of the wall, rather than visually on top of the wall.

check_whitelist

Checks whether someone's whitelisted or not. Will return FALSE if the whitelist hasn't been loaded yet (which shouldn't normally happen).

Returns TRUE if they are, null or FALSE if not.

check_zone

Convert a PRECISE ZONE into the BODY_ZONE

chem_splash

The basic chemical bomb proc. Combines a set of reagent holders into one holder and reacts it. If there are any reagents left over it spreads them across the surrounding environment. The maximum volume of the holder is temporarily adjusted to allow for reactions which increase total volume to work at full effectiveness. The maximum volume of the holder is then reset to its original value.

Arguments:

circle_range

Returns all atoms present in a circle around the center

circle_range_turfs

Returns a list of turfs around a center based on RANGE_TURFS()

circle_view

Returns all atoms present in a circle around the center but uses view() instead of range() (Currently not used)

circle_view_turfs

Returns a list of turfs around a center based on view()

claim_nova_import_prompt

One non-yielding claim enforces both cooldowns; persistent clients survive reconnects.

cleanup_expired_reta_grant

Cleans up an expired RETA grant from the active grants registry

cleanup_ghosts

Gives a farewell message and deletes the ghosts produced by a ghost portal structure.

Handles cleanup of all ghost mobs spawned a ghost portal. Iterates through the list and calls qdel on its contents, gives a short message, and leaves behind some goop. Stored as a global, as it is called immediately after the portal deletes itself.

cleanup_overmind_blobs

Clean up blob references after overmind is destroyed - called asynchronously to avoid blocking Destroy()

clear_owned_masked_leg_icons

Release owned metadata when the existing masked-leg cache is explicitly cleared.

clear_status_display_biohazard

Clear specific emergency types

clear_status_display_emergency

Clear a specific emergency type from status displays emergency_type: The specific type to clear ("biohazard", "lockdown", "radiation", etc.) If emergency_type is null, clears ALL emergencies

clip_pubic_hair

Returns pubic hair clipped to the bare skin under a baring underwear: each of its pixels is kept only where the body is drawn, the chest and legs, and outside the underwear's span in its row, from the underwear's leftmost pixel there to its rightmost, each direction on its own. The hair's colour is the overlay's, so it's left out: made once a round for each hair state, underwear sprite and body, a cached resource.

All of it is icon operations on the four directions at once. A row's span is the pixels with underwear at or left of them, and at or right of them: each found by spreading the underwear's pixels right, or left, by 1, 2, 4, 8 and 16.

Arguments:

clockwork_say

Causes the mob or movable in question to speak a message; it assumes that the message is already translated to ratvar speech using text2ratvar()

cmp_assoc_list_name

Passed a list of assoc lists, sorts them by the list's "name" keys.

cmp_autowiki_fish_sources_content

Sort the autowiki fish entries by their weight. However, duds always come first.

cmp_bodypart_by_body_part_asc

Orders bodyparts by their body_part value, ascending.

cmp_camera_ctag_asc

Orders cameras by their c_tag ascending

cmp_client_colours

Sorts client colors based on their priority

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.

cmp_custom_sprite_region_layer

Orders custom_sprite_region_map()'s images by layer, lowest first. sort_list() is stable, so region order holds within a layer.

cmp_dirt_parts_drawn

Sorts parts lowest drawn first: the higher layer number draws under.

cmp_dirt_underclothes_drawn

Sorts underclothes from dirt_underclothes_sprites() lowest first: the higher layer number draws under.

cmp_fish_fluid

Orders fish types following this order (freshwater -> saltwater -> anadromous -> sulphuric water -> any water -> air) If both share the same required fluid type, they'll be ordered by name instead.

cmp_heretic_knowledge

Orders heretic knowledge by priority

cmp_mob_health

Orders mobs by health

cmp_port_order_asc

Orders by integrated circuit weight

cmp_preview_region_cost

Orders regions by what all their patches would take, cheapest first.

cmp_rped_sort

Sorts stock parts based on tier

cmp_species_family_order

Sorts species family types by sort_order, lowest first.

Orders by uplink category weight

cmp_vending_prices

Orders vending products by their price

color_to_full_rgba_matrix

Converts RGB shorthands into RGBA matrices complete of constants rows (ergo a 20 keys list in byond). if return_identity_on_fail is true, stack_trace is called instead of CRASH, and an identity is returned.

color_transform

Constructs a transformer, with optional color multiply pre-added.

colorize_string

Gets a color for a name, will return the same color for a given string consistently within a round.atom

Note that this proc aims to produce pastel-ish colors using the HSL colorspace. These seem to be favorable for displaying on the map.

Arguments:

compare_list

compare two lists, returns TRUE if they are the same

condo_flat_render

Flattens a loaded room to a clean top-down icon: floors then objects, no lighting or parallax planes (those are what turn the picture into garbage).

condo_force_areas

Moves every reserved tile into a fresh /area/misc/condo so the room links up correctly.

condo_preview_asset_name

Asset name for an interior from its map path (".../alleyway.dmm" -> "condo_alleyway.png").

condo_sanitize_lamp_color

A valid "#rrggbb" lamp color or "" (default) - never trusts a raw client string.

condo_skip_turf

TRUE for turfs we don't want in the picture: the empty space around the room and the yellow cordon tiles the maps use as a boundary.

condo_validate_custom_map

Loads the template once into a temp reservation to confirm it loads + has a condo door, fixes its areas in the process, then frees it. Returns TRUE if it's usable.

considered_afk

Checks if a player is considered AFK

considered_alive

Checks if the passed mind has a mob that is "alive"

Returns TRUE if they're alive, FALSE otherwise

considered_escaped

Checks if the passed mind is considered "escaped".

Escaped mobs are used to check certain antag objectives / results.

Escaped includes minds with alive, non-exiled mobs generally.

Returns TRUE if they're a free person, or FALSE if they failed

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.

construct_phobia_regex

Creates a regular expression to match against the given phobia Capture group 2 = the scary word Capture group 3 = an optional suffix on the scary word

convert_integer_to_words

Takes an integer up to 999,999,999 and returns it in words. Works with negative numbers and 0.

Arguments:

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.

coords2turf

Converts a list of coordinates, or an assosciative list if passed, into a turf by calling locate(x, y, z) based on the values in the list

copy_appearance_filter_overlays

Copies the passed /appearance, returns a /mutable_appearance

Filters out certain overlays from the copy, depending on their planes Prevents stuff like lighting from being copied to the new appearance

cosmic_trail_based_on_passive

If we are a cosmic heretic, this will return the appropriate effect trail based on our passive level. returns the default trail otherwise

count_by_type

return the amount of items of the same type inside a list

cracker_reactions_list

Global proc to build up the list of co2 cracker reactions

create_announcement_div

Inserts a span styled message into an alert box div

Arguments

create_atmos_zone

Create an atmos zone (Think ZAS), similiar to [proc/detect_room] but it ignores walls and turfs which are non-[atmos_can_pass]

Arguments source - the turf which to find all connected atmos turfs range - the max range to check

Returns a list of turfs, which is an area of isolated atmos

create_basketball_game

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

create_cosmic_field

Creates a cosmic field at a given loc

create_ctf_game

Creates a CTF game with the provided team ID then returns a reference to the new controller. If a controller already exists provides a reference to it.

create_delusion

Helper to give the passed mob the ability to create a delusion hallucination (even a custom one). Returns a list of arguments - pass these to _cause_hallucination to cause the desired hallucination

create_girder_wall_recipes

Returns a list of newly created /datum/girder_wall_recipe instances from the given wall type lists.

create_glass_styles

Constructs a nested list of glass style singletons

List format:

Where

Returns the list.

create_mafia_game

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

create_ooc_announcement_div

Inserts a span styled message into an OOC alert style div

Arguments

create_random_books

Create a random book or books.

create_random_puzzgrid

Returns a random puzzgrid from config. If config is empty, or no valid puzzgrids can be found in time, will return null.

create_separatist_nation

create_separatist_nation()

Helper called to create the separatist antagonist via making a department independent from the station.

Returns nothing.

create_strippable_list

Creates an assoc list of keys to /datum/strippable_item

Selects a set number of unique items from the uplink, and deducts a percentage discount from them

credits_to_spacecash

Takes an amount of credit and returns a list of space cash typepaths that are equivalent to that amount. For example, if you passed 450 credits, it would return a list with a c200, another c200, and a c50 space cash stack typepath. You can then use the list to new() all the types provided if you wanted to give a player that amount in space cash.

cult_ending_helper

Selects cinematic to play as part of the cult end depending on the outcome then ends the round afterward called either when narsie eats everyone, or when [/proc/begin_the_end()] reaches its conclusion

cure_curse_of_babel

Mainly so admin triggered tower of babel can be undone

custom_hair_appendage_name

An appendage name as saved: tags, stray angle brackets, backslashes and control characters removed, spaces collapsed, at most CUSTOM_SPRITE_MAX_APPENDAGE_NAME characters. Null when nothing is left.

custom_hair_appendage_views

An appendage's painted views, re-encoded canonically. Unreadable and empty views are left out.

custom_hair_appendages_export

Appendages in export form: every view and emission setting spelled out, keyed as saved. Null without any.

custom_hair_appendages_validate

A drawing's appendages as they are saved, keyed "1", "2", "3" in order, or null when none are left.

The keys are strings so deep_copy_list() copies each record instead of turning it into a key. An entry that isn't a record, attaches at an unknown zone, sits neither under nor over hats or has no paint is dropped on its own, and a missing or unusable name becomes "Appendage N". Entries past CUSTOM_SPRITE_MAX_APPENDAGES are dropped.

custom_hair_appendages_validate_strict

Strictly validates a style file's appendages, as custom_style_validate_drawing() does its views. Nothing is salvaged, and messages never repeat uploaded text.

Arguments:

Returns list("appendages" = canonical appendages) or list("error" = message).

custom_hair_try_on_image

The hat a try-on puts on the preview: its worn sprite on the head layer, placed as the body places head items.

custom_hair_try_on_mask_rows

Where a try-on hat's hair mask keeps and trims paint on the hair canvas: per view, height rows, top row first, of eight hex digits. Each digit is four pixels, the leftmost in its high bit: set where the mask keeps paint, clear where it trims. That's a quarter of a character a pixel, and the window sends these with every rebuild. The mask is lowered by the hairstyle's y_offset and carried upward as its top row, as it is on the paint itself. Cached.

custom_hair_try_on_ui_data

The window's Try on hats for a hair canvas height tall, drawn lift off the tile, over a hairstyle lifted y_offset. The window crops its "Hats that cover it" chips from the front views itself: BYOND exports an icon smaller than a tile padded out to 32 by 32.

custom_hair_try_on_views

A try-on hat as the hair canvas shows it, per view: its worn sprite placed against paint drawn lift = list(x, z) off the tile. Data URLs, cached.

custom_limb_markings_validate

Zone drawings keep the existing codec; discard unknown zones and independently copy each valid drawing.

custom_marking_partner

The other half of an arm/hand pair, which share one limb, or null.

custom_marking_zone_limb

The bodypart that carries a marking zone's paint.

custom_marking_zone_overlay_type

The overlay identity for a marking zone, so zone, hand and taur paint on one bodypart stay independent.

custom_marking_zone_width

A zone's own drawing width: the taur spans the wide canvas, everything else the body's 32 pixels.

custom_sprite_all_views

The drawing's own view list, then each appendage's: live references, so writes change the drawing.

custom_sprite_appearance_drawing

Appearance copies honor the master preference without changing saved layer settings, appendages' included.

custom_sprite_append_mask

Adds paint's glow mask (glowing) or blocker mask to overlays for the facings whose emissive setting matches, placed like visible. Adds nothing when no facing matches. Dropped heads and limbs face South.

custom_sprite_apply_region_results

Puts every region's drawing and base markings on a body, then redraws it once.

custom_sprite_apply_round_style

Changes a live body's round appearance for one drawing target.

DNA keeps the edit for regenerated limbs; attached donor parts retain their other snapshots. Normal redraws preserve native markings, skin and the unedited custom layers.

custom_sprite_apply_round_styles

Changes a live body's round appearance for several drawings, redrawing it once.

Tattoo regions go on together through custom_sprite_apply_region_results(); a hair target redraws only the hair.

custom_sprite_background_tiles

Nova's character preview backgrounds as tiles for the custom editors' background swatches.

custom_sprite_blank_icon

A blank in every editable direction, including bald hairstyles without an icon state. Insert() alone leaves an empty icon reporting 0x0, so seed its dimensions from the blank.

custom_sprite_body_draw_mask

Row strings keep the wire payload small and test the same silhouette used by rendering. wrist gives a hand its wrist band.

custom_sprite_body_draw_mask_key

What custom_sprite_body_draw_mask() draws a zone's silhouette from, as text: the canvas, the zone, and the icons and states of the limbs that draw it. The same key draws the same mask, so it stands for the mask's rows in other keys.

custom_sprite_body_silhouette

Compose geometry in the canvas frame without stretching or changing the body's origin. wrist gives a hand its wrist band.

custom_sprite_boxes_recipe

A blank tile with these iconforge transforms applied in order, such as DrawBox boxes, as a recipe, or null for none.

custom_sprite_cache_put

Keep runtime caches bounded. Callers treat cached icons/lists as immutable.

custom_sprite_canvas_bounds

Full canvas for hair and facial hair; per-view locks are applied separately.

custom_sprite_canvas_code

A palette index as digits characters of CUSTOM_SPRITE_INDEX_ALPHABET, most significant first.

custom_sprite_color

A colour as #rrggbb lowercase, or null when the text isn't exactly that.

custom_sprite_compat_sidecar

A whole account sidecar as the branch wrote it, one slot with every key, and what loading it must give back.

custom_sprite_compat_v1

Old-format drawings as the branch's own writer stored them, built without any codec proc so a codec change can't regenerate them. v1, two colours: pixel (0,0) is colour 1 and (1,0) colour 2 in the Front view; 1,022 empty pixels follow (68 runs of 15 and one of 2).

custom_sprite_compat_v1_legacy_emissive

v1 as an even older save wrote it: one emissive flag for every view, an explicit filter, a solid Front view (68 runs of 15 and one of 4).

custom_sprite_compat_v2

v2, all 63 colours in the Front view's first row, a solid Back view of colour 63, per-view emission.

custom_sprite_compat_v3

v3, the 64-wide taur zone, one colour everywhere in the Front view (136 runs of 15 and one of 8).

custom_sprite_compat_v4

v4, a tall hair canvas: first and last Front pixels are colour 1; Back is solid colour 2.

custom_sprite_compose_regions

Builds the whole-body canvas from each region's saved drawing.

Each pixel shows its owner's paint. An arm and its hand share one limb and hand paint draws above arm paint, so at a pixel either of them owns the hand's paint wins and the arm's shows where the hand has none. Paint hidden under a different limb isn't shown, as in game.

Arguments:

Returns direction -> 32 rows of width "#rrggbbaa" colors, the workspace frame format.

custom_sprite_cover_char

The mark that names looks[index] in cover rows: 1 to 9, then a to z.

custom_sprite_cover_labels

The looks' labels in mark order, for the window's tooltip.

custom_sprite_cover_looks

The looks that can hide paint: the hair, every mutant part drawn on the body, each piece of underwear and, given a wearer, each item they have on. Each look carries its images, offset the way get_limb_icon() draws them, the highest layer it draws on and a label for the window; worn items are also marked worn. Looks come lowest layer first, so stamping them in order leaves the topmost part at each pixel. Parts behind the body, hidden parts, the taur body (which carries its own paint) and emissive images are left out. key, when given, collects what each look is drawn from and where it lands, so rows flattened from these looks can be cached by geometry.

custom_sprite_cover_rows

One view of the cover looks as rows of marks: "0" where nothing covers, else the mark of the topmost look (custom_sprite_cover_char(N) for looks[N]). Only images drawn after above_layer count, so the same looks serve body paint and hand paint. bounds (0-based, inclusive x0, y0, x1, y1) limits the pixel reads to the drawable box; outside it is clear. With cache_key (from custom_sprite_cover_looks), the same look reuses its rows across rebuilds and editors.

custom_sprite_cover_worn

Which looks, in mark order, are worn items (1) rather than parts of the body (0), for the window's tooltip.

custom_sprite_covered_positions

Where a region's paint in one view sits under a different limb or outside every region.

The canvas never shows paint there. Pixels its arm/hand partner owns aren't included, since the canvas shows their paint.

Returns positions in colors, a region's pixels in one view, that hold covered paint.

custom_sprite_decode_grid

Reject before expanding, and stop at the supported pixel count even for hostile runs.

custom_sprite_direction_signature

One view's pixels as color text, so two drawings compare by what they show, not palette order. Appendages' pixels in that view follow the hair's.

custom_sprite_directional_mask

Include explicit blank frames: a missing facing would fall back to the South mask.

custom_sprite_draw_recipes

Draws recipes with iconforge, a picture each, on the main thread: a few tenths of a millisecond per picture, where getFlatIcon() takes several for one view of a body. Each PNG goes to publish, a data URL of it when there's none. Returns view -> what publish made of it.

With a name, the files are kept where custom_sprite_picture_path() says, each drawing under the name overwriting the last: making and deleting a file costs more than drawing the picture. Their owner deletes them with custom_sprite_forget_pictures(). Without one, each file is deleted once published.

custom_sprite_drawing_pixels

One drawing's pixels as colors, row-major from the top left.

An explicit tint is baked in, so the colors are what the game shows. A drawing of the wrong width for its zone, or no drawing at all, reads as empty.

Returns direction -> list of width * 32 entries: "#rrggbb", or null for transparent.

custom_sprite_emissive_mask

Reuse the visible paint's placement; shared worn/bodypart preparation owns pose transforms.

custom_sprite_emissive_settings

Older drawings used one boolean; each view now owns its own saved choice.

custom_sprite_encode_grid

Each run is a hex length (1-f), followed by one palette-index character. Coordinates are row-major from the top left, matching SpriteEditor.

custom_sprite_extend_up

A copy of a 32-row icon grown to height rows, its top row repeated upward, so hair masks and gradients carry on over tall paint.

custom_sprite_flat_icon

Clip in body coordinates before flattening can expand a wide or offset overlay's origin. A tall canvas reaches above the tile, and shift_x and shift_z move the whole window the way a lifted hairstyle moves the paint drawn over it.

custom_sprite_forget_pictures

Deletes the pictures kept under a name, and under any name it begins.

custom_sprite_grid_args_valid

Grids are 32 rows of 32 or 64 pixels, or CUSTOM_SPRITE_TALL_HEIGHT rows of 32, indexing a palette of 1 to CUSTOM_SPRITE_MAX_COLORS colors.

custom_sprite_hair_canvas_height

The hair canvas a base look asks for: tall for custom hair over the tall bald base, otherwise 32 rows.

custom_sprite_hair_cover_key

The look the head's hair images were built from: those icons are generated at runtime and can't be keyed by path.

custom_sprite_hair_lift

Where a body's hair, and custom hair painted over it, are drawn from the tile, as list(x, z) pixels. A hairstyle drawn above the head, such as Afro (Huge), lifts both, as the species' hair offset does. style names a hairstyle other than the body's own.

custom_sprite_hand_silhouette

A hand's own pixels plus, with wrist, a short band of the arm just above them, so hand paint can't climb the arm.

custom_sprite_hash

Content identity of a whole drawing, "empty" for none.

custom_sprite_height

Tall hair drawings are version 4; every other drawing is 32 rows.

custom_sprite_history_jump

Clamps an undo or redo step count to what a window can ask for. Anything else passes through for the history to refuse.

custom_sprite_hydrate

Paints a drawing into a workspace's frames, centred on a wider canvas and at the bottom of a taller one.

custom_sprite_icon_bounds

Inclusive bounds in the editor's top-left coordinate system.

custom_sprite_icon_rows

Each view of a 32-row icon as row strings from the top, width characters each: "0" where it's clear and "1" where it has a pixel. With ids (colour -> region character) a pixel reads as its colour's region instead, and a blend as the region custom_sprite_region_fallback() finds in ordered.

custom_sprite_index_values

CUSTOM_SPRITE_INDEX_ALPHABET character -> its palette index. "0" is transparent.

custom_sprite_insert_marking_icons

Adds each zone's native marking once to the same cached sheet used by hair preferences.

custom_sprite_lifted_hair_test_top

The topmost painted pixel of a hairstyle's front view, as list(x, y) counted from the bottom left.

custom_sprite_limb_appearance

A body without its hair, so nothing hanging off the head covers the limb being drawn on.

A copied appearance holds appearances, not the images they were built from, so subtracting the mob's own hair overlays silently does nothing. Dropping the layer through the mob and putting it straight back does, and nothing else reads the body in between.

custom_sprite_limb_state

Raw limb geometry, using exactly the state selection in get_limb_icon().

custom_sprite_live_package

The recipient's live style for one target. Hair includes the whitelisted base hair look.

custom_sprite_live_package_from

The live form of an applied package: emission follows the body's current permission.

custom_sprite_live_packages

The recipient's live look for every drawing a salon target covers, by style key.

Markings cover every zone, including ones this body lacks right now, so a limb attached later is still told apart from the one work started on.

custom_sprite_marking_icons

Immutable per-zone marking classes, shared by character setup and tattoo editors.

custom_sprite_mask_bounds

Each view's paintable area padded by one pixel, from row-string masks.

custom_sprite_mask_pixels

The pixels a compact stroke mask of size characters marks, or null when it is another size, which custom_sprite_mask_points() refuses unread, or a character isn't in the alphabet.

custom_sprite_mask_points

A stroke's points from its compact mask: CUSTOM_SPRITE_INDEX_ALPHABET characters, six canvas pixels each, row-major from the top left, lowest bit first. A whole view fits in one short string, so a long stroke reaches the server as one message instead of a point list tgui splits into many. With allowed, the mask's six-pixel slots in the same layout, each character is cut down to the pixels its slot allows as it is read, which checks the points for a canvas that paints only those.

Returns list(list(x, y), ...), or null when the mask isn't exactly this canvas's size.

custom_sprite_mask_tables

Reads compact stroke masks by character code, which text2ascii() takes far faster than copytext() cuts a character.

Returns:

custom_sprite_merge_cover_rows

One view's cover rows with each pixel judged against the layer its own region's paint draws on.

Body paint sits at BODYPARTS_LAYER and takes body_rows; hand paint sits at the hand's aux layer and takes high_rows; taur paint rides the taur's own top layers and is never covered. Pixels no region owns stay clear. Without a region map the body rows stand as they are.

custom_sprite_native_marking_icons

Full-size mirror sprite classes for markings whose sheet is larger than a tile. The ordinary 32x32 markings reuse their picker sprite. Kept beside the picker in the same preferences asset, so hovering requests no drawing.

custom_sprite_obstructing_overlay

Whether a bodypart overlay hangs over the limb's paint: every mutant part except the taur body, which carries its own paint, and a moth chest's extra arms.

custom_sprite_packages_hash

One content hash for a set of packages, so a change to any of them shows.

custom_sprite_paint_icon

Called by debounced previews and appearance rendering, never by the per-stroke UI payload. Throwaway drawings skip the cache.

custom_sprite_palette_colors

The colours a saved or uploaded palette offers, canonical and lowercase.

Returns null when an entry isn't a colour or repeats one. With strict, an entry that carries a value (the palette written as an object rather than an array) is refused as well, as uploads and the account palette are; stored drawings stay lenient about it, as they always have.

custom_sprite_picture_icon

A drawn PNG as a native icon, for reading its pixels.

custom_sprite_picture_path

Where custom_sprite_draw_recipes() keeps the picture of one view drawn under a name; size is "[width]x[height]".

custom_sprite_picture_url

A drawn PNG as the data URL a window shows.

custom_sprite_pixel_hash

Tint and emissive settings affect appearances, not the drawing's raw pixels.

custom_sprite_pixels_drawing

Encodes one region's pixels as a canonical, literal-color drawing.

Returns list("drawing" = drawing, or null when nothing is painted), or list("error" = text) when the region would need more than CUSTOM_SPRITE_MAX_COLORS colors.

custom_sprite_placement_key

Where an image lands when flattened: its offsets and layer. Its art is keyed separately.

custom_sprite_present_regions

The marking regions this body can be painted on right now, in draw order.

Limbs follow the body's own render order (get_all_limbs(), as update_body_parts() draws them). Each hand comes straight after its arm, because hand paint draws above arm paint on that limb. A visible taur comes last; its native layers sort it in front of or behind the rest when the map is composed. Missing limbs, stumps and invisible taur legs have no region, and a hand only exists through its arm.

custom_sprite_preview_appearance

A body's look with worn overlays added, captured so its views can be flattened one at a time.

custom_sprite_preview_height

The rows a body's pictures need: taller while its hair drawing reaches above the head, and taller again for a hairstyle drawn above it, such as Afro (Huge). style names a hairstyle other than the body's own.

custom_sprite_preview_width

The canvas width a body's previews are flattened at: a taur organ widens it.

custom_sprite_private_view

One region's pixels in one view, copied on first write, since decoded pixels may be shared with the caller's cache.

custom_sprite_region_color

Region N's ID color. Regions paint nothing else, so a pixel of this color is unambiguous.

The colors sit on a circle, so a blend of two regions at an antialiased edge falls inside it and never reads as a third region.

custom_sprite_region_fallback

The region that dominates one blended pixel, as its region character.

Images composite from the top down, so each one's share of the pixel is its alpha times what the images above it left showing. A tie goes to the higher image.

custom_sprite_region_id_drawing

A solid drawing of region N's ID color across one editing mask, or null when the mask is empty.

custom_sprite_region_map

Which region owns each canvas pixel, in every view.

Every region's pixels are filled with its ID color and pushed through its real overlay type, so the hand/arm layering, the leg split and the taur's native layers all apply as they do in game. A hand counts only its own pixels: its drawing may also paint the arm rows just above it, but those stay the arm's, so the arm's region runs its whole length. The images are composed in draw order (by layer, then region order) and the result is read once per view. A blended edge pixel goes to the region that dominates it. Maps are cached by the geometry that produced them.

Arguments:

Returns direction -> 32 row strings of width characters: "0" for no region, "N" for zones[N].

custom_sprite_region_mask

The paintable mask of a region map: every pixel an unlocked region owns. locked holds region characters.

custom_sprite_region_owner

The region owning a canvas pixel (0-based), or null.

custom_sprite_region_pixel

One region's color at a canvas pixel, or null.

custom_sprite_region_position

Where a canvas pixel falls in one region's own drawing, which may be narrower than the canvas. 0 when outside it.

custom_sprite_region_signature

A cheap fingerprint of one marking zone's live look: its paint's hash and its native markings.

Looks with the same fingerprint have the same package hash, so a matching fingerprint spares the full comparison.

custom_sprite_region_visible

What the game shows at a canvas pixel: its owner's paint, with a hand's paint over its arm's.

custom_sprite_render_views

Front, Back, Right and Left data URLs of a captured look, without flipping any view, from one walk. Each picture's PNG goes through the callback when one is given, in GLOB.cardinals order, and is kept under name when one is given; see custom_sprite_draw_recipes().

custom_sprite_reopen_test_drawing

A version 1 drawing with one pixel painted at x, y in its Front view.

custom_sprite_resize_drawing

Fits canonical paint to a larger canvas: centered on a wide one, at the bottom of a tall one, so it keeps its place on the body. Refuses shrinking, so no paint can be lost.

custom_sprite_run_text

One index character repeated run times (1-15), cut from a string built once per character.

custom_sprite_salon_changes

Region labels a set of packages changes, in body order. Hair packages name none.

custom_sprite_salon_choose_draft

Asks which retained draft to reopen. Sleeps on the prompt.

custom_sprite_salon_claim_request

Claims the recipient's single incoming prompt and the pair's request cooldown.

custom_sprite_salon_draft_key

Where an artist keeps their draft for one drawing target on one person.

custom_sprite_salon_dummy

Builds a private preview body from a live body's current appearance.

This deliberately avoids generate_dummy_lookalike(), which reapplies saved preferences and can undo round changes. Only appearance data is copied: no inventory, mind, quirks or effects. Replaced and missing limbs follow the source body.

custom_sprite_salon_export_live

Sends a player their own live look for a salon target: one file for hair, a whole-body file for a tattoo.

custom_sprite_salon_keys

Style keys a salon target covers: the hair target itself, or every marking zone.

custom_sprite_salon_label

What salon work on a target is called. A zone names where a tattoo is; without one it's the whole body's.

custom_sprite_salon_open_draft

Reopens a retained draft for its artist, rebinding the artist's body and tool.

custom_sprite_salon_previous

Style key -> a copy of the look each of a target's drawings had before its last salon change, for those that have one. keys limits it.

custom_sprite_salon_request

Asks a recipient to start custom work, then opens the artist's editor. Sleeps on prompts.

Call through INVOKE_ASYNC from item interactions. Every condition is checked again after each prompt, because either player may have moved, changed bodies or disconnected meanwhile.

custom_sprite_salon_request_restore

Asks a recipient to restore the looks they had before their last salon change. Sleeps.

Restoration uses the same preview, consent and timed application as new work, but has no draft. A tattoo with more than one region to restore asks whether to restore the whole body or one region.

custom_sprite_salon_restore_choices

What Restore previous offers for several previous looks: the whole body, then each region by name. Label -> style keys.

custom_sprite_salon_restore_problem

Why an artist can't start restoring previous looks, or null. keys limits which looks count.

custom_sprite_salon_resume

Resumes a retained draft from a tool's self-use action. Sleeps only when asking which one.

Returns TRUE when this tool had something to resume.

custom_sprite_salon_session

The artist's retained draft for one drawing target on one person, or null.

custom_sprite_salon_sessions_for

Every draft this artist has, newest last.

custom_sprite_salon_sessions_for_tool

The drafts this tool can resume.

custom_sprite_salon_start_problem

Returns why an artist can't start work on a recipient, or null when they can.

Starting requires two distinct connected players, a supported human recipient, adjacency and the right tool in hand. The drawing target must exist and be reachable; for a tattoo, some part of the body.

custom_sprite_salon_start_restore

Shows the recipient previous looks to restore, in the mirror. keys limits them to the chosen ones.

Regions that can't be worked on right now, such as covered ones, are left out and named, as long as something is left to restore.

custom_sprite_salon_target_problem

Why a drawing target can't be worked on. Markings without a zone mean the whole body. Addresses the recipient when they're doing the work.

custom_sprite_salon_tool_menu

Offers new custom work or restoration of the previous round style, then starts the request. Sleeps.

Arguments:

custom_sprite_sample_hair_palette

Bake effective hair color into source shades; gradients already supply their own RGB.

custom_sprite_sample_palette

Sample the most frequent opaque shades from all four authored directions.

custom_sprite_self_mirror

Whether someone can see the parts of themselves they can't look at directly.

A hand mirror you're holding, or a mounted mirror you're standing by.

custom_sprite_shade

A sampled shade multiplied by a colour's channels, exactly as painted hair shades have always been built. Not custom_sprite_tint_color(): that rounds as the window does, and recolours match paint by these exact values.

custom_sprite_sidecar_path

The drawing sidecar beside a preferences.json path, or null when the path has no directory.

custom_sprite_silhouette

White RGB and original alpha: multiplying by this clips without darkening the paint.

custom_sprite_split_regions

Splits the canvas back into each region's drawing, changing only what was edited.

A pixel is edited when the canvas differs from the baseline. An edited pixel goes to its owner, and leaves the owner's arm/hand partner so the old paint can't show through. Every other pixel, including stranded paint and paint hidden under a different limb, keeps its saved value, except in views where Clear, an import or a restoration replaced the region outright.

Arguments:

Returns zone -> list("drawing" = drawing or null, "changed" = TRUE/FALSE, "error" = text or null) for every zone in zones and drawings. Unchanged zones return their saved drawing.

custom_sprite_tall_hair_test_drawing

A 32 by 48 hair drawing with one pixel painted, in every view. Rows count down from the top.

custom_sprite_tall_hair_test_short_drawing

A 32 by 32 hair drawing painted in every view, once in its top row and once in its bottom row.

custom_sprite_taur_overlay

The taur organ owns its visible body; its two leg placeholders have no paintable pixels.

custom_sprite_taur_paint_test_drawing

A 64 by 32 taur-zone drawing painted solid in one color, in every view.

custom_sprite_taur_silhouette

Native taur geometry in its centered 64 by 32 frame, shared by editing and rendering.

custom_sprite_test_canvas_mismatch

Returns where the window's canvas, as an update encodes it, differs from the drawing: the first pixel of a view it carries that doesn't decode to the pixel there, or null when every one does, as a whole encode would.

Arguments:

custom_sprite_test_close_pixel

Whether two GetPixel() results are the same colour to within the rounding iconforge and BYOND's icon procs differ by.

custom_sprite_test_drawing

A version 1 drawing painted solid with palette index shade in every view.

custom_sprite_test_front_drawing

A drawing with one painted pixel, in the Front view only.

custom_sprite_test_hidden_pixel

A pixel a region's own mask covers but a different limb owns on the canvas, as list(direction, x, y), or null.

custom_sprite_test_lit_pixels

Pixels of a picture that light what is under them on the emissive plane, red or green, as list("x,y").

custom_sprite_test_open_region_pixel

The middle of a region's pixels in a view that nothing drawn over the body covers, as list(x, y), or null.

custom_sprite_test_paint_region

Paints one pixel a region owns with the first color the canvas offers.

custom_sprite_test_paintable_point

The first pixel this draft may paint in one view.

custom_sprite_test_pool_colors

Saves up to count distinct colors across the body's regions in the Front view, a few per region, and returns how many it placed.

custom_sprite_test_region_drawing

A drawing with the same pixels in every view. Points are list(x, y, "#rrggbb").

custom_sprite_test_region_fixture

Chest owns x 0-3, the left arm 4-7 and the left hand 8-9 on the first row.

custom_sprite_test_region_pixel

The first canvas pixel a region owns in one view, as list(x, y), or null.

custom_sprite_test_region_rows

A region map whose first row is first_row (padded with "0") in every view; every other row is empty.

custom_sprite_test_region_seam

A front-view pixel of upper right above a pixel of lower, as list(x, y) of the upper one, or null.

custom_sprite_test_region_workspace

A region workspace over two regions on the first row: "1" at x 0-3, "2" at x 4-7.

custom_sprite_test_remove_sidecar

Deletes a sidecar's primary, backup and staging files.

custom_sprite_test_same_pixels

Whether two icons have the same pixels in every cardinal view of their 32 by 32 area.

custom_sprite_test_selection_placement

The compact placement the selection tool sends for a temporary picture or a final drop.

custom_sprite_test_taur

The real external organ path, including its hidden leg slots and matrixed sprite layers.

custom_sprite_test_wide_drawing

A version 3 taur-zone drawing whose every row is row (64 indexes), solid colour 1 by default.

custom_sprite_tint_color

Match the Custom palette's frontend multiplication and nearest-integer channel rounding.

custom_sprite_transaction_pixels

How many pixels a stroke or placement touches, from what the window sent, before any validation.

custom_sprite_underwear_looks

Each piece of underwear the body shows, as a look of its own: underwear, bra, undershirt and socks.

custom_sprite_validate

Reconstruct a bounded, canonical payload. Missing directions are ordinary empty canvases. Only hair passes allow_appendages; other drawings lose any.

custom_sprite_version

Wide canvases are version 3 and tall ones version 4. Otherwise version 1 holds up to 15 colors and version 2 the rest.

custom_sprite_view_recipes

A look in custom_sprite_flat_icon()'s window, facing each of the editors' views, from one universal icon walk: view -> iconforge recipe. custom_sprite_draw_recipes() draws them.

custom_sprite_width

The format owns the canvas dimensions; legacy drawings always remain 32 by 32.

custom_sprite_worn_looks

What the wearer has on, a look for each worn item, labelled by its name. Held items are left out.

custom_sprite_worn_overlays

This body's worn clothing overlays, in layer order. Held items are left out.

custom_sprite_zone_covered

Returns whether worn clothing covers a marking zone.

This reads the same worn coverage flags as other clothing checks, but per zone: a rolled-up jumpsuit exposes the arms, and gloves only cover the hands rather than the whole arm.

custom_sprites_after_import

Imports replace the character identities, so an old slot's drawings cannot carry across.

custom_style_apply_base_markings

Change only this limb/hand's native markings and its DNA snapshot. The caller redraws the body.

custom_style_apply_hair_context

Applies a whitelisted hair look to a live or preview body.

custom_style_body_export_text

Whole-body export: every region's drawing and base markings in one file.

custom_style_copy_markings

Copy record arrays without deep_copy_list() turning their list values into associative keys.

custom_style_copy_package

Canonical packages own every drawing, native context and marking record they carry.

custom_style_copy_previous

Keep each previous package's native record array independent and JSON-serializable.

custom_style_emissive_problem

Why a drawing's or appendage's emission settings are refused, finishing "The drawing's ...", or null when they're fine or absent.

custom_style_export_drawing

A drawing in export form: all four views and their emission settings, or null for empty art.

custom_style_export_text

The export format always includes all four views and their emission settings.

custom_style_file_label

The download name for a package: custom-hair-style, custom-facial-hair-style, custom-tattoo- or custom-markings.

custom_style_gradient_key

The gradient key a head target stores under.

custom_style_hair_accessories

The accessory list a head target draws on.

custom_style_hair_color_map

Maps painted hair shades from one base hair look to another.

Only a recolor of the same hairstyle maps: different hairstyles have their own shades, so their paint keeps the colors it was drawn with. Shades that collapse onto one color under the old look are ambiguous and left alone, as are the account's saved custom colors.

Returns list(old color = new color), or null when nothing should move.

custom_style_hair_gradients

The gradient list a head target draws from.

custom_style_hair_preference_types

Every preference a head target's base look is saved in: its fields, plus head hair's opacity toggle.

custom_style_hair_shades

The hairstyle's shades tinted by a hair look's color, in sampling order and without merging. Palettes dedupe these; recolors need the positions to line up between two looks.

custom_style_hair_slot_data

Returns an updated copy of a character's save data, or null when that slot has no data.

custom_style_hair_target

Whether a drawing target is head hair or facial hair.

custom_style_has_emission

Whether any view of a drawing glows.

custom_style_key

The key a style is stored under: the target, or markings:zone.

custom_style_live_hair_context

A body's live base look for a head target, read from its head when it has one.

custom_style_marking_conflict

Returns the marking a region's rows already wear that keeps another off it: one of its exclusion group. The preview and saving set a region through set_zone_from_list(), which drops the second marking of a group, so the editor refuses it first.

Arguments:

Returns:

custom_style_marking_data

Convert validated records back into the native marking renderer's ordered map.

custom_style_marking_entries

Ordered, portable records for native markings: a limb's or a collection zone's entries, or a zone's saved nested shape.

custom_style_markings_slot_data

Copy a character's saved native markings and replace exactly the selected zone, including Clear.

custom_style_matches

Compare a legacy drawing-only package with the base markings it would preserve.

custom_style_normal_color

A colour as the preference writer stores it, black when invalid.

custom_style_normal_opacity

Keep explicit opacity, including fully opaque hair on naturally translucent species.

custom_style_package

A canonical package that owns copies of its drawing, hair look and markings.

custom_style_package_hash

Content identity for proposals, rotations and unchanged checks.

custom_style_paint_outside

Returns the first view with paint outside the destination's allowed pixels.

Arguments:

Returns:

custom_style_parse

Parses an uploaded style file into a package.

Envelopes must match the export format exactly. Strictly valid legacy drawing-only files are also accepted; they return legacy so the open editor can supply its own target and hair look.

Returns:

custom_style_previous_validate

Previous styles are trusted disk data, but still pass the strict package validator.

custom_style_read_file

A file's text, or null when it's missing or larger than max_bytes.

custom_style_receive

Asks a player for a style file and parses it. This sleeps while the file dialog is open.

The byte size is checked before the file is read. BYOND has already received the upload by then, so this limit protects parsing, not the transfer itself. Callers must recheck ownership, slot, session and draft revision after this returns.

Returns:

custom_style_recolor_drawing

Rewrites literal-color paint through a color map, keeping every pixel where it is.

Legacy no-tint paint already follows native hair coloring, so its raw shades must not change. Entries that collide after mapping are merged into one palette slot, so a recolor can shrink the palette but never reorders or moves paint.

Returns:

custom_style_rewrite_markings

Rewrites a limb's native marking records. Markings are stored by name, so one limb can't wear the same marking twice, and their order is kept.

Arguments:

Returns the new ordered records, or null when there's no marking at index.

custom_style_send

Sends one package to a client as a downloaded file.

custom_style_send_body

Sends a whole-body style to a client as a downloaded file.

custom_style_send_text

Sends export text to a client as a downloaded file.

The temporary file uses a fixed directory and a server-generated name; nothing from the contents becomes a path. It is removed on every exit path.

Returns:

custom_style_spawned_slot_problem

Returns why a body's style can't be saved to the selected character slot, or null when it can.

Without these checks a save could land on whichever character happens to be selected in character setup instead of the one this body spawned as.

custom_style_test_cleanup

Deletes the preference and sidecar files a test wrote to folder.

custom_style_test_export

The export text of a package holding drawing for target and zone.

custom_style_test_facial_style

The name of the first facial hairstyle that has a sprite.

custom_style_test_folder

A fresh temporary folder for one test's preference and sidecar files.

custom_style_test_hair

A complete base hair look for packages.

custom_style_test_markings

Two distinct native markings make order, independent field types and duplicate checks observable.

custom_style_test_sidecar

A sidecar store whose last verified contents match the file written for a save test.

custom_style_test_spaces

count spaces, the same text as repeat_string(count, " ") but built by doubling: appending one character at a time makes a 160 KiB file take most of a minute.

custom_style_test_two_color_drawing

Two colors, split evenly, so a recolor can be checked on both the palette and the pixels.

custom_style_transfer_begin

Claims the account's single transfer slot and starts the relevant cooldown.

Failed and cancelled attempts consume the cooldown too, so repeated rejected uploads cannot be used to keep the server parsing files.

Returns:

custom_style_transfer_end

Releases the account's transfer slot.

custom_style_unknown_key

Returns the first unsupported key, or null when every key is allowed.

custom_style_validate_body

Strictly validates a whole-body style: one region package per zone it contains.

Returns list("body" = zone -> canonical package) or list("error" = message).

custom_style_validate_drawing

Strictly validates one drawing. Unlike custom_sprite_validate(), nothing is salvaged.

Arguments:

Returns:

custom_style_validate_hair

Strictly validates the whitelisted base hair look carried by hair styles.

Registered names and value ranges are checked here. Destination-specific rules, such as a character's species, emissive permission or opacity access, are checked by the destination.

Returns:

custom_style_validate_markings

Strictly validates the ordered native markings for one supported limb. A name a marking merge retired validates as the marking that draws it now (GLOB.body_marking_renames), as a save's migration renames it. Stored data (trusted) leaves out, and logs, a marking its limb no longer offers, where an upload is refused.

custom_style_validate_package

Validates a package's structure: one drawing target, plus its optional native context.

Packages are the server's canonical style shape, used by transfers, runtime restoration and previous saved styles: list("target", "zone", "drawing", "hair", optional "markings"). A null drawing is valid empty art; absent markings preserve the destination's native markings.

Arguments:

Returns:

cut_relative_direction

Takes a screen_loc string and cut out any directions like NORTH or SOUTH

cyborg_accessory_color_channels

Returns the color channels an accessory's art uses at this size and arousal state, by channel number

cyborg_accessory_effective_size

Returns the requested size when the accessory has art for it, or else the first size it has

cyborg_accessory_metadata

Returns what the editor shows for a part's sprite - its color channels and its sizes, with a thumbnail of each unless include_icons is off

cyborg_accessory_render

Returns a part's colored art as an icon and its base64, or null when it has none. Cached, up to 128 images and 2 MiB

cyborg_accessory_size_values

Returns the sizes an accessory has art for, cached by slot and choice. The caller gets its own copy

cyborg_animation_anchor

Returns the still frame a chassis's parts are placed against in this direction and pose, or null when it has no authored animation

cyborg_animation_frames

Authored anchor data is generated offline; runtime never scans marker pixels.

cyborg_animation_map

One pixel per native frame, encoding a literal anchor translation after part transforms. Only catalog descriptors reach this cache; player colors and placement are not cache keys.

cyborg_appearance_model_id

Display names and mutable icon states are deliberately not identities.

cyborg_appearance_models

Appearance previews/defaults also support bodies obtained through antagonist roles.

cyborg_body_visuals_visible

Rendering and examine share this - death, a disguise or being tipped over hide the parts, lockdown and stuns do not. A redraw passes the chassis's catalog entry it already has

cyborg_build_appearance

Generates only the changed appearance, never creates organs or reads preferences. Returns null when no part shows

cyborg_canonical_model_id

Canonicalize stored IDs too, so old variant defaults remain usable.

cyborg_customization_after_import

Imports replace every character, so the old layouts go and the uploaded ones take their place.

cyborg_direct_accessories

The silicon-only accessories of a slot by name, null for a slot without any - these donor sheets never enter human accessory selection

cyborg_direct_accessory_render

Returns a silicon-only accessory's colored art as an icon and its base64, or null when it has none. Keeps the last 32

cyborg_dynamic_accessory_has_size

Whether a genital accessory has art at this size, in any layer or color channel

cyborg_dynamic_accessory_suffix

Native icon operations and bounded immutable outputs replace donor per-pixel loops. Reuses Meridian accessories: no physical organ or bodypart overlay is constructed.

cyborg_effective_base_size

Returns the body size a chassis can show for the requested one, 1 when it isn't eligible. Small chassis never shrink and wide or tall ones stop at 1.6

cyborg_identity_import_sanitize_slot

Import-only migration of donor identity keys. Layouts are read separately into the sidecar.

cyborg_identity_lore

Returns the character's silicon model lore, or the fallback when it has none

cyborg_identity_model

Only cyborgs use the new fields; AI and other silicon preferences retain their behavior.

cyborg_identity_text

Reads the silicon-specific text first without copying a human field into it.

cyborg_interaction_participant

Deliberately small interaction capability surface for cyborgs. Visual anatomy does not grant organs, hands, toy handling, vore, or any lewd interaction. Whether a mob can take part in the interaction menu - humans and cyborgs

cyborg_layout_account_full_message

What the editor says while saving a character would take the account past CYBORG_LAYOUT_MAX_SIDECAR_BYTES.

cyborg_layout_action

cyborg_layout_apply_placement

cyborg_layout_choices

Old presets inherit character choices; newer presets carry their selected parts.

cyborg_layout_codec_element

Element index of a decoded list, or null past its end.

cyborg_layout_codec_parse

A save text's JSON, or null when the text is not a save of this format.

cyborg_layout_codec_trim

Drops unset trailing elements, which decoding reads as unset.

cyborg_layout_codec_trim_text

Drops unset trailing elements from a list of element texts, as cyborg_layout_codec_trim() does before encoding.

cyborg_layout_copy_encoded

A deep copy of a layout whose parts keep the save text of the parts they copy. A part without text in encoded_parts is encoded here, once for it and its copy.

cyborg_layout_decode

The normalized tree for a save text, or null when the text is not a save of this format.

cyborg_layout_decode_advanced

Returns a part's overrides by key from their flat pairs, skipping key indices we don't know

cyborg_layout_decode_for_body

What a body takes from a save text: its active layout and one model default, as cyborg_layout_decode() gives them, without decoding the rest. Null when the text is not a save of this format.

Arguments:

cyborg_layout_decode_override

Returns an override from its header and values, with its arousal states unless it is one

cyborg_layout_decode_part

Returns a part's fields from its mask and values, or null for an untouched part

cyborg_layout_decode_slots

Returns an encoded layout's parts by slot. Untouched parts are left out, for normalizing to fill in

cyborg_layout_default

Returns a new layout tree with default parts and no presets or model defaults

cyborg_layout_default_entry

Returns a new part entry with every field at its default

cyborg_layout_default_slots

Returns a new layout with every part slot at its defaults

cyborg_layout_default_sprite_size

Returns the sprite size a slot's parts start at

cyborg_layout_edit_position

Materialize just the edited view group, preserving legacy fallback elsewhere.

cyborg_layout_encode

The save text for a character slot, built from the save text of each part.

Arguments:

cyborg_layout_encode_advanced

Returns a part's overrides as flat key index and override pairs, or null when it has none

cyborg_layout_encode_entry

A preset or model default as save text: its name or chassis, its layout, and its chassis or linked preset. A layout found in cached_parts keeps its text, and its parts' texts for copies of it; see cyborg_layout_encode(). Presets and defaults are only ever replaced whole, so most saves find all but one of them there.

cyborg_layout_encode_override

An arousal state writes every field it has: there each one overrides its pose, whatever the value.

cyborg_layout_encode_part

Fields are read the way cyborg_layout_normalize_entry() reads them, so leaving one out decodes to the same value.

cyborg_layout_encode_slots

A layout's parts as save text, in cyborg_layout_supported_slots() order. See cyborg_layout_encode() for the caches.

cyborg_layout_from_stored

The editable tree for whatever a slot holds: save text, an older nested tree, or nothing.

cyborg_layout_import_is_future

Whether a stored or uploaded slot comes from a newer build. It is kept as it is and never rewritten.

cyborg_layout_normalize

A layout tree in its canonical form, or the default tree when raw is not one.

Arguments:

cyborg_layout_normalize_advanced

Returns a part's overrides in canonical form. An import also expands donor pose-wide entries to each direction

cyborg_layout_normalize_advanced_entry

Returns one override with only the fields it sets, bounded, or null when it sets none. Arousal states can't nest, so they pass allow_arousal FALSE

cyborg_layout_normalize_entry

Returns a part entry in canonical form, every field bounded and filled in, or the slot's defaults when raw isn't a list

cyborg_layout_normalize_slots

Returns a layout with every part slot normalized, defaults filling the missing ones

cyborg_layout_number

Returns a number clamped to its range and rounded to its step, or the default when it isn't one. Text numbers are read too

cyborg_layout_override_fields

Override fields in header bit order, with what the editor fills a new override with.

cyborg_layout_sidecar_path

The cyborg layout sidecar beside a preferences.json path, or null when the path has no directory.

cyborg_layout_slot_full_message

What the editor says while a character's setups are past CYBORG_LAYOUT_MAX_SLOT_BYTES.

cyborg_layout_sprite_size

Returns a sprite size clamped to the allowed range, or the slot's default when it isn't a number

cyborg_layout_supported_advanced_keys

Save texts store overrides by their place here, so only append.

cyborg_layout_supported_slots

Save texts store parts by their place here, so only append. Every caller shares the list, so none may change it

cyborg_layout_text_is_future

Whether a save text comes from a newer format. Every format starts with its version, so this needs no decode.

cyborg_layouts_from_import

Layouts carried by an uploaded preferences file, keyed by character slot. Read before pass one sanitation.

cyborg_message_interaction_act

Uses only authored non-lewd messages. It never invokes the human effects path.

cyborg_message_interaction_allowed

Whether actor may use an interaction on target when a cyborg is one of them - a cyborg only cheers, a human may also beckon and pat

cyborg_message_interaction_contract_is_safe

Whether an interaction is a plain non-lewd message with no parts, effects, sounds or requirements beyond a free hand

cyborg_mirror_placement

Whether a part's placement is mirrored - a wide chassis facing west, unless the part opts out

cyborg_model_catalog

Cached descriptors contain resources and copied lists only; temporary models have no host.

cyborg_model_legacy_id

Donor keys are accepted only when exactly one current descriptor matches.

cyborg_occlusion_mask

Returns a chassis's occlusion mask - its family's mask icon and the state its poses add their suffix to - or null when it has none

cyborg_part_capability

Returns whether a part slot is configured, turned on and showing on the borg right now

cyborg_part_sprite_direction

Returns the direction of a part's art - a wide chassis facing north may reuse its south art

cyborg_preferences_for

GET_CLIENT can resolve to a real /client or the unit-test client interface.

cyborg_preview_animation

A bounded frame sequence for the visible model only. No periodic server UI updates.

cyborg_preview_body

Body previews use immutable resources, never world mobs. A bounded FIFO caches PNGs.

cyborg_preview_layers

Returns the editor preview's part layers without their art, placed as the live renderer places them.

Every part shows, all in one arousal state. The window has the art in its resources already.

Arguments:

cyborg_preview_reference

Existing one-tile mannequin artwork, fixed at normal body scale in the frontend.

cyborg_resolve_placement

Pure geometry shared by creator/live rendering. Input has already been normalized.

cyborg_runtime_actor_is_owner

The runtime backend shares this actor/slot gate with its self-management UI.

cyborg_selectable_models

Normal in-round selection stays restricted to its existing departments.

cyborg_sprite_preferences

Part slot -> the preference that holds its sprite. Every caller shares the list, so none may change it

cyborg_test_run_queued_save

Runs the save SScyborg_layout_saves would run for store on its next fire. Returns FALSE while none is due.

cyborg_visual_anatomy_examine_lines

These descriptions mirror already-rendered visual layers. They do not imply an organ or interaction capability.

cyborg_visuals_allowed

Whether or not these preferences allow cyborg parts at all - the server config, the ERP master toggle and the genitals toggle

day_of_month

Returns the day (mon, tues, wen...) in number format, 1 (monday) - 7 (sunday) from the passed in date (year, month, day) All inputs are expected indexed at 1

debug_hallucination_weighted_list

Debug proc for getting the total weight of the random_hallucination_weighted_list

debug_variable

Get displayed variable in VV variable list

deep_compare_list

Compares 2 lists, returns TRUE if they are the same

deep_copy_list

Copies a list, and all lists inside it recusively Does not copy any other reference type

deep_copy_list_alt

A version of deep_copy_list that actually supports associative list nesting: list(list(list("a" = "b"))) will actually copy correctly.

default_ui_state

The sane defaults for a UI such as a computer or a machine.

delete_all_SS_and_recreate_master

Delete all existing SS to basically start over

deliver_meridian_theme_art

Hands a client its MeridianOS theme's art: the files first, waiting for them to arrive, then their stylesheet to its open windows and its lobby, which load it as they hear of it. For the lobby as it starts and for a theme picked while windows are open; a window that opens later gets the art with its other assets (/datum/tgui/send_assets()).

Arguments:

delta_to_angle

Calculate the angle produced by a pair of x and y deltas

deltimer

Delete a timer

Arguments:

deprecise_zone

Takes a zone and returns its "parent" zone, if it has one.

derive_body_marking_species

Gives every marking in a marking set the species of its sets: the union of their recommended_species, or any species when one of them names none. A marking in no set keeps the species it declares. Runs once both lists are built, so a set and its markings never disagree about who may wear them. Only choices and validation read the result, never loading or drawing.

determine_drafted_knowledge

Each heretic has a few drafted knowledges within their heretic knowledge tree. This is not during the knowledge tree creation because we want to know what path our heretic picks so we filter out dupe knowledges. Also generates shop knowledges as their validation is shared. Modifies shop_list and final_draft that are provided in the arguments.

diagonally_blocked

check if 2 diagonal turfs are blocked by dense objects

diff_appearances

Takes two appearances as args, prints out, logs, and returns a text representation of their differences Including suboverlays

dir2offset

Returns a list(x, y), being the change in position required to step in the passed in direction

dir_to_all_junctions

Takes a direction, turns it into all the junctions that contain it

dirt_add_run

Adds one run to a role's in one direction.

Arguments:

dirt_aim_bounds

Returns how far past its zone's heights a streak may end, for the zones whose streaks stay in them: list(zone = h). Off target they read as a U, bars or socks. You should NEVER modify it.

dirt_aim_inset

Returns how many pixels a clamped streak end's or a capped drip's bound moves in: odd on one side of a pair, 0 or 2 on the other, so the sides keep to different rows. It stays under the room the streak or drip starts with inside its bound, so a streak never shrinks to nothing and a drip never runs up. Without the room an odd one moves 1 px out where that's allowed (the knee); elsewhere it stays on the bound.

Arguments:

dirt_aim_inside

Returns a streak's end pulled back along the streak until its height lies between two bounds: list(theta, h). The streak keeps its own taper.

A pulled-back end sits on its bound exactly. Summed back from the scale, it would miss the bound by a rounding now and then, and the glint 0.3 px over a bound such as 0.02 falls midway between two rows, where a rounding picks one.

Arguments:

dirt_aim_zones

Returns each aim zone's areas, where its shots land: list(zone = list(list(limb, lowest theta, highest theta, lowest h, highest h), ...)). You should NEVER modify it.

dirt_baked_icon

Returns runs baked into one four-direction RGBA icon on a blank state, registered in the resource cache as bulge_register_icon() registers an icon built at run time, or null when they draw nothing. Each run is one DrawBox() in its role's tint colour, at the tint's alpha times the run's level, rounded to 8 bits.

Arguments:

dirt_body_parts

Returns the parts a body draws that take mess, lowest drawn first: the pecs guide if its chest takes one, then each genital drawn (dirt_part_drawn()).

Arguments:

dirt_body_parts_key

Returns a body's parts as one line of text, with what they're drawn for and at what layers, to tell when a change to them may shape its mess otherwise.

Arguments:

dirt_build_template_now

Builds a dirt template at once, for tests and for anything that can't wait for a subsystem.

Arguments:

Returns:

dirt_cleanup

Returns a mask cleaned up: a lone film pixel goes, a lone core softens to body, and a pixel whose role none of its neighbours share takes the role three of them share. Flecks stay.

Arguments:

dirt_container_over

Returns a container of a baked mess image just over a genital's or a taur body's images: at the layer and offsets of the last sprite among them, the one drawn over the others, kept together. It isn't nested in that sprite: the sprite is coloured, which its overlays would take, and a filter on it doesn't reach them.

Arguments:

Returns null when none of the images is a sprite.

dirt_cover_fades

Returns how near a mask's pixels lie to what's worn over them, where they fade out: alist(index = 1 beside it, or 2 one pixel further), for the pixels drawn that it leaves bare. Steps are up, down and across.

Arguments:

dirt_cover_layers

Returns the overlays_standing slots whose sprites cover skin mess, so it fades out beside them: the underclothes and the garments. You should NEVER modify it.

dirt_cover_sprites

Returns the sprites a body draws over its skin, from what it wears: list(list(icon, icon state), ...), in dirt_cover_layers() order.

Arguments:

dirt_covering_thickness

Returns how thick a covering feature lies on a pixel: film at most on the outline, and in profile broken by noise on the outline and beside it, to nothing, haze or film. Highlights aren't broken.

Arguments:

dirt_despeckle

Returns a mask without lone pixels, which read harshly: a lone film or haze pixel goes, and a lone body or core pixel becomes film with a haze ring where the surface reaches. A film or haze hole with three dark neighbours fills with body: it read as a chip or a scar. Glints and flecks are highlights and stay.

Arguments:

dirt_drawn_indexes

Returns the indexes of a mask's drawn pixels, in row-major order.

Arguments:

dirt_drawn_roles

Returns the roles runs are drawn in, one to a pixel, in the order they're baked: haze is film at half (dirt_role_runs()). You should NEVER modify it.

dirt_eye_reads

Returns what a body's eyes and its human head are drawn from as dirt_zone_sources_match() reads them against zone sources: list(the head, its limb_id, whether it draws eyes, the eyes, their sheet, their state).

Arguments:

dirt_eyes_unchanged

Returns whether a body's eyes and its human head are drawn from what they were when dirt_eye_reads() read them, read as it reads them without making a list.

Arguments:

dirt_footprint

Returns the pixels features draw on in one view before the raster's cleanups, as alist(index = TRUE): where any of them lies thick enough for film. A feature hidden in profile is left out there.

Arguments:

dirt_footprint_touches

Returns whether any of a footprint's pixels lies within DIRT_RUN_GAP px of another's, in both axes: no skin between.

Arguments:

dirt_fresh_variant

Returns a variant of a zone's mess none of some splats on that zone has, at random, or any once they have them all.

Arguments:

dirt_human_zone_pixels

Returns a zone's pixels on the plain human template, facing the way that shows it (dirt_zone_facing()): the body pixels whose limb, angle and height lie in one of the zone's aim areas (dirt_aim_zones()). Null until SSdirt has built that direction of the template in the background (/datum/controller/subsystem/dirt/proc/human_surface()). Each zone is read once a round. You should NEVER modify the list it returns.

Arguments:

dirt_index_range

Returns list(1, 2, ... count), made once for each count. You should NEVER modify it.

Arguments:

dirt_level_shows

Returns whether a level shows anything new on the body over level 1's shot: a pixel the kept runs and drops draw that level 1's doesn't, beside either. A lone one would go.

Arguments:

dirt_lobe_rasterise

Returns mess following a rounded part's form (breasts, pecs, the butt, testicles, the vulva), from the "lobe:aimed_::" stream. A ragged blob lands on a lobe's upper slope, and at levels 2 and 3 its drip runs down the lobe keeping its place across each row as the lobe widens and narrows, to a bead at the under-curve. Level 3 adds a smaller blob with a short drip, and breaks the drips into beads. A pair's other lobe takes a smaller blob, clear of the first lobe's rows (level with it, the pair read as a bra). Opaque cores, a highlight per drop, a grey underside, a translucent fringe, all on the part's own pixels.

Arguments:

dirt_lobe_row_at

Returns the row a fraction of the way down a lobe, 0 its top and 1 its bottom, not rounded.

Arguments:

dirt_lobe_shape

Returns a lobe's shape: list(its indexes, TRUE on each of its pixels, alist(row = list(leftmost column, rightmost column)), its rows from the top).

Arguments:

dirt_lobes

Returns a rounded part's lobes, each a list of indexes in row-major order: each side of DIRT_PART_MIDLINE where the view shows both (front or back, the vulva excepted), else the whole part. A lobe under 4 px holds none.

Arguments:

dirt_lower_zones

Returns the zones below the waist: the groin, the thighs and the butt. You should NEVER modify it.

dirt_mask_directions

Returns the directions a mask is made in, in the order its pieces go. You should NEVER modify it.

dirt_measure_metrics

Returns alist(limb = list(degrees per pixel, h per pixel)), measured from the plain human template facing south, then facing east for a limb the south view lacks. A limb's diameter is its median row width; its length, its rows.

Arguments:

dirt_merge

Returns masks merged into one: on each pixel the thickest wins, by role rank and then thickness, and the first mask keeps a full tie. All the splats on one surface make one mask this way, oldest first. A splat below the top level leaves out each of its pieces that comes within DIRT_RUN_GAP px of an earlier splat's: piled on, splats filled into one sheet. A top-level splat keeps everything: it covers.

Arguments:

dirt_merge_with_parts

Returns a surface's splats in one direction merged with the parts drawn under and over it. Each splat leaves out the pixels of the rounded parts on its zone (dirt_part_rounded()): straight streaks carried onto a breast read as blocks. Then each part drawn under the surface takes each splat on its zone in its own pixels (dirt_part_field()), merged in after the splats and keeping every piece, as a top-level splat does. A part drawn over the surface takes its share on itself, so its field isn't drawn here.

Arguments:

dirt_mess_amount_levels

Returns how many levels a shot's amount adds where it lands: 1 for a normal shot, 2 for a heavy one, and straight to DIRT_MESS_MAX_LEVEL for a huge one.

Arguments:

dirt_mess_baked_image

Returns an image of a surface's baked mess, drawn as it is: its colours and alpha are in its pixels (dirt_baked_icon()).

Arguments:

dirt_mess_carriers

Returns the carriers of a person's mess: their own, then each worn item's.

Arguments:

dirt_mess_entry

Returns a zone's entry in a shot's list of where to aim: "On their chest".

Arguments:

dirt_mess_evict

Takes a person's oldest splats off until they carry DIRT_MESS_MAX_SPLATS at most, counting their skin, their parts and their worn items. It draws nothing: the caller draws each carrier it returns, and each part.

Arguments:

Returns what it took splats off: list(carrier = list of what of it changed, ORGAN_SLOT_* defines or null for its own surface).

dirt_mess_garment

Returns the worn item a shot at a zone lands on, or null for the skin: the outermost of the head, mask, suit and uniform slots whose body_parts_covered includes the zone's part (the chest for the chest, stomach and back; the groin for the groin and butt; the legs for the thighs). The face is covered when the mouth is, by the item covering it. Underclothes never count: they aren't items. Through a wall portal only the uniform counts, while it's drawn: the relay copies it and no suit (lower_body_only()), so a coat over the lower body leaves the shot to what the relay shows under it. A skirt the relay leaves out (wall_relay_skips_uniform()) leaves it to the underclothes or the skin.

Arguments:

dirt_mess_inset_image

Returns an image drawing cloth's baked mess over a garment, kept to the garment's own pixels by BLEND_INSET_OVERLAY inside the worn KEEP_TOGETHER wrapper build_worn_icon() makes. It floats, and on a garment drawn on the body's own tile it isn't offset, so the bulge redraws it over its cloth too (bulge_over_cloth()).

Arguments:

dirt_mess_land

Puts a mess on a person where a shot was aimed (dirt_mess_place()), when the portal shows a zone that lands.

Arguments:

Returns whether anything was deposited.

dirt_mess_landable

Returns whether dirt_mess_land() lands a shot at a zone: the zones dirt_mess_zones() lists, and DIRT_ZONE_COCK, which dirt_mess_regions() offers through a one-part portal and which lands on the penis alone.

Arguments:

dirt_mess_place

Puts a mess where a shot at a zone lands on a person (dirt_mess_surface()) as /datum/component/dirtiness/proc/add_mess() does, and on each part drawn over that surface which the zone reaches (dirt_body_parts()), a splat of the same variant in its own slot. A back shot on a taur also puts one in its taur body's slot (dirt_taur_takes_pools()), unless a taur suit takes it, whose own splat draws the pools. DIRT_ZONE_COCK lands on the penis alone, while it draws its front image. Then it takes the oldest splats off past DIRT_MESS_MAX_SPLATS, and only then draws each garment that changed and the person, once, so the masks asked for are the ones kept.

Arguments:

Returns the splat it started, or the one it raised when it started none, or null when it landed nowhere.

dirt_mess_regions

Returns the zones a shot on a person can aim at, in dirt_mess_zones() order.

Arguments:

dirt_mess_role_tints

Returns the mess's tints, indexed by DIRT_ROLE_* define, each list(colour, alpha from 0 to 1), as dirt_baked_icon() takes them. Pearl white, translucent where thin and near opaque where thick, a light grey underside that sets drops apart on pale skin, and a white highlight. Haze is the film's colour at half its alpha, drawn as film at half coverage. You should NEVER modify it.

dirt_mess_splat_rasterise

Returns mess aimed at a taur body's back in one direction, from the "splat:aimed_back:taur:" and DIRT_MESS_TAUR_SEED streams: broken pools along the back line (dirt_taur_back_region()), ragged underneath, drips of uneven length off them, an opaque core, a highlight per drop and a translucent fringe, all on the taur body's pixels. Level 1 is one drop; levels 2 and 3 two pools, level 3's heavier. A drop or pool that comes beside the rider's mess, or under it where a line would carry on down, is left out whole: a pool beside it read as one straight line across both bodies. Its levels don't nest: each is drawn from the streams on its own.

Arguments:

dirt_mess_surface

Returns the carrier a shot at a zone lands on, and the underclothes it lands on: list(/datum/component/dirtiness, a DIRT_UNDERCLOTHES_* define or null). The outermost garment over the zone takes it (dirt_mess_garment()), else the underclothes that cover it, held by the person, else the skin.

Arguments:

dirt_mess_zones

Returns the zones a shot can be aimed at on a person, in the order they're offered: face, chest, stomach, back, groin, thighs, butt. You should NEVER modify it.

dirt_metric

Returns how far one pixel reaches on a limb: list(degrees round it, h along it). It's measured once, as the reference generator measures it, and serves every body, so marks keep one size whatever the body and the direction.

SSdirt measures it before any mask job it queues reads it (/datum/dirt_template_job/metric). Anything else that draws mess, such as the parity manifest, has it measured on the spot.

Arguments:

dirt_metric_directions

Returns the directions dirt_measure_metrics() reads, the only ones its template needs. You should NEVER modify it.

dirt_metric_sources

Returns the plain human template's sprites, which dirt_metric() is measured from: no eyes, no mouth guard. You should NEVER modify it.

dirt_neighbour_table

Returns each pixel's neighbours on a canvas, in the order the reference generator visits them: right, left, below, above, those off the canvas left out. Built once per canvas size. You should NEVER modify it.

Arguments:

dirt_noise_hash

Returns a lattice point's noise value, from 0 to 1 in steps of 1/255.

The seed's low byte, its next byte and then the point's coordinates are chained through the permutation table. DIRT_MODULO keeps every index in range when a coordinate is negative.

Arguments:

dirt_packed_thicknesses

Returns the thicknesses packed so far, indexed by their code + 1 (dirt_thickness_code()). You should NEVER modify it.

dirt_parity_case_block

Returns a corpus case as the text the reference generator writes for it: "case ", then the case's lines, each ending in a newline, the last one too.

Arguments:

Returns:

dirt_parity_facing_parts

Returns the parts a body case places under or over its surface in one facing: each entry of its "under_parts" or "over_parts" is a part's name, placed so in every facing, or "name@NE", placed so in the facings it names.

Arguments:

dirt_parity_number_text

Returns a number, or a list of numbers joined by single spaces, as the reference writes them: whole numbers in full, never in scientific notation.

Arguments:

dirt_parity_parts

Returns corpus parts as the game reads a genital: each a /datum/dirt_part_source of its states, every layer's together, its sheet loaded from its path.

Arguments:

dirt_parity_random_lines

Returns a random case's lines: one per integer call, in order, all from one stream.

Arguments:

Crashes:

dirt_parity_surface_lines

Returns one direction of a surface as three grids, one line per row, one after the other:

Arguments:

dirt_parity_taur

Returns a corpus taur kind as the game reads a taur body (/datum/dirt_taur_source): each layer's states, its sheet loaded from its path.

Arguments:

dirt_parity_taur_lines

Returns what each pixel of a taur canvas shows as one grid, one line per row, one glyph per pixel: "B" the taur body's behind layer, "A" its adjacent layer, "r" the rider, "U" its front under clothes layer, "F" its front layer, "O" its front over layer, "." none.

Arguments:

dirt_parity_template

Returns a corpus template, built as the game builds a body's the first time it's asked for and shared after that.

Arguments:

dirt_parity_zone_sources

Returns a corpus template as the zone sources dirt_zone_sources() gives a body: each zone's sheet, loaded from its path, and state, the eyes' sheet and states, and whether the head is a human's.

Arguments:

dirt_part_body_level

Returns the level of a splat's mess on the body where parts take a share of it: down by 2 where a penis, testicles or vulva does, else by 1 where any part does, never under 1. A part takes a share in a direction where it has pixels. The top level stays: the body keeps its glaze, still off the rounded parts' pixels, and the parts draw theirs at DIRT_PART_MAX_LEVEL.

Arguments:

dirt_part_drawn

Returns the source a genital is drawn as now, its organ slot filled in and each state's layer read from its image, or null while it draws none: hidden (dirt_shown()), a device drawn in its place, a bulge look drawn for it, no sprite in the layers mess reads it from (a taur's penis draws only behind the body), or a kind that takes no share.

Arguments:

dirt_part_field

Returns one splat's mess on a part's pixels, which keeps every piece where it merges with others: lobes on a rounded part, a bead behind the tip on the penis. Its fields have levels 1 to DIRT_PART_MAX_LEVEL, so a splat past it draws at it. A field rests on its arguments alone, and every mask its splat is on draws it again, so the newest DIRT_PART_FIELDS are kept, packed.

Arguments:

dirt_part_fringe

Lays a part's translucent fringe: film on each of the part's pixels beside its solid mess, up, down or across, that holds none yet.

Arguments:

dirt_part_index

Returns a pixel's index on a 32x32 canvas, or null off it.

Arguments:

dirt_part_kind

Returns what a genital is drawn as for mess: a DIRT_PART_* define, or null for one that takes no share (the anus, the womb). The breasts organ is pecs when it's built from a pecs accessory.

Arguments:

dirt_part_layers

Returns the layers mess reads a kind of genital from, as the reference generator draws it (its own parts take every one): the butt's front and back (ADJ) images, every other kind's front image alone. You should NEVER modify it.

Arguments:

dirt_part_own

Returns the pixels a part takes its share on in one direction, as indexes in row-major order: its own. The pecs guide keeps to where the chest shows. The vulva, too small for a lobe of its own, also takes the ring of visible pixels round them (the body's, and the parts') when it lies on skin, but never on cloth.

Arguments:

dirt_part_rasterise

Returns mess on a part too small to round, the penis: a bead just behind its tip (its pixel farthest from where it joins the body) with a highlight and a grey underside, the tip itself translucent (over the whole end it read as a white cap); at levels 2 and 3 a run back from the tip and a drop or two along the part; a translucent fringe inside it. Drawn from the "part:aimed_:" stream, on its pixels only.

Arguments:

dirt_part_rounded

Returns whether a kind of part is rounded, so its mess follows its form in lobes (dirt_lobe_rasterise()) and the body's own mess leaves its pixels out: every kind but the penis, which takes a bead behind its tip.

Arguments:

dirt_part_source_of

Returns a genital's images as a part source, every layer's colour layers' states together with the layer each draws at, or null when none draws a sprite. Emissives and texture holders are left out.

Arguments:

dirt_part_zone

Returns the zone whose shots a kind of part takes a share of: the chest for breasts and pecs, the butt for the butt, the groin for the rest.

Arguments:

dirt_parts_key

Returns parts' keys as one line of text, to key masks by: each with where it draws against a surface in each direction, when one is given.

Arguments:

dirt_pecs_guide

Returns the source of the plain pecs' shape a human chest without breasts takes mess in, an undrawn guide (Muscular pecs and breasts are the breasts organ, drawn), or null for any other chest. You should NEVER modify it.

Arguments:

dirt_perm_table

Returns the table the noise hashes lattice points through: 0 to 255, shuffled by the "dirt:perm" stream.

The table is built on the first call and shared after that. You should NEVER modify it.

dirt_pieces_near

Returns TRUE on each pixel of a mask's pieces, 8-connected, that come within DIRT_RUN_GAP px of a taken pixel.

Arguments:

dirt_pixel_span

Returns how many degrees a pixel of a row spans: the turn to the pixels beside it in the row, or a limb's own at least.

Arguments:

dirt_pixel_zones

Returns the zones a template pixel's flags name (DIRT_PIXEL_ZONE()), each keyed to its own place: zones[place] is a zone and zones[zone] its place. They're the zones dirt_zone_owners() gives pixels, those of dirt_zone_draw_order(). A pixel holds its zone in 4 bits, 0 for none, so there are 15 at most. You should NEVER modify it.

dirt_pixels_from_drawn

Returns a mask made again from its drawn pixels.

Arguments:

dirt_pool_clear

Returns whether a pool's columns keep more than 2 px from every column of the pools kept before it.

Arguments:

dirt_pool_draw

Draws a role on a pool pixel of the taur body, where the role drawn there doesn't outrank it: never off the taur body's pixels.

Arguments:

dirt_pool_put

Lays a solid role on a pool pixel, noting it as the drop or pool's own if nothing was laid there before.

Arguments:

dirt_portal_shows

Returns whether a portal shows the part of its occupant a zone lies on: through a one-part portal only DIRT_ZONE_COCK, through a wall the groin and the butt (its relay draws no legs), and anything with no portal.

Arguments:

dirt_ragged_edges

Breaks a covering mask's flat edges, and returns it: no top or bottom edge runs flat along one row for more than 2 px. Cut level, a sheet read as clipped at a region, an apron, a back patch, a bib. At irregular spots along a flat stretch, film runs on 1 to 3 px below a bottom edge, or rises 1 px over a top edge. It only adds film, on bare skin or haze of the chest and the legs, so what's under it and the highlights stay. What's solid is read before anything is added, so the mask is changed where it is.

Arguments:

dirt_ragged_free

Returns whether a covering mask's flat edge may run on over a pixel: bare skin or haze on the surface, where the chest or a leg shows.

Arguments:

dirt_rasterise_aimed

Returns mess aimed at a zone, drawn on one direction of a body: levels 1 to level, each from the deposit's same draws, merged by role rank with the later level winning a tie, then despeckled. A highlight, once drawn, stays: a later run beside it folded it in. The top level then breaks its flat edges, and keeps every pixel of level 3 as it was drawn, at its role or a darker one.

Arguments:

dirt_rasterise_level

Returns one level of a deposit drawn on one direction of a body. The first feature, in list order, to lie thickest on a pixel picks its role. Nothing goes on an eye, the pixels beside it or a human mouth, and an eye's diagonals take film at most. Cloth draws its rim a role lighter, so a garment keeps its outline, though a contact point keeps its tone. Then bare legs streak, lone pixels go, and on skin nothing smaller than 2 px stays.

A covering feature, the top level's, thins to film on the outline: cut there, a coat read as a garment. In profile it also breaks with noise on the outline and the pixels beside it, where whole it ran the torso's height as one band; highlights stay whole.

Arguments:

dirt_role_ranks

Returns each role's rank, indexed by its DIRT_ROLE_* define: where masks or levels meet, the higher rank keeps the pixel. You should NEVER modify it.

dirt_role_runs

Adds a mask's horizontal runs in one direction to each role's: list(icon y, first icon x, last icon x, level). A run is a role's pixels side by side in one row at one level, how much of each pixel it covers out of 255: DIRT_MASK_SOLID, or DIRT_MASK_HALF for haze, drawn as film. A pixel beside what's worn over it keeps a share of its level: its fade ring over DIRT_FADE_RINGS + 1.

Arguments:

dirt_runs_apart

Returns a level's features with the runs and drops this view leaves out taken out, and its run plan with them. In the plan's order, each run or drop stays only if it keeps DIRT_RUN_GAP px of skin from level 1's shot and from every one kept before it: side by side they filled into a sheet. The two hung from level 1's shot and drop always stay. Then each kept run's carry-on stays where it keeps as clear, and level 2's carry-on from the first drop where level 2 shows nothing new in the zone's main facing. The plan holds the top run level's set, so every level keeps the same ones.

Arguments:

dirt_runs_key

Returns an MD5 of what runs draw, the same for runs that draw the same pixels: each role's runs in each direction, in a fixed order, with their levels.

Arguments:

dirt_shown_runs

Returns a surface's runs, as dirt_role_runs() lays them: alist(DIRT_ROLE_* define = alist(direction = runs)).

Arguments:

dirt_skin_besides

Returns the body zones whose sprites a limb skin mess draws on checks besides its own (ready_skin_masks()): for the chest the arms, which bring their hands and which no limb skin mess draws on draws (the chest checks the eyes too); for the rest none. You should NEVER modify it.

Arguments:

dirt_skin_rules

Makes a mask as skin takes goo, and returns it: no pixel without a neighbour, since a lone body dot reads as a mole and nothing smaller than 2 px stays. Goo keeps its core: flattened, it read as body paint.

The reference drops lone body pixels, then every group of pixels smaller than two. Neither step leaves a new lone pixel, so together they drop exactly the pixels with no neighbour. A pixel dropped had none, so dropping it where it is leaves every other pixel's neighbours as they were.

Arguments:

dirt_skin_streaks

Streaks bare legs in a mask rather than coating them, and returns it: a solid coat up a bare shin reads as boots. Body pixels more than 2.5 px up a leg mostly thin to film, in clumps about a limb wide. Each pixel is judged on its own, so the mask is changed where it is.

Arguments:

dirt_skin_zones

Returns the body zones of the limbs skin mess draws on: the head, the chest and the legs, where aimed mess lands. You should NEVER modify it.

dirt_slot_layer

Returns the layer a worn slot's garment draws at, which its mess lies on, against which parts draw over or under it.

Arguments:

dirt_slot_redraw

Returns what to draw again on a body for an item in a slot: a DIRT_REDRAW_* flag, or NONE.

Arguments:

dirt_split_parts

Returns parts split by where they draw against a surface in one direction: list(those under it, whose share is drawn in its masks, those over it, whose share is drawn on themselves).

Arguments:

dirt_spread_noise

Returns two octaves of value noise, stretched back out to cover 0 to 1 (summed noise bunches round 0.5).

The second octave is half the scale, on the seed plus 97.

Arguments:

dirt_sprite_facings

Returns the directions a sprite has pixels in, any opacity counting, as SOUTH, NORTH, EAST and WEST flags: none for a sprite that isn't 32x32. A direction dirt_sprite_pixels() holds is taken from it; any other is read only as far as its first pixel. Parts' layers are worked out from these whenever a body with mess is drawn, so they're kept for far more sprites than whole reads are, in SSdirt.sprite_facings.

Arguments:

dirt_sprite_key

Returns text naming a sprite's icon: a file's path, or the reference of an icon made at run time, whose text is empty or its type.

Arguments:

dirt_sprite_pixels

Returns the pixels a sprite covers in one direction, any opacity counting, as indexes in row-major order on a canvas width across and 32 tall: none for a sprite of another size. Templates and outfits share sprites (every human head, its eyes, a jumpsuit), so each sprite's direction is read once and kept in SSdirt.sprite_reads, the least lately read dropped first. You should NEVER modify the list it returns.

Arguments:

dirt_sprite_read_key

Returns the key dirt_sprite_pixels() keeps a sprite's direction under.

Arguments:

dirt_sprite_shows

Returns whether a 32x32 sprite has a pixel in one direction, any opacity counting, reading only as far as its first. Rows go from the middle down, then up from it: parts lie in the canvas's middle and lower rows.

Arguments:

dirt_sprite_zone_pixels

Returns which of a zone's pixels a sprite covers, read at those pixels only, facing the way that shows the zone. Kept for each sprite and zone, the oldest dropped past DIRT_COVERAGE_READS. A sprite that isn't 32x32 covers none. You should NEVER modify the list it returns.

Arguments:

dirt_sprites_key

Returns sprites as one line of text, to key masks by and to tell outfits apart.

Arguments:

dirt_surface_parts

Returns the parts a surface's splats reach, lowest drawn first: those on a zone one of the splats is on. Where each draws against the surface is worked out in each direction (/datum/dirt_part_source/proc/under()).

Arguments:

dirt_surface_rows

Returns a surface's pixels grouped by limb and row, so a feature is weighed only on the rows it can reach: alist(limb = list(list(row, lowest h, highest h, indexes), ...)), rows from the top. Built once for each surface. You should NEVER modify it.

Arguments:

dirt_taur_back_region

Returns the pixels of a taur body mess aimed at its back reaches in one direction: a band 3 px deep under the back line the view shows. None facing south (the band there is the rider's waist, which read as underwear); facing north, the columns whose top lies within 2 px below the back's middle height; in profile, the columns whose top lies within 1 px of it, less the 30% at the far end (a white tuft at the tail) and the 2 beside the rider's waist (the groin).

Arguments:

dirt_taur_blank

Returns a 64x32 blank, for masks on the taur canvas. You should NEVER modify it.

dirt_taur_fitted

Returns whether a garment is drawn on its wearer's taur body as a taur suit: a sprite spanning the 64x32 taur canvas, the body's own tile in its middle, which takes the taur body's pools.

Arguments:

dirt_taur_owners

Returns what each pixel of the taur canvas shows in one direction: the EXTERNAL_* layer of the taur body drawn last over it, DIRT_TAUR_RIDER where the rider (the body, 16 px in) is drawn over the taur body, or null, as dirt_taur_stack() stacks them.

Arguments:

dirt_taur_pools

Returns a back shot's pools on a taur body in one direction: dirt_mess_splat_rasterise() on the pixels the taur body shows, keeping clear of the rider's mess there.

Arguments:

dirt_taur_source

Returns a person's taur body as mess reads it, drawn or hidden (a taur suit hides it), or null without one.

Arguments:

dirt_taur_stack

Returns what a taur canvas shows, lowest first, as the reference stacks a taur under its rider: the taur body's behind and adjacent layers, the rider, then its front layers. You should NEVER modify it.

dirt_taur_takes_pools

Returns whether a back shot on a person also lands along their taur body's back: they have a taur body of a kind with a back (dirt_read_source(): not Big Legs), it draws now, and the surface the shot lands on isn't a garment drawn over the whole taur canvas (a taur suit), which takes the pools itself (/datum/component/dirtiness/proc/ready_taur_cloth_masks()).

Arguments:

dirt_template_key

Returns the key of the template zone sources build: an MD5 of every sprite they name, in draw order, the eyes and whether the head is a human's. Bodies drawn from the same sprites share it.

Arguments:

dirt_thickness_code

Returns the code a thickness packs as in /datum/dirt_pixels/proc/drawn(), from 0: its place among the thicknesses packed so far this round. A mask's thicknesses come from a handful of values.

Arguments:

Crashes:

dirt_underclothes_by_rules

Returns which underclothes a shot at a zone lands on before the human template is built: the topmost piece covering it by the rules underclothes follow elsewhere, or null. Underwear covers the groin and butt, an undershirt or bra the chest, and an undershirt the stomach and back too. A piece also covers what it hides (dirt_underclothes_hides()).

Arguments:

dirt_underclothes_hides

Returns whether the underclothes rules say a piece hides a zone outright: an undershirt that hides the groin (a corset, a leotard) the groin and butt, underwear that hides the breasts (a one-piece swimsuit) the chest.

Arguments:

dirt_underclothes_key

Returns the key a person's mess on one piece of underclothes is kept under: the slot and the accessory, so it stays with that piece while it's off.

Arguments:

dirt_underclothes_on

Returns which underclothes a shot at a zone lands on, or null for the skin. Each piece is judged by its sprite against the zone's pixels on the plain human template (dirt_human_zone_pixels()), so every body is judged on the human shape and nothing waits on its own template.

Arguments:

dirt_underclothes_sprites

Returns a body's underclothes as drawn, lowest first: list(list(DIRT_UNDERCLOTHES_* define, icon, icon state, accessory name), ...). Each is drawn as get_underwear_overlays() draws it, fitted to the body, a revealing loincloth with its flap cut away while the bulge cuts it (bulge_cut_worn()), and they stack by their accessories' layers, then in that proc's order.

Arguments:

dirt_underclothes_worn

Returns the underclothes a body draws, each its own surface: alist(DIRT_UNDERCLOTHES_* define = its /datum/sprite_accessory/clothing), as get_underwear_overlays() picks them.

Arguments:

dirt_value_noise

Returns smooth value noise from 0 to 1: the four lattice points round a sample, blended with a smoothstep. Each point is dirt_noise_hash()'s, its chain's seed steps taken once and each column's step once, for the four.

Arguments:

dirt_worn_shift

Returns where a worn garment's wrapper has its wearer's own tile, as list(pixels right, pixels up): build_worn_icon() centres the wrapper on the garment's worn dimensions, then moves it by its worn offsets, so masks drawn on the body go back by both. list(0, 0) for a 32x32 garment without offsets; list(16, 0) for a 64x32 taur suit, moved 16 px left.

Arguments:

dirt_zone_cover_flags

Returns the body_parts_covered flag each zone below the face lies under: list(zone = flag). You should NEVER modify it.

dirt_zone_draw_order

Returns the zones a body's limb sprites come from, in the order the body draws them: get_all_limbs() order, which for every carbon is its species' bodypart_overrides sorted by body_part (/datum/species/New()), so the chest, the head, the legs and the arms, each hand straight after its arm. Zone sources are alists, which keep no order, so they're always read in this one.

dirt_zone_facing

Returns the direction a zone is judged from, the one that shows it: north for the back and butt, south for the rest.

Arguments:

dirt_zone_layer

Returns the layer of the surface a shot at a zone would land on: the garment's over it, DIRT_UNDERCLOTHES_LAYER where underclothes take it, else DIRT_SKIN_LAYER.

Arguments:

dirt_zone_limbs

Returns the limb each zone's pixels lie on: list(zone = DIRT_LIMB_* define). An arm runs on into its hand. You should NEVER modify it.

dirt_zone_owners

Returns the zone each pixel shows in one direction, as the body draws its limb images: a list of one zone or null per pixel. The images draw the lowest layer first and in draw order within a layer, and the last one drawn over a pixel owns it: the legs' lower halves (BODYPARTS_LOW_LAYER), then the limbs and the legs' upper halves (BODYPARTS_LAYER), then the hands (BODYPARTS_HIGH_LAYER). handle_masking() splits each leg between its halves with leg_masks.dmi, so the far leg goes under everything in profile.

Arguments:

dirt_zone_pixels

Returns each drawn zone's sprite pixels in one direction: list(zone = indexes from dirt_sprite_pixels()), zones in draw order.

Arguments:

dirt_zone_sources

Returns the sprites a body's dirt template is built from, as get_limb_icon() draws them: alist(zone = list(icon file, icon state)) for each drawn limb and each hand, "eyes" = list(icon file, left state, right state) when the head draws eyes, and "human_head" = whether the head is a human's. Stumps, invisible limbs and a taur's hidden legs draw no sprite of their own, so they're left out.

Arguments:

dirt_zone_sources_drawable

Returns whether every limb sprite zone sources name is in its sheet. The eyes aren't checked: a missing eye state draws no eye, so the face is left unguarded as the body shows it.

Arguments:

dirt_zone_sources_match

Returns whether a body draws the sprites zone sources name, as dirt_zone_sources() reads them, without building them: the sheet and state of each limb in some zones and of its hand, the eyes, and whether the head is a human's. Skin mess asks it only when what a limb is drawn from has changed since it last matched (skin_reads); a worn garment's mess, a taur body's or taur suit's pools and the vulva's ring of skin ask it on every draw.

Arguments:

dirt_zone_underclothes

Returns the kinds of underclothes that belong on each zone, in the order they take a tied shot there: list(zone = list of DIRT_UNDERCLOTHES_* defines). You should NEVER modify it.

disambiguate_client

Takes an argument which could be either a ckey, /client, or IRC marker, and returns a client if possible Returns [EXTERNAL_PM_USER] if an IRC marker is detected Otherwise returns null

disease_air_spread_walk

Helper for checking if there is an air path between two turfs

diseasescan

Checks the individual for any diseases that are visible to the scanner, and displays the diseases in the attacked to the attacker.

dispatch_announcement_to_players

Proc that just dispatches the announcement to our applicable audience. Only the announcement is a mandatory arg. should_play_sound can also be a callback, if you want to only play the sound to specific players.

display_corners

Makes all lighting corners visible, debug to aid in understanding

display_energy

Format an energy value in prefixed joules. Arguments

display_power

*Format a power value in prefixed watts.

do_admin_sparks

Creates non-interactive rainbow sparks at the given source location

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.

do_chem_smoke

Helper to quickly create a cloud of reagent smoke reagent_type can accept a list of reagents, optionally as a key-value pair with values overriding reagent_volume if not null

do_foam

Proc to quickly spawn foam reagent_type can accept a list of reagents, optionally as a key-value pair with values overriding reagent_volume if not null

do_portal_spawn

Spawns a portal storm that spawns in sentient/non sentient mobs portal_appearance is a list in the form (turf's plane offset + 1) -> appearance to use

do_salon_work

A do_after() for the finishing touches that plays the tool's work sound, and the tattoo machine's hum, until it ends either way.

do_smoke

A helper proc used to spawn small puffs of smoke.

Arguments:

do_sweep

Sweep objects in the direction we're facing towards our direction Arguments

drawn_appearances

Returns every appearance drawn in an overlay layer, each before what it holds.

Arguments:

drawn_underclothes

Returns the appearance a test human's only underclothes are drawn as. Their layer also holds what their worn emissives are drawn with (prepare_worn_emissive_overlays()), which has no sprite.

Arguments:

drawn_worn_sprite

Returns the sprite a test human's worn item is drawn as in one of its overlay layers: the first appearance drawn there with an icon. The layer also holds what the item's emissives are drawn with (prepare_worn_emissive_overlays()).

Arguments:

drop_hair_trimmings

Drops a pile of hair cuttings, coloured from the hair that was just cut off.

ducting_layer_check

Finds a duct or plumbing machinery located at the destination

Arguments

dump_in_space

Dump a movable in a random valid spacetile

dump_stack

Returns an ordered list of all our parent procs, highest to deepest.

introspection like this is mostly useful for debugging, if you have another use I suspect you are just creating god's strongest footgun and should rethink things

duplicate_object

duplicate_object

Makes a copy of an item and transfers most vars over, barring GLOB.duplicate_forbidden_vars Args: original - Atom being duplicated spawning_location - Turf where the duplicated atom will be spawned at.

dview

Version of view() which ignores darkness, because BYOND doesn't have it (I actually suggested it but it was tagged redundant, BUT HEARERS IS A T- /rant).

dyn_explosion

Using default dyn_ex scale:

100 explosion power is a (5, 10, 20) explosion. 75 explosion power is a (4, 8, 17) explosion. 50 explosion power is a (3, 7, 14) explosion. 25 explosion power is a (2, 5, 10) explosion. 10 explosion power is a (1, 3, 6) explosion. 5 explosion power is a (0, 1, 3) explosion. 1 explosion power is a (0, 0, 1) explosion.

The easy formula for defaults is sqrt(power * 2) * (0.25 | 0.5 | 1)

Arguments:

emissive_appearance

Produces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the EMISSIVE_COLOR.

emissive_blocker

Produces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the EM_BLOCK_COLOR.

emissive_branch_lit

Whether an emissive-plane branch glows anywhere. An emissive's colour is a matrix whose constant row turns it red (blooming) or green; BYOND keeps a blocker's, which only multiplies, as plain black. inherited is the colour the branch takes from above it.

emissive_branches

What of a look glows in the dark, for the pages that show it with the lights off.

The game lights a glowing pixel through its emissive plane: every emissive overlay and every blocker over one sits there, at the layer of what it belongs to, so a blocker drawn later hides the glow under it. An emissive's colour turns it red when it blooms and green when it doesn't; a blocker's turns it black. Flattening a look's emissive overlays alone, as the plane holds them, gives that mask: get_flat_uni_icon() leaves them out of the look itself, as they are on another plane. The worn-emissive grouping puts every emissive and blocker of a mob at its top level.

A look's own emissive overlays and underlays, the glowing and the blocking, layered in (low, high], as list(overlays, underlays), each null when there are none. Underlays come only with the lowest layers, as a slice of the look takes them.

emissive_branches_lit

Whether any of emissive_branches() glows, rather than only blocking.

emissive_holder

emissive_branches() of look in a holder that get_flat_uni_icon() draws as the emissive plane holds them, placed as they are on the look: its layer and facing, and a blank tile of its own at the look's lower left, where the look's own icon is. Null when there are none.

emissive_tri_bool_list

Returns a cached emissive boolean list for mutant bodyparts. You should NEVER modify these lists, always use Copy() if you have to.

This proc takes exactly three boolean-like values (0 or 1) representing whether the primary, secondary, and tertiary color channels are emissive.

To reduce memory churn and repeated list allocations, all possible permutations (2³ = 8 total) are cached globally and reused.

The returned list should be treated as immutable. Modifying the returned list will affect all users of that permutation.

Arguments:

Returns:

Crashes:

end_cooldown

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

Arguments:

This sends a signal reporting the cooldown end.

end_message_delay

Simply resets the message delay and the recent messages list, to ensure that recent messages can be sent again. Is called on a one second timer after a delay is set, from /obj/machinery/telecomms/broadcaster/receive_information()

ending_helper

Helper to set the round to end asap. Current usage Cult round end code

endswith

Returns TRUE if the input_text ends with the ending

energy_to_power

Converts the joule to the watt, assuming SSmachines tick rate. Arguments

engaged_role_play_check

Checks if a player meets certain conditions to exclude them from event selection. Returns FALSE if the player is considered ineligible for the event

english_list

Returns a list in plain english as a string

expand_three_digit_color

Given a 3 character color (no hash), converts it into #RRGGBB (with hash)

expand_weights

Takes a weighted list (see above) and expands it into raw entries This eats more memory, but saves time when actually picking from it

explosion

Makes a given atom explode.

Arguments:

export_single_item

It works like export_item_and_contents(), however it ignores the contents. Meaning only exported_atom will be valued.

failed_narsie_summon

Summon failed, time to work backwards

fast_split_stack

Splits a stack. we don't use /obj/item/stack/proc/split_stack because Byond complains that should only be called asynchronously. This proc is also more faster because it doesn't deal with mobs, copying evidences or refreshing atom storages Has special internal uses for e.g. by the material container & RPED

Arguments:

female_cut_over_pecs

Returns the female cut a garment gets on wearer, as wear_female_version() takes its flags: flags themselves, unless the wearer has pecs, which keep the torso out of it. Then only the lower body is shaped: FEMALE_UNIFORM_LOWER_ONLY where the cut would take in the crotch, or null, no cut at all, where it would shape only the torso. Pecs of any shape count, whether they show or not.

Arguments:

female_lower_cut_mask

Returns the mask a FEMALE_UNIFORM_LOWER_ONLY cut is drawn through: masking_helpers.dmi's full cut, less the pixels its torso-only cut shares with it, so it shapes the lower body alone. Made with each new cut, which wear_female_version() caches.

fill_grid_from_icon

Copies the pixel colors from the passed in icon I to the 2d list grid

fill_holidays

Fills the holidays list if applicable, or leaves it an empty list.

fill_with_ones

Given a list, return a copy where values without defined weights are given weight 1. For example, fill_with_ones(list(A, B=2, C)) = list(A=1, B=2, C=1) Useful for weighted random choices (loot tables, syllables in languages, etc.)

filter_appearance_recursive

Recursively applies a filter to a passed in static appearance, returns the modified appearance

filter_chain_step

Keeps the steps in the correct order. Arguments:

filter_name_ic

Helper proc to check if a name is valid for the IC filter

findTrueKey

Takes a stealthed ckey as input, returns the true key it represents

find_functional_ntnet_relay

Checks whether NTNet is available by ensuring at least one relay exists and is operational.

find_last_punctuation

Find what punctuation is at the end of the input, returns it. Ignores emphasis (|, +, _)

find_maintenance_spawn

Finds us a generic maintenance spawn location.

Goes through the list of the generic mainteance landmark locations, checking for atmos safety if required, and returns a valid turf. Returns MAP_ERROR if no valid locations are present. Returns nothing and alerts admins if no valid points are found. Keep this in mind when using this helper.

find_mod_theme

Simple proc to search through mod_themes global to return a theme

find_obstruction_free_location

Find an obstruction free turf that's within the range of the center. Can also condition on if it is of a certain area type.

find_record

Returns the first record in the list that matches the name

If locked_only is TRUE, locked records will be checked

If locked_only is FALSE, crew records will be checked

If no record is found, returns null

find_safe_turf

Attempts to find a "safe" floor turf within some given z-levels

Returns a safe floor turf, BUT there is a chance of it being null if an extremely large portion of a z-level is unsafe or blocked.

find_space_spawn

Finds us a generic spawn location in space.

Goes through the list of the space carp spawn locations, picks from the list, and returns that turf. Returns MAP_ERROR if no landmarks are found.

find_vent_spawns

Finds us all suitable vent spawn locations on the station.

findname

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

finish_equip_mob

A utility function for /datum/strippable_items to finish equipping an item to a mob.

finish_unequip_mob

A utility function for /datum/strippable_items to finish unequipping an item from a mob.

fire_curse_hand

Torment the target with a frightening hand

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_name

Find the first name of a mob from a passed string with regex

fit_garment_frames

Fits a garment's state in place: each direction, and each animation frame, is fitted on its own (fit_garment_view()), the front views last (GARMENT_FIT_PIECE_VIEW()).

Arguments:

Returns:

fit_garment_view

Fits one view of a garment's state in place, one direction's animation frame (/datum/garment_fit_view), and draws it back over the state's own when the fit changes it. A state's views are numbered direction by direction (S, N, E, W), and frame by frame within each. Its arms' sleeves are judged from its frame's front view (garment_front_sleeves()), which must still be the garment's own: fit the front views last.

Arguments:

Returns whether the view changed.

flash_color

Flash a color on the passed mob

flick_overlay_global

Add an image to a list of clients and calls a proc to remove it after a duration

force_apc_arcing

Set all APCs to start (or stop) arcing

forced_throw_vortex

Magical move-wooney but it always throws you that happens sometimes, adapted from goonchem_vortex

Simulates a vortex that moves nearby movable atoms towards or away from the turf T. Range also determines the strength of the effect. Always throws. Parameters decide how hard it throws. Arguments:

format_frequency

Format frequency by moving the decimal.

format_text

Properly format a string of text by using replacetext()

full_capitalize

Returns a string with the first letter of each word capitialized

gags_to_universal_icon

Converts a GAGS atom to a universal icon by generating blend operations.

garment_colour_hue

Returns a colour's hue as the sleeve modes judge it (garment_sleeve_mode()), in whole degrees from 0 to 359, or -1 for a grey: one whose channels spread less than percent percent of its brightest one, black included.

Arguments:

garment_colours_kin

Whether a shaded sleeve may step a pixel from colour source to the darker colour, keeping to source's family. A colour is lit when its brightest channel is at least SLEEVE_LIT_MIN, and dark otherwise. It may when:

Arguments:

garment_fit_cache_slot

Returns the list a garment fit is cached in, under its own last key, by the keys before it, making each level as it goes.

Arguments:

garment_fit_templates

Returns the limb templates garments are fitted with, read from fitting/fit_templates.json the first time they're asked for: SSgarment_fitting reads them as the server starts. The file is compiled into the resource file, so a server has it wherever it runs.

limbs holds, for each limb, muscle size and view ("S", "N", "E" or "W"), the rows its outline grew in as bands (y, step back into the limb, new edge, old edge, distance, and whether the row is one an arm grew into above its old top, which only a sleeve is fitted over), its baseline pixels as core, the upper third of those by rows as upper_core, made here for the sleeve test, and its fitted pixels' skin tones as tones. The limbs are the arms and legs by zone, a digitigrade body's legs, "r_leg_digi" and "l_leg_digi", and "chest_m", a male chest's glutes in the side views at the sizes where they reach past today's, which has bands alone. A leg in a side view grows toward both its front and its back.

garment_fit_upper_core

Returns the upper third, by rows, of a limb template's baseline pixels: on an arm, what a sleeve covers and a strap over the shoulder doesn't. The sleeve test reads it (/datum/garment_fit_view/proc/apply_bands(), garment_front_sleeves()).

Arguments:

garment_frame_count

Returns how many animation frames a garment's state has, counted from its front view, up to GARMENT_FIT_MAX_FRAMES.

Arguments:

garment_front_sleeves

Returns which of a garment's fitted arms it has a sleeve over, judged from its front view, where the arms show whole: fitted arm -> whether the garment covers at least half of the upper third of the arm's baseline pixels there. A short sleeve covers the upper arm and counts, where a strap over the shoulder covers a pixel or two of it. Every view's fit uses it (/datum/garment_fit_view/proc/apply_bands()). Null when no arm is fitted.

Arguments:

garment_metadata

Returns fitting/garment_metadata.json's sheets, by path, read the first time they're asked for: SSgarment_fitting reads them as the server starts. See garment_sheet_metadata().

garment_near_grey

Whether a colour is a near-grey: its channels spread less than twice SLEEVE_GREY_PERCENT percent of its brightest one, black included. A greyscale garment's own faintly blue shading falls either side of the grey line, but is near-grey.

Arguments:

garment_pec_flex

Returns a pec flex's templates, as garment_pec_templates() holds them under flexes: its frame delays, and its shapes, each shape's templates by view on each of its frames. Null for a sheet that isn't a pec flex's, like a jiggle's, or none.

Arguments:

garment_pec_templates

Returns the templates tops are fitted to pecs with, read from fitting/pec_templates.json and fitting/pec_flex_templates.json the first time they're asked for, as the limb templates are.

centre is the chest's centre column and chest the chest's own outline, per view and row, as its outermost x on each side. shapes holds, for each pec shape and view: in front and back views, the pec's outermost x on each side per row as rows (null where it has none) and its pixels as pixels, also kept by FIT_INDEX() as mask; in side views, its bulge past the body's front as bands, in the limb templates' form; in the front view, the pixels its smile shades as smile, for pecs with and without nipples. flexes holds, for each pec flex by its sheet's path, the flex's frame delays and, for each shape, its templates of the same form on each frame of the flex as shapes (garment_pec_flex()).

garment_sheet_metadata

Returns what garment fitting knows of a sheet without reading its pixels, from fitting/garment_metadata.json: sleeves, its states whose own sleeves pick shaded sleeves -> TRUE, and colours, for each state whose fits read whole views, those views' colours as fit_garment_view() takes them, or null for a view read from its pixels. Null for a sheet it doesn't know, like a generated icon, or one that changed after the file was written: those are read from their pixels.

A sheet is checked against its hash the first time it's asked about each round.

Arguments:

garment_sleeve_mode

Returns the mode a worn garment is fitted in when it doesn't set its own, picked from its sleeves in its front view.

The sleeves are the garment's pixels over the baseline arms (both arms' template core). Their lit colours count, where the brightest channel is at least SLEEVE_LIT_MIN; darker ones are outlines and shadows. Plain sleeves, fitted with the arms' shading (GARMENT_FIT_SHADED_SLEEVES), are greys only, up to SLEEVE_MAX_COLOURS of them, or one hue: up to SLEEVE_MAX_COLOURS hued colours within SLEEVE_MAX_HUE_SPREAD degrees of each other, and at most SLEEVE_MAX_GREYS_WITH_HUE grey. Anything else, and a garment with no sleeves or only dark ones, is fitted solid.

Arguments:

gas_mixture_parser

gather_z_level_information

Returns all necessary z-level information. Argument append_grid allows the user to see a table showing all of the z-level linkages, which is only visible and useful in-game.

generateStealthCkey

Hands back a stealth ckey to use, guarenteed to be unique

generate_adjacent_directions

Encodes connectivity between border objects Returns a list accessable by a border object's dir, the direction between it and a target, and a target Said list will return the direction the two objects connect, if any exists (if the target isn't a border object and the direction is fine, return the inverse of the direction in use)

generate_and_hash_rsc_file

generates a filename for a given asset. like generate_asset_name(), except returns the rsc reference and the rsc file hash as well as the asset name (sans extension) used so that certain asset files don't have to be hashed twice

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_autowiki_output

Returns a string of the autowiki output file

generate_bitfields

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

generate_changeling_meteor

Receives a mob candidate, transforms them into a changeling, and hurls them at the station inside of a changeling meteor

Takes a given candidate and turns them into a changeling, generates a changeling meteor, and throws it at the station. Returns the changeling generated by the event, NOT the meteor. This is so that it plays nicely with the dynamic ruleset while still being usable in the ghost_role event as well.

Arguments:

generate_chemwiki_line

Generate the big list of reagent based reactions. style='background-color:#FFEE88;'|{{anchor|Synthetic-derived growth factor}}Synthetic-derived growth factor▮

generate_clockcult_scriptures

Generate all scriptures in a global assoc of name:ref. Only needs to be done once

generate_cult_rune_types

Returns an associated list of rune types. [rune.cultist_name] = [typepath]

generate_customizable_races

Generates races available to choose in character setup at roundstart, yet not playable on the station.

This proc generates which species are available to pick from in character setup.

generate_filter_immune_string

Generates a static string appended to the venom milker's description, detailing which reagents available to the venom quirk will not be transformed into /datum/reagent/generic_milked_venom.

Ran once, then never again.

generate_generator_index

Creates generator__id => type map.

generate_hallucination_weighted_list

Generates the global weighted list of random hallucinations.

generate_heretic_starting_knowledge

Modifies the 2 lists provided in the arguments and sets it up so the heretic can actually start researching stuff. Specifically generates the tier 1-4 knowledges + start ones for each path as well for the preview (should probably be moved to use the actual list of per-path researches) Importantly, this adds HKT_NEXT's for the starting knowledges so the heretic's next researches are considered valid

generate_holiday_races

Every species with a holiday of its own that the roundstart races config doesn't already allow: id -> holiday.

generate_icon_alpha_mask

Helper proc to generate a cutout alpha mask out of an icon.

Why is it a helper if it's so simple?

Because BYOND's documentation is hot garbage and I don't trust anyone to actually figure this out on their own without sinking countless hours into it. Yes, it's that simple, now enjoy.

But why not use filters?

Filters do not allow for masks that are not the exact same on every dir. An example of a need for that can be found in [/proc/generate_left_leg_mask()].

Arguments:

Returns an /icon that is the alpha mask of the provided icon and icon_state.

generate_items_inside

Creates new items inside an atom based on a list

generate_lazy_template_map

Iterates through all lazy template datums that exist and returns a list of them as an associative list of key -> instance.

Screams if more than one key exists, loudly.

generate_map_list_from_directory

Returns a list of all maps to be found in the directory that is passed in.

generate_milkable_venom_list

Generates a static list of /datum/reagent that will not be transformed into /datum/reagent/generic_milked_venom upon being milked by a venom milker.

Ran once, then never again.

generate_number_strings

Generates and returns a list of both arabic and roman numerals for 1 through 99

generate_quirk_constant_data

Constructs [GLOB.all_quirk_constant_data] by iterating through a typecache of pregen data, ignoring abstract types, and instantiating the rest.

generate_random_name

Generate a random name based off of one of the roundstart languages

generate_random_name_species_based

Generate a random name based off of a species This will pick a name from the species language, and avoid picking common if there are alternatives

generate_reagents_taste_message

Returns what the reagents in our given list taste like

Arguments:

generate_seed_data_from

Returns a list of seed data generated from the given seeds. Filling the "name", "icon" and "icon_state" fields of the data is the caller's responsibility.

generate_selectable_species_and_languages

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.

generate_space_underlay

Generates a space underlay for a turf This provides proper lighting support alongside just looking nice Accepts the appearance to make "spaceish", and the turf we're doing this for

generate_taur_clothing

Proc to generate a taur variation of clothes, with the intent of caching them. It is meant for suits and uniforms at the moment, to cut out the bottom half so that it doesn't look too out of place.

Arguments:

Add a taur_type here if you ever want to add different cropping options, for whatever reason.

generate_unique_announcement_header

Proc that just generates a custom header based on variables fed into priority_announce() Will return a string.

generate_wound_series_collection

Generates [wound_series_collections] by iterating through all pregen_data. Refer to the mentioned list for documentation

generate_wound_static_data

Constructs [GLOB.all_wound_pregen_data] by iterating through a typecache of pregen data, ignoring abstract types, and instantiating the rest.

genital_option_label

Reverse lookup: the label whose define matches the current value, or null.

get

Returns the atom type in the specified loc

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. clip_bounds fixes the output rectangle in appearance coordinates, including nested offsets. grow: the canvas fits every overlay, nested ones where they really are; grown_origin, list(1, 1), gets where it starts.

get_abstract_branch_descendants

Returns a list of concrete types under abstract sub-branches of root

get_abstract_types

Returns a list of all abstract typepaths for all datums

get_active_player_count

Counts active players who are playing in the round

get_active_player_list

Get active players who are playing in the round

get_adjacent_areas

Returns a list of all areas that are adjacent to the center atom's area, clear the list of nulls at the end.

get_adjacent_open_areas

Returns a list with all the adjacent areas by getting the adjacent open turfs

get_adjacent_open_turfs

Returns a list with all the adjacent open turfs. Clears the list of nulls in the end.

get_adjacent_turfs

Returns a list of all turfs that are adjacent to the center atom's turf, clear the list of nulls at the end.

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_all_antag_flags

Returns a list of all antag flags that are available to the player

So this includes stuff like traitor, wizard, fugitive, but does not include wizard apprentice or hypnotized

get_all_slots

Get all possible organ slots by checking every organ, and then store it and give it whenever needed

get_allowed_instrument_ids

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

get_angle

Calculate the angle between two movables and the west|east coordinate

get_angle_raw

Angle between two arbitrary points and horizontal line same as /proc/get_angle

get_announcement_system

Returns a random announcement system that is operational, has the specified config entry, signal can reach source and radio supports any channel in list. All args are optional.

get_anomaly_protection

Calculates mob effect protection returns NO_ANOMALY_PROTECTION if not human, returns calculated protection otherwise higher returning number means less protection

Arguments:

get_antag_minds

Returns MINDS of the assigned antags of given type/subtypes Supplying no antag type grants all minds with antag datums

get_area_name

Returns the name of the area the atom is in

get_areas_in_range

Returns a list with the names of the areas around a center at a certain distance Returns the local area if no distance is indicated Returns an empty list if the center is null

get_armor_by_type

Gets an armor type datum using the given type by formatting it into the expected datum tag

get_atom_on_turf

Returns the top-most atom sitting on the turf. For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.

Arguments

get_bbox_of_atoms

Get a bounding box of a list of atoms.

Arguments:

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

get_blood_type

Returns the blood_type datum that corresponds to the string id key in GLOB.blood_types

get_blueprint_data

get_blueprint_data Gets a list of turfs around a central turf and gets the blueprint data in a list Args:

get_bulge_palette

The adaptive palette of a cloth colour in a finish (BULGE_FINISH_*): five "#rrggbb" strings, cloth, light, highlight, shade and deep shade, or null for no colour. One shared list per (colour, finish): never change it.

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_cardinal_dir

Get the cardinal direction between two atoms

get_chasm_category

Returns a key to store, remove and access fallen mobs depending on the z-level. This stops rescuing people from places that are waaaaaaaay too far-fetched.

get_chat_toggles

Get the given client's chat toggle prefs.

Getter function for prefs.chat_toggles which guards against null client and null prefs. The client object is fickle and can go null at times, so use this instead of directly accessing the var if you want to ensure no runtimes.

returns client.prefs.chat_toggles or FALSE if something went wrong.

Arguments:

get_chem_id

Returns reagent datum from reagent name string

get_closest_atom

Returns the closest atom of a specific type in a list from a source

get_color_from_blood_list

Returns the hex color string, or a color matrix, of a given blood_type datum given an assoc list of blood_DNA e.g. ("Unknown Blood Type", "*X")

get_consistent_feature_entry

Takes in an accessory list and returns the first entry from that list, ensuring that we dont return SPRITE_ACCESSORY_NONE in the process.

get_corresponding_wound_type

Searches through all wounds for any of proper type, series, and biostate, and then returns a single one via pickweight. Is able to discern between, say, a flesh slash wound, and a metallic slash wound, and will return the respective one for the provided limb.

The severity_max and severity_pick_mode args mostly exist in case you want a wound in a series that may not have your ideal severity wound, as it lets you essentially set a "fallback", where if your ideal wound doesnt exist, it'll still return something, trying to get closest to your ideal severity.

Generally speaking, if you want a critical/severe/moderate wound, you should set severity_min to WOUND_SEVERITY_MODERATE, severity_max to your ideal wound, and severity_pick_mode to WOUND_PICK_HIGHEST_SEVERITY - UNLESS you for some reason want the LOWEST severity, in which case you should set severity_max to the highest wound you're willing to tolerate, and severity_pick_mode to WOUND_PICK_LOWEST_SEVERITY.

Args:

Returns: A randomly picked wound typepath meeting all the above criteria and being applicable to the part's biotype - or null if there were none.

get_ctf_voting_controller

Returns the existing /datum/ctf_voting_controller for the given ID, or makes one

get_customizable_races

Gets a list of all customizable races on roundstart.

get_decoration_color_from_pattern

Proc to return colors for recoloring atoms based on a pattern and the position of the atom. Primarily used by holidays

get_display_icon_for

Gets the relevant universal icon for an atom, when displayed in TGUI. (see: icon_state_preview) Supports GAGS items and colored items.

get_dist_euclidean

Returns the distance between two atoms

get_dummy_savefile

Gets a dummy savefile for usage in icon generation. Savefiles generated from this proc will be empty.

get_dynamic_human_appearance

Creates a human with the given parameters and returns an appearance of it

get_edge_target_turf

Returns the turf located at the map edge in the specified direction relative to target_atom used for mass driver

get_element_by_var

return first thing in L which has var/varname == value this is typecaste as list/L, but you could actually feed it an atom instead. completely safe to use

get_emote_sound_from_list

Gets an emote sound from a specific list of sounds. Supports lists and genders. Used by emote datums for default sounds, and tongues, masks etc. for overrides.

get_first_open_turf_in_area

Iterates over all turfs in the target area and returns the first non-dense one

get_flat_existing_human_icon

A simpler version of get_flat_human_icon() that uses an existing human as a base to create the icon. Does not feature caching yet, since I could not think of a good way to cache them without having a possibility of using the cached version when we don't want to, so only use this proc if you just need this flat icon generated once and handle the caching yourself if you need to access that icon multiple times, or refactor this proc to feature caching of icons.

Arguments:

get_flat_human_icon

If you already have a human and need to get its flat icon, call get_flat_existing_human_icon() instead.

For creating consistent icons for human looking simple animals. grow: getFlatIcon() grows the canvas to show what reaches past the tile, for previews of one direction.

get_flat_uni_icon

getFlatIcon for /datum/universal_icons Still fairly slow for complex appearances due to filesystem operations. Try to avoid using it grow: the canvas fits every overlay, nested ones where they really are; see flat_x1.

get_frozenwake_puzzle_area

Proc used to check if get_area returns the frozenwake puzzle area.

get_garment_fit

Returns the garment fit to these muscle sizes and pecs, made the first time it's asked for.

Arguments:

get_general_adminwho_information

Proc that gathers adminwho information for a general player, which will only give information if an admin isn't AFK, and handles potential fakekeying. Will return a list of strings.

get_hear

Like view but bypasses luminosity check

get_hear_turfs

get_hear that only gets turfs so we can use as_anything

get_hearers_in_LOS

Returns a list of movable atoms that are hearing sensitive in view_radius and line of sight to source the majority of the work is passed off to the spatial grid if view_radius > 0 because view() isnt a raycasting algorithm, this does not hold symmetry to it. something in view might not be hearable with this. if you want that use get_hearers_in_view() - however thats significantly more expensive

get_hearers_in_looc_range

get_hearers_in_radio_ranges

Returns a list of mobs who are in hearing range of every radio in the list of radios given

get_hearers_in_radio_ranges_track_radios

Returns a list of mobs who can hear any of the radios given in the given radio list, indexed by the radio. More expensive than get_hearers_in_radio_ranges()

get_hearers_in_range

The exact same as get_hearers_in_view, but not limited by visibility. Does no filtering for traits, line of sight, or any other such criteria. Filtering is intended to be done by whatever calls this function.

This function exists to allow for mobs to hear speech without line of sight, if such a thing is needed.

get_hearers_in_view

returns every hearaing movable in view to the turf of source not taking into account lighting useful when you need to maintain always being able to hear something if a sound is emitted from it and you can see it (and youre in range). otherwise this is just a more expensive version of get_hearers_in_LOS().

get_holiday_races

Species that are roundstart races only during a holiday, as an assoc list of id to holiday.

Character setup offers them all year. Joining is still gated by check_roundstart_eligible(), since jobs refuse species missing from the roundstart races.

get_icon_dimensions

Returns a list containing the width and height of an icon file

get_icon_dimensions_pure

Returns a list containing the width and height of an icon file, without using rustg for pure function calls

get_icon_dmi_path

given an icon object, dmi file path, or atom/image/mutable_appearance, attempts to find and return an associated dmi file path. a weird quirk about dm is that /icon objects represent both compile-time or dynamic icons in the rsc, but stringifying rsc references returns a dmi file path ONLY if that icon represents a completely unchanged dmi file from when the game was compiled. so if the given object is associated with an icon that was in the rsc when the game was compiled, this returns a path. otherwise it returns ""

get_job_hud_icon

Returns the (isolated) security HUD icon for the given job.

get_line

Get a list of turfs in a line from starting_atom to ending_atom.

Uses the ultra-fast Bresenham Line-Drawing Algorithm.

get_linked_admin_name

Proc that will return the applicable display name, linkified or not, based on the input client reference.

get_linked_z_angle

Gets the angle between two linked z-levels. Returns an angle (in degrees) if the z-levels are crosslinked/neighbors, or null if they are not.

Arguments:

get_linked_z_levels_in_range

Gets all connected z-levels within a given manhattan distance of center.

Arguments:

get_liquid_color_factor

Returns the LIQUID_COLOR_FACTOR_* that a pool of this LIQUID_SURFACE_* class scales its mix colour by.

get_liquid_reagent_look

Returns what liquids read off a reagent type, worked out once per type.

Arguments:

get_liquid_surface

Returns the surface a pool of these reagents draws.

The pool takes the LIQUID_SURFACE_* class holding the most volume, ties going to the lower define, and the liquid_surface_detail of that class's largest reagent.

Arguments:

Returns:

get_list_of_admins

Proc that returns a list of cliented admins. Remember that this list can contain nulls! Also, will return null if we don't have any admins.

get_loc_from_mousepos

Converts mouse-pos control coordinates to a specific turf location on the map.

Handles the conversion between control-space mouse coordinates and screen-space map coordinates, accounting for various BYOND quirks and display scaling factors.

@param mousepos_x The x-coordinate of the mouse click (in control pixels, top-left origin) @param mousepos_y The y-coordinate of the mouse click (in control pixels, top-left origin) @param sizex x control width of the map @param sizey y control width of the map @param viewing_client The client whose view perspective to use for the conversion

@return The turf at the calculated map position, or the closest one if out of bounds, as well as the residual x and y map offsets

Important Notes:

get_lone_liquid_color

Returns the colour of a pool holding only one reagent type, at any volume above 0, worked out once per type.

Any volume mixes to the reagent's own colour, so this is what scale_liquid_color(mix_liquid_color()) gives for it.

Arguments:

get_matching_bitflags

Returns null if no such field exists, a list of all matching flags by name otherwise

get_messenger_name

Get the display name of a messenger instance

get_minimap_blips_in_area

Returns minimap blips matching a tag that are within distance tiles of target_turf on the same z-level.

get_minimap_for_z

Gets the /datum/minimap for a Z-level - generating it if it hasn't been yet.

get_mob_admin_traits

Returns only traits that apply to mobs

get_mob_by_ckey

returns a mob type controlled by a specified ckey

get_mob_by_key

Return the mob type that is being controlled by a ckey

get_mob_or_brainmob

Returns the occupant mob or brain from a specified input

get_most_experienced

From a list of players (minds, mobs or clients), finds the one with the highest playtime (either from a specific role or overall living) and returns it. If playtime tracking is disabled, just returns the first player in the list.

get_nested_locs

Returns a list of all locations (except the area) the movable is within.

get_officer_department

Returns the department a new officer should go to: the least populated one, favoring their preference on ties.

get_offset_target_turf

returns turf relative to target_atom offset in dx and dy tiles, bound to map limits

get_open_turf_in_dir

Returns the open turf next to the center in a specific direction

get_path_by_slot

Returns a generic path of the object based on the slot

get_path_to

This is the proc you use whenever you want to have pathfinding more complex than "try stepping towards the thing". If no path was found, returns an empty list, which is important for bots like medibots who expect an empty list rather than nothing. It will yield until a path is returned, using magic

Arguments:

get_perceived_radiation_danger

Gets the perceived "danger" of radiation pulse, given the threshold to the target. Returns a RADIATION_DANGER_* define, see code/__DEFINES/radiation.dm

get_perimeter

Get a list of turfs in a perimeter given the center_atom and radius. Automatically rounds down decimals and does not accept values less than positive 1 as they don't play well with it. Is efficient on large circles but ugly on small ones Uses Jesko`s method to the midpoint circle Algorithm.

get_pixel_angle

for getting the angle when animating something's pixel_x and pixel_y

get_pixel_distance

Finds the distance between two atoms, in pixels
centered = FALSE counts from turf edge to edge
centered = TRUE counts from turf center to turf center
of course mathematically this is just adding world.icon_size on again

get_player_client

Returns a client from a mob, mind or client

get_powernet_info_from_source

Extracts the powernet and cell of the provided power source

get_preferences_in_priority_order

Returns a flat list of preferences in order of their priority

get_protean_chest_component

Gets the protean chest component from a mob. Returns null if not protean.

get_protean_modsuit

-- Helper procs -- Gets the protean modsuit from a mob's chest component. Returns null if not protean or no modsuit.

get_rand_frequency

get a random frequency.

get_rand_frequency_low_range

get_rand_frequency but lower range.

get_random_coin

Gets a random coin excluding the blocked type and including extra coins which aren't pathed like coins.

get_random_drink

Gets a random drink excluding the blocked type

get_random_food

Get a random food item exluding the blocked ones

get_random_hallucination

Select a random hallucination from the hallucination pool

get_random_jumpskirt

Returns a random, acceptable jumpskirt typepath

get_random_jumpsuit

Returns a random, acceptable jumpsuit typepath

get_random_manual

Gets a random manuel book type excluding certain banned books

get_random_neuroware

Returns a random neuroware reagent type. Excludes aphrodisiac reagents.

get_random_reagent_id

Returns a random reagent object, with the option to blacklist reagents.

get_random_station_turf

Returns a random turf on the station

get_random_valid_hallucination_subtype

Gets a random subtype of the passed hallucination type that has a random_hallucination_weight > 0. If no subtype is passed, it will get any random hallucination subtype that is not abstract and has weight > 0. This can be used instead of picking from the global weighted list to just get a random valid hallucination.

get_ranged_target_turf_direct

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

Starts at atom starting_atom and gets the exact angle between starting_atom and target Moves from starting_atom 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_round_default_lawset

A getter that sets up the round default if it has not been yet.

round_default_lawset is what is considered the default for the round. Aka, new AI and other silicons would get this. You might recognize the fact that 99% of the time it is asimov.

This requires config, so it is generated at the first request to use this var.

get_safe_random_station_turf

Returns a random turf on the station, excludes dense turfs (like walls) and areas that have valid_territory set to FALSE

get_safe_random_station_turf_equal_weight

Returns a random department of areas to pass into get_safe_random_station_turf() for more equal spawning.

get_sane_item_types

Used for random item gen to try and generate a list of types that arent weird parent types and similar

get_selectable_species

Gets a list of all species id's available to choose in roundstart.

get_sensitive_adminwho_information

Proc that gathers adminwho information for admins, which will contain information on if the admin is AFK, readied to join, etc. Only arg is a list of clients to use. Will return a list of strings.

get_sfx

Used to convert a SFX define into a .ogg so we can add some variance to sounds. If soundin is already a .ogg, we simply return it

get_size_in_tiles

Returns the size of the sprite in tiles. Takes the icon size and divides it by the world icon size (default 32). This gives the size of the sprite in tiles.

@return size of the sprite in tiles

get_small_overlay

Fikou's fix for making toast alerts look nice - resets offsets, transforms to fit

get_sorted_areas

Returns a sorted version of GLOB.areas, by name

get_species_page_ids

Every species the species page offers, as an assoc list of id to TRUE.

get_species_page_renders

Draws every species on the species page facing each way, without uniform and then in it, as list("body" = entries, "uniform" = entries) in insert_icon()'s entry format. Both sheets take their half from the one drawing, and later callers wait for the first to finish.

This never loads a sheet itself: loading one can realize it, which would call back in here.

get_swarm_path_to

POTENTIALLY cheaper version of get_path_to This proc generates a path map for the end atom's turf, which allows us to cheaply do pathing operations "at" it Generation is significantly SLOWER then get_path_to, but if many things are/might be pathing at something then it is much faster Runs the risk of returning an suboptimal or INVALID PATH if the delay between map creation and use is too long

If no path was found, returns an empty list, which is important for bots like medibots who expect an empty list rather than nothing. It will yield until a path is returned, using magic

Arguments:

get_synthesizable_reagent_subtypes

Returns a list of all subtypes of base_type reagent that can be synthesized. If none qualify, returns an empty list — caller should handle fallback.

get_teleport_loc

Returns location. Returns null if no location was found.

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:

get_turf_pixel

Lets the turf this atom's ICON appears to inhabit it takes into account: Pixel_x/y Matrix x/y NOTE: if your atom has non-standard bounds then this proc will handle it, but: if the bounds are even, then there are an even amount of "middle" turfs, the one to the EAST, NORTH, or BOTH is picked this may seem bad, but you're at least as close to the center of the atom as possible, better than byond's default loc being all the way off) if the bounds are odd, the true middle turf of the atom is returned

get_valid_bitflags

Returns an associative list of bitflag name -> number for all valid bitflags in the passed in field

get_valid_screen_location

Returns a valid location to place a screen object without overflowing the viewport

Returns a screen loc representing the valid location

get_valid_teleport_turf

Check for turfs within range of the center turf and perform simple checks to see which is a valid teleportation target. If so, add it to a list to pick the final destination from at the end.

get_visual_offset

Returns how visually "off" the atom is from its source turf as a list of x, y (in pixel steps) it takes into account: Pixel_x/y Matrix x/y Icon width/height

get_vox_glove_color

Gloves have no leg/foot sample point. Use their most common visible source color.

give_admin_popup

Tries to give the target an admin popup. If it fails, will send the error to the passed admin.

give_feline_taur

Makes a human a feline taur, the taur whose tail is drawn separately, and returns its taur body.

Arguments:

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:

graffiti_anchor_for

Returns where graffiti painted on a turf lives across rounds: a station anchor, the turf's coordinates and area, and its graffiti_surface_kind() as its surface.

Arguments:

Returns:

graffiti_anchor_resolve

Returns the turf an anchor names this round, when it is still the kind of surface the graffiti was painted on.

A station anchor needs its turf to be in the same area as before and still the static station (graffiti_static_station()). Other kinds go through their registered resolver.

Arguments:

Returns:

graffiti_anchor_waits

Whether an anchor that doesn't resolve is only waiting, so the round isn't counted as a miss: no system has registered a resolver for its kind this round.

Arguments:

Returns:

graffiti_art_decode

Decodes an art, such as one read from a map file, when it can be drawn: a one- or two-tile width, a palette of 1 to GRAFFITI_FLAT_MAX_COLORS colours, and a grid and glow mask that both cover every pixel.

Arguments:

Returns:

graffiti_art_glow_kind

Returns which of an art's painted pixels glow, which decides its emissive overlays.

Arguments:

Returns:

graffiti_art_hash

Returns an art's content identity, which tiles showing the same art share.

Arguments:

Returns:

graffiti_art_icon

Returns an art drawn as an icon, which every tile showing that art shares. Its paint shows at its real alpha (graffiti_drawn_colors()).

Icons are cached by graffiti_art_hash() in SSgraffiti.art_icons, up to GRAFFITI_ICON_CACHE of them, the oldest going first. A placement's art the map no longer uses goes at once (SSgraffiti's release_art()); the composite of a stack of several pieces, which no placement names, only ages out. Never change one.

Arguments:

Returns:

graffiti_art_pixels

Counts an art's painted pixels.

Arguments:

Returns:

graffiti_blank_icon

Returns a new transparent icon one or two tiles wide.

The files call their one state "nothing", but icon() names the state it takes "", the state an atom shows by default.

Arguments:

Returns:

graffiti_blend

Blends a colour over another as placed graffiti shows them, in their real alphas: GRAFFITI_ALPHA_CEILING for opaque paint and its own for translucent paint. The standard "over" operator gives the alpha and the colour, and an alpha that reaches the ceiling is stored opaque.

Arguments:

Returns:

graffiti_clean_text

Cleans player text for a piece's name, description or layer names, so that cleaning it again changes nothing.

Entities are decoded first so escaped text isn't escaped twice, and the text is cut to max_length characters before it is escaped so the cut can't split an entity.

Arguments:

Returns:

graffiti_clip_record

Returns a decoded art or layer with paint left only where a poster takes it.

Arguments:

Returns:

graffiti_color

Returns a colour in its canonical graffiti form: lowercase #rrggbb when its alpha reaches GRAFFITI_ALPHA_CEILING, the alpha placed graffiti draws opaque paint at, and #rrggbbaa below it, raised to GRAFFITI_ALPHA_FLOOR when lower. So a stored colour's real alpha is the ceiling when it has seven characters, and its own alpha when it has nine.

sanitize_hexcolor() can't widen six digits to eight, and it answers bad input with #00000000 rather than the null default, so opaque input is padded to eight digits first and the sanitized text must match the input exactly.

Arguments:

Returns:

graffiti_copy_piece

Returns a copy of a canonical piece that shares no list with it, such as one to hand on from a library, which keeps its own. deep_copy_list() would turn the list of layers into an associative list.

Arguments:

Returns:

graffiti_credit_painter

Marks graffiti as a painter's work as they finish a piece on it: their hidden print, and once only the art element, which every piece stacked on a tile, or sprayed over a poster, shares.

Arguments:

graffiti_decode_flat

Decodes a flat art grid that graffiti_encode_flat() wrote. Hostile input is refused before anything is expanded, and decoding stops at pixel_count whatever the runs claim.

Arguments:

Returns:

graffiti_default_palette

Returns the colours the graffiti editor offers before a piece has its own: black and Endesga-32's greys, hues, browns and skin tones, a few pastels, then neons for glow layers.

Returns:

graffiti_draw_icon

Draws pixels on a new icon as horizontal runs, one DrawBox() for each run of one colour.

Arguments:

Returns:

graffiti_drawn_colors

Returns colours as placed graffiti draws them, in their real alphas: opaque ones at GRAFFITI_ALPHA_CEILING, so the surface shows through, and translucent ones at their own, which is below it. None draws above the ceiling.

Arguments:

Returns:

graffiti_drop_loose_paint

Drops for good the paint a stopping piece has placed, both halves of a two-tile one, when a tile of it offers no surface now, as a pane loosened under it leaves one: a loose pane drops the piece in progress whole. Graffiti finished there stays.

Arguments:

Returns:

graffiti_editor_for

Opens a graffiti editor for a player, ending any editor they already have. A surface session shakes the can.

Arguments:

Returns:

graffiti_editor_test_begin

Points the graffiti registry and libraries at the scratch directory, with the test account's library empty.

graffiti_editor_test_end

Ends the test account's graffiti editor, takes the test ckey back off its painter, and puts the registry, the library directory and the account's library and cooldowns back.

graffiti_editor_test_painter

Puts a painter for the test account beside a wall, holding an uncapped spray can.

Arguments:

Returns:

graffiti_editor_test_paste

Returns a one-pixel green paste on the bottom layer's top row, as the editor's window sends pasted paint it drops.

Arguments:

Returns:

graffiti_editor_test_stroke

Returns a one-pixel pencil stroke on the bottom layer's top row, as the editor's window sends it.

Arguments:

Returns:

graffiti_emissive_overlays

Returns the overlays that light an art's glowing paint on the emissive plane and let its other paint block the glow of whatever lies beneath it.

Paint that doesn't glow gets a blocker of the visible icon, and paint that all glows an emissive of it. Mixed paint gets the blocker with an emissive of the glow mask just above it. They take the layer of location, a decal's own, over the glass on a window, moved onto the emissive plane as emissive_appearance() moves a floor plane layer.

Arguments:

Returns:

graffiti_encode_flat

Encodes palette indices as a flat art grid.

A grid is g1 or g2, the number of characters each index takes, then runs: a hex length (1-f) and the run's index in CUSTOM_SPRITE_INDEX_ALPHABET characters, most significant first. Index 0 is transparent. Palettes of up to GRAFFITI_MAX_COLORS colours take one character; larger ones, which only merged art reaches, take two.

Arguments:

Returns:

graffiti_encode_piece

Returns a canonical piece as the text Export writes, format and version first.

Arguments:

Returns:

graffiti_export

Sends a saved piece to a player as a downloaded file. custom_style_send_text() claims the account's transfer slot and export cooldown, which custom styles share.

Arguments:

Returns:

graffiti_file_key

Returns text made safe to name a file or directory with.

Arguments:

Returns:

graffiti_flat_codes

Returns the characters a flat grid writes, built once, so encoding looks each run's characters up instead of cutting text and calling custom_sprite_canvas_code() for every run, and the glow of art that glows nowhere at each width.

Returns:

graffiti_flatten

Flattens a piece's layers into one art, or only as much of them as a paint job has revealed.

Arguments:

Returns:

graffiti_flatten_records

Flattens decoded layers into one art, or only as much of them as a paint job has revealed. Nothing is encoded or decoded on the way, so it is graffiti_flatten() for layers already decoded.

Arguments:

Returns:

graffiti_glow_icon

Returns an art's glow mask: white wherever its paint glows, as opaque as the paint is drawn there.

Masks are cached by graffiti_art_hash() in SSgraffiti.glow_icons, as graffiti_art_icon() caches its icons. Never change one.

Arguments:

Returns:

graffiti_import

Lets a player import a graffiti piece file into their library as a new piece. This sleeps while the file dialog is open.

Arguments:

Returns:

graffiti_json_decode

Decodes a graffiti file's JSON, such as a piece's or a map's, as hostile input, without validating what it holds.

json_decode() makes lists of JSON arrays and objects alike, so the text itself must open an object.

Arguments:

Returns:

graffiti_layer_records

Decodes a piece's layers for graffiti_merge_arts(), each against the piece's whole palette, glowing on every pixel or on none. A paint job keeps its piece's records, so its steps never decode the layers again.

Arguments:

Returns:

graffiti_library

Returns an account's library, loading it from its file when it isn't loaded, as on first use or after it unloaded.

Arguments:

Returns:

graffiti_library_check

Returns a piece in the canonical form a library keeps, or why a library can't keep it.

The piece is read back from the text Export would write for it, so it is held to that text's size and validated as an import is, with the format and version Export writes and without keys Export leaves out.

Arguments:

Returns:

graffiti_library_delete

Deletes an account's library, file and all, as an admin purge does. A library still held elsewhere is emptied and can't write its file back.

Arguments:

graffiti_library_flush

Writes the library changes the write pacing still holds back, as the round ends or the world stops.

graffiti_library_paced

Paces an account's next graffiti library write by the one just made: a player's waits GRAFFITI_LIBRARY_WRITE_PACE times as long as it took, and at least a second, and a change the server makes is held back as long.

Arguments:

graffiti_library_path

Returns where an account's library file lives, in a directory named by the ckey's first character.

Arguments:

Returns:

graffiti_library_test_reset

Points the graffiti library directory at root, then forgets the test account's library and its write pacing and deletes the scratch directory, so a test starts and ends with no library files.

Arguments:

graffiti_library_unload

Unloads an account's library as its owner disconnects, unless something still holds it: an editor session or a paint job of the account's, a write the pacing holds back, or an import or export under way. An editor or paint job that ends, and a held write once made, ask again while the owner is away; an import or export doesn't, so its library waits for the owner's next disconnect or the reboot. graffiti_library() loads it again when it is next wanted, under a newer revision.

Arguments:

graffiti_library_write_due

Whether a player may write their graffiti library now, starting a second's wait if so. Each write rewrites and checks the whole file, so the account's saves, imports and exports share the wait, which is kept beside its style transfer cooldowns, and each write lengthens it by its cost (graffiti_library_paced()).

Arguments:

Returns:

graffiti_library_write_wait

Returns how long until an account's graffiti library may be written again.

Arguments:

Returns:

graffiti_merge_arts

Merges arts of one width into one, bottom to top.

An opaque pixel replaces what is beneath it, a translucent one blends over it (graffiti_blend()), and a fully transparent one leaves it alone. A pixel glows when the topmost art that paints it glows there. The merged palette holds only the colours the result shows, in the order its pixels first use them, so arts that look alike merge to the same art. Arts that aren't lists, have another width or can't be decoded are left out.

Arguments:

Returns:

graffiti_merge_fingerprint

Returns a fingerprint of what merging gives: the alpha ceiling and the hash of one fixed merge of opaque and translucent paint, glowing and not, made once. The map file keeps it beside its stack cache, so a cache written before merges changed is set aside rather than show stacks under keys today's merges wouldn't give.

Returns:

graffiti_new_sheet

Returns a new sprite sheet for icons of one width. BYOND can't remove a state, so the blank's own transparent state, "", stays beside the states added to it.

Arguments:

Returns:

graffiti_palette_pack

Packs canonical colours into one string of nine-character #rrggbbaa entries, the form placed art keeps its palette in.

Arguments:

Returns:

graffiti_palette_unpack

Unpacks a palette graffiti_palette_pack() wrote. Only its lowercase spelling is read, so an art has one packed form and one hash.

Arguments:

Returns:

graffiti_poster_look

Returns what a poster offers graffiti, read from its icon pixel by pixel: the pixels it shows, which alone take paint, and the poster itself as an art, for the editor's window to draw beneath the canvas. Kept for each icon and state; a poster drawn at runtime, as a wanted poster is, is read each time.

Arguments:

Returns:

graffiti_poster_test_stroke

Returns a one-pixel pencil stroke on the bottom layer, as the editor's window sends it.

Arguments:

Returns:

graffiti_receive

Asks a player for a graffiti piece file and decodes it. This sleeps while the file dialog is open.

The account's transfer slot and import cooldown, which custom styles share, are claimed first and the slot is released on every path. The byte size is checked before the file is read.

Arguments:

Returns:

graffiti_register_anchor_resolver

Lets a system that loads its own spaces, such as condos, place graffiti in them: its anchors are resolved through callback, called with the anchor and returning a turf or null.

Arguments:

graffiti_registry_release

Takes the graffiti of one unloading space off its tiles and keeps it dormant, still in the map file. Call it before the space's turfs change: a decal whose turf stops taking graffiti first loses its graffiti for good.

Arguments:

graffiti_registry_test_begin

Empties the graffiti registry and points it at a scratch map file, with its sheets in the scratch directory too.

Arguments:

graffiti_registry_test_end

Empties the graffiti registry, takes the test room down (graffiti_test_room()), puts the registry's test settings back and deletes the scratch directory. The registry points at the current map's own file again but stays frozen, so nothing the rest of a test round does is written over it.

Arguments:

graffiti_release_merges

Lets the decals of a piece's tiles go of their merges once its painter stops painting there (release_merges()).

Arguments:

graffiti_resume_anchor

Returns the anchor a stopped piece resumes on: its left tile's, with the kind of surface its paint went on, which a window fastened over floor paint since doesn't change.

Arguments:

Returns:

graffiti_resume_placements

Returns the placements a stopped paint job or freehand session left on a surface, to resume them there: those with its placement id on the tile and, for a two-tile piece, on the tile to its right. They resume only on the same map and the same tile, and only while every tile that showed paint still shows it.

Arguments:

Returns:

graffiti_resume_tile

Returns the tile a stopped paint job or freehand session left its paint on, the only one it resumes on: the left tile of the placements with its placement id that still show on this map.

Arguments:

Returns:

graffiti_reveal_bounds

Returns how much of a piece shows once a paint job has revealed some of its strips, as graffiti_flatten() takes it.

Arguments:

Returns:

graffiti_reveal_units

Returns how a paint job reveals a piece: in strips GRAFFITI_REVEAL_STRIP pixels wide, left to right across each layer in turn, from the bottom layer up.

Arguments:

Returns:

graffiti_shake

Plays a spray can's shake, as a freehand session or a paint job starts.

Arguments:

graffiti_sheet_add

Adds an icon to a sprite sheet as a state of its own, replacing any state of that name.

Arguments:

graffiti_sheet_path

Returns where one of a map's sprite sheet files lives.

Arguments:

Returns:

graffiti_split_wide

Splits a wide art into the arts of its two tiles.

Each half keeps only the colours it shows, in the order its pixels first use them, and glows only where it is painted, as graffiti_merge_arts() would leave it. So a half hashes the same as a one-tile art that looks the same, and two halves that look alike share one hash.

Arguments:

Returns:

graffiti_spray

Plays the spray sound where paint lands, at most once a clip, however often a sprayer paints.

The sprayer, such as a freehand session or a paint job, keeps the time in its own spray_cooldown, which it passes in and stores again from the return value.

Arguments:

Returns:

graffiti_static_station

Whether a turf is the station as the map built it, the only place graffiti goes: a station level's turf in a station area, neither a shuttle's nor the holodeck's, and outside every map template loaded on the station this round, such as a random room. Other levels, bitrunning and reserved space, ruins and the like take none. A system that loads spaces of its own, such as condos, registers an anchor resolver for them instead (graffiti_register_anchor_resolver()).

Arguments:

Returns:

graffiti_station_levels

Returns the station levels in ascending order.

Returns:

graffiti_station_ordinal

Returns where a z level falls among the station levels, which anchors keep instead of the z level itself.

Arguments:

Returns:

graffiti_station_z

Returns the station level at an anchor's ordinal.

Arguments:

Returns:

graffiti_surface_full

Whether adding a piece would exceed the tile's stack. Resuming a piece already there needs no new slot.

graffiti_surface_kind

Returns the kind of surface a turf offers graffiti: a wall, the glass of a full-tile window fastened down on it, or a floor with ground. A loose full-tile window still covers its floor, and a directional window changes nothing.

Arguments:

Returns:

graffiti_surface_ok

Whether a turf takes graffiti: a wall, a floor with ground, or a full-tile window fastened down on it, on the static station (graffiti_static_station()).

Arguments:

Returns:

graffiti_test_art

Returns a one-tile art with one or two red pixels.

Arguments:

Returns:

graffiti_test_cameras

Counts the cameras on the station levels.

Returns:

graffiti_test_chunk_turfs

Returns tiles of the test room (graffiti_test_room()) that take graffiti under a station anchor, all in one of the 16-tile chunks build_sheets() packs together, the same ones every call.

Arguments:

Returns:

graffiti_test_counts_match

Whether a graffiti workspace's colour counts hold what its layers do, read pixel by pixel.

Arguments:

Returns:

graffiti_test_dense_art

Returns a one-tile art painted on every pixel, no two neighbours alike, from forty colours, every other pixel glowing, so its composite and glow mask take as many runs as a tile's art can. The same index gives the same art.

Arguments:

Returns:

graffiti_test_floors

Returns floors of the test room (graffiti_test_room()), where graffiti gets a station anchor.

Arguments:

Returns:

graffiti_test_golden_piece

Returns a fixed piece for the flattened-bytes test: an opaque red base on rows 1-30, a translucent green glowing layer on rows 9-16 and a translucent white unlit one on rows 13-20, so it blends translucent over opaque and translucent over translucent, and its glow is mixed.

Returns:

graffiti_test_index_problem

Compares the registry's index of each account's placements with a scan of the placements themselves.

Returns:

graffiti_test_mounted

Whether anything wall-mounted is on a wall or on the turfs beside it, where it may hang from the wall.

Arguments:

Returns:

graffiti_test_piece

A raw piece as Export writes it: an opaque and a translucent pixel at the top left of an unlit layer, under a glowing layer with one translucent pixel at the bottom right.

graffiti_test_placement

Finds a placement by its id.

Arguments:

Returns:

graffiti_test_room

Returns the room the graffiti tests paint in, built the first time a test asks and taken down by graffiti_registry_test_end(): walls round floors, with a row of GRAFFITI_TEST_ROOM_ROW walls across them, built on empty space of a station level and moved into a station area, so its every tile takes graffiti under a station anchor. No map is relied on to have such walls, as the unit test map, runtimestation_minimal, is all space. The room sits inside one of the 16-tile chunks build_sheets() packs together.

Returns:

graffiti_test_room_end

Takes the graffiti test room down, if a test put it up: deletes all a test left in it, then turns it back into the space of the space area it was.

graffiti_test_walls

Returns walls side by side, west to east, in the test room (graffiti_test_room()), each between two floors so that turning one into a floor opens no room to space, and with nothing wall-mounted on it or around it. The same walls come back every call.

Arguments:

Returns:

graffiti_tile_decal

Returns the custom graffiti decal of the surface a turf offers now.

Arguments:

Returns:

graffiti_trim_wide

Narrows a two-tile piece to one tile when no layer paints its right tile, as a wide canvas left blank there saves.

Arguments:

Returns:

graffiti_unix_time

Returns the current unix time in whole seconds, as the ten-digit text libraries store and sort. BYOND numbers can't hold it exactly.

Returns:

graffiti_unlit_glow

Returns the glow of art that glows nowhere, as graffiti_encode_flat() writes it and decoded, which graffiti_flat_codes() makes once for each width, so decoded arts that glow nowhere share one list.

Arguments:

Returns:

graffiti_validate_piece

Strictly validates a library piece, as Export writes it and Import reads it. Nothing is salvaged, and messages never repeat uploaded text.

The id, created and updated keys the library keeps beside a piece are allowed and ignored. Names and the description are cleaned rather than refused.

Arguments:

Returns:

graffiti_wide_ok

Whether a two-tile piece fits with its left half on a turf: the turf and the one to its east both take graffiti, on the static station, and are of one kind, both walls, both floors or both windows, which draw their graffiti differently.

Arguments:

Returns:

graffiti_window_of

Returns the full-tile window fastened down on a turf, whose glass takes graffiti. Directional windows never do.

Arguments:

Returns:

grawlix

Generate a grawlix string of length of the text argument.

greatest_common_factor

Takes a list of numbers as input, returns the highest value that is cleanly divides them all Note: this implementation is expensive as heck for large numbers, I only use it because most of my usecase Is < 10 ints

hallucination_pulse

Emits a hallucinating pulse around the passed atom. Affects everyone in the passed radius except for those with TRAIT_MADNESS_IMMUNE. This affects blind players.

center - required, the center of the pulse radius - the radius around that the pulse reaches hallucination_duration - how much hallucination is added by the pulse. reduced based on distance to the center. hallucination_max_duration - a cap on how much hallucination can be added optional_messages - optional list of messages passed. Those affected by pulses will be given one of the messages in said list.

has_blood_flag

Checks if any of the passed blood types have certain blood flags

haunt_outburst

Takes a given area and chance, applying the haunted_item component to objects in the area.

Takes an epicenter, and within the range around it, runs a haunt_chance percent chance of applying the haunted_item component to nearby objects.

healthscan

healthscan returns a list of everything a health scan should give to a player. Examples of where this is used is Health Analyzer and the Physical Scanner tablet app. Args: user - The person with the scanner target - The person being scanned mode - Uses SCANNER_CONDENSED or SCANNER_VERBOSE to decide whether to give a list of all individual limb damage advanced - Whether it will give more advanced details, such as husk source. tochat - Whether to immediately post the result into the chat of the user, otherwise it will return the results.

hidden_slots_to_inventory_slots

Convers HIDEX to ITEM_SLOT_X, should be phased out in favor of using latter everywhere later

holosynth_drop_unkept_items

Drops everything the holosynth has equipped except items in the slots they get to keep (ID + pockets).

honkerblast

Unleashes a honkerblast similar to the honkmech weapon, but with more granular control.

hsv2rgb

Converts a list storing hsva into an rgb color

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:

husk_toned_sheet

Returns an icon sheet toned the way a husk is drawn.

Toning works on the whole sheet, every state in it, so a sheet from a file is toned once and its copy kept, one per file: as bounded as the icon files are. A runtime icon or an /icon datum could hold any pixels and is toned afresh every time.

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)

icon2html

generate an asset for the given icon or the icon of the given appearance for [thing], and send it to any clients in target. Arguments:

icon_exists

Checks whether a given icon state exists in a given icon file. If file and state both exist, this will return TRUE - otherwise, it will return FALSE.

If you want a stack trace to be output when the given state/file doesn't exist, use /proc/icon_exists_or_scream().

icon_exists_or_scream

Functions the same as /proc/icon_exists(), but with the addition of a stack trace if the specified file or state doesn't exist.

Stack traces will only be output once for each file.

icon_metadata

Returns rustg-parsed metadata for an icon, universal icon, or DMI file, using cached values where possible Returns null if passed object is not a filepath or icon with a valid DMI file

icon_states_fast

Cached, rustg-based alternative to icon_states()

icon_transformer_from_list

Reverse operation of /datum/icon_transformer/to_list()

iconforge_drawn

A drawing is done: a character preview's, or share of one for a smaller picture, like the custom sprite editors'. iconforge keeps every image it makes until it is told to let them go, and a look is hardly ever drawn twice, so what it keeps only grows, by 80 to 330 KB a look. Every CHARACTER_PREVIEW_CLEANUP_EVERY looks' worth it lets go, once no character preview is under way: one under way would come out empty. Until then new previews wait, for a tick or two, and the last preview under way lets go when it is done. Spritesheets being made let go themselves once they are done, so it waits for them to finish.

inLineOfSight

Calculate if two atoms are in sight, returns TRUE or FALSE

init_Exports

Called when the global exports_list is empty, and sets it up.

init_blood_types

Initializes the list of blood type singletons

init_chemical_reagent_list

Initialises all /datum/reagent into a list indexed by reagent id

init_crafting_recipes

Inits crafting recipe lists

init_crafting_recipes_atoms

Inits atoms used in crafting recipes

init_discountable_packs

Caled when the global discount pack list is initialized

init_fitness_definition_sheets

Returns GLOB.fitness_definition_sheets.

init_fitness_limb_families

Returns GLOB.fitness_limb_families, built from the size subtypes.

init_fitness_limb_sheets

Returns GLOB.fitness_limb_sheets. Sheets are files, so it is built here rather than written as a list literal.

init_gas_id_to_canister

Returns a map of canister id to its type path

init_hotspot_reactions

Returns reactions which will contribute to a hotspot's size.

init_keybindings

Creates and sorts all the keybinding datums

init_language_holder_prototypes

Inits the global list of language holder prototypes.

init_loadout_categories

Inits the global list of loadout category singletons Also inits loadout item singletons

init_main_girder_wall_recipes

Initializes the main, false and tram wall types using three lists of wall types.

init_material_girder_wall_recipes

Initializes the normal and false girder material wall recipes using two lists of material wall types.

init_pirate_gangs

initializes the pirate gangs glob list, adding all subtypes that can roll today.

init_plant_traits

Inits GLOB.plant_traits

init_random_ship_events

Initializes the random ship events glob list, adding all subtypes that can roll this shift.

init_subtypes

Creates every subtype of prototype (excluding prototype and abstract types) and adds it to list L. If no list/L is provided, one is created.

init_subtypes_w_path_keys

Functions like init_subtypes, but uses the subtype's path as a key for easy access If no list/L is provided, one is created.

initialize_starting_knowledge

Returns a list of all heretic knowledge TYPEPATHS that have route set to PATH_START.

int_to_words

Takes a 1, 2 or 3 digit number and returns it in words. Don't call this directly, use convert_integer_to_words() instead.

Arguments:

invert_HTML_colour

Inverts the colour of an HTML string

ion_num

Picks a string of symbols to display as the law number for hacked or ion laws is at the start to prevent us from changing say modes via get_message_mode()

isAdminGhostAI

Returns TRUE/FALSE on whether the mob is an Admin Ghost AI. This requires this snowflake check because AI interact gives the access to the mob's client, rather than the mob like everyone else, and we keep it that way so they can't accidentally give someone Admin AI access.

isAdminObserver

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

is_admin

Returns if the given client is an admin, REGARDLESS of if they're deadminned or not.

is_banned_from

Checks client ban cache or, if it doesn't exist, queries the DB ban table to see if the player's ckey is banned from at least one of the provided roles.

Returns TRUE if the player matches with one or more role bans. Returns FALSE if the player doesn't match with any role bans. Possible errors states also return FALSE.

Args:

is_color_dark

Given a color in the format of "#RRGGBB", will return if the color is dark.

is_color_dark_with_saturation

Given a color in the format of "#RRGGBB", will return if the color is dark. Value is mixed with Saturation and Brightness from HSV.

is_convertable_to_cult

Returns whether the given mob is convertable to the blood cult

is_ctf_target

Proc that identifies if something is a valid target for CTF related checks, checks if an object is a ctf barrier or has ctf component if they are a player.

is_factual_sprite_accessory

This will check if SSaccessories.sprite_accessories[mutant_part]?[part_name] is associated with sprite accessory with factual TRUE.

is_file_type

Verifys wether a string or file ends with a given file type

this does not at all check the actual type of the file, a user could just rename it

Arguments:

is_file_type_in_list

Verifys wether a string or file ends with a given file type.

this does not at all check the actual type of the file, a user could just rename it

Arguments:

is_guest_key

Returns whether or not a player is a guest using their ckey as an input

is_ic_filtered

Given a text, will return what word is on the IC filter, with the reason. Returns null if the message is OK.

is_ic_filtered_for_pdas

Given a text, will return what word is on the IC filter, ignoring words allowed on the PDA, with the reason. Returns null if the message is OK.

is_infiltrator_docked_at_syndiebase

Returns whether or not syndicate operatives escaped.

is_matching_bait

Helper proc that checks if a bait matches identifier from fav/disliked bait list

is_mononym

Find whitespace or dashes in the passed string with regex and returns TRUE if found

is_mutation_restricted_for_quirks

Helper proc to check if a mutation is restricted by any of the given quirk names Returns TRUE if the mutation is restricted (not allowed), FALSE otherwise

is_mutation_restricted_for_species

Helper proc to check if a mutation is restricted for a given species Returns TRUE if the mutation is restricted (not allowed), FALSE otherwise

is_on_a_planet

Checks if the passed non-area atom is on a "planet".

A planet is defined as anything with planetary atmos that has gravity, with some hardcoded exceptions.

Returns TRUE if we are on a planet. Returns FALSE if we are not in a planet, or otherwise, "in space".

is_ooc_filtered

Given a text, will return what word is on the OOC filter, with the reason. Returns null if the message is OK.

is_path_in_list

Checks for specific paths in a list.

If using zebra mode the list should be an assoc list with truthy/falsey values. The check short circuits so earlier entries in the input list will take priority. Ergo, subpaths should come before parent paths. Notice that this is the opposite priority of /proc/typecacheof.

Arguments:

is_plain_bodypart_mask

Whether a bodypart appearance is a standard glow/blocker sprite that can move into a shared emissive boundary. Inset husk blood, other composite effects and prepared boundaries keep their own roots.

is_plain_bodypart_sprite

Whether a bodypart appearance draws the same nested in an unshifted holder as it does on the mob: floating, default blending, and not reaching past its parent with KEEP_APART or RESET_* flags. Iconless holders such as inner ears and MOD textures qualify; their contents are unchanged.

is_safe_turf

Checks to see if a given turf is a "safe" location. Being safe requires the following to be true:

Optionally:

Returns TRUE if all conditions pass, FALSE otherwise.

is_soft_ic_filtered

Given a text, will return what word is on the soft IC filter, with the reason. Returns null if the message is OK.

is_soft_ic_filtered_for_pdas

Given a text, will return what word is on the soft IC filter, ignoring words allowed on the PDA, with the reason. Returns null if the message is OK.

is_soft_ooc_filtered

Given a text, will return that word is on the soft OOC filter, with the reason. Returns null if the message is OK.

is_source_facing_target

Compare source's dir, the clockwise dir of source and the anticlockwise dir of source To the opposite dir of the dir returned by get_dir(target,source) If one of them is a match, then source is facing target

is_symphony_whitelisted

Admission check: allow access when enforcement is disabled; deny on a database failure. Use symphony_whitelist_lookup() when the caller must distinguish a denial from an outage.

is_type_in_list

Checks for specific types in a list.

If using zebra mode the list should be an assoc list with truthy/falsey values. The check short circuits so earlier entries in the input list will take priority. Ergo, subtypes should come before parent types. Notice that this is the opposite priority of /proc/typecacheof.

Arguments:

is_type_on_turf

Checks whether or not a particular typepath or subtype of it is present on a turf

Returns the first instance located if an instance of the desired type or a subtype of it is found Returns null if the type is not found, or if no turf is supplied

Arguments:

is_uppercase

Checks if the passed string is all uppercase, ignoring punctuation and numbers and symbols

is_valid_dmi_file

given a text string, returns whether it is a valid dmi icons folder path

is_valid_src

Check if a datum has not been deleted and is a valid source

is_valid_z_level

Checks if source_loc and checking_loc is both on the station, or on the same z level. This is because the station's several levels aren't considered the same z, so multi-z stations need this special case.

Args: source_loc - turf of the source we're comparing. checking_loc - turf we are comparing to source_loc.

returns TRUE if connection is valid, FALSE otherwise.

is_wire_tool

Is the passed item a tool that would interact with wires?

Arguments:

is_within_radio_jammer_range

Checks if a given atom is in range of a radio jammer, returns TRUE if it is.

ishumanbasic

Returns if the given target is a human. Like, a REAL human. Not a moth, not a felinid (which are human subtypes), but a human.

iso_to_weekday

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

isolate_light

Hides all the lights around a source temporarially, for the sake of figuring out how bad a light bleeds (Except for turf lights, because they're a part of the "scene" and rarely modified)

isvineimmune

Used to determine whether the mob is immune to actions by the vine. Use cases: Stops vine from attacking itself, other plants.

join_admin_ranks

Takes a list of rank names and joins them with +

json_deserialize_datum

Convert a list of json to datum

json_serialize_datum

Convert a datum into a json blob

keep_hairstyle

Writes a hairstyle to the character slot this body spawned from, and saves it to disk.

Returns a player-facing problem, or null once saved.

kvpify_list

Converts a list into a list of assoc lists of the form ("key" = key, "value" = value) so that list keys that are themselves lists can be fully json-encoded and that unique objects with the same string representation do not produce duplicate keys that are clobbered by the standard JavaScript JSON.parse function

language_understanding_sample

A sample line in a language, as heard by someone who follows this much of it. Kept, so a level's sample stays put.

last_name

Find the last name of a mob from a passed string with regex

lavaland_equipment_pressure_check

Check if the turf pressure allows specialized equipment to work

lawid_to_type

returns the law datum with the lawid in question, law boards and law datums should share this id.

level_announce

Sends an announcement about the level changing to players. Uses the passed in datum and the subsystem's previous security level to generate the message.

library_updated

Increments every time WE update the library db table, causes all existing consoles to repull when they next check

lightningbolt

this is the actual bolt effect and damage, made into its own proc because it is used elsewhere

list_clear_empty_weakrefs

Removes any empty weakrefs from the list Returns TRUE if the list had empty refs, FALSE otherwise

list_clear_nulls

Removes any null entries from the list Returns TRUE if the list had nulls, FALSE otherwise

list_holy_successors

Create a list of the holy successors mobs from GLOB.holy_successors weakref list

Returns the list of valid holy successors

living_player_count

Returns the amount of currently living players

load_admin_ranks

Loads admin ranks. Return a list containing the backup data if they were loaded from the database backup json

load_admins

(Re)Loads the admin list. returns TRUE if database admins had to be loaded from the backup json

load_adventures

Loads all adventures from DB

load_default_map_config

Proc that simply loads the default map config, which should always be functional.

load_map

Helper and recommened way to load a map file

load_map_config

Proc handling the loading of map configs. Will return the default map config using /proc/load_default_map_config if the loading of said file fails for any reason whatsoever, so we always have a working map for the server to run. Arguments:

Returns the config for the map to load.

load_poll_data

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

load_whitelist

Loads the whitelist. Tries to load it from the database if enabled, otherwise will load it from the legacy whitelist.txt file as normal.

load_whitelist_legacy

Loads the whitelist with the legacy way of loading it (from the whitelist.txt file).

loadout_list_to_datums

Takes a list of paths (such as a loadout list) and returns a list of their singleton loadout item datums

loadout_list - the list being checked

Returns a list of singleton datums

log_access

Logging for logging in & out of the game, with error messages.

log_admin

General logging for admin actions

log_admin_circuit

Logging for admin actions on or with circuits

log_admin_private

General logging for admin actions

log_adminsay

Logging for AdminSay (ASAY) messages

log_asset

Logging for loading and caching assets

log_atmos

Logs the contents of the gasmix to the game log, prefixed by text

log_attack

Generic attack logging

log_blood_worm

Logs blood worm events like entering/leaving a host.

log_bomber

Logging for bombs detonating

log_borer_evolution

Logging for borer evolutions

log_changeling_power

Logging for changeling powers purchased

log_chat

Logging for chatting on modular computer channels

log_combat

Log a combat message in the attack log

Arguments:

log_comment

Logging for newscaster comments

log_config

Logging for config errors Rarely gets called; just here in case the config breaks.

log_creator

This logs character creator changes in debug.log

log_directed_talk

Helper for logging of messages with only one sender and receiver (i.e. mind links)

log_dsay

Logging for DeachatSay (DSAY) messages

log_dynamic

Logging for dynamic procs

log_emote

Logging for emotes

log_filter

Logs to the filter log with the given message, match, and scope

log_game

Logging for generic/unsorted game messages

log_heretic_knowledge

Logging for heretic powers learned

log_internet_request

Logging for music requests

log_job_debug

Logging for job slot changes

log_law_change

Adds something to the law change log

log_lua

Logging for lua scripting

log_malf_upgrades

Logging for upgrades purchased by a malfunctioning (or combat upgraded) AI

log_manifest

Logging for player manifest (ckey, name, job, special role, roundstart/latejoin)

log_mapping

Logging for mapping errors

log_mecha

Logging for mech actions

log_minimap_drawing

Logging for drawing on minimap

log_ooc

Logging for messages sent in OOC

log_paper

Logging for writing made on paper

log_pda

Logging for PDA messages sent

log_perf

Logging for game performance

log_played_names

Adds the new names to the player's played_names list on their /datum/persistent_client for use of admins. ckey should be their ckey, and data should be an associative list with the keys being the names they played under and the values being the unique mob ID tied to that name.

log_player_image_creation

Log the creation of an image by a player

log_prayer

Logging for prayed messages

log_qdel

Logging for hard deletes

log_radio_emote

Logging for emotes sent over the radio

log_research

Puts the text into the research html file, not log. See [INVESTIGATE_RESEARCH] for [/atom/proc/investigate_log]

log_reta

Request Emergency Temporary Access - RETA System Provides temporary department access when Requests Console emergency calls are made. Helper function for RETA-specific logging

log_say

Logging for generic spoken messages

log_shuttle

Logging for shuttle actions

log_speech_indicators

Logging for speech indicators.

log_spellbook

Logging for wizard powers learned

log_spy

Logs bounties completed by spies and their rewards

log_sql

Logging for DB errors

log_subtle

This logs subtle emotes in game.log

log_subtler

This logs subtler emotes in game.log, if the conflig flag in config\nova\config_nova.txt is true.

log_suspicious_login

Writes to a special log file if the log_suspicious_login config flag is set, which is intended to contain all logins that failed under suspicious circumstances.

Mirrors this log entry to log_access when access_log_mirror is TRUE, so this proc doesn't need to be used alongside log_access and can replace it where appropriate.

log_telecomms

Logging for speech taking place over comms, as well as tcomms equipment

log_tgui

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

log_tool

Logging for tool usage

log_topic

Logging for world/Topic

log_traitor

Logging for traitor objectives

log_transport

Logging for transport (tram/elevator) actions

log_tts

Logging for TTS

Logging for items purchased from a traitor uplink

log_virus

Logging for the creation and contraction of viruses

log_vote

Logging for OOC votes

log_whisper

Logging for whispered messages

log_world

Log to both DD and the logfile.

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:

los_check

Line of sight check! Spawns a dummy object and then iterates through each turf to see if it's blocked by something not handled by pass_args. Contains a mid_los_check, meant to be overriden by subtypes. args:

lowercase_title

Ensures text does not start with capital letters.

make_associative

Make a normal list an associative one

make_body

Uses stripped down and bastardized code from respawn character

make_datum_reference_lists

//Initial Building/////

Legacy procs that really should be replaced with proper _INIT macros

make_into_clown

Helper proc that handles making someone into a clown after a bananium nuke goes off.

make_knowledge_id

ID's are not unique, the same knowledge with the same type in the same shop will always have the same ID.

make_mutable_appearance_directional

Takes an input mutable appearance, returns a copy of it with the hidden flag flipped to avoid inheriting dir from what it's drawn on This inheriting thing is handled by a hidden flag on the /image (MAs are subtypes of /image)

make_tuple

Returns the name of the mathematical tuple of same length as the number arg (rounded down).

marking_fur_colors

Returns the three mutant colours a marking can follow, as a body's DNA features hold them: what a new marking, a preset or a colour reset gives it.

Returns:

markings_baseline_fill

Builds the fixture's marking map in the nested shape a savefile holds: zone -> (marking name -> list(color, emissive)).

Every zone in GLOB.marking_zones receives all three fixture markings. Only the second one emits, so a test covers both the plain and the emissive branch of append_base_marking_overlays(). Callers load it through body_marking_collection_from_list(), the way a saved character's markings arrive, and replace the whole collection with it, so a species randomiser that already seeded a zone cannot leave a stray entry behind.

Returns a new list.

markings_baseline_is_glowing

Tells a glowing emissive appearance from an emissive blocker, which shares its plane.

Every emissive colour matrix writes its glow into the constant row, and a blocker leaves that row at zero (see _EMISSIVE_COLOR() and _EM_BLOCK_COLOR()).

Arguments:

Returns TRUE when the appearance glows.

markings_baseline_marking_colors

One fixed colour per fixture marking, so no signature ever depends on a mutant colour roll.

markings_baseline_marking_names

Fixtures the body marking tests share: the markings a test body wears and their colours, the standard and merge fills, a rendered icon's pixel signature and the emissive glow check. Their names come from the before/after baselines the markings datumisation was measured with. The markings the fixture wears. Each one claims all eight marking zones and ships art for every one of them plus both leg shapes, so no case falls back to a sheet's default frame and hides a difference. Named explicitly rather than read out of GLOB.body_markings_per_limb, whose order can change.

markings_baseline_signature

Reduces a rendered icon to one comparison key.

Every pixel of every cardinal folds into a single md5, so a colour-only change is caught where difference().getbbox() would miss it. The canvas size travels with the hash so a later run can never silently compare a differently sized render.

Arguments:

Returns a list holding the hash and the canvas shape.

markings_merge_fixture_color

The one colour every marking of the merge fixture wears.

markings_merge_fixture_fill

Builds the merge fixture's marking map, in the same nested shape as markings_baseline_fill(): the same three markings on every zone, all in one colour and all glowing. Each zone's markings then run together in colour and in glow, which the standard fixture, three colours with one glow per zone, never does. Its tests draw a zone's same-coloured markings, and its glows, as one.

Returns a new list.

material_insertion_animation

Creates a mutable appearance with the material color applied for its insertion animation into an autolathe or techfab Arguments

md5asfile

Save file as an external file then md5 it. Used because md5ing files stored in the rsc sometimes gives incorrect md5 results. https://www.byond.com/forum/post/2611357

merge_body_marking_run

Draws a run of markings, or of glows, with its first appearance as drawn into the output list, a dropped limb's image of it included: that appearance takes the run's blended icon and keeps its own colour, alpha, layer, plane, flags and facing, so it draws what the run's appearances drew one on another.

The blended icon holds the run's states blended uncoloured, in order, on a canvas of their sheets' size in all four cardinals. Its key, the parts joined by "|", is colour-free, so every body drawing the same states shares it, in any colour and husked or not. Built on a cache miss, into a bounded cache. The blend sits under a state named by the key as well. An appearance reads its runtime icon back as empty text, and the leg split keys its masked halves by that text and the appearance's state (handle_masking()), so only the state tells two runs apart there. The same content keys keep custom paint's own leg split safe (appearance.dm).

Arguments:

meridian_theme_art

Returns the art asset a MeridianOS theme draws with outside tgui's bundle, or null for a theme whose art is all in it.

Arguments:

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

metal_transmute

Change the material type of an object or turf, but with visuals and effects related to the material

minor_announce

Sends a minor annoucement to players. Minor announcements are large text, with the title in red and message in white. Only mobs that can hear can see the announcements.

message - the message contents of the announcement. title - the title of the announcement, which is often "who sent it". alert - whether this announcement is an alert, or just a notice. Only changes the sound that is played by default. html_encode - if TRUE, we will html encode our title and message before sending it, to prevent player input abuse. players - optional, a list mobs to send the announcement to. If unset, sends to all palyers. sound_override - optional, use the passed sound file instead of the default notice sounds. should_play_sound - Whether the notice sound should be played or not. This can also be a callback, if you only want mobs to hear the sound based off of specific criteria. color_override - optional, use the passed color instead of the default notice color.

mix_colors_by_volume

Returns the volume-weighted RGB mean of a colour to volume list, as "#rrggbb" with alpha ignored, or null when it holds no volume.

mix_liquid_color

Returns the volume-weighted RGB mean of a reagent type to volume list, as "#rrggbb".

Each reagent counts with its initial(color), alpha ignored: a pool's alpha comes from SSliquids.get_pool_alpha(). Liquids hold reagents by type, which can't tell blood types apart, so blood counts with blood_color when it is set.

Arguments:

Returns:

mix_opacity_from_reagent_list

Returns the volume-weighted liquid_opacity of a reagent type to volume list, from 0 (clear) to 1 (opaque).

mob_only_listeners

A filter to be applied to get_hearers_in_x, that removes any non-mob hearers, converting them to their relevant mob if one exists (such as dullahan heads). Modifies input list.

mobs_in_area_type

Takes: list of area types Returns: all mobs that are in an area type

modular_persistence_account_key

Normalizes an admitted or cryo account key, including aghost's prefix. An absent key has no save identity.

mouse_angle_from_client

Returns an angle in degrees relative to the position of the mouse and that of the client eye.

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] This will preserve associations ~Carnie

move_range

Move elements [from_index,from_index+len) to [to_index-len, to_index) Same as moveElement but for ranges of elements This will preserve associations ~Carnie

movespeed_data_null_check

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

mutable_appearance

narsie_apocalypse

Third crew last second win check and flufftext for [/proc/begin_the_end()]

narsie_end_begin_check

First crew last second win check and flufftext for [/proc/begin_the_end()]

narsie_end_second_check

Second crew last second win check and flufftext for [/proc/begin_the_end()]

narsie_last_second_win

Called only if the crew managed to destroy narsie at the very last second for [/proc/begin_the_end()]

narsie_start_destroy_station

security level and shuttle lockdowns for [/proc/begin_the_end()]

next_list_item

Returns the next item in a list

notify_all_banned_players

Notifies all banned players about their ban and gives them a link to appeal from the config. If it was a server ban, it also kicks them.

If the banned player's ckey has a linked client on the server, it notifies them of the ban details and kicks them if it was a server ban. If there is anyone else sharing the banned player's IP or CID, it notifies them of the ban details and kicks them if it was a server ban.

Builds the ban cache for every client impacted by the ban.

Arguments:

notify_ghosts

Fancy notifications for ghosts

The kitchen sink of notification procs

Arguments:

nuke_gib

Helper proc that handles gibbing someone who has been nuked.

nuke_request

Used by communications consoles to request the nuclear launch codes

objectify

"Turns" people into objects. Really, we just add them to the contents of the item.

offer_control

Offer control of the passed in mob to dead player

Automatic logging and uses poll_candidates_for_mob, how convenient

offer_to_keep_hairstyle

Asks the freshly cut recipient whether to keep the style beyond this round.

Sleeps on the prompt, so call it asynchronously and let the barber carry on. Says nothing when the style already matches what they spawn with.

offset_to_screen_loc

Takes a list in the form (x_offset, y_offset) And converts it to a screen loc string Accepts an optional view string/size to force the screen_loc around, so it can't go out of scope

onclose

Registers the on-close verb for a browse window (client/verb/windowclose) this will be called when the close-button of a window is pressed.

This is usually only needed for devices that regularly update the browse window, e.g. canisters, timers, etc.

windowid should be the specified window name e.g. code is : user << browse(text, "window=fred") then use : onclose(user, "fred")

Optionally, specify the "source" parameter as the controlled atom (usually src) Otherwise, the user mob's machine var will be reset directly.

overlays2text

Converts an overlay list into text for debug printing Of note: overlays aren't actually mutable appearances, they're just appearances Don't have access to that type tho, so this is the best you're gonna get

painting_pixels_from_icon

The painting store's pixel string: every pixel of the drawing, row by row, as the canvas grid writes them.

painting_store_failure

Build the common failure envelope used by the DM transaction queue and native calls.

params2screenpixel

Converts a screen loc param to a x,y coordinate pixel on the screen.

parse_caught_click_modifiers

Returns a turf based on text inputs, original turf and viewing client

parse_slot_flags

Returns a list of strings for a given slot flag.

parse_zone

Return a string for the specified body zone. Should be used for parsing non-instantiated bodyparts, otherwise use /obj/item/bodypart/var/plaintext_zone

partially_block_emissives

Takes a non area atom and a threshold Makes it block emissive with any pixels with more alpha then that threshold, with the rest allowing the light to pass Returns a list of objects, automatically added to your vis_contents, that apply this effect QDEL them when appropriate

pass

A do nothing proc

path_map_passalong

We generate a path for the passed in callbacks, and then pipe it over

pathfinding_finished

Uses funny pass by reference bullshit to take the output created by pathfinding, and insert it into a return list We'll be able to use this return list to tell a sleeping proc to continue execution

pathwalk

Takes a directory and returns every file within every sub directory. If extensions_filter is provided then only files that end in that extension are given back. If extensions_filter is a list, any file that matches at least one entry is given back.

peek

Returns the top (last) element from the list, does not remove it from the list. Stack functionality.

permissive_sanitize_name

Much more permissive version of reject_bad_name(). Returns a trimmed string or null if the name is invalid. Allows most characters except for IC chat prohibited words.

phase_filter

Cool filter that I'm using for some of this :)))

pick_closest_path

Returns a chosen path that is the closest to a list of matches

pick_holy_successor

Chooses a valid holy successor from GLOB.holy_successor weakref list and sets things up for them to be the new high priest

Returns the chosen holy successor, or null if no valid successor

pick_n

Picks n items from a list. The same index will not be chosen more than once. e.g. pick_n(list_of_stuff, 10) would return a list of 10 items from the list, chosen randomly.

pick_n_take

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

pick_recursive

Similar to pick_weight_recursive, except without the weight part, meaning it should hopefully not take up as much computing power for things that don't +need+ weights.

pick_weight

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.

pick_weight_recursive

Like pick_weight, but allowing for nested lists.

For example, given the following list: list(A = 1, list(B = 1, C = 1)) A would have a 50% chance of being picked, and list(B, C) would have a 50% chance of being picked. If list(B, C) was picked, B and C would then each have a 50% chance of being picked. So the final probabilities would be 50% for A, 25% for B, and 25% for C.

Weights should be integers. Entries without weights are assigned weight 1 (so unweighted lists can be used as well)

pick_weight_take

pick_weighted_lawset

returns a law datum based off of config. will never roll asimov as the weighted datum if the station has a unique AI.

piglatin_sentence

runs piglatin_word() proc on each word in a sentence. preserves caps and punctuation

piglatin_word

takes "word", and returns it piglatinized.

pixel_offset_turf

Takes a turf, and a list of x and y pixel offsets and returns the turf that the offset position best lands in

play_cinematic

Plays a cinematic, duh. Can be to a select few people, or everyone.

cinematic_type - datum typepath to what cinematic you wish to play. watchers - a list of all mobs you are playing the cinematic to. If world, the cinematical will play globally to all players. special_callback - optional callback to be invoked mid-cinematic.

play_fov_effect

Plays a visual effect representing a sound cue for people with vision obstructed by FOV or blindness

playsound

playsound is a proc used to play a 3D sound in a specific range. This uses SOUND_RANGE + extra_range to determine that.

Arguments:

playsound_if_pref

playsound_if_pref is similar to playsound but it doesn't play for ghosts, and checks for prefs. This is useful if we have something like the organic interface content, which everyone may not want to hear.

source - Origin of sound. soundin - Either a file, or a string that can be used to get an SFX. vol - The volume of the sound, excluding falloff and pressure affection. vary - bool that determines if the sound changes pitch every time it plays. extrarange - modifier for sound range. This gets added on top of SOUND_RANGE. falloff_exponent - Rate of falloff for the audio. Higher means quicker drop to low volume. Should generally be over 1 to indicate a quick dive to 0 rather than a slow dive. frequency - playback speed of audio. channel - The channel the sound is played at. pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space). falloff_distance - Distance at which falloff begins. Sound is at peak volume (in regards to falloff) aslong as it is in this range. ignore_walls - Whether or not the sound can pass through walls. pref_to_check - the path of the pref that we want to check - defaults to /datum/preference/toggle/erp/sex_toy_sounds

playsoundtoken

Creates a soundtoken datum (a sound that updates for movement). allowed_listeners is an optional list of mobs that are the only ones that can hear this sound ever. sound_length is an optional length of the sound. Things like TTS need to pass this since we can't dynamically grab the length in that case.

podspawn

One proc for easy spawning of pods in the code to drop off items before whizzling (please don't proc call this in game, it will destroy you)

Arguments:

poll_holiday

Takes a holiday datum, a starting month, ending month, max amount of days to test in, and min/max year as input Returns a list in the form list("yyyy/m/d", ...) representing all days the holiday runs on in the tested range

pop

Returns the top(last) element from the list and removes it from the list (typical stack function)

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.

populate_interaction_instances

Global loading procs

populate_reta_job_trims

Populates the job trims list for RETA system

populate_rtd_datums

Lazy-initialize the datum field on all the designs

populate_virtual_areas

Constructs the list of virtual areas

power_fail

Disables power in most station APCs temporarily

power_failure

Causes a power failure across the station.

All SMESs and APCs will be fully drained, and all areas will power down.

The drain is permanent (that is, it won't automatically come back after some time like the grid check event), but the crew themselves can return power via the engine, solars, or other means of creating power.

power_restore

Restores power to all rooms on the station.

Magically fills ALL APCs and SMESs to capacity, and restores power to depowered areas.

power_restore_quick

A quicker version of /proc/power_restore that only handles recharging SMESs.

This will also repower an entire station - it is not instantaneous like power restore, but it is faster performance-wise as it only handles SMES units.

Great as a less magical / more IC way to return power to a sapped station.

power_to_energy

Converts the watt to the joule, assuming SSmachines tick rate.

prefix_zeros_to_number

Returns a text string containing N prefixed with a series of zeros with length equal to max_zeros minus log(10, N), rounded down.

prefs_import_admin_backup

Staff backups are retained until explicitly removed; never overwrite a numbered backup after a gap.

prefs_import_backup

Player backups rotate independently of retained staff/legacy backups.

prefs_import_clean_assoc_paths

We just guarantee the shape, the owning loaders resolve them.

prefs_import_clean_loadout

The UI encodes and caps these, the load path doesn't, so we redo it here.

prefs_import_clean_loadout_presets

loadout_lists is preset -> path -> details, so unwrap a level first.

prefs_import_clean_text_list

Lists consumed as text/type names by raw loaders must not carry numeric indexes or nested collections.

prefs_import_invalidate_cache

After successful replacement, old UI/disconnect callbacks must only write to memory.

prefs_import_pass1

Pass 1. Retains character migration inputs. Player imports may only replace player-owned root fields. Supplying local_player_data enables the player allowlist; staff may still restore a complete backup.

prefs_import_player_root

Registered preferences plus raw player settings and inputs still used by supported migrations.

prefs_import_prevalidate

Structural checks. Returns an error string, or null if it's fine.

prefs_import_read_upload

Shared upload validation. Policy-specific metadata filtering happens after this succeeds. Returns an error, or the decoded tree and byte count; never logs uploaded JSON or decoder exceptions.

prefs_import_replace

Write and verify the candidate before touching the destination. Returns an error, or null on success.

prefs_import_strip_empty_keys

Pass 1 and native migrations produce unique path keys; copy only to remove empty keys, preserving shared lists.

prefs_import_strip_empty_loadout_keys

Migration leaves null keys behind, and sanitize_loadout_list stack_traces on them.

prefs_import_tree_too_deep

Check depth iteratively so a deeply nested upload cannot overflow the call stack.

prepare_bodypart_overlays

Prepares the final bodypart or hair slot, where direct glow/blocker masks already have their centering and height adjustments. Each mask moves inside a neutral emissive boundary so rotation does not depend on icon size; masks sharing a plane and layer share one boundary. Plain visible sprites sharing a layer share one holder. Only the mob's top-level overlays count toward MAX_ATOM_OVERLAYS, and a matrixed accessory otherwise spends a sprite and a mask per colour slot on every layer it draws.

Draw order is kept: an entry that cannot join stays in place, and later entries at its layer start a new boundary or holder. Shared limb-cache appearances are copied or nested, never modified. Prepared roots cannot join again and single sprites are not wrapped, so repeating the pass adds nothing.

Arguments:

Returns a new list for the cache.

prepare_explosion_turfs

Returns a list of turfs in X range from the epicenter Returns in a unique order, spiraling outwards This is done to ensure our progressive cache of blast resistance is always valid This is quite fast

prepare_infuser_entries

Global proc that sets up each /datum/infuser_entry sub-type as singleton instances in a list, and returns it.

prepare_lua_editor_list

Intermediate step for preparing lists to be passed into the lua editor tgui. Resolves weakrefs, converts some values without a standard textual representation to text, and can handle self-referential lists and potential duplicate output keys.

pretty_string_from_reagent_list

Input a reagent_list, outputs pretty readable text! Default output will be formatted as

preview_animated_leaves

The animated icon states a flat icon draws, and where: list(list(leaf, x, y), ...), with the leaf's lower left pixel at (x, y) of the flat's own canvas. In a walk's recipes only crops move what is already drawn; an animated leaf that anything else would move is left out, and drawn still.

preview_animation_difference

White where two icons, each split by preview_animation_split(), differ, and black where they don't.

preview_animation_fewer_steps

The same steps, with only keep after the first: dropped evenly, each kept one shown for the time of those after it.

preview_animation_frames_at

What frame each of a region's leaves shows time ms into its animation: leaf number -> frame.

preview_animation_mark_frames

Marks animated leaves in a detached to_list() recipe, using their source identities to keep shared leaves on the same track. The source tree and its transformer lists remain untouched.

preview_animation_reading

A reading of an animated icon state, or null for one that is drawn still without reading it.

preview_animation_split

An icon as two opaque icons that differ wherever it does: its colours, and its alpha in grey. Uses up source.

preview_animation_steps

A region's animation as steps, list(list(start, ms), ...): from the start, each time any of its leaves shows something new, when, and for how long, in ms. The leaves start together and come round together once all their loops have, or at CHARACTER_PREVIEW_ANIMATION_MAX_PERIOD. The first step is every leaf's first frame, the facing as drawn; see preview_animation_frames_at() for the others.

preview_animation_tokens

A recipe marked for patches, split where each fills in its own numbers: the pieces between, and in place of each number a code for it: 0 for the facing's dir, a leaf's number for its frame, and -1 to -4 for the crop's x1, y1, x2 and y2.

preview_animation_track

One leaf's frames in a facing, as the steps of preview_animation_steps() read them: list("leaf" = its number, "frames" = each frame it shows in turn, "starts" = when each starts, in ms, "shows" = whether each looks different from the one before it, the first from the last, "cycle" = how long they take in all).

preview_state_animated

Whether an icon state has more than one frame, from its file's metadata, remembered by file and state.

previous_list_item

Returns the previous item in a list

print_command_report

Print a report to all the communications consoles, and optionally send an announcement to players about it. This is used for the roundstart report, but can also be used for other reports in the future.

print_holiday

Does the same as /proc/poll_holiday, but prints the output to admins instead of returning it

print_language_list

Helper proc to print a list of languages in a human readable format

priority_announce

Make a big red text announcement to

Formatted like:

" Message from sender "

" Title "

" Text "

Arguments

process_chat_color

Converts a given color to comply within a smaller subset of colors to be used in runechat. If a color is outside the min/max saturation or lum, it will be set at the nearest value that passes validation.

Arguments:

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.

radiation_pulse

Sends out a pulse of radiation, eminating from the source. Radiation is performed by collecting all radiatables within the max range (0 means source only, 1 means adjacent, etc), then makes their way towards them. A number, starting at 1, is multiplied by the insulation amounts of whatever is in the way (for example, walls lowering it down). If this number hits equal or below the threshold, then the target can no longer be irradiated. If the number is above the threshold, then the chance is the chance that the target will be irradiated. As a consumer, this means that max_range going up usually means you want to lower the threshold too, as well as the other way around. If max_range is high, but threshold is too high, then it usually won't reach the source at the max range in time. If max_range is low, but threshold is too low, then it basically guarantees everyone nearby, even if there's walls and such in the way, can be irradiated. You can also pass in a minimum exposure time. If this is set, then this radiation pulse will not irradiate the source unless they have been around any radioactive source for that period of time. The chance to get irradiated diminishes over range, and from objects that block radiation. Assuming there is nothing in the way, the chance will determine what the chance is to get irradiated from half of max_range. Example: If chance is equal to 30%, and max_range is equal to 8, then the chance for a thing to get irradiated is 30% if they are 4 turfs away from the pulse source.

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_colour

Returns a random color picked from a list, has 2 modes (0 and 1), mode 1 doesn't pick white, black or gray

random_fish_type

Returns random fish, using random_case_rarity probabilities.

random_human_blood_type

Returns one of the human blood types at random, weighted by their rarity

random_nukecode

Returns a string for a random nuke code

random_step

Forces the atom to take a step in a random direction

randomize_human

Fully randomizes everything about a human, including DNA and name.

randomize_human_normie

Randomizes a human, but produces someone who looks exceedingly average (by most standards).

(IE, no wacky hair styles / colors)

ranks_from_rank_name

Converts a rank name (such as "Coder+Moth") into a list of /datum/admin_rank

ratvar2text

Reverts ravarian styling and rot13 in text.

rcd_result_with_memory

Produces a new RCD result from the given one if it can be calculated that the RCD should speed up with the remembered form.

rcd_scan

Global proc that generates RCD hologram in a range.

Arguments:

read_sheet

Debug proc, for when lighting sheets fuck up Accepts the sheet (2 or 3 (multiz) dimensional list of lighting values at some offset) alongside x and y delta values and the sheet's "offset", which is the amount required to ensure everything indexes at 1 Optionally, you can pass similar values for multiz stuff

reagent_explode

Generic explosions/failures

realize_appearance_queue

Takes a list of appearnces, makes them mutable so they can be properly vv'd and inspected

reciprocal_add

Takes two values x and y, and returns 1/((1/x) + y) Useful for providing an additive modifier to a value that is used as a divisor

recoil_camera

Helper proc for a similar function to shake_camera, expect this one kicks the camera back at an opposite angle rather then skake_camera's irratic jittering.

recover_all_SS_and_recreate_master

Recreate all SSs which will still cause data survive due to Recover(), the new Master will then find and take them from global.vars

recurse

Exists to trigger infinite recursion runtimes in testing

recursive_list_resolve

Returns a list with all weakrefs resolved

recursive_list_resolve_element

Helper for recursive_list_resolve()

recursive_loc_check

Recursively checks if an item is inside a given type/atom, even through layers of storage. Returns the atom if it finds it.

Arguments

reebe_station_warning

Tells the station that there's a clockie portal, along with making it usable by all

refresh_jukebox_songs

Recache the songs from config then force replace all the songs.

reject_bad_chattext

The procedure to check the text of the entered text on ntnrc_client.dm

This procedure is designed to check the text you type into the chat client. It checks for invalid characters and the size of the entered text.

reject_bad_name

Filters out undesirable characters from names.

reject_bad_text

Returns the text if properly formatted, or null else.

Things considered improper:

relay_to_list_and_observers

Sends a message to everyone within the list, as well as all observers.

remove_clunky_diagonals

Processes a path (list of turfs), removes any diagonal moves that would lead to a weird bump

path - The path to process down pass_info - Holds all the info about what this path attempt can go through simulated_only - If we are not allowed to pass space turfs avoid - A turf to be avoided

remove_diagonals

Processes a path (list of turfs), removes any diagonal moves

path - The path to process down pass_info - Holds all the info about what this path attempt can go through simulated_only - If we are not allowed to pass space turfs avoid - A turf to be avoided

remove_erp_things

If the "Remove ERP Interaction" config is disabled, remove ERP things from various lists

remove_faded_filters

Removes filters once they've faded out, skipping any that were replaced in the meantime

remove_image_from_client

Removes an image from a client's .images. Useful as a callback.

remove_image_from_clients

Like remove_image_from_client, but will remove the image from a list of clients

remove_messenger

Unregisters an NTMessenger instance from the pda_messengers table.

remove_non_dm_variants

Given a list and a list of its variant hints, removes any list key/values that are represent lua values that could not be directly converted to DM.

remove_synth_defib_trauma

Global timer proc used in defib.dm. Removes the temporary trauma caused by being defibbed as a synth.

Args:

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:

rename_area

rename_area Renames an area to the given new name, updating all machines' names and firedoors to properly ensure alarms and machines are named correctly at all times. Args:

render_species_facings

Adds a render of the dummy facing each way to entries, in the page's turning order.

replace_icon_legs

Cuts the legs (y 1-11) off a worn icon and staples new_legs on.

Upstream replaced this with apply_icon_mask(LEGS_MASK), which only cuts y 1-9. The big legs and vox leg templates are drawn to replace all 11 rows, so the upstream cut leaves stray human thigh pixels around them.

request_z_pillar

Returns a z pillar to insert turfs into

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.

reset_religion

It's time to kill GLOB Reset religion to its default state so the new chaplain becomes high priest and can change the sect, armor, weapon type, etc Also handles the selection of a holy successor from existing crew if multiple chaplains are on station.

reset_religious_sect

Removes any existing religious sect from chaplains, allowing another to be selected

resolve_ai_icon_sync

A form of resolve_ai_icon that is guaranteed to never sleep. Not always accurate, but always synchronous.

reta_find_and_grant_access

Finds eligible responders and grants them temporary access

reta_get_user_department

Gets the department string for a user based on their job

reta_get_user_department_by_name

Gets the standardized department string from a console department name

reta_init_config

Initialize RETA config values

reta_on_cooldown

Checks if an origin department is on cooldown for calling a target department

reta_push_ui_updates

Pushes UI updates to all consoles in the same origin department

reta_set_cooldown

Sets a cooldown for an origin department calling a target department

reta_track_call

Tracks recent emergency calls for multiple department analysis

retrieve_ban_cache

Gets the ban cache of the passed in client If the cache has not been generated, we start off a query If we still have a query going for this request, we just sleep until it's received back

return_atmos_handbooks

Returns an assoc list of the gas handbook and the reaction handbook. For UIs, simply do data += return_atmos_handbooks() to use.

return_escape_shuttle

Docks the emergency shuttle back to the station and resets its state

return_generator_args

returns the arguments given to a generator and manually extracts them from the internal byond object returns:

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

reverse_range

replaces reverseList ~Carnie

rgb2hsv

Converts an rgb color into a list storing hsva Exists because it's useful to have a guaranteed alpha value

round_blood_for_hud

A helper for getting the appropriate icon state for the blood hud.

round_timestamp

Returns timestamp since the round started, AKA Pay Time (PT)

rustg_get_version

Gets the version of rust_g

rustg_git_commit_date

Returns the date of the given revision using the provided format. Defaults to returning %F which is YYYY-MM-DD.

rustg_git_commit_date_head

Returns the formatted datetime string of HEAD using the provided format. Defaults to returning %F which is YYYY-MM-DD. This is different to rustg_git_commit_date because it only needs the logs directory.

rustg_sound_length

Provided a static RSC file path or a raw text file path, returns the duration of the file in deciseconds as a float.

rustg_unix_timestamp

Returns the timestamp as a string

safe_read_pref

Safely read a given preference datum from a given client.

Reads the given preference datum from the given client, and guards against null client and null prefs. The client object is fickle and can go null at times, so use this instead of read_preference() if you want to ensure no runtimes.

returns client.prefs.read_preference(prefs_to_read) or FALSE if something went wrong.

Arguments:

sample_fabric_colour

The cloth colour of a worn sprite, as the approved previews sample it: every opaque pixel of rows 21-24, columns 12-18 facing south (GetPixel() x 13-19, y 11-8), tinted (each tint rounds half to even), stable-sorted by Rec. 601 luma; the upper median. Cached by file, state, tints and source revision; a sprite that is neither a file nor text is sampled without being cached. Null when nothing opaque is there.

sanitize

Runs byond's html encoding sanitization proc, after replacing new-lines and tabs for the # character.

sanitize_alt_job_titles

Keep only entries whose job title and alternative title are text. get_alt_job_title() handles job validation; SSjob may not be initialized while preferences load.

sanitize_augment_colors

Returns colors lowercased when it is four "#rrggbb" colours run together, else null. It runs only as a save loads and on the editor's actions, so its regex is made each time rather than kept.

Arguments:

sanitize_color

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

sanitize_css_class_name

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

sanitize_filepath

Sanitizes the name of each node in the path.

Im case you are wondering when to use this proc and when to use SANITIZE_FILENAME,

You use SANITIZE_FILENAME to sanitize the name of a file [e.g. example.txt]

You use sanitize_filepath sanitize the path of a file [e.g. root/node/example.txt]

If you use SANITIZE_FILENAME to sanitize a file path things will break.

sanitize_frequency

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

sanitize_language_understanding

Saved levels read back: known language types only, each snapped to a step and kept within range. Null if none.

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.

scale_liquid_color

Returns a mixed pool colour scaled by its surface class's LIQUID_COLOR_FACTOR_*, as "#rrggbb".

Arguments:

Returns:

scramble_message_replace_chars

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

screen_loc_to_offset

Takes a screen loc string in the format "+-left-offset:+-pixel,+-bottom-offset:+-pixel" Where the :pixel is optional, and returns A list in the format (x_offset, y_offset) We require context to get info out of screen locs that contain relative info, so NORTH, SOUTH, etc

screen_loc_to_turf

Almost identical to the params_to_turf(), but unused (remove?)

screen_text

Return an object with a new maptext (not currently in use)

seedRuins

Loads the ruins for a given z level. @param z_levels The z levels to load ruins on. @param budget The budget to spend on ruins. Compare against the cost of the ruins in /datum/map_template/ruin. @param whitelist A list of areas to allow ruins to be placed in. @param potentialRuins A list of ruins to choose from. @param clear_below Whether to clear the area below the ruin. Used for multiz ruins. @param mineral_budget The budget to spend on ruins that spawn ore vents. Map templates with vents have that defined by mineral_cost. @param mineral_budget_update What type of ore distribution should spawn from ruins picked by this cave generator? This list is copied from ores_spawned.dm into SSore_generation.ore_vent_minerals. @param ruin_type The type of ruins that are spawning (ZTRAIT_SPACE_RUINS, ZTRAIT_ICE_RUINS, ZTRAIT_LAVA_RUINS, etc.) @param immediate_load If TRUE, loads the placed ruins' maps in right away instead of leaving them queued in SSmapping.reserved_ruins for terrain generation to run first. Only safe to use outside of the roundstart mapping init sequence, once terrain generation has already finished.

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:

select_hallucination_type

Helper to give the passed mob the ability to select a hallucination from the list of all hallucination subtypes.

semver_to_list

Converts a semver string into a list of numbers

send2adminchat

Asynchronously sends a message to TGS admin chat channels.

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

send2chat

Asynchronously sends a message to TGS chat channels.

message - The /datum/tgs_message_content 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). admin_only - Determines if this communication can only be sent to admin only channels.

send2otherserver

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

Arguments:

send_clock_message

Send sent_message to all other clock cultists and ghosts from the user

send_department_ooc

Validates and sends a message to a departmental OOC channel.

Applies channel access, OOC bans, mutes, and chat filters. Admins bypass membership, channel disables, and moderation mutes.

Arguments:

send_exported_map

A procedure for saving DMM text to a file and then sending it to the user. Arguments:

send_fax_to_area

Sends a fax to a fax machine in an area! fax_area is a type, where all subtypes are also queried. If multiple machines, one is randomly picked If force is TRUE, we send a droppod with a fax machine and fax the message to that fax machine

send_ooc_announcement

Sends a div formatted chat box announcement

Formatted like:

" Server Announcement " (or sender_override)

" Title "

" Text "

Arguments

send_status_display_alert

Send an emergency alert signal to all status displays alert_type: The picture state to display ("biohazard", "lockdown", "radiation", etc.)

send_status_display_biohazard_alert

Send a biohazard alert signal to all status displays

send_status_display_lockdown_alert

Send a lockdown alert signal to all status displays

send_status_display_radiation_alert

Send a radiation alert signal to all status displays

send_supply_pod_to_area

Easily send a supplypod to an area

send_tip_of_the_round

Sends a round tip to a target. If selected_tip is null, a random tip will be sent instead (5% chance of it being silly). Tips that starts with the @ character won't be html encoded. That's necessary for any tip containing markup tags, just make sure they don't also have html characters like <, > and ' which will be garbled.

send_to_observers

Sends a message to all dead and observing players, if a source is provided a follow link will be attached.

send_to_playing_players

sends a whatever to all playing players; use instead of to_chat(world, where needed)

serialize_antag_name

Serializes an antag name to be used for preferences UI

server_timestamp

Returns UTC timestamp with the specifified format, with optionally deciseconds or optional IC time (year offset), AKA Nanotrasen Standard Time (NST)

set_area_machinery_title

Renames all machines in a defined area from the old title to the new title. Used when renaming an area to ensure that all machiens are labeled the new area's machine. Args:

set_dynamic_human_appearance

This proc gets an argument of a target and runs

set_network_broadcast_status

Sets the camera network status on all entertainment monitors. A way to force a network to a status if you are unsure of the current state.

set_new_religious_sect

Sets a new religious sect used by all chaplains int he round

set_owned_masked_leg_icons

Publish or evict a finalized masked-leg pair and its exact native dimensions together. The caller must finish icon mutation before publishing. Existing cache entries are immutable. Retain the replacement before releasing the old pair, including when they share icons. Raw cache writes/removals must use this proc so metadata does not outlive its owning cache.

set_protean_modsuit

Sets the protean modsuit on a mob's chest component. Returns TRUE on success.

setup_clockwork_research

Returns a list of every initialized clockwork research datum

setup_mod_themes

Global proc that sets up all MOD themes as singletons in a list and returns it.

setup_round_default_laws

first called when something wants round default laws for the first time in a round, considers config returns a law datum that GLOB._round_default_lawset will be set to.

shake_camera

Shake the camera of the person viewing the mob SO REAL! Takes the mob to shake, the time span to shake for, and the amount of tiles we're allowed to shake by in tiles Duration isn't taken as a strict limit, since we don't trust our coders to not make things feel shitty. So it's more like a soft cap.

sheet2amount

Turns number of sheets into material amount, returning FALSE if the number is <= 0

Arguments:

sheets_from_value

Convert a raw material amount into "SHEET_MATERIAL_AMOUNT", or "* N", with rounding rules.

should_border_obj_smooth

Helper proc for smoothing border objects. Return this from smoothing_allowed() to get the desired effect Indexes into some global lists that encode direction bullshit

should_have_space_before_emote

Returns a boolean based on whether or not the string contains a comma or an apostrophe, to be used for emotes to decide whether or not to have a space between the name of the user and the emote.

Requires the message to be HTML decoded beforehand. Not doing it here for performance reasons.

Returns TRUE if there should be a space, FALSE if there shouldn't.

should_visual_organ_apply_to

Some sanity checks, but mostly to check if the person has their preference/dna set to load

shuffle

Randomize: Return the list in a random order

shuffle_inplace

same as shuffle, but acts on list in place, and returns same list

silent_alert

Sends a silent alert message to certain crew members' PDAs

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_isolated

Formats a number into a list representing the si unit. Access the coefficient with [SI_COEFFICIENT], and access the unit with [SI_UNIT].

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

siunit_pressure

slice_off_turfs

Returns a slice of a list of turfs, defined by the ones that are inside the inner/outer angle's bounds

sm_gas_data

Return a list info of the SM gases. Can only run after init_sm_gas

snap_language_understanding

A level snapped to a whole step, between the least allowed and all of it.

sortInsert

Insertion Sort

Simple sorting algorithm that builds the final sorted list one item at a time.

@see

sortMerge

Merge Sort

Divide and conquer sorting algorithm.

@see

sortTim

Tim Sort

Hybrid sorting algorithm derived from merge sort and insertion sort.

Sorts in place. You might not need to get the return value.

@see https://en.wikipedia.org/wiki/Timsort

@param {list} to_sort - The list to sort.

@param {proc} cmp - The comparison proc to use. Default: Numeric ascending.

@param {boolean} associative - Whether the list is associative. Default: FALSE.

@param {int} fromIndex - The index to start sorting from. Default: 1.

@param {int} toIndex - The index to stop sorting at. Default: 0.

sort_key

for sorting clients or mobs by ckey

sort_list

sort any value in a list

sort_mobs

Orders mobs by type then by name. Accepts optional arg to sort a custom list, otherwise copies GLOB.mob_list.

sort_names

uses sort_list() but uses the var's name specifically. This should probably be using mergeAtom() instead

sort_record

Specifically for record datums in a list.

spanning_screen_loc

Returns a screen_loc format for a tiling screen objects from start and end positions. Start should be bottom left corner, and end top right corner.

spawn_random_ship

Spawns the random ship proper, with the follow-up effects, if you've set any up.

spawn_reebe

Spawn reebe with the appropriate fanfare after sacrificing a blood cultist

special_list_filter

Returns a list with items filtered from a list that can call callback

species_family_id

The id the species page knows a family by: the last part of its typepath.

species_has_fitness_limbs

Returns whether a species' own limbs have fitness subtypes, which is when its characters get a muscle size and definition.

Arguments:

species_page_height

A dummy's flat render with the rows its height filters move moved in it, as the game draws them, so a species shorter or taller than average stands as high on the page as in the round. A flatten leaves filters out.

Each run of rows the filters move, as character_preview_rows() gives them, is cleared and filled with the band of the flat render's rows it shows, if any. A render that isn't a tile, or whose filters move more than whole rows, is left as it is.

spiral_range

similar function to range(), but with no limitations on the distance; will search spiralling outwards from the center

spiral_range_turfs

similar function to RANGE_TURFS(), but will search spiralling outwards from the center (like the above, but only turfs)

split_color

Given a color in the format of "#RRGGBB" or "#RRGGBBAA", gives back a 4 entry list with the number values of each

split_worn_emissive_branches

Return the emissive-only tree, or null if nothing changed. visible_resultWORN_EMISSIVE_VISIBLE_RESULT receives the visible tree (null for a moved mask leaf). The caller reuses this single return slot throughout the traversal; each node consumes its child's result immediately. Unchanged branches retain their original appearances and allocate no lists. Nested cross-plane masks escape the mob's KEEP_TOGETHER group. Moving the plane boundary to a sibling root lets BYOND inherit the mob transform normally, without baking a pose into the cache. Only floating equipment masks are moved; absolute-layer effects and other planes retain their behavior.

spread_reagents

Exposes all accessible atoms within some distance of an epicenter to some reagents. Does not clear the source reagent holder; that must be done manually if it is desired.

Arguments:

stars

Convert random parts of a passed in message to stars

This proc is dangerously laggy, avoid it or die

start_broadcasting_network

Adds a camera network to all entertainment monitors.

start_unequip_mob

A utility function for /datum/strippable_items to start unequipping an item from a mob.

started_narsie_summon

When narsie begins to be summoned, slowly dim the saturation of parallax and starlight

starts_with_any

Returns TRUE if the input_text starts with any of the beginnings

stifled

For when you're only able to speak a limited amount of words phrase - the string to convert definitive_limit - the amount of words to limit the phrase to, optional

stop_broadcasting_network

Removes a camera network from all entertainment monitors.

stoplag

returns the number of ticks slept

string_list

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

strip_appearance_underlays

Strips all underlays on a different plane from an appearance. Returns the stripped appearance.

strip_html

Runs STRIP_HTML_SIMPLE and sanitize.

strip_html_full

Runs STRIP_HTML_FULL and sanitize.

strip_outer_punctuation

Removes all punctuation sequences from the beginning and the end of the input string. Includes emphasis (|, +, _) and whitespace. Anything punctuation in the middle of the input will be maintained.

stripped_input

Used to get a properly sanitized input. Returns null if cancel is pressed.

Arguments

stripped_multiline_input

Used to get a properly sanitized input in a larger box. Works very similarly to stripped_input.

Arguments

summon_events

Triggers Summon Events from [user]. If Summon Events has already been triggered, speeds up the event timer.

summon_ghosts

Triggers Summon Ghosts from [user].

summon_guns

Triggers Summon Guns from [user]. Can optionally be passed [survivor_probability], to set the chance of creating survivalists. If Summon Guns has already been triggered, gives out guns to everyone again.

summon_magic

Triggers Summon Magic from [user]. Can optionally be passed [survivor_probability], to set the chance of creating survivalists. If Summon Magic has already been triggered, gives out magic to everyone again.

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 ~Carnie

symphony_address_allowed

TRUE if a topic from this sender is allowed to run.

symphony_ago

How long ago a stamp was. DisplayTimeText already says "right now", and "right now ago" reads wrong.

symphony_apply_discord_admins

Runs after load_admins() clears and rebuilds local/SQL holders, which take precedence.

symphony_ban_minutes

Ban length in minutes, 0 being permanent.

symphony_bannable_roles

Shared by the panel's role list and ban validation.

symphony_discord_admin_sync_enabled

Discord admin grants require both the module and admin sync flags.

symphony_enforce_kick

Recheck a revoke after its grace period, then return the player to the lobby. A failed query leaves them in the round; the periodic sweep retries when the database recovers.

symphony_has_ingame_role

Query a linked account for an in-game role grant. Returns TRUE/FALSE, or null when the database cannot answer. Unlinked accounts return FALSE.

symphony_holds_whitelist_role

Check a current role entitlement, bypassing the admission cache. Unlike admission, perks and imports require an enabled module and a confirmed grant.

symphony_ingame_role_ckeys

Return role holders as ckey -> TRUE, an empty list for no holders, or null on query failure.

symphony_invalidate_whitelist_cache

Invalidate one account immediately after a role change.

symphony_note_panel

Remember who called, so the status verb can compare the two halves.

symphony_request_community_ban

Queue propagation of an existing local ban to the other servers.

symphony_resolve_role

The ban cache is case sensitive, so match the caller's text to the stored title.

symphony_revoke

Announce a revoke, block pending admission, and schedule enforcement after the grace period.

symphony_seed_whitelist_cache

Cache a confirmed TRUE/FALSE result from a notification or bulk query. Advancing the epoch prevents an older in-flight query from overwriting this answer.

symphony_validate_ready_players

May sleep. Display and signal handlers must continue to use the cache-only gate.

symphony_version_verdict

Which half is behind, if either. needs/wants are what the panel asked for.

symphony_whitelist_cache_peek

Return cached TRUE/FALSE, or null for a miss. Never queries or sleeps.

symphony_whitelist_lookup

Return a cached whitelist answer, querying on a miss. May sleep. Database failures return null and are never cached; FALSE is a confirmed denial. Use symphony_whitelist_cache_peek() in display and signal handlers that cannot sleep.

symphony_write_ban_note

World topics have no usr, which create_message() requires, so insert the note directly.

techweb_point_display_generic

Helper proc to turn an associative list of points into a more human readable format.

test_whiteship_sizes

Helper proc that tests to ensure all whiteship templates can spawn at their docking port, and logs their sizes This should be a unit test, but too much of our other code breaks during shuttle movement, so not yet, not yet.

text2ratvar

Takes english and applies ratvarian styling rules (and rot13) to it.

tg_alert

DEPRECATED: USE tgui_alert(...) INSTEAD

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

tgm_encode

Takes a constant, encodes it into a TGM valid string

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_color_picker

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:

tgui_input_checkboxes

tgui_input_checkbox

Opens a window with a list of checkboxes and returns a list of selected choices.

user - The mob to display the window to message - The message inside the window title - The title of the window list/items - The list of items to display min_checked - The minimum number of checkboxes that must be checked (defaults to 1) max_checked - The maximum number of checkboxes that can be checked (optional) timeout - The timeout for the input (optional)

tgui_input_keycombo

Creates a TGUI window with a key input. Returns the user's response as a full key with modifiers, eg ShiftK.

This proc should be used to create windows for key entry that the caller will wait for a response from. If tgui fancy chat is turned off: Will return a normal input.

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

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:

time_to_twelve_hour

Converts a time expressed in deciseconds (like world.time) to the 12-hour time format. the format arg is the format passed down to time2text() (e.g. "hh:mm" is hours and minutes but not seconds). the timezone is the time value offset from the local time. It's to be applied outside time2text() to get the AM/PM right.

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.

toggle_blooper

Globally toggles bloopers on/off

toggle_department_ooc

Enables or disables a channel and notifies its listeners when the state changes.

Arguments:

toggle_id_ctf

Proc that handles toggling and unloading CTF.

tool_behaviour_name

returns an ic name of the tool needed Arguments:

trim

Returns a string with reserved characters and spaces before the first word and after the last word removed.

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:

try_move_adjacent

Tries to move an atom to an adjacent turf, return TRUE if successful

turf_peel

Behaves like the orange() proc, but only looks in the outer range of the function (The "peel" of the orange). This is useful for things like checking if a mob is in a certain range, but not within a smaller range.

@params outer_range - The outer range of the cicle to pull from. @params inner_range - The inner range of the circle to NOT pull from. @params center - The center of the circle to pull from, can be an atom (we'll apply get_turf() to it within circle_x_turfs procs.) @params view_based - If TRUE, we'll use circle_view_turfs instead of circle_range_turfs procs. @params reject_dense - If TRUE, ignore picked turfs in this selection that have density.

type_english_list

Returns a list of atom types in plain english as a string of each type name

typecache_filter_list

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

ui_status_only_living

Returns a UI status such that the dead will be able to watch, but not interact.

ui_status_silicon_has_access

Returns a UI status such that silicons will be able to interact with whatever they would have access to if this was a machine. For example, AIs can interact if there's cameras with wireless control is enabled.

ui_status_user_has_free_hands

Returns a UI status such that those without blocked hands will be able to interact, but everyone else can only watch.

ui_status_user_inside

Return UI_INTERACTIVE if the user is inside the target atom, whether they can see it or not. Return UI_CLOSE otherwise.

ui_status_user_is_abled

Returns a UI status such that users with debilitating conditions, such as being dead or not having power for silicons, will not be able to interact. Being dead will disable UI, being incapacitated will continue updating it, and anything else will make it interactive.

ui_status_user_is_adjacent

Returns a UI status such that users adjacent to source will be able to interact, far away users will be able to see, and anyone farther won't see anything. Dead users will receive updates no matter what, though you likely want to add a [ui_status_only_living] check for finer observer interactions.

ui_status_user_is_advanced_tool_user

Returns a UI status such that advanced tool users will be able to interact, but everyone else can only watch.

ui_status_user_is_conscious_and_lying_down

Returns UI_INTERACTIVE if the user is conscious and lying down. Returns UI_UPDATE otherwise.

ui_status_user_strictly_adjacent

Return UI_INTERACTIVE if the user is strictly adjacent to the target atom, whether they can see it or not. Return UI_CLOSE otherwise.

unformat_frequency

Opposite of format, returns as a number

uni_icon_facings_json

Turns a flat icon walked with get_flat_uni_icon(target, UP) into its recipe for each facing, as iconforge entry JSON: facing name -> recipe.

Nothing in the walk depends on the facing except which frame each directional state shows, so one walk with UP standing in for the facing, with each facing written in afterwards, gives exactly what a walk per facing does, for a quarter of the walking. No mob overlay faces UP of its own accord. A mob that something redraws when it turns has to be turned and walked once per facing instead.

unique_list

Return a list with no duplicate entries

unique_list_in_place

same as unique_list, but returns nothing and acts on list in place (also handles associated values properly)

unpack_garment_colours

Returns a view's colours, colour -> how many of its pixels have it, from the "rrggbb:count,..." form garment_sheet_metadata() holds them in.

Arguments:

unvalidated_client_error

Proc that just logs whenever an uninitialized client tries to do something before they have fully gone through New(). Intended to be used in conjunction with the VALIDATE_CLIENT_INITIALIZATION() macro, but can be dropped anywhere when we look at the fully_created var on /client.

updateToolTip

Updates a user's tooltip to show new title/contents.

update_all_doors_reta_lights

Updates RETA lighting for all doors in the game

update_all_security_huds

Updates the visual security huds on all mobs in GLOB.human_list

update_matching_security_huds

Updates the visual security huds on all mobs in GLOB.human_list that match the name passed to it.

updatetimedelay

Update the delay on an existing LOOPING timer Will come into effect on the next process

Arguments:

urange

ultra range (no limitations on distance, faster than range for distances > 8); including areas drastically decreases performance

url2htmlloader

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

valid_build_direction

Checks whether the target turf is in a valid state to accept a directional construction such as windows or railings.

Returns FALSE if the target turf cannot accept a directional construction. Returns TRUE otherwise.

Arguments:

valid_direct_subtypesof

Like valid_subtypesof(), but excludes concrete descendants of abstract sub-branches

valid_direct_typesof

Like valid_typesof(), but excludes concrete descendants of abstract sub-branches

valid_painting_id

Accept only the lowercase 32-character hexadecimal identities used for painting paths.

valid_subtypesof

Like subtypesof, but automatically excludes abstract typepaths

valid_typesof

Like typesof, but automatically excludes abstract typepaths

validate_suppression_status

Check if the delam suppression setup is valid on the map

view_to_pixels

Takes a string or num view, and converts it to pixel width/height in a list(pixel_width, pixel_height)

visible_hallucination_pulse

Emits a hallucinating pulse around the passed atom. Affects everyone in the passed radius who can view the center, except for those with TRAIT_MADNESS_IMMUNE, or those who are blind.

center - required, the center of the pulse radius - the radius around that the pulse reaches hallucination_duration - how much hallucination is added by the pulse. reduced based on distance to the center. hallucination_max_duration - a cap on how much hallucination can be added optional_messages - optional list of messages passed. Those affected by pulses will be given one of the messages in said list.

weakrefify_list

Returns a copy of the list where any element that is a datum is converted into a weakref

wear_female_version

Modifies a sprite slightly to conform to female body shapes

web_sound

Takes an input from either proc/play_web_sound or the request manager and runs it through yt-dlp and prompts the user before playing it to the server.

weekday_to_iso

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

weight_class_to_text

Returns a string based on the weight class define used as argument

window_flash

Flash the window of a player

world_topic_log_parameters

Redact the decoded credential, covering every parameter encoding accepted by authentication.

worn_frame_delays

Returns an animated worn state's frame delays, read from its sheet, or null when the sheet isn't a file on disk, like a generated icon, or has no such state.

Arguments:

woundscan

Displays wounds with extended information on their status vs medscanners

write_map

Procedure for converting a coordinate-selected part of the map into text for the .dmi format

zebra_typecacheof

Like typesof() or subtypesof(), but returns a typecache instead of a list. This time it also uses the associated values given by the input list for the values of the subtypes.

Latter values from the input list override earlier values. Thus subtypes should come after parent types in the input list. Notice that this is the opposite priority of /proc/is_type_in_list and /proc/is_path_in_list.

Arguments: