mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-31 07:57:47 +01:00
617 lines
166 KiB
HTML
617 lines
166 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><link rel="stylesheet" href="dmdoc.css"><title>(global) - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="global.html#var">Var Details</a> - <a href="global.html#proc">Proc Details</a></header><main><h1>/(global) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/(unknown)"><img src="git.png" width="16" height="16" title="(unknown)"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="global.html#var/Failsafe">Failsafe</a></th><td>Failsafe</td></tr><tr><th><a href="global.html#var/Master">Master</a></th><td>StonedMC</td></tr><tr><th><a href="global.html#var/SSai_behaviors">SSai_behaviors</a></th><td>The subsystem used to tick <a href="datum/ai_behavior.html" title="/datum/ai_behavior">/datum/ai_behavior</a> instances.
|
||
Handling the individual actions an AI can take like punching someone in the fucking NUTS</td></tr><tr><th><a href="global.html#var/SSai_controllers">SSai_controllers</a></th><td>The subsystem used to tick <a href="datum.html" title="/datum">/datum/ai_controllers</a> instances. Handling the re-checking of plans.</td></tr><tr><th><a href="global.html#var/SSai_movement">SSai_movement</a></th><td>The subsystem used to tick <a href="datum/ai_movement.html" title="/datum/ai_movement">/datum/ai_movement</a> instances. Handling the movement of individual AI instances</td></tr><tr><th><a href="global.html#var/SSambience">SSambience</a></th><td>The subsystem used to play ambience to users every now and then, makes them real excited.</td></tr><tr><th><a href="global.html#var/SSchat">SSchat</a></th><td>Copyright (c) 2020 Aleksej Komarov
|
||
SPDX-License-Identifier: MIT</td></tr><tr><th><a href="global.html#var/SScleanup">SScleanup</a></th><td></td></tr><tr><th><a href="global.html#var/SSearly_assets">SSearly_assets</a></th><td>Initializes any assets that need to be loaded ASAP.</td></tr><tr><th><a href="global.html#var/SSpathfinder">SSpathfinder</a></th><td>Queues and manages JPS pathfinding steps</td></tr><tr><th><a href="global.html#var/SSpersistent_data">SSpersistent_data</a></th><td></td></tr><tr><th><a href="global.html#var/SSspatial_grid">SSspatial_grid</a></th><td></td></tr><tr><th><a href="global.html#var/SStgui">SStgui</a></th><td>tgui subsystem</td></tr><tr><th><a href="global.html#var/SStimer">SStimer</a></th><td></td></tr><tr><th><a href="global.html#var/SSunplanned_controllers">SSunplanned_controllers</a></th><td>Handles making mobs perform lightweight "idle" behaviors such as wandering around when they have nothing planned</td></tr><tr><th><a href="global.html#var/SSverb_manager">SSverb_manager</a></th><td>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.</td></tr><tr><th><a href="global.html#var/SSvis_overlays">SSvis_overlays</a></th><td></td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="global.html#proc/GetBestWeapon">GetBestWeapon</a></th><td>Returns either the best weapon from the given choices or null if held weapons are better</td></tr><tr><th><a href="global.html#proc/HTTPGet">HTTPGet</a></th><td>HTTP Get (Powered by rustlibs)</td></tr><tr><th><a href="global.html#proc/IsEdible">IsEdible</a></th><td>returns if something can be consumed, drink or food</td></tr><tr><th><a href="global.html#proc/RoundDiagBar">RoundDiagBar</a></th><td>Diagnostic HUDs!</td></tr><tr><th><a href="global.html#proc/_queue_verb">_queue_verb</a></th><td>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.</td></tr><tr><th><a href="global.html#proc/add_attack_logs">add_attack_logs</a></th><td>Creates attack (old and new) logs for the user and defense logs for the target.
|
||
Will message admins depending on the custom_level, user and target.</td></tr><tr><th><a href="global.html#proc/add_verb">add_verb</a></th><td>handles adding verbs and updating the stat panel browser</td></tr><tr><th><a href="global.html#proc/addtimer">addtimer</a></th><td>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.</td></tr><tr><th><a href="global.html#proc/announce_merge_conflict_marker">announce_merge_conflict_marker</a></th><td>We REALLY do not want un-addressed merge conflicts in maps for an
|
||
inexhaustible list of reasons. This should help ensure that this will not be
|
||
missed in case linters fail to catch it for any reason what-so-ever.</td></tr><tr><th><a href="global.html#proc/assoc_to_keys">assoc_to_keys</a></th><td>Turns an associative list into a flat list of keys</td></tr><tr><th><a href="global.html#proc/atmos_scan">atmos_scan</a></th><td>Outputs a message to the user describing the target's gasmixes.
|
||
Used in chat-based gas scans.</td></tr><tr><th><a href="global.html#proc/avoid_assoc_duplicate_keys">avoid_assoc_duplicate_keys</a></th><td>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</td></tr><tr><th><a href="global.html#proc/bang">bang</a></th><td>Creates a flashing effect that blinds and deafens mobs within range</td></tr><tr><th><a href="global.html#proc/border_diamond_range_turfs">border_diamond_range_turfs</a></th><td>Returns the list of turfs around the outside of a center based on RANGE_TURFS()</td></tr><tr><th><a href="global.html#proc/broadcast_message">broadcast_message</a></th><td>Message Broadcast Proc</td></tr><tr><th><a href="global.html#proc/byondapi_stack_trace">byondapi_stack_trace</a></th><td>Exists by default in 516, but needs to be defined for 515 or byondapi-rs doesn't like it.</td></tr><tr><th><a href="global.html#proc/calculate_projectile_angle_and_pixel_offsets">calculate_projectile_angle_and_pixel_offsets</a></th><td>Calculates the pixel offsets and angle that a projectile should be launched at.</td></tr><tr><th><a href="global.html#proc/callback_add_trait">callback_add_trait</a></th><td>Proc wrapper of add_trait. You should only use this for callback. Otherwise, use the macro.</td></tr><tr><th><a href="global.html#proc/callback_remove_trait">callback_remove_trait</a></th><td>Proc wrapper of remove_trait. You should only use this for callback. Otherwise, use the macro.</td></tr><tr><th><a href="global.html#proc/check_active_security_force">check_active_security_force</a></th><td></td></tr><tr><th><a href="global.html#proc/check_behind">check_behind</a></th><td>Checks to see if <code>atom/source</code> is behind <code>atom/target</code></td></tr><tr><th><a href="global.html#proc/circle_range">circle_range</a></th><td>Returns all atoms present in a circle around the center</td></tr><tr><th><a href="global.html#proc/circle_range_turfs">circle_range_turfs</a></th><td>Returns a list of turfs around a center based on RANGE_TURFS()</td></tr><tr><th><a href="global.html#proc/circle_view">circle_view</a></th><td>Returns all atoms present in a circle around the center but uses view() instead of range() (Currently not used)</td></tr><tr><th><a href="global.html#proc/circle_view_turfs">circle_view_turfs</a></th><td>Returns a list of turfs around a center based on view()</td></tr><tr><th><a href="global.html#proc/client2rankcolour">client2rankcolour</a></th><td>Proc to generate a "rank colour" from a client</td></tr><tr><th><a href="global.html#proc/cmp_heretic_knowledge">cmp_heretic_knowledge</a></th><td>Orders heretic knowledge by priority</td></tr><tr><th><a href="global.html#proc/collect_nested_mobs">collect_nested_mobs</a></th><td>Recursively loops through the contents of this atom looking for mobs, optionally requiring them to have a client.</td></tr><tr><th><a href="global.html#proc/compare_list">compare_list</a></th><td>compare two lists, returns TRUE if they are the same</td></tr><tr><th><a href="global.html#proc/condense_water">condense_water</a></th><td>condenses water on a tile at the specified coordinates</td></tr><tr><th><a href="global.html#proc/contaminate_adjacent">contaminate_adjacent</a></th><td>Contaminate things that share our immediate location(periodic)</td></tr><tr><th><a href="global.html#proc/contaminate_target">contaminate_target</a></th><td>Contaminate the contents of a target(single instance)</td></tr><tr><th><a href="global.html#proc/costly_icon2asset">costly_icon2asset</a></th><td>Costlier version of icon2asset() that uses getFlatIcon() to account for overlays, underlays, etc. Use with extreme moderation, ESPECIALLY on mobs.</td></tr><tr><th><a href="global.html#proc/cover_flags2body_zones">cover_flags2body_zones</a></th><td>Turns a Body_parts_covered bitfield into a list of organ/limb names.</td></tr><tr><th><a href="global.html#proc/create_shrapnel">create_shrapnel</a></th><td>Creates an explosion of shrapnel at a turf.</td></tr><tr><th><a href="global.html#proc/create_strippable_list">create_strippable_list</a></th><td>Creates an assoc list of keys to /datum/strippable_item</td></tr><tr><th><a href="global.html#proc/cryo_ssd">cryo_ssd</a></th><td>Teleport an SSD human inside a cryopod, or a robot to a robot storage unit, but do not despawn them.</td></tr><tr><th><a href="global.html#proc/cut_relative_direction">cut_relative_direction</a></th><td>Takes a screen_loc string and cut out any directions like NORTH or SOUTH</td></tr><tr><th><a href="global.html#proc/delete_all_SS_and_recreate_master">delete_all_SS_and_recreate_master</a></th><td>Delete all existing SS to basically start over</td></tr><tr><th><a href="global.html#proc/deltimer">deltimer</a></th><td>Delete a timer</td></tr><tr><th><a href="global.html#proc/diagonally_blocked">diagonally_blocked</a></th><td>check if 2 diagonal turfs are blocked by dense objects</td></tr><tr><th><a href="global.html#proc/do_teleport">do_teleport</a></th><td>Will teleport the given atom to the given destination using the other parameters</td></tr><tr><th><a href="global.html#proc/emissive_appearance">emissive_appearance</a></th><td>Produces a mutable appearance glued to the <a href="code/__DEFINES/layers.html#define/EMISSIVE_PLANE" title="EMISSIVE_PLANE">EMISSIVE_PLANE</a> dyed to be the <a href="code/__DEFINES/lighting_defines.html#define/EMISSIVE_COLOR" title="EMISSIVE_COLOR">EMISSIVE_COLOR</a>. Order of application matters: Default generated blockers are overlays, and will block its own emissive underlays. If you want an object to be both a blocker, and have their own emissive, it has to be an overlay instead. Grayscale lightmasks are visible in the BYOND right-click and Examine pane, unless they're covered up by another overlay.</td></tr><tr><th><a href="global.html#proc/emissive_blocker">emissive_blocker</a></th><td>Produces a mutable appearance glued to the <a href="code/__DEFINES/layers.html#define/EMISSIVE_PLANE" title="EMISSIVE_PLANE">EMISSIVE_PLANE</a> dyed to be the <a href="code/__DEFINES/lighting_defines.html#define/EM_BLOCK_COLOR" title="EM_BLOCK_COLOR">EM_BLOCK_COLOR</a>.</td></tr><tr><th><a href="global.html#proc/emoji_parse">emoji_parse</a></th><td>Turns :ai: into an emoji in text.</td></tr><tr><th><a href="global.html#proc/empulse">empulse</a></th><td>Will cause an EMP on the given epicenter.
|
||
This proc can sleep depending on the affected objects. So assume it sleeps!</td></tr><tr><th><a href="global.html#proc/fill_with_ones">fill_with_ones</a></th><td>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.)</td></tr><tr><th><a href="global.html#proc/finish_unequip_mob">finish_unequip_mob</a></th><td>A utility function for <code>/datum/strippable_item</code>s to finish unequipping an item from a mob.</td></tr><tr><th><a href="global.html#proc/fire_curse_hand">fire_curse_hand</a></th><td>Torment the target with a frightening hand</td></tr><tr><th><a href="global.html#proc/fire_flash_log">fire_flash_log</a></th><td>Flashfire is a proc used to log fire causing chemical reactions.</td></tr><tr><th><a href="global.html#proc/first_name">first_name</a></th><td>Find the first name of a mob from a passed string with regex</td></tr><tr><th><a href="global.html#proc/flatten_list">flatten_list</a></th><td>Flattens a keyed list into a list of its contents</td></tr><tr><th><a href="global.html#proc/force_cryo">force_cryo</a></th><td>Immeditely teleport a human or robot to cryo and then despawn them.</td></tr><tr><th><a href="global.html#proc/format_si_suffix">format_si_suffix</a></th><td>Formats num with an SI prefix.</td></tr><tr><th><a href="global.html#proc/generate_and_hash_rsc_file">generate_and_hash_rsc_file</a></th><td>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 dont have to be hashed twice</td></tr><tr><th><a href="global.html#proc/generate_bitfields">generate_bitfields</a></th><td>Turns /datum/bitfield subtypes into a list for use in debugging</td></tr><tr><th><a href="global.html#proc/get_active_player_count">get_active_player_count</a></th><td>Get active players who are playing in the round</td></tr><tr><th><a href="global.html#proc/get_adjacent_areas">get_adjacent_areas</a></th><td>Returns a list of all areas that are adjacent to the center atom's area, clear the list of nulls at the end.</td></tr><tr><th><a href="global.html#proc/get_adjacent_turfs">get_adjacent_turfs</a></th><td>Returns a list of all turfs that are adjacent to the center atom's turf, clear the list of nulls at the end.</td></tr><tr><th><a href="global.html#proc/get_admin_objective_targets">get_admin_objective_targets</a></th><td>Allows admins to safely pick from SSticker.minds for objectives</td></tr><tr><th><a href="global.html#proc/get_all_linked_levels_zpos">get_all_linked_levels_zpos</a></th><td>Proc to get a list of all the linked-together Z-Levels</td></tr><tr><th><a href="global.html#proc/get_allowed_instrument_ids">get_allowed_instrument_ids</a></th><td>Get all non admin_only instruments as a list of text ids.</td></tr><tr><th><a href="global.html#proc/get_angle_raw">get_angle_raw</a></th><td>Angle between two arbitrary points and horizontal line same as [/proc/get_angle]</td></tr><tr><th><a href="global.html#proc/get_antag_type_strings_list">get_antag_type_strings_list</a></th><td>A proc that return an array of capitalized strings containing name of the antag types they are</td></tr><tr><th><a href="global.html#proc/get_antag_type_truncated_plaintext_string">get_antag_type_truncated_plaintext_string</a></th><td>A proc that return a string containing all the singled out antags . Empty string if not antag</td></tr><tr><th><a href="global.html#proc/get_atoms_of_type">get_atoms_of_type</a></th><td>Returns a list of atoms in a location of a given type. Can be refined to look for pixel-shift.</td></tr><tr><th><a href="global.html#proc/get_bbox_of_atoms">get_bbox_of_atoms</a></th><td>Get a bounding box of a list of atoms.</td></tr><tr><th><a href="global.html#proc/get_channel_name">get_channel_name</a></th><td>Returns the clean name of an audio channel.</td></tr><tr><th><a href="global.html#proc/get_departments_from_job">get_departments_from_job</a></th><td>matches a string job name to their department(s) and returns it as a list</td></tr><tr><th><a href="global.html#proc/get_dist_euclidean">get_dist_euclidean</a></th><td>Returns the distance between two atoms</td></tr><tr><th><a href="global.html#proc/get_dist_manhattan">get_dist_manhattan</a></th><td>Returns the manhattan distance between two atoms. Returns INFINITY if either are not on a turf, for BYOND get_dist() parity.</td></tr><tr><th><a href="global.html#proc/get_dummy_savefile">get_dummy_savefile</a></th><td>Gets a dummy savefile for usage in icon generation.
|
||
Savefiles generated from this proc will be empty.</td></tr><tr><th><a href="global.html#proc/get_edge_target_turf">get_edge_target_turf</a></th><td>Returns the turf located at the map edge in the specified direction relative to target_atom used for mass driver</td></tr><tr><th><a href="global.html#proc/get_hear">get_hear</a></th><td>Like view but bypasses luminosity check</td></tr><tr><th><a href="global.html#proc/get_hearers_in_LOS">get_hearers_in_LOS</a></th><td>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</td></tr><tr><th><a href="global.html#proc/get_hearers_in_range">get_hearers_in_range</a></th><td>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.</td></tr><tr><th><a href="global.html#proc/get_hearers_in_view">get_hearers_in_view</a></th><td>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().</td></tr><tr><th><a href="global.html#proc/get_icon_dimensions">get_icon_dimensions</a></th><td>Returns a list containing the width and height of an icon file</td></tr><tr><th><a href="global.html#proc/get_icon_dmi_path">get_icon_dmi_path</a></th><td>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 ""</td></tr><tr><th><a href="global.html#proc/get_line">get_line</a></th><td>Get a list of turfs in a line from <code>starting_atom</code> to <code>ending_atom</code>.</td></tr><tr><th><a href="global.html#proc/get_living_players">get_living_players</a></th><td>This proc returns every player with a client who is not a ghost or a new_player</td></tr><tr><th><a href="global.html#proc/get_living_players_count">get_living_players_count</a></th><td>Get living players who are playing in the round (no ghosts)</td></tr><tr><th><a href="global.html#proc/get_nested_locs">get_nested_locs</a></th><td>Returns a list of all locations (except the area) the movable is within.</td></tr><tr><th><a href="global.html#proc/get_obj_screen_xy">get_obj_screen_xy</a></th><td>Gets the location of an object on a client's screen. Thanks to Kaioken on BYOND forums.</td></tr><tr><th><a href="global.html#proc/get_path_to">get_path_to</a></th><td>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</td></tr><tr><th><a href="global.html#proc/get_rad_contents">get_rad_contents</a></th><td>A special GetAllContents that doesn't search past things with rad insulation
|
||
Components which return COMPONENT_BLOCK_RADIATION prevent further searching into that object's contents. The object itself will get returned still.
|
||
The ignore list makes those objects never return at all</td></tr><tr><th><a href="global.html#proc/get_random_perimeter_turf">get_random_perimeter_turf</a></th><td>returns a turf at the outer edge of a given radius</td></tr><tr><th><a href="global.html#proc/get_ranged_target_turf">get_ranged_target_turf</a></th><td></td></tr><tr><th><a href="global.html#proc/get_ranged_target_turf_direct">get_ranged_target_turf_direct</a></th><td>Get ranged target turf, but with direct targets as opposed to directions</td></tr><tr><th><a href="global.html#proc/get_safe_random_station_turf_equal_weight">get_safe_random_station_turf_equal_weight</a></th><td>Returns a random department of areas to pass into get_safe_random_station_turf() for more equal spawning.</td></tr><tr><th><a href="global.html#proc/get_safe_species">get_safe_species</a></th><td>Returns a list of names of non-blacklisted or hazardous species.</td></tr><tr><th><a href="global.html#proc/get_swarm_path_to">get_swarm_path_to</a></th><td>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</td></tr><tr><th><a href="global.html#proc/get_total_resources">get_total_resources</a></th><td>Returns the net resources available for event rolling</td></tr><tr><th><a href="global.html#proc/get_unrestricted_random_reagent_id">get_unrestricted_random_reagent_id</a></th><td>Returns a random reagent ID, with real non blacklisted balance boosting action!</td></tr><tr><th><a href="global.html#proc/get_valid_screen_location">get_valid_screen_location</a></th><td>Returns a valid location to place a screen object without overflowing the viewport</td></tr><tr><th><a href="global.html#proc/get_valid_vent_spawns">get_valid_vent_spawns</a></th><td>Returns a list of vents that can be used as a potential spawn if they meet the criteria set by the arguments</td></tr><tr><th><a href="global.html#proc/goonchem_vortex">goonchem_vortex</a></th><td>Throws or pulls objects to/from a chem reaction</td></tr><tr><th><a href="global.html#proc/gradient_text">gradient_text</a></th><td>Make a color a repeating gradient between two colors. Note: This is inaccurate because its a linear transformation, but human eyes do not perceive color this way.</td></tr><tr><th><a href="global.html#proc/hit_zone_to_clothes_zone">hit_zone_to_clothes_zone</a></th><td>Convert the impact zone of a projectile to a clothing zone we can do a contamination check on</td></tr><tr><th><a href="global.html#proc/icon2asset">icon2asset</a></th><td>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:</td></tr><tr><th><a href="global.html#proc/icon2base64">icon2base64</a></th><td>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)</td></tr><tr><th><a href="global.html#proc/icon_exists">icon_exists</a></th><td>Checks if the given iconstate exists in the given file, caching the result. Setting no_sprite to TRUE will print a stack trace ONCE.</td></tr><tr><th><a href="global.html#proc/init_reagent_list">init_reagent_list</a></th><td>Initialises all of /datum/reagent into a list indexed by reagent id.</td></tr><tr><th><a href="global.html#proc/initialize_starting_knowledge">initialize_starting_knowledge</a></th><td>Returns a list of all heretic knowledge TYPEPATHS
|
||
that have route set to PATH_START.</td></tr><tr><th><a href="global.html#proc/is_bad_connection">is_bad_connection</a></th><td>Connection checker</td></tr><tr><th><a href="global.html#proc/is_color_dark">is_color_dark</a></th><td>Given a color in the format of "#RRGGBB", will return if the color is dark.</td></tr><tr><th><a href="global.html#proc/is_special_character">is_special_character</a></th><td>ADMIN HELPER PROCS
|
||
A proc that return whether the mob is a "Special Character" aka Antagonist</td></tr><tr><th><a href="global.html#proc/is_type_in_UID_list">is_type_in_UID_list</a></th><td>If the list <code>L</code> contains a datum UID who's type matches <code>D</code>'s type, returns the UID of that datum in the list. Otherwise returns null.</td></tr><tr><th><a href="global.html#proc/is_valid_dmi_file">is_valid_dmi_file</a></th><td>given a text string, returns whether it is a valid dmi icons folder path</td></tr><tr><th><a href="global.html#proc/last_name">last_name</a></th><td>Find the last name of a mob from a passed string with regex</td></tr><tr><th><a href="global.html#proc/list_clear_nulls">list_clear_nulls</a></th><td>Removes any null entries from the list
|
||
Returns TRUE if the list had nulls, FALSE otherwise</td></tr><tr><th><a href="global.html#proc/lists_equal_unordered">lists_equal_unordered</a></th><td>Checks to make sure that the lists have the exact same contents, ignores the order of the contents.</td></tr><tr><th><a href="global.html#proc/locateUID">locateUID</a></th><td>Locates a datum based off of the UID</td></tr><tr><th><a href="global.html#proc/makeDatumRefLists">makeDatumRefLists</a></th><td>Initial Building</td></tr><tr><th><a href="global.html#proc/make_associative">make_associative</a></th><td>A proc for turning a list into an associative list.</td></tr><tr><th><a href="global.html#proc/md5asfile">md5asfile</a></th><td>Save file as an external file then md5 it.
|
||
Used because md5ing files stored in the rsc sometimes gives incorrect md5 results.</td></tr><tr><th><a href="global.html#proc/md5filepath">md5filepath</a></th><td>Returns the md5 of a file at a given path.</td></tr><tr><th><a href="global.html#proc/message_adminTicket">message_adminTicket</a></th><td>Sends a message to the staff able to see admin tickets
|
||
Arguments:
|
||
msg - The message being send
|
||
important - If the message is important. If TRUE it will ignore the CHAT_NO_TICKETLOGS preferences,
|
||
send a sound and flash the window. Defaults to FALSE</td></tr><tr><th><a href="global.html#proc/message_mentorTicket">message_mentorTicket</a></th><td>Sends a message to the staff able to see mentor tickets
|
||
Arguments:
|
||
msg - The message being send
|
||
important - If the message is important. If TRUE it will ignore the CHAT_NO_TICKETLOGS preferences,
|
||
send a sound and flash the window. Defaults to FALSE</td></tr><tr><th><a href="global.html#proc/message_roles">message_roles</a></th><td>Sends a message to all players with a role and the specified permissions</td></tr><tr><th><a href="global.html#proc/message_to_html">message_to_html</a></th><td>Message-related procs</td></tr><tr><th><a href="global.html#proc/offset_to_screen_loc">offset_to_screen_loc</a></th><td>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</td></tr><tr><th><a href="global.html#proc/parse_caught_click_modifiers">parse_caught_click_modifiers</a></th><td>Returns a turf based on text inputs, original turf and viewing client</td></tr><tr><th><a href="global.html#proc/path_map_passalong">path_map_passalong</a></th><td>We generate a path for the passed in callbacks, and then pipe it over</td></tr><tr><th><a href="global.html#proc/pathfinding_finished">pathfinding_finished</a></th><td>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</td></tr><tr><th><a href="global.html#proc/phase_filter">phase_filter</a></th><td>This filter proc makes a visual effect where the object is split into fragments, with vertical lines cut out of them. It will appear as 2 seperate things are made of the one object that was cut out</td></tr><tr><th><a href="global.html#proc/pick_multiple_unique">pick_multiple_unique</a></th><td>Picks multiple unique elements from the suplied list.
|
||
If the given list has a length less than the amount given then it will return a list with an equal amount</td></tr><tr><th><a href="global.html#proc/pick_unique_lawset">pick_unique_lawset</a></th><td>returns a random non starting / kill crew lawset if the station has a unique ai lawset</td></tr><tr><th><a href="global.html#proc/pick_weight_recursive">pick_weight_recursive</a></th><td>Like pick_weight, but allowing for nested lists.</td></tr><tr><th><a href="global.html#proc/pickweight">pickweight</a></th><td>Picks an element based on its weight.
|
||
L - The input list</td></tr><tr><th><a href="global.html#proc/pickweight_fraction">pickweight_fraction</a></th><td>Picks an element based on its weight. Weight can be any real number
|
||
L - The input list</td></tr><tr><th><a href="global.html#proc/propagate_network">propagate_network</a></th><td>remove the old powernet and replace it with a new one throughout the network.</td></tr><tr><th><a href="global.html#proc/radial_menu_helper">radial_menu_helper</a></th><td>Similar to show_radial_menu, but choices is a list of atoms, for which icons will be automatically generated.
|
||
Supports multiple items of the same name, 2 soaps will become soap (1) and soap (2) to the user.
|
||
Otherwise, has the exact same arguments as show_radial_menu</td></tr><tr><th><a href="global.html#proc/random_body_accessory">random_body_accessory</a></th><td>Returns a random body accessory for a given species name. Can be null based on is_optional argument.</td></tr><tr><th><a href="global.html#proc/random_skin_tone">random_skin_tone</a></th><td>Randomises skin tone, specifically for each species that has a skin tone. Otherwise keeps a default of 1</td></tr><tr><th><a href="global.html#proc/ranked_rights2text">ranked_rights2text</a></th><td>Converts the full permissions details of a DB-ranked admin to a HTML-colored string</td></tr><tr><th><a href="global.html#proc/read_bug_report_table">read_bug_report_table</a></th><td>Populates a list using the bug reports db table and returns it</td></tr><tr><th><a href="global.html#proc/read_bug_report_titles">read_bug_report_titles</a></th><td>Create a list of ids, authors and titles of bug reports awaiting approval</td></tr><tr><th><a href="global.html#proc/recover_all_SS_and_recreate_master">recover_all_SS_and_recreate_master</a></th><td>Recreate all SSs which will still cause data survive due to Recover(), the new Master will then find and take them from global.vars</td></tr><tr><th><a href="global.html#proc/remove_clunky_diagonals">remove_clunky_diagonals</a></th><td>Processes a path (list of turfs), removes any diagonal moves that would lead to a weird bump</td></tr><tr><th><a href="global.html#proc/remove_diagonals">remove_diagonals</a></th><td>Processes a path (list of turfs), removes any diagonal moves</td></tr><tr><th><a href="global.html#proc/remove_verb">remove_verb</a></th><td>handles removing verb and sending it to browser to update, use this for removing verbs</td></tr><tr><th><a href="global.html#proc/rights2text">rights2text</a></th><td>Converts a rights bitfield into a string</td></tr><tr><th><a href="global.html#proc/round_health">round_health</a></th><td>rounds value to limited symbols after the period for organ damage and other values</td></tr><tr><th><a href="global.html#proc/runechat_emote">runechat_emote</a></th><td>Send an emote to runechat for all (listening) users in the vicinity.</td></tr><tr><th><a href="global.html#proc/rustlibs_create_toast">rustlibs_create_toast</a></th><td>(Windows only) Triggers a desktop notification with the specified title and body</td></tr><tr><th><a href="global.html#proc/rustlibs_dbp_generate">rustlibs_dbp_generate</a></th><td>This proc generates a grid of perlin-like noise</td></tr><tr><th><a href="global.html#proc/safe_get_ckey">safe_get_ckey</a></th><td>Safe ckey getter</td></tr><tr><th><a href="global.html#proc/sanitize_for_ic">sanitize_for_ic</a></th><td>sanitize() with a pre-set list of characters to remove from IC speech.</td></tr><tr><th><a href="global.html#proc/screen_loc_to_offset">screen_loc_to_offset</a></th><td>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</td></tr><tr><th><a href="global.html#proc/seconds_to_clock">seconds_to_clock</a></th><td>Take a value in seconds and makes it display like a clock. Hours are stripped. (mm:ss)</td></tr><tr><th><a href="global.html#proc/seconds_to_full_clock">seconds_to_full_clock</a></th><td>Take a value in seconds and makes it display like a clock (h:mm:ss)</td></tr><tr><th><a href="global.html#proc/seedify">seedify</a></th><td>Convert a grown object into seeds.</td></tr><tr><th><a href="global.html#proc/setup_mod_themes">setup_mod_themes</a></th><td>Global proc that sets up all MOD themes as singletons in a list and returns it.</td></tr><tr><th><a href="global.html#proc/shake_camera">shake_camera</a></th><td>Shake the camera of the person viewing the mob SO REAL!</td></tr><tr><th><a href="global.html#proc/show_blurb">show_blurb</a></th><td>Shows a ticker reading out the given text on a client's screen.</td></tr><tr><th><a href="global.html#proc/slice_off_turfs">slice_off_turfs</a></th><td>Returns a slice of a list of turfs, defined by the ones that are inside the inner/outer angle's bounds</td></tr><tr><th><a href="global.html#proc/start_unequip_mob">start_unequip_mob</a></th><td>A utility function for <code>/datum/strippable_item</code>s to start unequipping an item from a mob.</td></tr><tr><th><a href="global.html#proc/start_watch">start_watch</a></th><td>Returns "watch handle" (really just a timestamp :V)</td></tr><tr><th><a href="global.html#proc/stop_watch">stop_watch</a></th><td>Returns number of seconds elapsed.
|
||
@param wh number The "Watch Handle" from start_watch(). (timestamp)</td></tr><tr><th><a href="global.html#proc/string_list">string_list</a></th><td>Caches lists with non-numeric stringify-able values (text or typepath).</td></tr><tr><th><a href="global.html#proc/strip_html_tags">strip_html_tags</a></th><td>Strips HTML tags (and only tags) from the input.
|
||
The result may still include HTML entities, like ' for '</td></tr><tr><th><a href="global.html#proc/tgui_Topic">tgui_Topic</a></th><td>Middleware for /client/Topic.</td></tr><tr><th><a href="global.html#proc/tgui_alert">tgui_alert</a></th><td>Creates a TGUI alert window and returns the user's response.</td></tr><tr><th><a href="global.html#proc/tgui_input_checkbox_list">tgui_input_checkbox_list</a></th><td>Creates a TGUI input list window and returns the user's response in a ranked order.</td></tr><tr><th><a href="global.html#proc/tgui_input_color">tgui_input_color</a></th><td>Creates a TGUI color picker window and returns the user's response.</td></tr><tr><th><a href="global.html#proc/tgui_input_keycombo">tgui_input_keycombo</a></th><td>Creates a TGUI window with a key input. Returns the user's response as a full key with modifiers, eg ShiftK.</td></tr><tr><th><a href="global.html#proc/tgui_input_list">tgui_input_list</a></th><td>Creates a TGUI input list window and returns the user's response.</td></tr><tr><th><a href="global.html#proc/tgui_input_number">tgui_input_number</a></th><td>Creates a TGUI window with a number input. Returns the user's response as num | null.</td></tr><tr><th><a href="global.html#proc/tgui_input_ranked_list">tgui_input_ranked_list</a></th><td>Creates a TGUI ranked input list window and returns the user's response in a ranked order.</td></tr><tr><th><a href="global.html#proc/tgui_input_text">tgui_input_text</a></th><td>Creates a TGUI window with a text input. Returns the user's response.</td></tr><tr><th><a href="global.html#proc/tint_color">tint_color</a></th><td>Returns a purely random tint for specific color</td></tr><tr><th><a href="global.html#proc/to_chat">to_chat</a></th><td>Sends the message to the recipient (target).</td></tr><tr><th><a href="global.html#proc/to_chat_immediate">to_chat_immediate</a></th><td>Circumvents the message queue and sends the message to the recipient (target) as soon as possible.
|
||
trailing_newline, confidential, and handle_whitespace currently have no effect, please fix this in the future or remove the arguments to lower cache!</td></tr><tr><th><a href="global.html#proc/trim_length">trim_length</a></th><td>Returns a string that does not exceed max_length characters in size</td></tr><tr><th><a href="global.html#proc/turf_peel">turf_peel</a></th><td>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.</td></tr><tr><th><a href="global.html#proc/type_list_to_counted_assoc_list">type_list_to_counted_assoc_list</a></th><td>This proc takes a list of types, and returns them in the format below.
|
||
[type] = amount of type in list.
|
||
Useful for recipes.</td></tr><tr><th><a href="global.html#proc/view_to_pixels">view_to_pixels</a></th><td>Takes a string or num view, and converts it to pixel width/height in a list(pixel_width, pixel_height)</td></tr><tr><th><a href="global.html#proc/wiki_link">wiki_link</a></th><td>Creates a hyperlink for a specified wiki article.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/Failsafe"><aside class="declaration">var </aside>Failsafe <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/failsafe</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/failsafe.dm#L7"><img src="git.png" width="16" height="16" title="code/controllers/failsafe.dm 7"></a></h3><p>Failsafe</p>
|
||
<p>Pretty much pokes the MC to make sure it's still alive.</p><h3 id="var/Master"><aside class="declaration">var </aside>Master <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/master.html">master</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/master.dm#L12"><img src="git.png" width="16" height="16" title="code/controllers/master.dm 12"></a></h3><p>StonedMC</p>
|
||
<p>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</p><h3 id="var/SSai_behaviors"><aside class="declaration">var </aside>SSai_behaviors <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/processing/ai_behaviors.html">processing/ai_behaviors</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/processing/SSai_behaviors.dm#L3"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/processing/SSai_behaviors.dm 3"></a></h3><p>The subsystem used to tick <a href="datum/ai_behavior.html" title="/datum/ai_behavior">/datum/ai_behavior</a> instances.
|
||
Handling the individual actions an AI can take like punching someone in the fucking NUTS</p><h3 id="var/SSai_controllers"><aside class="declaration">var </aside>SSai_controllers <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/ai_controllers.html">ai_controllers</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SSai_controllers.dm#L2"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSai_controllers.dm 2"></a></h3><p>The subsystem used to tick <a href="datum.html" title="/datum">/datum/ai_controllers</a> instances. Handling the re-checking of plans.</p><h3 id="var/SSai_movement"><aside class="declaration">var </aside>SSai_movement <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/movement.html">movement</a>/<a href="datum/controller/subsystem/movement/ai_movement.html">ai_movement</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/movement/SSai_movement.dm#L2"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/movement/SSai_movement.dm 2"></a></h3><p>The subsystem used to tick <a href="datum/ai_movement.html" title="/datum/ai_movement">/datum/ai_movement</a> instances. Handling the movement of individual AI instances</p><h3 id="var/SSambience"><aside class="declaration">var </aside>SSambience <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/ambience.html">ambience</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SSambience.dm#L2"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSambience.dm 2"></a></h3><p>The subsystem used to play ambience to users every now and then, makes them real excited.</p><h3 id="var/SSchat"><aside class="declaration">var </aside>SSchat <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/chat.html">chat</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SSchat.dm#L6"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSchat.dm 6"></a></h3><p>Copyright (c) 2020 Aleksej Komarov
|
||
SPDX-License-Identifier: MIT</p><h3 id="var/SScleanup"><aside class="declaration">var </aside>SScleanup <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/cleanup.html">cleanup</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SScleanup.dm#L13"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SScleanup.dm 13"></a></h3><h1 id="cleanup-subsystem">Cleanup Subsystem</h1>
|
||
<p>For now, all it does is periodically clean the supplied global lists of any null values they may contain.</p>
|
||
<p>Why is this important?</p>
|
||
<p>Sometimes, these lists can gain nulls due to errors.
|
||
For example, when a dead player trasitions from the <code>dead_mob_list</code> to the <code>alive_mob_list</code>, a null value may get stuck in the dead mob list.
|
||
This can cause issues when other code tries to do things with the values in the list, but are instead met with null values.
|
||
These problems are incredibly hard to track down and fix, so this subsystem is a solution to that.</p><h3 id="var/SSearly_assets"><aside class="declaration">var </aside>SSearly_assets <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/early_assets</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/non_firing/SSearly_assets.dm#L2"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSearly_assets.dm 2"></a></h3><p>Initializes any assets that need to be loaded ASAP.</p><h3 id="var/SSpathfinder"><aside class="declaration">var </aside>SSpathfinder <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/pathfinder.html">pathfinder</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/non_firing/SSpathfinder.dm#L2"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSpathfinder.dm 2"></a></h3><p>Queues and manages JPS pathfinding steps</p><h3 id="var/SSpersistent_data"><aside class="declaration">var </aside>SSpersistent_data <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/persistent_data.html">persistent_data</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/non_firing/SSpersistent_data.dm#L10"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSpersistent_data.dm 10"></a></h3><h1 id="persistent-data-subsystem">Persistent Data Subsystem</h1>
|
||
<p>Provides a centralised handler for persistent data reading and writing.
|
||
The subsystem does not do any actual spawning itself, as this focuses on objects and mobs
|
||
Should anything that is turf persistence related added in, that can be chucked into this SS
|
||
Its quite a simple subsystem. For now, anyways.</p><h3 id="var/SSspatial_grid"><aside class="declaration">var </aside>SSspatial_grid <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/spatial_grid.html">spatial_grid</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/non_firing/SSspatial_grid.dm#L80"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSspatial_grid.dm 80"></a></h3><h1 id="spatial-grid">Spatial Grid</h1>
|
||
<p>a gamewide grid of spatial_grid_cell datums, each "covering" <a href="code/__DEFINES/spatial_gridmap_defines.html#define/SPATIAL_GRID_CELLSIZE" title="SPATIAL_GRID_CELLSIZE">SPATIAL_GRID_CELLSIZE</a> ^ 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.</p>
|
||
<p>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.</p>
|
||
<p>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</p>
|
||
<p>The system currently implements two different "classes" of spatial type</p>
|
||
<p>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 <a href="code/__DEFINES/spatial_gridmap_defines.html#define/SPATIAL_GRID_CONTENTS_TYPE_HEARING" title="SPATIAL_GRID_CONTENTS_TYPE_HEARING">SPATIAL_GRID_CONTENTS_TYPE_HEARING</a> and <a href="code/__DEFINES/spatial_gridmap_defines.html#define/SPATIAL_GRID_CONTENTS_TYPE_CLIENTS" title="SPATIAL_GRID_CONTENTS_TYPE_CLIENTS">SPATIAL_GRID_CONTENTS_TYPE_CLIENTS</a></p>
|
||
<p>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 <a href="code/__DEFINES/spatial_gridmap_defines.html#define/SPATIAL_GRID_CONTENTS_TYPE_ATMOS" title="SPATIAL_GRID_CONTENTS_TYPE_ATMOS">SPATIAL_GRID_CONTENTS_TYPE_ATMOS</a> uses this pattern. This is because it's far more common, and so worth optimizing</p><h3 id="var/SStgui"><aside class="declaration">var </aside>SStgui <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/tgui.html">tgui</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SStgui.dm#L10"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStgui.dm 10"></a></h3><p>tgui subsystem</p>
|
||
<p>Contains all tgui state and subsystem code.</p>
|
||
<p>Copyright (c) 2020 Aleksej Komarov
|
||
SPDX-License-Identifier: MIT</p><h3 id="var/SStimer"><aside class="declaration">var </aside>SStimer <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/timer.html">timer</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SStimer.dm#L19"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 19"></a></h3><h1 id="timer-subsystem">Timer Subsystem</h1>
|
||
<p>Handles creation, callbacks, and destruction of timed events.</p>
|
||
<p>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.</p><h3 id="var/SSunplanned_controllers"><aside class="declaration">var </aside>SSunplanned_controllers <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/unplanned_controllers.html">unplanned_controllers</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SSunplanned_controllers.dm#L3"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSunplanned_controllers.dm 3"></a></h3><p>Handles making mobs perform lightweight "idle" behaviors such as wandering around when they have nothing planned</p><h3 id="var/SSverb_manager"><aside class="declaration">var </aside>SSverb_manager <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/verb_manager.html">verb_manager</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SSverb_manager.dm#L22"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSverb_manager.dm 22"></a></h3><p>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.</p>
|
||
<p>see TICK_ORDER.md for more info on how the byond tick is structured.</p>
|
||
<p>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.</p>
|
||
<p>Without this subsystem, verbs are likely to cause overtime if the MC uses all of the time it has alloted 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 alloted 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 isnt 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.</p>
|
||
<p>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 arent riddled with
|
||
minor hangs over and over again.</p><h3 id="var/SSvis_overlays"><aside class="declaration">var </aside>SSvis_overlays <aside>– /static/<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/vis_overlays.html">vis_overlays</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SSvis_overlays.dm#L10"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSvis_overlays.dm 10"></a></h3><h1 id="ssvis-overlays">SSvis_overlays</h1>
|
||
<p>This subsystem handles visual overlays for objects in the game world.</p>
|
||
<p>It manages the creation, caching, and removal of visual overlays, allowing for dynamic visual effects
|
||
associated with various atoms. Overlays can be reused if they are not unique, and they are automatically
|
||
cleaned up if they go unused for a specified duration.</p><h2 id="proc">Proc Details</h2><h3 id="proc/GetBestWeapon"><aside class="declaration">proc </aside>GetBestWeapon<aside>(/<a href="datum.html">datum</a>/<a href="datum/ai_controller.html">ai_controller</a>/controller, /list/choices, /list/held_weapons) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/basic_ai.dm#L15"><img src="git.png" width="16" height="16" title="code/__HELPERS/basic_ai.dm 15"></a></aside></h3><p>Returns either the best weapon from the given choices or null if held weapons are better</p><h3 id="proc/HTTPGet"><aside class="declaration">proc </aside>HTTPGet<aside>(url) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L1936"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 1936"></a></aside></h3><p>HTTP Get (Powered by rustlibs)</p>
|
||
<p>This proc should be used as a replacement for <a href="https://www.byond.com/docs/ref/#/world/proc/Export" title="/world/proc/Export">/world/proc/Export</a> due to an underlying issue with it.
|
||
See: https://www.byond.com/forum/post/2772166
|
||
The one thing you will need to be aware of is that this no longer wraps the response inside a "file", so anything that relies on a file2text() unwrap will need tweaking.
|
||
RUST HTTP also has better support for HTTPS as well as weird quirks with modern webservers.
|
||
Returns an assoc list that follows the standard <a href="https://www.byond.com/docs/ref/#/world/proc/Export" title="/world/proc/Export">/world/proc/Export</a> format (https://secure.byond.com/docs/ref/index.html#/world/proc/Export), with the above exception</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>url - URL to GET</li>
|
||
</ul><h3 id="proc/IsEdible"><aside class="declaration">proc </aside>IsEdible<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/thing) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/basic_ai.dm#L2"><img src="git.png" width="16" height="16" title="code/__HELPERS/basic_ai.dm 2"></a></aside></h3><p>returns if something can be consumed, drink or food</p><h3 id="proc/RoundDiagBar"><aside class="declaration">proc </aside>RoundDiagBar<aside>(value) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/game/data_huds.dm#L315"><img src="git.png" width="16" height="16" title="code/game/data_huds.dm 315"></a></aside></h3><p>Diagnostic HUDs!</p><h3 id="proc/_queue_verb"><aside class="declaration">proc </aside>_queue_verb<aside>(/<a href="datum.html">datum</a>/<a href="datum/callback/verb_callback.html">callback/verb_callback</a>/incoming_callback, tick_check, /<a href="datum.html">datum</a>/<a href="datum/controller.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/verb_manager.html">verb_manager</a>/subsystem_to_use, ...) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SSverb_manager.dm#L55"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSverb_manager.dm 55"></a></aside></h3><p>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.</p>
|
||
<p>returns TRUE if the queuing was successful, FALSE otherwise.</p><h3 id="proc/add_attack_logs"><aside class="declaration">proc </aside>add_attack_logs<aside>(/<a href="atom.html">atom</a>/user, target, what_done, custom_level) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/mob_helpers.dm#L283"><img src="git.png" width="16" height="16" title="code/__HELPERS/mob_helpers.dm 283"></a></aside></h3><p>Creates attack (old and new) logs for the user and defense logs for the target.
|
||
Will message admins depending on the custom_level, user and target.</p>
|
||
<p>custom_level will determine the log level set. Unless the target is SSD and there is a user doing it
|
||
If custom_level is not set then the log level will be determined using the user and the target.</p>
|
||
<ul>
|
||
<li>Arguments:</li>
|
||
<li>user - The thing doing it. Can be null</li>
|
||
<li>target - The target of the attack</li>
|
||
<li>what_done - What has happened</li>
|
||
<li>custom_level - The log level override</li>
|
||
</ul><h3 id="proc/add_verb"><aside class="declaration">proc </aside>add_verb<aside>(/<a href="client.html">client</a>/target, verb_or_list_to_add) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/verb_helpers.dm#L9"><img src="git.png" width="16" height="16" title="code/__HELPERS/verb_helpers.dm 9"></a></aside></h3><p>handles adding verbs and updating the stat panel browser</p>
|
||
<p>pass the verb type path to this instead of adding it directly to verbs so the statpanel can update
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>target - Who the verb is being added to, client or mob typepath</li>
|
||
<li>verb - typepath to a verb, or a list of verbs, supports lists of lists</li>
|
||
</ul><h3 id="proc/addtimer"><aside class="declaration">proc </aside>addtimer<aside>(/<a href="datum.html">datum</a>/callback/callback, wait, flags) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SStimer.dm#L647"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 647"></a></aside></h3><p>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.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>callback the callback to call on timer finish</li>
|
||
<li>wait deciseconds to run the timer for</li>
|
||
<li>flags flags for this timer, see: code__DEFINES\subsystems.dm</li>
|
||
</ul><h3 id="proc/announce_merge_conflict_marker"><aside class="declaration">proc </aside>announce_merge_conflict_marker<aside>(/<a href="atom.html">atom</a>/origin) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/mapping/merge_conflicts.dm#L13"><img src="git.png" width="16" height="16" title="code/modules/mapping/merge_conflicts.dm 13"></a></aside></h3><p>We REALLY do not want un-addressed merge conflicts in maps for an
|
||
inexhaustible list of reasons. This should help ensure that this will not be
|
||
missed in case linters fail to catch it for any reason what-so-ever.</p><h3 id="proc/assoc_to_keys"><aside class="declaration">proc </aside>assoc_to_keys<aside>(/list/input) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L1012"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 1012"></a></aside></h3><p>Turns an associative list into a flat list of keys</p><h3 id="proc/atmos_scan"><aside class="declaration">proc </aside>atmos_scan<aside>(/<a href="mob.html">mob</a>/user, /<a href="atom.html">atom</a>/target, silent, print, milla_turf_details, detailed) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/game/objects/items/devices/gasanalyzer.dm#L135"><img src="git.png" width="16" height="16" title="code/game/objects/items/devices/gasanalyzer.dm 135"></a></aside></h3><p>Outputs a message to the user describing the target's gasmixes.
|
||
Used in chat-based gas scans.</p><h3 id="proc/avoid_assoc_duplicate_keys"><aside class="declaration">proc </aside>avoid_assoc_duplicate_keys<aside>(input_key, /list/used_key_list) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L1001"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 1001"></a></aside></h3><p>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</p><h3 id="proc/bang"><aside class="declaration">proc </aside>bang<aside>(/<a href="turf.html">turf</a>/T, /<a href="atom.html">atom</a>/A, range, flash, bang) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/game/objects/items/weapons/grenades/flashbang.dm#L57"><img src="git.png" width="16" height="16" title="code/game/objects/items/weapons/grenades/flashbang.dm 57"></a></aside></h3><p>Creates a flashing effect that blinds and deafens mobs within range</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>T - The turf to flash</li>
|
||
<li>A - The flashing atom</li>
|
||
<li>range - The range in tiles of the flash</li>
|
||
<li>flash - Whether to flash (blind)</li>
|
||
<li>bang - Whether to bang (deafen)</li>
|
||
</ul><h3 id="proc/border_diamond_range_turfs"><aside class="declaration">proc </aside>border_diamond_range_turfs<aside>(/<a href="atom.html">atom</a>/center, radius) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L288"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 288"></a></aside></h3><p>Returns the list of turfs around the outside of a center based on RANGE_TURFS()</p><h3 id="proc/broadcast_message"><aside class="declaration">proc </aside>broadcast_message<aside>(/<a href="datum.html">datum</a>/<a href="datum/tcomms_message.html">tcomms_message</a>/tcm) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/game/machinery/tcomms/tcomms_base.dm#L269"><img src="git.png" width="16" height="16" title="code/game/machinery/tcomms/tcomms_base.dm 269"></a></aside></h3><p>Message Broadcast Proc</p>
|
||
<p>This big fat disaster is responsible for sending the message out to all headsets and radios on the station
|
||
It is absolutely disgusting, but used to take about 20 arguments before I slimmed it down to just one
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>tcm - The tcomms message datum</li>
|
||
</ul><h3 id="proc/byondapi_stack_trace"><aside class="declaration">proc </aside>byondapi_stack_trace<aside>(err) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__DEFINES/rust.dm#L65"><img src="git.png" width="16" height="16" title="code/__DEFINES/rust.dm 65"></a></aside></h3><p>Exists by default in 516, but needs to be defined for 515 or byondapi-rs doesn't like it.</p><h3 id="proc/calculate_projectile_angle_and_pixel_offsets"><aside class="declaration">proc </aside>calculate_projectile_angle_and_pixel_offsets<aside>(/<a href="atom.html">atom</a>/source, /<a href="atom.html">atom</a>/target, modifiers) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/projectiles/firing.dm#L144"><img src="git.png" width="16" height="16" title="code/modules/projectiles/firing.dm 144"></a></aside></h3><p>Calculates the pixel offsets and angle that a projectile should be launched at.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li><a href="atom.html" title="/atom">source</a>: The thing that the projectile is being shot from.</li>
|
||
<li><a href="atom.html" title="/atom">target</a>: (Optional) The thing that the projectile is being shot at.
|
||
<ul>
|
||
<li>If this is not provided the source atom must be a mob with a client.</li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="https://www.byond.com/docs/ref/#/list" title="/list">modifiers</a>: A list of click parameters used to modify the shot angle.</li>
|
||
</ul><h3 id="proc/callback_add_trait"><aside class="declaration">proc </aside>callback_add_trait<aside>(/<a href="datum.html">datum</a>/target, trait, source) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/trait_helpers.dm#L650"><img src="git.png" width="16" height="16" title="code/__HELPERS/trait_helpers.dm 650"></a></aside></h3><p>Proc wrapper of add_trait. You should only use this for callback. Otherwise, use the macro.</p><h3 id="proc/callback_remove_trait"><aside class="declaration">proc </aside>callback_remove_trait<aside>(/<a href="datum.html">datum</a>/target, trait, source) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/trait_helpers.dm#L654"><img src="git.png" width="16" height="16" title="code/__HELPERS/trait_helpers.dm 654"></a></aside></h3><p>Proc wrapper of remove_trait. You should only use this for callback. Otherwise, use the macro.</p><h3 id="proc/check_active_security_force"><aside class="declaration">proc </aside>check_active_security_force<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/mob_helpers.dm#L709"><img src="git.png" width="16" height="16" title="code/__HELPERS/mob_helpers.dm 709"></a></aside></h3><ul>
|
||
<li>checks the security force on station and returns a list of numbers, of the form:</li>
|
||
<li>total, active, dead, antag</li>
|
||
<li>where active is defined as conscious (STAT = 0) and not an antag</li>
|
||
</ul><h3 id="proc/check_behind"><aside class="declaration">proc </aside>check_behind<aside>(/<a href="atom.html">atom</a>/source, /<a href="atom.html">atom</a>/target) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/game.dm#L528"><img src="git.png" width="16" height="16" title="code/__HELPERS/game.dm 528"></a></aside></h3><p>Checks to see if <code>atom/source</code> is behind <code>atom/target</code></p><h3 id="proc/circle_range"><aside class="declaration">proc </aside>circle_range<aside>(center, radius) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L222"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 222"></a></aside></h3><p>Returns all atoms present in a circle around the center</p><h3 id="proc/circle_range_turfs"><aside class="declaration">proc </aside>circle_range_turfs<aside>(center, radius) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L261"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 261"></a></aside></h3><p>Returns a list of turfs around a center based on RANGE_TURFS()</p><h3 id="proc/circle_view"><aside class="declaration">proc </aside>circle_view<aside>(center, radius) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L237"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 237"></a></aside></h3><p>Returns all atoms present in a circle around the center but uses view() instead of range() (Currently not used)</p><h3 id="proc/circle_view_turfs"><aside class="declaration">proc </aside>circle_view_turfs<aside>(center, radius) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L275"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 275"></a></aside></h3><p>Returns a list of turfs around a center based on view()</p><h3 id="proc/client2rankcolour"><aside class="declaration">proc </aside>client2rankcolour<aside>(/<a href="client.html">client</a>/C) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/text.dm#L730"><img src="git.png" width="16" height="16" title="code/__HELPERS/text.dm 730"></a></aside></h3><p>Proc to generate a "rank colour" from a client</p>
|
||
<p>This takes the client and looks at various factors in order, such as patreon status, staff rank, and more
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>C - The client were looking up</li>
|
||
</ul><h3 id="proc/cmp_heretic_knowledge"><aside class="declaration">proc </aside>cmp_heretic_knowledge<aside>(/<a href="datum.html">datum</a>/<a href="datum/heretic_knowledge.html">heretic_knowledge</a>/knowledge_a, /<a href="datum.html">datum</a>/<a href="datum/heretic_knowledge.html">heretic_knowledge</a>/knowledge_b) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/cmp.dm#L69"><img src="git.png" width="16" height="16" title="code/__HELPERS/cmp.dm 69"></a></aside></h3><p>Orders heretic knowledge by priority</p><h3 id="proc/collect_nested_mobs"><aside class="declaration">proc </aside>collect_nested_mobs<aside>(/<a href="atom.html">atom</a>/parent, /list/mobs, recursion_limit, client_check, ai_eyes) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/game.dm#L165"><img src="git.png" width="16" height="16" title="code/__HELPERS/game.dm 165"></a></aside></h3><p>Recursively loops through the contents of this atom looking for mobs, optionally requiring them to have a client.</p><h3 id="proc/compare_list"><aside class="declaration">proc </aside>compare_list<aside>(/list/l, /list/d) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L982"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 982"></a></aside></h3><p>compare two lists, returns TRUE if they are the same</p><h3 id="proc/condense_water"><aside class="declaration">proc </aside>condense_water<aside>(water_phase, x, y, z) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SSair.dm#L814"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SSair.dm 814"></a></aside></h3><p>condenses water on a tile at the specified coordinates</p><h3 id="proc/contaminate_adjacent"><aside class="declaration">proc </aside>contaminate_adjacent<aside>(/<a href="atom.html">atom</a>/source, intensity, emission_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/radiation_helpers.dm#L195"><img src="git.png" width="16" height="16" title="code/__HELPERS/radiation_helpers.dm 195"></a></aside></h3><p>Contaminate things that share our immediate location(periodic)</p><h3 id="proc/contaminate_target"><aside class="declaration">proc </aside>contaminate_target<aside>(/<a href="atom.html">atom</a>/target, /<a href="atom.html">atom</a>/source, intensity, emission_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/radiation_helpers.dm#L207"><img src="git.png" width="16" height="16" title="code/__HELPERS/radiation_helpers.dm 207"></a></aside></h3><p>Contaminate the contents of a target(single instance)</p><h3 id="proc/costly_icon2asset"><aside class="declaration">proc </aside>costly_icon2asset<aside>(thing, target, sourceonly) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/iconprocs.dm#L522"><img src="git.png" width="16" height="16" title="code/__HELPERS/iconprocs.dm 522"></a></aside></h3><p>Costlier version of icon2asset() that uses getFlatIcon() to account for overlays, underlays, etc. Use with extreme moderation, ESPECIALLY on mobs.</p><h3 id="proc/cover_flags2body_zones"><aside class="declaration">proc </aside>cover_flags2body_zones<aside>(bpc) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/type2type.dm#L343"><img src="git.png" width="16" height="16" title="code/__HELPERS/type2type.dm 343"></a></aside></h3><p>Turns a Body_parts_covered bitfield into a list of organ/limb names.</p><h3 id="proc/create_shrapnel"><aside class="declaration">proc </aside>create_shrapnel<aside>(/<a href="turf.html">turf</a>/epicenter, shrapnel_number, /<a href="obj.html">obj</a>/<a href="obj/projectile.html">projectile</a>/shrapnel_type, chance_to_hit_same_turf) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/game/objects/explosion.dm#L287"><img src="git.png" width="16" height="16" title="code/game/objects/explosion.dm 287"></a></aside></h3><p>Creates an explosion of shrapnel at a turf.</p>
|
||
<ul>
|
||
<li>/turf/epicenter - where the explosion occurs</li>
|
||
<li>shrapnel_number - the amount of shrapnel to create</li>
|
||
<li>/obj/projectile/shrapnel_type - the type of shrapnel bullets to shoot</li>
|
||
<li>chance_to_hit_same_turf - the probability to hit someone on the same turf, doubled for someone lying down</li>
|
||
</ul><h3 id="proc/create_strippable_list"><aside class="declaration">proc </aside>create_strippable_list<aside>(types) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/datums/elements/strippable.dm#L502"><img src="git.png" width="16" height="16" title="code/datums/elements/strippable.dm 502"></a></aside></h3><p>Creates an assoc list of keys to /datum/strippable_item</p><h3 id="proc/cryo_ssd"><aside class="declaration">proc </aside>cryo_ssd<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/person_to_cryo) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/game/machinery/cryopod.dm#L717"><img src="git.png" width="16" height="16" title="code/game/machinery/cryopod.dm 717"></a></aside></h3><p>Teleport an SSD human inside a cryopod, or a robot to a robot storage unit, but do not despawn them.</p><h3 id="proc/cut_relative_direction"><aside class="declaration">proc </aside>cut_relative_direction<aside>(fragment) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/screen_objs.dm#L89"><img src="git.png" width="16" height="16" title="code/__HELPERS/screen_objs.dm 89"></a></aside></h3><p>Takes a screen_loc string and cut out any directions like NORTH or SOUTH</p><h3 id="proc/delete_all_SS_and_recreate_master"><aside class="declaration">proc </aside>delete_all_SS_and_recreate_master<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/failsafe.dm#L156"><img src="git.png" width="16" height="16" title="code/controllers/failsafe.dm 156"></a></aside></h3><p>Delete all existing SS to basically start over</p><h3 id="proc/deltimer"><aside class="declaration">proc </aside>deltimer<aside>(id) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/SStimer.dm#L696"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/SStimer.dm 696"></a></aside></h3><p>Delete a timer</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>id a timerid or a /datum/timedevent</li>
|
||
</ul><h3 id="proc/diagonally_blocked"><aside class="declaration">proc </aside>diagonally_blocked<aside>(/<a href="turf.html">turf</a>/our_turf, /<a href="turf.html">turf</a>/dest_turf) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L371"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 371"></a></aside></h3><p>check if 2 diagonal turfs are blocked by dense objects</p><h3 id="proc/do_teleport"><aside class="declaration">proc </aside>do_teleport<aside>(atom_to_teleport, destination, variance_range, force_teleport, /<a href="datum.html">datum</a>/<a href="datum/effect_system.html">effect_system</a>/effect_in, /<a href="datum.html">datum</a>/<a href="datum/effect_system.html">effect_system</a>/effect_out, sound_in, sound_out, bypass_area_flag, safe_turf_pick, do_effect) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/datums/helper_datums/teleport.dm#L17"><img src="git.png" width="16" height="16" title="code/datums/helper_datums/teleport.dm 17"></a></aside></h3><p>Will teleport the given atom to the given destination using the other parameters</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>atom_to_teleport - Atom to teleport</li>
|
||
<li>destination - Where to teleport the atom to</li>
|
||
<li>variance_range - With what precision to do the teleport. 0 means on target. Higher means that many turfs around it</li>
|
||
<li>force_teleport - Whether to use forceMove instead of Move to move the atom to the destination</li>
|
||
<li>effect_in - The effect started at the starting turf. If set to NONE then no effect is used</li>
|
||
<li>effect_out - The effect started at the destination turf. If set to NONE then no effect is used</li>
|
||
<li>sound_in - The sound played at the starting turf</li>
|
||
<li>sound_out - The sound played at the destination turf</li>
|
||
<li>bypass_area_flag - Whether is_teleport_allowed is skipped or not</li>
|
||
<li>safe_turf_pick - Whether the chosen random turf from the variance is prefered to be a safe turf or not</li>
|
||
<li>do_effect - Whether to play the effect or not</li>
|
||
</ul><h3 id="proc/emissive_appearance"><aside class="declaration">proc </aside>emissive_appearance<aside>(icon, icon_state, layer, alpha, appearance_flags) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lighting_helpers.dm#L2"><img src="git.png" width="16" height="16" title="code/__HELPERS/lighting_helpers.dm 2"></a></aside></h3><p>Produces a mutable appearance glued to the <a href="code/__DEFINES/layers.html#define/EMISSIVE_PLANE" title="EMISSIVE_PLANE">EMISSIVE_PLANE</a> dyed to be the <a href="code/__DEFINES/lighting_defines.html#define/EMISSIVE_COLOR" title="EMISSIVE_COLOR">EMISSIVE_COLOR</a>. Order of application matters: Default generated blockers are overlays, and will block its own emissive underlays. If you want an object to be both a blocker, and have their own emissive, it has to be an overlay instead. Grayscale lightmasks are visible in the BYOND right-click and Examine pane, unless they're covered up by another overlay.</p><h3 id="proc/emissive_blocker"><aside class="declaration">proc </aside>emissive_blocker<aside>(icon, icon_state, layer, alpha, appearance_flags) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lighting_helpers.dm#L9"><img src="git.png" width="16" height="16" title="code/__HELPERS/lighting_helpers.dm 9"></a></aside></h3><p>Produces a mutable appearance glued to the <a href="code/__DEFINES/layers.html#define/EMISSIVE_PLANE" title="EMISSIVE_PLANE">EMISSIVE_PLANE</a> dyed to be the <a href="code/__DEFINES/lighting_defines.html#define/EM_BLOCK_COLOR" title="EM_BLOCK_COLOR">EM_BLOCK_COLOR</a>.</p><h3 id="proc/emoji_parse"><aside class="declaration">proc </aside>emoji_parse<aside>(text) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/emoji/emoji_parse.dm#L2"><img src="git.png" width="16" height="16" title="code/modules/emoji/emoji_parse.dm 2"></a></aside></h3><p>Turns :ai: into an emoji in text.</p><h3 id="proc/empulse"><aside class="declaration">proc </aside>empulse<aside>(/<a href="turf.html">turf</a>/epicenter, heavy_range, light_range, log, cause) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/game/objects/empulse.dm#L11"><img src="git.png" width="16" height="16" title="code/game/objects/empulse.dm 11"></a></aside></h3><p>Will cause an EMP on the given epicenter.
|
||
This proc can sleep depending on the affected objects. So assume it sleeps!</p>
|
||
<p>epicenter - The center of the EMP. Can be an atom, as long as the given atom is on a turf (in)directly
|
||
heavy_range - The max distance from the epicenter where objects will be get heavy EMPed
|
||
light_range - The max distance from the epicenter where objects will get light EMPed
|
||
log - Whether or not this action should be logged or not. Will use the cause if provided
|
||
cause - The cause of the EMP. Used for the logging</p><h3 id="proc/fill_with_ones"><aside class="declaration">proc </aside>fill_with_ones<aside>(/list/list_to_pad) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L1023"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 1023"></a></aside></h3><p>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.)</p><h3 id="proc/finish_unequip_mob"><aside class="declaration">proc </aside>finish_unequip_mob<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/item, /<a href="mob.html">mob</a>/source, /<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/datums/elements/strippable.dm#L269"><img src="git.png" width="16" height="16" title="code/datums/elements/strippable.dm 269"></a></aside></h3><p>A utility function for <code>/datum/strippable_item</code>s to finish unequipping an item from a mob.</p><h3 id="proc/fire_curse_hand"><aside class="declaration">proc </aside>fire_curse_hand<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/victim, /<a href="turf.html">turf</a>/forced_turf) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm#L67"><img src="git.png" width="16" height="16" title="code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm 67"></a></aside></h3><p>Torment the target with a frightening hand</p><h3 id="proc/fire_flash_log"><aside class="declaration">proc </aside>fire_flash_log<aside>(/<a href="datum.html">datum</a>/<a href="datum/reagents.html">reagents</a>/holder, name) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/reagents/chemistry/reagents_datum.dm#L183"><img src="git.png" width="16" height="16" title="code/modules/reagents/chemistry/reagents_datum.dm 183"></a></aside></h3><p>Flashfire is a proc used to log fire causing chemical reactions.</p>
|
||
<p>Call this whenever you have a chemical reaction that makes fire flashes.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>holder: the beaker that the reagent is in</li>
|
||
<li>name: name of the reagent / reaction</li>
|
||
</ul><h3 id="proc/first_name"><aside class="declaration">proc </aside>first_name<aside>(given_name) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/name_helpers.dm#L195"><img src="git.png" width="16" height="16" title="code/__HELPERS/name_helpers.dm 195"></a></aside></h3><p>Find the first name of a mob from a passed string with regex</p><h3 id="proc/flatten_list"><aside class="declaration">proc </aside>flatten_list<aside>(/list/key_list) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L1070"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 1070"></a></aside></h3><p>Flattens a keyed list into a list of its contents</p><h3 id="proc/force_cryo"><aside class="declaration">proc </aside>force_cryo<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/person_to_cryo) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/game/machinery/cryopod.dm#L743"><img src="git.png" width="16" height="16" title="code/game/machinery/cryopod.dm 743"></a></aside></h3><p>Immeditely teleport a human or robot to cryo and then despawn them.</p><h3 id="proc/format_si_suffix"><aside class="declaration">proc </aside>format_si_suffix<aside>(num) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/text.dm#L759"><img src="git.png" width="16" height="16" title="code/__HELPERS/text.dm 759"></a></aside></h3><p>Formats num with an SI prefix.</p>
|
||
<p>Returns a string formatted with a multiple of num and an SI prefix corresponding to an exponent of 10.
|
||
Only considers exponents that are multiples of 3 (deca, deci, hecto, and centi are not included).
|
||
A unit is not included in the string, the prefix is placed after the number with no spacing added anywhere.
|
||
Listing of prefixes: https://en.wikipedia.org/wiki/Metric_prefix#List_of_SI_prefixes</p><h3 id="proc/generate_and_hash_rsc_file"><aside class="declaration">proc </aside>generate_and_hash_rsc_file<aside>(file, dmi_file_path) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/iconprocs.dm#L306"><img src="git.png" width="16" height="16" title="code/__HELPERS/iconprocs.dm 306"></a></aside></h3><p>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 dont have to be hashed twice</p><h3 id="proc/generate_bitfields"><aside class="declaration">proc </aside>generate_bitfields<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/_globalvars/bitfields.dm#L17"><img src="git.png" width="16" height="16" title="code/_globalvars/bitfields.dm 17"></a></aside></h3><p>Turns /datum/bitfield subtypes into a list for use in debugging</p><h3 id="proc/get_active_player_count"><aside class="declaration">proc </aside>get_active_player_count<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/game.dm#L375"><img src="git.png" width="16" height="16" title="code/__HELPERS/game.dm 375"></a></aside></h3><p>Get active players who are playing in the round</p><h3 id="proc/get_adjacent_areas"><aside class="declaration">proc </aside>get_adjacent_areas<aside>(/<a href="atom.html">atom</a>/center) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L321"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 321"></a></aside></h3><p>Returns a list of all areas that are adjacent to the center atom's area, clear the list of nulls at the end.</p><h3 id="proc/get_adjacent_turfs"><aside class="declaration">proc </aside>get_adjacent_turfs<aside>(/<a href="atom.html">atom</a>/center) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L331"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 331"></a></aside></h3><p>Returns a list of all turfs that are adjacent to the center atom's turf, clear the list of nulls at the end.</p><h3 id="proc/get_admin_objective_targets"><aside class="declaration">proc </aside>get_admin_objective_targets<aside>(/<a href="mob.html">mob</a>/caller_mob, /list/blacklist, /<a href="mob.html">mob</a>/default_target) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/admin/misc_admin_procs.dm#L401"><img src="git.png" width="16" height="16" title="code/modules/admin/misc_admin_procs.dm 401"></a></aside></h3><p>Allows admins to safely pick from SSticker.minds for objectives</p>
|
||
<ul>
|
||
<li>caller_mob, mob to ask for results</li>
|
||
<li>blacklist, optional list of targets that are not available</li>
|
||
<li>default_target, the target to show in the list as default</li>
|
||
</ul><h3 id="proc/get_all_linked_levels_zpos"><aside class="declaration">proc </aside>get_all_linked_levels_zpos<aside>(transit_tag) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/space_management/level_traits.dm#L75"><img src="git.png" width="16" height="16" title="code/modules/space_management/level_traits.dm 75"></a></aside></h3><p>Proc to get a list of all the linked-together Z-Levels</p>
|
||
<p>Returns a list of zlevel numbers which can be accessed from travelling space naturally</p><h3 id="proc/get_allowed_instrument_ids"><aside class="declaration">proc </aside>get_allowed_instrument_ids<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/instruments/_instrument_data.dm#L4"><img src="git.png" width="16" height="16" title="code/modules/instruments/_instrument_data.dm 4"></a></aside></h3><p>Get all non admin_only instruments as a list of text ids.</p><h3 id="proc/get_angle_raw"><aside class="declaration">proc </aside>get_angle_raw<aside>(start_x, start_y, start_pixel_x, start_pixel_y, end_x, end_y, end_pixel_x, end_pixel_y) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L65"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 65"></a></aside></h3><p>Angle between two arbitrary points and horizontal line same as [/proc/get_angle]</p><h3 id="proc/get_antag_type_strings_list"><aside class="declaration">proc </aside>get_antag_type_strings_list<aside>(/<a href="mob.html">mob</a>/M) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/admin/misc_admin_procs.dm#L134"><img src="git.png" width="16" height="16" title="code/modules/admin/misc_admin_procs.dm 134"></a></aside></h3><p>A proc that return an array of capitalized strings containing name of the antag types they are</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>M - the mob you're checking</li>
|
||
</ul><h3 id="proc/get_antag_type_truncated_plaintext_string"><aside class="declaration">proc </aside>get_antag_type_truncated_plaintext_string<aside>(/<a href="mob.html">mob</a>/M<span class="as"> as </span><a href="mob.html">mob</a>) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/admin/misc_admin_procs.dm#L180"><img src="git.png" width="16" height="16" title="code/modules/admin/misc_admin_procs.dm 180"></a></aside></h3><p>A proc that return a string containing all the singled out antags . Empty string if not antag</p>
|
||
<p>Usually, you'd return a FALSE, but since this is consumed by javascript you're in
|
||
for a world of hurt if you pass a byond FALSE which get converted into a fucking string anyway and pass for TRUE in check. Fuck.
|
||
It always append "(May be other antag)"
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>M - the mob you're checking</li>
|
||
</ul><h3 id="proc/get_atoms_of_type"><aside class="declaration">proc </aside>get_atoms_of_type<aside>(/<a href="atom.html">atom</a>/loc, type, check_shift, shift_x, shift_y) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L1815"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 1815"></a></aside></h3><p>Returns a list of atoms in a location of a given type. Can be refined to look for pixel-shift.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>loc - The atom to look in.</li>
|
||
<li>type - The type to look for.</li>
|
||
<li>check_shift - If true, will exclude atoms whose pixel_x/pixel_y do not match shift_x/shift_y.</li>
|
||
<li>shift_x - If check_shift is true, atoms whose pixel_x is different to this will be excluded.</li>
|
||
<li>shift_y - If check_shift is true, atoms whose pixel_y is different to this will be excluded.</li>
|
||
</ul><h3 id="proc/get_bbox_of_atoms"><aside class="declaration">proc </aside>get_bbox_of_atoms<aside>(/list/atoms) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/game.dm#L514"><img src="git.png" width="16" height="16" title="code/__HELPERS/game.dm 514"></a></aside></h3><p>Get a bounding box of a list of atoms.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>atoms - List of atoms. Can accept output of view() and range() procs.</li>
|
||
</ul>
|
||
<p>Returns: list(x1, y1, x2, y2)</p><h3 id="proc/get_channel_name"><aside class="declaration">proc </aside>get_channel_name<aside>(channel) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L1893"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 1893"></a></aside></h3><p>Returns the clean name of an audio channel.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>channel - The channel number.</li>
|
||
</ul><h3 id="proc/get_departments_from_job"><aside class="declaration">proc </aside>get_departments_from_job<aside>(job_name) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/economy/economy_helpers.dm#L21"><img src="git.png" width="16" height="16" title="code/modules/economy/economy_helpers.dm 21"></a></aside></h3><p>matches a string job name to their department(s) and returns it as a list</p><h3 id="proc/get_dist_euclidean"><aside class="declaration">proc </aside>get_dist_euclidean<aside>(/<a href="atom.html">atom</a>/first_location, /<a href="atom.html">atom</a>/second_location) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L252"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 252"></a></aside></h3><p>Returns the distance between two atoms</p><h3 id="proc/get_dist_manhattan"><aside class="declaration">proc </aside>get_dist_manhattan<aside>(/<a href="atom.html">atom</a>/A, /<a href="atom.html">atom</a>/B) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L388"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 388"></a></aside></h3><p>Returns the manhattan distance between two atoms. Returns INFINITY if either are not on a turf, for BYOND get_dist() parity.</p><h3 id="proc/get_dummy_savefile"><aside class="declaration">proc </aside>get_dummy_savefile<aside>(from_failure) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/iconprocs.dm#L321"><img src="git.png" width="16" height="16" title="code/__HELPERS/iconprocs.dm 321"></a></aside></h3><p>Gets a dummy savefile for usage in icon generation.
|
||
Savefiles generated from this proc will be empty.</p><h3 id="proc/get_edge_target_turf"><aside class="declaration">proc </aside>get_edge_target_turf<aside>(/<a href="atom.html">atom</a>/target_atom, direction) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L495"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 495"></a></aside></h3><p>Returns the turf located at the map edge in the specified direction relative to target_atom used for mass driver</p><h3 id="proc/get_hear"><aside class="declaration">proc </aside>get_hear<aside>(range, /<a href="atom.html">atom</a>/source) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L313"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 313"></a></aside></h3><p>Like view but bypasses luminosity check</p><h3 id="proc/get_hearers_in_LOS"><aside class="declaration">proc </aside>get_hearers_in_LOS<aside>(view_radius, /<a href="atom.html">atom</a>/source, contents_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L162"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 162"></a></aside></h3><p>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</p>
|
||
<ul>
|
||
<li>view_radius - what radius search circle we are using, worse performance as this increases but not as much as it used to</li>
|
||
<li>source - object at the center of our search area. everything in get_turf(source) is guaranteed to be part of the search area</li>
|
||
</ul><h3 id="proc/get_hearers_in_range"><aside class="declaration">proc </aside>get_hearers_in_range<aside>(range, /<a href="atom.html">atom</a>/source, contents_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L128"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 128"></a></aside></h3><p>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.</p>
|
||
<p>This function exists to allow for mobs to hear speech without line of sight, if such a thing is needed.</p>
|
||
<ul>
|
||
<li>radius - what radius search circle we are using, worse performance as this increases</li>
|
||
<li>source - object at the center of our search area. everything in get_turf(source) is guaranteed to be part of the search area</li>
|
||
<li>contents_type - the type of contents we want to be looking for. defaults to hearing sensitive</li>
|
||
</ul><h3 id="proc/get_hearers_in_view"><aside class="declaration">proc </aside>get_hearers_in_view<aside>(view_radius, /<a href="atom.html">atom</a>/source, contents_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L79"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 79"></a></aside></h3><p>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().</p>
|
||
<ul>
|
||
<li>view_radius - what radius search circle we are using, worse performance as this increases</li>
|
||
<li>source - object at the center of our search area. everything in get_turf(source) is guaranteed to be part of the search area</li>
|
||
<li>contents_type - the type of contents we want to be looking for. defaults to hearing sensitive</li>
|
||
</ul><h3 id="proc/get_icon_dimensions"><aside class="declaration">proc </aside>get_icon_dimensions<aside>(icon_path) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/iconprocs.dm#L533"><img src="git.png" width="16" height="16" title="code/__HELPERS/iconprocs.dm 533"></a></aside></h3><p>Returns a list containing the width and height of an icon file</p><h3 id="proc/get_icon_dmi_path"><aside class="declaration">proc </aside>get_icon_dmi_path<aside>(/<a href="icon.html">icon</a>/icon) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/iconprocs.dm#L393"><img src="git.png" width="16" height="16" title="code/__HELPERS/iconprocs.dm 393"></a></aside></h3><p>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 ""</p><h3 id="proc/get_line"><aside class="declaration">proc </aside>get_line<aside>(/<a href="atom.html">atom</a>/starting_atom, /<a href="atom.html">atom</a>/ending_atom) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L191"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 191"></a></aside></h3><p>Get a list of turfs in a line from <code>starting_atom</code> to <code>ending_atom</code>.</p>
|
||
<p>Uses the ultra-fast <a href="https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm">Bresenham Line-Drawing Algorithm</a>.</p><h3 id="proc/get_living_players"><aside class="declaration">proc </aside>get_living_players<aside>(exclude_nonhuman, exclude_offstation) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L1760"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 1760"></a></aside></h3><p>This proc returns every player with a client who is not a ghost or a new_player</p><h3 id="proc/get_living_players_count"><aside class="declaration">proc </aside>get_living_players_count<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/game.dm#L388"><img src="git.png" width="16" height="16" title="code/__HELPERS/game.dm 388"></a></aside></h3><p>Get living players who are playing in the round (no ghosts)</p><h3 id="proc/get_nested_locs"><aside class="declaration">proc </aside>get_nested_locs<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/atom_on_location, include_turf) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/atom_helpers.dm#L2"><img src="git.png" width="16" height="16" title="code/__HELPERS/atom_helpers.dm 2"></a></aside></h3><p>Returns a list of all locations (except the area) the movable is within.</p><h3 id="proc/get_obj_screen_xy"><aside class="declaration">proc </aside>get_obj_screen_xy<aside>(/<a href="obj.html">obj</a>/target_obj, /<a href="client.html">client</a>/viewer) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/screen_objs.dm#L94"><img src="git.png" width="16" height="16" title="code/__HELPERS/screen_objs.dm 94"></a></aside></h3><p>Gets the location of an object on a client's screen. Thanks to Kaioken on BYOND forums.</p><h3 id="proc/get_path_to"><aside class="declaration">proc </aside>get_path_to<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/path_caller, /<a href="atom.html">atom</a>/end, max_distance, mintargetdist, access, simulated_only, /<a href="turf.html">turf</a>/exclude, skip_first, diagonal_handling) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/paths/path.dm#L17"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 17"></a></aside></h3><p>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</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>path_caller: The movable atom that's trying to find the path</li>
|
||
<li>end: What we're trying to path to. It doesn't matter if this is a turf or some other atom, we're gonna just path to the turf it's on anyway</li>
|
||
<li>max_distance: The maximum number of steps we can take in a given path to search (default: 30, 0 = infinite)</li>
|
||
<li>mintargetdistance: Minimum distance to the target before path returns, could be used to get near a target, but not right to it - for an AI mob with a gun, for example.</li>
|
||
<li>access: A list representing what access we have and what doors we can open.</li>
|
||
<li>simulated_only: Whether we consider tur fs without atmos simulation (AKA do we want to ignore space)</li>
|
||
<li>exclude: If we want to avoid a specific turf, like if we're a mulebot who already got blocked by some turf</li>
|
||
<li>skip_first: Whether or not to delete the first item in the path. This would be done because the first item is the starting tile, which can break movement for some creatures.</li>
|
||
<li>diagonal_handling: defines how we handle diagonal moves. see __DEFINES/path.dm</li>
|
||
</ul><h3 id="proc/get_rad_contents"><aside class="declaration">proc </aside>get_rad_contents<aside>(/<a href="atom.html">atom</a>/location, emission_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/radiation_helpers.dm#L6"><img src="git.png" width="16" height="16" title="code/__HELPERS/radiation_helpers.dm 6"></a></aside></h3><p>A special GetAllContents that doesn't search past things with rad insulation
|
||
Components which return COMPONENT_BLOCK_RADIATION prevent further searching into that object's contents. The object itself will get returned still.
|
||
The ignore list makes those objects never return at all</p><h3 id="proc/get_random_perimeter_turf"><aside class="declaration">proc </aside>get_random_perimeter_turf<aside>(/<a href="atom.html">atom</a>/origin, radius) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L564"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 564"></a></aside></h3><p>returns a turf at the outer edge of a given radius</p><h3 id="proc/get_ranged_target_turf"><aside class="declaration">proc </aside>get_ranged_target_turf<aside>(/<a href="atom.html">atom</a>/target_atom, direction, range) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L524"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 524"></a></aside></h3><ul>
|
||
<li>returns turf relative to A in given direction at set range
|
||
// result is bounded to map size
|
||
// note range is non-pythagorean
|
||
// used for disposal system</li>
|
||
</ul><h3 id="proc/get_ranged_target_turf_direct"><aside class="declaration">proc </aside>get_ranged_target_turf_direct<aside>(/<a href="atom.html">atom</a>/starting_atom, /<a href="atom.html">atom</a>/target, range, offset) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L550"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 550"></a></aside></h3><p>Get ranged target turf, but with direct targets as opposed to directions</p>
|
||
<p>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:</p>
|
||
<ul>
|
||
<li>starting_atom - Initial Firer / Position</li>
|
||
<li>target - Target to aim towards</li>
|
||
<li>range - Distance of returned target turf from starting_atom</li>
|
||
<li>offset - Angle offset, 180 input would make the returned target turf be in the opposite direction</li>
|
||
</ul><h3 id="proc/get_safe_random_station_turf_equal_weight"><aside class="declaration">proc </aside>get_safe_random_station_turf_equal_weight<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/datums/helper_datums/teleport.dm#L256"><img src="git.png" width="16" height="16" title="code/datums/helper_datums/teleport.dm 256"></a></aside></h3><p>Returns a random department of areas to pass into get_safe_random_station_turf() for more equal spawning.</p><h3 id="proc/get_safe_species"><aside class="declaration">proc </aside>get_safe_species<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/mob/living/carbon/human/species/_species.dm#L1095"><img src="git.png" width="16" height="16" title="code/modules/mob/living/carbon/human/species/_species.dm 1095"></a></aside></h3><p>Returns a list of names of non-blacklisted or hazardous species.</p><h3 id="proc/get_swarm_path_to"><aside class="declaration">proc </aside>get_swarm_path_to<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/path_caller, /<a href="atom.html">atom</a>/end, max_distance, mintargetdist, age, access, simulated_only, /<a href="turf.html">turf</a>/exclude, skip_first) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/paths/path.dm#L50"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 50"></a></aside></h3><p>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</p>
|
||
<p>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</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>path_caller: The movable atom that's trying to find the path</li>
|
||
<li>end: What we're trying to path to. It doesn't matter if this is a turf or some other atom, we're gonna just path to the turf it's on anyway</li>
|
||
<li>max_distance: The maximum number of steps we can take in a given path to search (default: 30, 0 = infinite)</li>
|
||
<li>mintargetdistance: Minimum distance to the target before path returns, could be used to get near a target, but not right to it - for an AI mob with a gun, for example.</li>
|
||
<li>age: How old a path map can be before we'll avoid reusing it. Use the defines found in <a href="code/__DEFINES/path_defines.html" title="code/__DEFINES/path_defines.dm">code/__DEFINES/path_defines.dm</a>, values larger then MAP_REUSE_SLOWEST will be discarded</li>
|
||
<li>access: A list representing what access we have and what doors we can open.</li>
|
||
<li>simulated_only: Whether we consider tur fs without atmos simulation (AKA do we want to ignore space)</li>
|
||
<li>exclude: If we want to avoid a specific turf, like if we're a mulebot who already got blocked by some turf</li>
|
||
<li>skip_first: Whether or not to delete the first item in the path. This would be done because the first item is the starting tile, which can break movement for some creatures.</li>
|
||
</ul><h3 id="proc/get_total_resources"><aside class="declaration">proc </aside>get_total_resources<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/events/event_procs.dm#L132"><img src="git.png" width="16" height="16" title="code/modules/events/event_procs.dm 132"></a></aside></h3><p>Returns the net resources available for event rolling</p><h3 id="proc/get_unrestricted_random_reagent_id"><aside class="declaration">proc </aside>get_unrestricted_random_reagent_id<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/reagents/chemistry/reagents_holder.dm#L1013"><img src="git.png" width="16" height="16" title="code/modules/reagents/chemistry/reagents_holder.dm 1013"></a></aside></h3><p>Returns a random reagent ID, with real non blacklisted balance boosting action!</p><h3 id="proc/get_valid_screen_location"><aside class="declaration">proc </aside>get_valid_screen_location<aside>(target_loc, target_offset, view) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/screen_objs.dm#L69"><img src="git.png" width="16" height="16" title="code/__HELPERS/screen_objs.dm 69"></a></aside></h3><p>Returns a valid location to place a screen object without overflowing the viewport</p>
|
||
<ul>
|
||
<li>target: The target location as a purely number based screen_loc string "+-left-offset:+-pixel,+-bottom-offset:+-pixel"</li>
|
||
<li>target_offset: The amount we want to offset the target location by. We explictly don't care about direction here, we will try all 4</li>
|
||
<li>view: The view variable of the client we're doing this for. We use this to get the size of the screen</li>
|
||
</ul>
|
||
<p>Returns a screen loc representing the valid location</p><h3 id="proc/get_valid_vent_spawns"><aside class="declaration">proc </aside>get_valid_vent_spawns<aside>(unwelded_only, exclude_mobs_nearby, min_network_size) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/game.dm#L475"><img src="git.png" width="16" height="16" title="code/__HELPERS/game.dm 475"></a></aside></h3><p>Returns a list of vents that can be used as a potential spawn if they meet the criteria set by the arguments</p>
|
||
<p>Will not include parent-less vents to the returned list.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>unwelded_only - Whether the list should only include vents that are unwelded</li>
|
||
<li>exclude_mobs_nearby - Whether to exclude vents that are near living mobs</li>
|
||
<li>min_network_size - The minimum length (non-inclusive) of the vent's parent network. A smaller number means vents in small networks (Security, Virology) will appear in the list</li>
|
||
</ul><h3 id="proc/goonchem_vortex"><aside class="declaration">proc </aside>goonchem_vortex<aside>(/<a href="turf.html">turf</a>/T, pull, volume, ignore_volume) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/reagents/chemistry/chemical_reaction.dm#L84"><img src="git.png" width="16" height="16" title="code/modules/reagents/chemistry/chemical_reaction.dm 84"></a></aside></h3><p>Throws or pulls objects to/from a chem reaction</p>
|
||
<p>Scales the amount of objects thrown with the volume, unless ignore_volume is TRUE</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>T - The turf to use as the throw from/to point</li>
|
||
<li>pull - Do we want to pull objects towards T (TRUE) or push them away from it (FALSE)</li>
|
||
<li>volume - The volume of reagents. Used to scale the effect is ignore_volume = FALSE</li>
|
||
<li>ignore_volume - Do we want to ignore the volume of reagents and just throw regardless</li>
|
||
</ul><h3 id="proc/gradient_text"><aside class="declaration">proc </aside>gradient_text<aside>(message, color_1, color_2) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/flock_helpers.dm#L80"><img src="git.png" width="16" height="16" title="code/__HELPERS/flock_helpers.dm 80"></a></aside></h3><p>Make a color a repeating gradient between two colors. Note: This is inaccurate because its a linear transformation, but human eyes do not perceive color this way.</p><h3 id="proc/hit_zone_to_clothes_zone"><aside class="declaration">proc </aside>hit_zone_to_clothes_zone<aside>(zone) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/mob/mob_misc_procs.dm#L241"><img src="git.png" width="16" height="16" title="code/modules/mob/mob_misc_procs.dm 241"></a></aside></h3><p>Convert the impact zone of a projectile to a clothing zone we can do a contamination check on</p><h3 id="proc/icon2asset"><aside class="declaration">proc </aside>icon2asset<aside>(/<a href="atom.html">atom</a>/thing, /<a href="client.html">client</a>/target, icon_state, dir, frame, moving, sourceonly, extra_classes) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/iconprocs.dm#L450"><img src="git.png" width="16" height="16" title="code/__HELPERS/iconprocs.dm 450"></a></aside></h3><p>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:</p>
|
||
<ul>
|
||
<li>thing - either a /icon object, or an object that has an appearance (atom, image, mutable_appearance).</li>
|
||
<li>target - either a reference to or a list of references to /client's or mobs with clients</li>
|
||
<li>icon_state - string to force a particular icon_state for the icon to be used</li>
|
||
<li>dir - dir number to force a particular direction for the icon to be used</li>
|
||
<li>frame - what frame of the icon_state's animation for the icon being used</li>
|
||
<li>moving - whether or not to use a moving state for the given icon</li>
|
||
<li>sourceonly - if TRUE, only generate the asset and send back the asset url, instead of tags that display the icon to players</li>
|
||
<li>extra_classes - string of extra css classes to use when returning the icon string</li>
|
||
</ul><h3 id="proc/icon2base64"><aside class="declaration">proc </aside>icon2base64<aside>(/<a href="icon.html">icon</a>/icon) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/iconprocs.dm#L341"><img src="git.png" width="16" height="16" title="code/__HELPERS/iconprocs.dm 341"></a></aside></h3><p>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)</p><h3 id="proc/icon_exists"><aside class="declaration">proc </aside>icon_exists<aside>(file, state, no_sprite) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/icon_helpers.dm#L219"><img src="git.png" width="16" height="16" title="code/__HELPERS/icon_helpers.dm 219"></a></aside></h3><p>Checks if the given iconstate exists in the given file, caching the result. Setting no_sprite to TRUE will print a stack trace ONCE.</p><h3 id="proc/init_reagent_list"><aside class="declaration">proc </aside>init_reagent_list<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/global_lists.dm#L250"><img src="git.png" width="16" height="16" title="code/__HELPERS/global_lists.dm 250"></a></aside></h3><p>Initialises all of /datum/reagent into a list indexed by reagent id.</p><h3 id="proc/initialize_starting_knowledge"><aside class="declaration">proc </aside>initialize_starting_knowledge<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/antagonists/heretic/knowledge/starting_lore.dm#L10"><img src="git.png" width="16" height="16" title="code/modules/antagonists/heretic/knowledge/starting_lore.dm 10"></a></aside></h3><p>Returns a list of all heretic knowledge TYPEPATHS
|
||
that have route set to PATH_START.</p><h3 id="proc/is_bad_connection"><aside class="declaration">proc </aside>is_bad_connection<aside>(old_freq, new_freq) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/game/machinery/tcomms/tcomms_base.dm#L239"><img src="git.png" width="16" height="16" title="code/game/machinery/tcomms/tcomms_base.dm 239"></a></aside></h3><p>Connection checker</p>
|
||
<p>Checks the connection frequency against the intended frequency for the message
|
||
NOTE: I barely know what on earth this does, but it works and it scares me
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>old_freq - Frequency of the connection</li>
|
||
<li>new_freq - Frequency of the message</li>
|
||
</ul><h3 id="proc/is_color_dark"><aside class="declaration">proc </aside>is_color_dark<aside>(color, threshold) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L1959"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 1959"></a></aside></h3><p>Given a color in the format of "#RRGGBB", will return if the color is dark.</p><h3 id="proc/is_special_character"><aside class="declaration">proc </aside>is_special_character<aside>(/<a href="mob.html">mob</a>/M) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/admin/misc_admin_procs.dm#L115"><img src="git.png" width="16" height="16" title="code/modules/admin/misc_admin_procs.dm 115"></a></aside></h3><p>ADMIN HELPER PROCS
|
||
A proc that return whether the mob is a "Special Character" aka Antagonist</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>M - the mob you're checking</li>
|
||
</ul><h3 id="proc/is_type_in_UID_list"><aside class="declaration">proc </aside>is_type_in_UID_list<aside>(/<a href="datum.html">datum</a>/D, /list/L) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unique_ids.dm#L73"><img src="git.png" width="16" height="16" title="code/__HELPERS/unique_ids.dm 73"></a></aside></h3><p>If the list <code>L</code> contains a datum UID who's type matches <code>D</code>'s type, returns the UID of that datum in the list. Otherwise returns null.</p><h3 id="proc/is_valid_dmi_file"><aside class="declaration">proc </aside>is_valid_dmi_file<aside>(icon_path) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/iconprocs.dm#L377"><img src="git.png" width="16" height="16" title="code/__HELPERS/iconprocs.dm 377"></a></aside></h3><p>given a text string, returns whether it is a valid dmi icons folder path</p><h3 id="proc/last_name"><aside class="declaration">proc </aside>last_name<aside>(given_name) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/name_helpers.dm#L201"><img src="git.png" width="16" height="16" title="code/__HELPERS/name_helpers.dm 201"></a></aside></h3><p>Find the last name of a mob from a passed string with regex</p><h3 id="proc/list_clear_nulls"><aside class="declaration">proc </aside>list_clear_nulls<aside>(/list/list_to_clear) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L1066"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 1066"></a></aside></h3><p>Removes any null entries from the list
|
||
Returns TRUE if the list had nulls, FALSE otherwise</p><h3 id="proc/lists_equal_unordered"><aside class="declaration">proc </aside>lists_equal_unordered<aside>(/list/list_one, /list/list_two) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L1058"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 1058"></a></aside></h3><p>Checks to make sure that the lists have the exact same contents, ignores the order of the contents.</p><h3 id="proc/locateUID"><aside class="declaration">proc </aside>locateUID<aside>(uid) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unique_ids.dm#L55"><img src="git.png" width="16" height="16" title="code/__HELPERS/unique_ids.dm 55"></a></aside></h3><p>Locates a datum based off of the UID</p>
|
||
<p>Replacement for locate() which takes a UID instead of a ref
|
||
Returns the datum, if found</p><h3 id="proc/makeDatumRefLists"><aside class="declaration">proc </aside>makeDatumRefLists<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/global_lists.dm#L6"><img src="git.png" width="16" height="16" title="code/__HELPERS/global_lists.dm 6"></a></aside></h3><p>Initial Building</p><h3 id="proc/make_associative"><aside class="declaration">proc </aside>make_associative<aside>(/list/flat_list) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L976"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 976"></a></aside></h3><p>A proc for turning a list into an associative list.</p>
|
||
<p>A simple proc for turning all things in a list into an associative list, instead
|
||
Each item in the list will have an associative value of TRUE</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>flat_list - the list that it passes to make associative</li>
|
||
</ul><h3 id="proc/md5asfile"><aside class="declaration">proc </aside>md5asfile<aside>(file) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/files.dm#L90"><img src="git.png" width="16" height="16" title="code/__HELPERS/files.dm 90"></a></aside></h3><p>Save file as an external file then md5 it.
|
||
Used because md5ing files stored in the rsc sometimes gives incorrect md5 results.</p><h3 id="proc/md5filepath"><aside class="declaration">proc </aside>md5filepath<aside>(path) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/files.dm#L85"><img src="git.png" width="16" height="16" title="code/__HELPERS/files.dm 85"></a></aside></h3><p>Returns the md5 of a file at a given path.</p><h3 id="proc/message_adminTicket"><aside class="declaration">proc </aside>message_adminTicket<aside>(msg, important) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/admin/misc_admin_procs.dm#L37"><img src="git.png" width="16" height="16" title="code/modules/admin/misc_admin_procs.dm 37"></a></aside></h3><p>Sends a message to the staff able to see admin tickets
|
||
Arguments:
|
||
msg - The message being send
|
||
important - If the message is important. If TRUE it will ignore the CHAT_NO_TICKETLOGS preferences,
|
||
send a sound and flash the window. Defaults to FALSE</p><h3 id="proc/message_mentorTicket"><aside class="declaration">proc </aside>message_mentorTicket<aside>(msg, important) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/admin/misc_admin_procs.dm#L54"><img src="git.png" width="16" height="16" title="code/modules/admin/misc_admin_procs.dm 54"></a></aside></h3><p>Sends a message to the staff able to see mentor tickets
|
||
Arguments:
|
||
msg - The message being send
|
||
important - If the message is important. If TRUE it will ignore the CHAT_NO_TICKETLOGS preferences,
|
||
send a sound and flash the window. Defaults to FALSE</p><h3 id="proc/message_roles"><aside class="declaration">proc </aside>message_roles<aside>(msg, permissions) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/admin/misc_admin_procs.dm#L17"><img src="git.png" width="16" height="16" title="code/modules/admin/misc_admin_procs.dm 17"></a></aside></h3><p>Sends a message to all players with a role and the specified permissions</p><h3 id="proc/message_to_html"><aside class="declaration">proc </aside>message_to_html<aside>(message) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_panel/tgui_panel_message.dm#L14"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_panel/tgui_panel_message.dm 14"></a></aside></h3><p>Message-related procs</p>
|
||
<p>Message format (/list):</p>
|
||
<ul>
|
||
<li>type - Message type, must be one of defines in <code>code/__DEFINES/chat.dm</code></li>
|
||
<li>text - Plain message text</li>
|
||
<li>html - HTML message text</li>
|
||
<li>Optional metadata, can be any key/value pair.</li>
|
||
</ul>
|
||
<p>Copyright (c) 2020 Aleksej Komarov
|
||
SPDX-License-Identifier: MIT</p><h3 id="proc/offset_to_screen_loc"><aside class="declaration">proc </aside>offset_to_screen_loc<aside>(x_offset, y_offset, view) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/screen_objs.dm#L39"><img src="git.png" width="16" height="16" title="code/__HELPERS/screen_objs.dm 39"></a></aside></h3><p>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</p><h3 id="proc/parse_caught_click_modifiers"><aside class="declaration">proc </aside>parse_caught_click_modifiers<aside>(/list/modifiers, /<a href="turf.html">turf</a>/origin, /<a href="client.html">client</a>/viewing_client) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L1837"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 1837"></a></aside></h3><p>Returns a turf based on text inputs, original turf and viewing client</p><h3 id="proc/path_map_passalong"><aside class="declaration">proc </aside>path_map_passalong<aside>(/list/<a href="datum.html">datum</a>/callback/return_callbacks, /<a href="turf.html">turf</a>/target, mintargetdist, skip_first, /<a href="datum.html">datum</a>/<a href="datum/path_map.html">path_map</a>/hand_back) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/subsystem/non_firing/SSpathfinder.dm#L99"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSpathfinder.dm 99"></a></aside></h3><p>We generate a path for the passed in callbacks, and then pipe it over</p><h3 id="proc/pathfinding_finished"><aside class="declaration">proc </aside>pathfinding_finished<aside>(/list/return_list, hand_back) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/paths/path.dm#L78"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 78"></a></aside></h3><p>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</p><h3 id="proc/phase_filter"><aside class="declaration">proc </aside>phase_filter<aside>(size) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/reagents/chemistry/reagents/drugs.dm#L1130"><img src="git.png" width="16" height="16" title="code/modules/reagents/chemistry/reagents/drugs.dm 1130"></a></aside></h3><p>This filter proc makes a visual effect where the object is split into fragments, with vertical lines cut out of them. It will appear as 2 seperate things are made of the one object that was cut out</p><h3 id="proc/pick_multiple_unique"><aside class="declaration">proc </aside>pick_multiple_unique<aside>(/list/listfrom, amount) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L361"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 361"></a></aside></h3><p>Picks multiple unique elements from the suplied list.
|
||
If the given list has a length less than the amount given then it will return a list with an equal amount</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>listfrom - The list where to pick from</li>
|
||
<li>amount - The amount of elements it tries to pick.</li>
|
||
</ul><h3 id="proc/pick_unique_lawset"><aside class="declaration">proc </aside>pick_unique_lawset<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/mob/living/silicon/silicon_laws.dm#L140"><img src="git.png" width="16" height="16" title="code/modules/mob/living/silicon/silicon_laws.dm 140"></a></aside></h3><p>returns a random non starting / kill crew lawset if the station has a unique ai lawset</p><h3 id="proc/pick_weight_recursive"><aside class="declaration">proc </aside>pick_weight_recursive<aside>(/list/list_to_pick) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L1049"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 1049"></a></aside></h3><p>Like pick_weight, but allowing for nested lists.</p>
|
||
<p>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.</p>
|
||
<p>Weights should be integers. Entries without weights are assigned weight 1 (so unweighted lists can be used as well)</p><h3 id="proc/pickweight"><aside class="declaration">proc </aside>pickweight<aside>(/list/L) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L307"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 307"></a></aside></h3><p>Picks an element based on its weight.
|
||
L - The input list</p>
|
||
<p>example: list("a" = 1, "b" = 2) will pick "b" 2/3s of the time</p><h3 id="proc/pickweight_fraction"><aside class="declaration">proc </aside>pickweight_fraction<aside>(/list/L) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/lists.dm#L329"><img src="git.png" width="16" height="16" title="code/__HELPERS/lists.dm 329"></a></aside></h3><p>Picks an element based on its weight. Weight can be any real number
|
||
L - The input list</p>
|
||
<p>example: list("a" = 0.33, "b" = 0.67) will have a 67% chance to pick "b"</p><h3 id="proc/propagate_network"><aside class="declaration">proc </aside>propagate_network<aside>(/<a href="obj.html">obj</a>/O, /<a href="datum.html">datum</a>/<a href="datum/regional_powernet.html">regional_powernet</a>/PN) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/power/powernets/powernet_helpers.dm#L6"><img src="git.png" width="16" height="16" title="code/modules/power/powernets/powernet_helpers.dm 6"></a></aside></h3><p>remove the old powernet and replace it with a new one throughout the network.</p><h3 id="proc/radial_menu_helper"><aside class="declaration">proc </aside>radial_menu_helper<aside>(/<a href="mob.html">mob</a>/user, /<a href="atom.html">atom</a>/anchor, /list/choices, uniqueid, radius, /<a href="datum.html">datum</a>/callback/custom_check, require_near) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/_onclick/hud/radial.dm#L292"><img src="git.png" width="16" height="16" title="code/_onclick/hud/radial.dm 292"></a></aside></h3><p>Similar to show_radial_menu, but choices is a list of atoms, for which icons will be automatically generated.
|
||
Supports multiple items of the same name, 2 soaps will become soap (1) and soap (2) to the user.
|
||
Otherwise, has the exact same arguments as show_radial_menu</p><h3 id="proc/random_body_accessory"><aside class="declaration">proc </aside>random_body_accessory<aside>(species, is_optional) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/mob_helpers.dm#L205"><img src="git.png" width="16" height="16" title="code/__HELPERS/mob_helpers.dm 205"></a></aside></h3><p>Returns a random body accessory for a given species name. Can be null based on is_optional argument.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>species - The name of the species to filter valid body accessories.</li>
|
||
<li>is_optional - Whether <em>no</em> body accessory (null) is an option.</li>
|
||
</ul><h3 id="proc/random_skin_tone"><aside class="declaration">proc </aside>random_skin_tone<aside>(species) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/mob_helpers.dm#L228"><img src="git.png" width="16" height="16" title="code/__HELPERS/mob_helpers.dm 228"></a></aside></h3><p>Randomises skin tone, specifically for each species that has a skin tone. Otherwise keeps a default of 1</p><h3 id="proc/ranked_rights2text"><aside class="declaration">proc </aside>ranked_rights2text<aside>(rank_rights, extra_rights, removed_rights, separator) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/type2type.dm#L143"><img src="git.png" width="16" height="16" title="code/__HELPERS/type2type.dm 143"></a></aside></h3><p>Converts the full permissions details of a DB-ranked admin to a HTML-colored string</p><h3 id="proc/read_bug_report_table"><aside class="declaration">proc </aside>read_bug_report_table<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/datums/bug_report.dm#L256"><img src="git.png" width="16" height="16" title="code/datums/bug_report.dm 256"></a></aside></h3><p>Populates a list using the bug reports db table and returns it</p><h3 id="proc/read_bug_report_titles"><aside class="declaration">proc </aside>read_bug_report_titles<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/datums/bug_report.dm#L278"><img src="git.png" width="16" height="16" title="code/datums/bug_report.dm 278"></a></aside></h3><p>Create a list of ids, authors and titles of bug reports awaiting approval</p><h3 id="proc/recover_all_SS_and_recreate_master"><aside class="declaration">proc </aside>recover_all_SS_and_recreate_master<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/controllers/failsafe.dm#L138"><img src="git.png" width="16" height="16" title="code/controllers/failsafe.dm 138"></a></aside></h3><p>Recreate all SSs which will still cause data survive due to Recover(), the new Master will then find and take them from global.vars</p><h3 id="proc/remove_clunky_diagonals"><aside class="declaration">proc </aside>remove_clunky_diagonals<aside>(/list/path, /<a href="datum.html">datum</a>/<a href="datum/can_pass_info.html">can_pass_info</a>/pass_info, simulated_only, /<a href="turf.html">turf</a>/avoid) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/paths/path.dm#L154"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 154"></a></aside></h3><p>Processes a path (list of turfs), removes any diagonal moves that would lead to a weird bump</p>
|
||
<p>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</p><h3 id="proc/remove_diagonals"><aside class="declaration">proc </aside>remove_diagonals<aside>(/list/path, /<a href="datum.html">datum</a>/<a href="datum/can_pass_info.html">can_pass_info</a>/pass_info, simulated_only, /<a href="turf.html">turf</a>/avoid) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/paths/path.dm#L182"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 182"></a></aside></h3><p>Processes a path (list of turfs), removes any diagonal moves</p>
|
||
<p>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</p><h3 id="proc/remove_verb"><aside class="declaration">proc </aside>remove_verb<aside>(/<a href="client.html">client</a>/target, verb_or_list_to_remove) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/verb_helpers.dm#L57"><img src="git.png" width="16" height="16" title="code/__HELPERS/verb_helpers.dm 57"></a></aside></h3><p>handles removing verb and sending it to browser to update, use this for removing verbs</p>
|
||
<p>pass the verb type path to this instead of removing it from verbs so the statpanel can update
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>target - Who the verb is being removed from, client or mob typepath</li>
|
||
<li>verb - typepath to a verb, or a list of verbs, supports lists of lists</li>
|
||
</ul><h3 id="proc/rights2text"><aside class="declaration">proc </aside>rights2text<aside>(rights, separator) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/type2type.dm#L136"><img src="git.png" width="16" height="16" title="code/__HELPERS/type2type.dm 136"></a></aside></h3><p>Converts a rights bitfield into a string</p><h3 id="proc/round_health"><aside class="declaration">proc </aside>round_health<aside>(health) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/mob_helpers.dm#L762"><img src="git.png" width="16" height="16" title="code/__HELPERS/mob_helpers.dm 762"></a></aside></h3><p>rounds value to limited symbols after the period for organ damage and other values</p><h3 id="proc/runechat_emote"><aside class="declaration">proc </aside>runechat_emote<aside>(/<a href="atom.html">atom</a>/user, text) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/datums/emote.dm#L291"><img src="git.png" width="16" height="16" title="code/datums/emote.dm 291"></a></aside></h3><p>Send an emote to runechat for all (listening) users in the vicinity.</p>
|
||
<ul>
|
||
<li>user - The user of the emote.</li>
|
||
<li>text - The text of the emote.</li>
|
||
</ul><h3 id="proc/rustlibs_create_toast"><aside class="declaration">proc </aside>rustlibs_create_toast<aside>(title, body) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__DEFINES/rust.dm#L226"><img src="git.png" width="16" height="16" title="code/__DEFINES/rust.dm 226"></a></aside></h3><p>(Windows only) Triggers a desktop notification with the specified title and body</p><h3 id="proc/rustlibs_dbp_generate"><aside class="declaration">proc </aside>rustlibs_dbp_generate<aside>(seed, accuracy, stamp_size, world_size, lower_range, upper_range) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__DEFINES/rust.dm#L202"><img src="git.png" width="16" height="16" title="code/__DEFINES/rust.dm 202"></a></aside></h3><p>This proc generates a grid of perlin-like noise</p>
|
||
<p>Returns a single string that goes row by row, with values of 1 representing an turned on cell, and a value of 0 representing a turned off cell.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>seed: seed for the function</li>
|
||
<li>accuracy: how close this is to the original perlin noise, as accuracy approaches infinity, the noise becomes more and more perlin-like</li>
|
||
<li>stamp_size: Size of a singular stamp used by the algorithm, think of this as the same stuff as frequency in perlin noise</li>
|
||
<li>world_size: size of the returned grid.</li>
|
||
<li>lower_range: lower bound of values selected for. (inclusive)</li>
|
||
<li>upper_range: upper bound of values selected for. (exclusive)</li>
|
||
</ul><h3 id="proc/safe_get_ckey"><aside class="declaration">proc </aside>safe_get_ckey<aside>(/<a href="mob.html">mob</a>/M) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/mob_helpers.dm#L741"><img src="git.png" width="16" height="16" title="code/__HELPERS/mob_helpers.dm 741"></a></aside></h3><p>Safe ckey getter</p>
|
||
<p>Should be used whenever broadcasting public information about a mob,
|
||
as this proc will make a best effort to hide the users ckey if they request it.
|
||
It will first check the mob for a client, then use the mobs last ckey as a directory lookup.
|
||
If a client cant be found to check preferences on, it will just show as DC'd.
|
||
This proc should only be used for public facing stuff, not administration related things.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>M - Mob to get a safe ckey of</li>
|
||
</ul><h3 id="proc/sanitize_for_ic"><aside class="declaration">proc </aside>sanitize_for_ic<aside>(t) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/text.dm#L42"><img src="git.png" width="16" height="16" title="code/__HELPERS/text.dm 42"></a></aside></h3><p>sanitize() with a pre-set list of characters to remove from IC speech.</p><h3 id="proc/screen_loc_to_offset"><aside class="declaration">proc </aside>screen_loc_to_offset<aside>(screen_loc, view) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/screen_objs.dm#L6"><img src="git.png" width="16" height="16" title="code/__HELPERS/screen_objs.dm 6"></a></aside></h3><p>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</p><h3 id="proc/seconds_to_clock"><aside class="declaration">proc </aside>seconds_to_clock<aside>(seconds<span class="as"> as </span>num) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/time.dm#L108"><img src="git.png" width="16" height="16" title="code/__HELPERS/time.dm 108"></a></aside></h3><p>Take a value in seconds and makes it display like a clock. Hours are stripped. (mm:ss)</p><h3 id="proc/seconds_to_full_clock"><aside class="declaration">proc </aside>seconds_to_full_clock<aside>(seconds<span class="as"> as </span>num) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/time.dm#L112"><img src="git.png" width="16" height="16" title="code/__HELPERS/time.dm 112"></a></aside></h3><p>Take a value in seconds and makes it display like a clock (h:mm:ss)</p><h3 id="proc/seedify"><aside class="declaration">proc </aside>seedify<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/source_item, seed_count, /<a href="obj.html">obj</a>/<a href="obj/machinery.html">machinery</a>/seed_extractor/extractor, /<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/hydroponics/seed_extractor.dm#L7"><img src="git.png" width="16" height="16" title="code/modules/hydroponics/seed_extractor.dm 7"></a></aside></h3><p>Convert a grown object into seeds.</p><h3 id="proc/setup_mod_themes"><aside class="declaration">proc </aside>setup_mod_themes<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/mod/mod_theme.dm#L2"><img src="git.png" width="16" height="16" title="code/modules/mod/mod_theme.dm 2"></a></aside></h3><p>Global proc that sets up all MOD themes as singletons in a list and returns it.</p><h3 id="proc/shake_camera"><aside class="declaration">proc </aside>shake_camera<aside>(/<a href="mob.html">mob</a>/M, duration, strength) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/mob/mob_misc_procs.dm#L418"><img src="git.png" width="16" height="16" title="code/modules/mob/mob_misc_procs.dm 418"></a></aside></h3><p>Shake the camera of the person viewing the mob SO REAL!</p><h3 id="proc/show_blurb"><aside class="declaration">proc </aside>show_blurb<aside>(/list/<a href="mob.html">mob</a>/targets, duration, message, scroll_down, screen_position, text_alignment, text_color, blurb_key, ignore_key, speed) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/maptext_alerts/text_blurbs.dm#L24"><img src="git.png" width="16" height="16" title="code/modules/maptext_alerts/text_blurbs.dm 24"></a></aside></h3><p>Shows a ticker reading out the given text on a client's screen.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>targets - mob or list of mobs to show it to.</li>
|
||
<li>duration - how long it lingers after it finishes ticking.</li>
|
||
<li>message - the message to display. Due to using maptext it isn't very
|
||
flexible format-wise. 11px font, up to 480 pixels per line. Use <code>\n</code> for
|
||
line breaks. Single-character HTML tags (<code><b></code>, <code><i></code>, <code><u></code> etc.) are handled
|
||
correctly but others display strangely. Note that maptext can display text
|
||
macros in strange ways, ex. \improper showing as "ÿ". Lines containing
|
||
only spaces, including ones only containing "\improper ", don't display.</li>
|
||
<li>scroll_down - by default each line pushes the previous line upwards - this
|
||
tells it to start high and scroll down. Ticks on <code>\n</code> - does not autodetect
|
||
line breaks in long strings.</li>
|
||
<li>screen_position - screen loc for the bottom-left corner of the blurb.</li>
|
||
<li>text_alignment - "right", "left", or "center"</li>
|
||
<li>text_color - colour of the text.</li>
|
||
<li>blurb_key - a key used for specific blurb types so they are not shown
|
||
repeatedly.</li>
|
||
<li>ignore_key - used to skip key checks.</li>
|
||
<li>text_limit - limit in characters of the message.</li>
|
||
</ul><h3 id="proc/slice_off_turfs"><aside class="declaration">proc </aside>slice_off_turfs<aside>(/<a href="atom.html">atom</a>/center, /list/<a href="turf.html">turf</a>/turfs, inner_angle, outer_angle) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L301"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 301"></a></aside></h3><p>Returns a slice of a list of turfs, defined by the ones that are inside the inner/outer angle's bounds</p><h3 id="proc/start_unequip_mob"><aside class="declaration">proc </aside>start_unequip_mob<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/item, /<a href="mob.html">mob</a>/source, /<a href="mob.html">mob</a>/user, strip_delay, hidden) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/datums/elements/strippable.dm#L260"><img src="git.png" width="16" height="16" title="code/datums/elements/strippable.dm 260"></a></aside></h3><p>A utility function for <code>/datum/strippable_item</code>s to start unequipping an item from a mob.</p><h3 id="proc/start_watch"><aside class="declaration">proc </aside>start_watch<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/time.dm#L88"><img src="git.png" width="16" height="16" title="code/__HELPERS/time.dm 88"></a></aside></h3><p>Returns "watch handle" (really just a timestamp :V)</p><h3 id="proc/stop_watch"><aside class="declaration">proc </aside>stop_watch<aside>(wh) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/time.dm#L95"><img src="git.png" width="16" height="16" title="code/__HELPERS/time.dm 95"></a></aside></h3><p>Returns number of seconds elapsed.
|
||
@param wh number The "Watch Handle" from start_watch(). (timestamp)</p><h3 id="proc/string_list"><aside class="declaration">proc </aside>string_list<aside>(/list/values) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/string_assoc_lists.dm#L28"><img src="git.png" width="16" height="16" title="code/__HELPERS/string_assoc_lists.dm 28"></a></aside></h3><p>Caches lists with non-numeric stringify-able values (text or typepath).</p><h3 id="proc/strip_html_tags"><aside class="declaration">proc </aside>strip_html_tags<aside>(input, max_length, allow_lines) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/text.dm#L353"><img src="git.png" width="16" height="16" title="code/__HELPERS/text.dm 353"></a></aside></h3><p>Strips HTML tags (and only tags) from the input.
|
||
The result may still include HTML entities, like ' for '</p><h3 id="proc/tgui_Topic"><aside class="declaration">proc </aside>tgui_Topic<aside>(href_list) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/external.dm#L177"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 177"></a></aside></h3><p>Middleware for /client/Topic.</p>
|
||
<p>return bool If TRUE, prevents propagation of the topic call.</p><h3 id="proc/tgui_alert"><aside class="declaration">proc </aside>tgui_alert<aside>(/<a href="mob.html">mob</a>/user, message, title, /list/buttons, timeout, autofocus, ui_state) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_input/alert_input.dm#L13"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_input/alert_input.dm 13"></a></aside></h3><p>Creates a TGUI alert window and returns the user's response.</p>
|
||
<p>This proc should be used to create alerts that the caller will wait for a response from.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>user - The user to show the alert to.</li>
|
||
<li>message - The content of the alert, shown in the body of the TGUI window.</li>
|
||
<li>title - The of the alert modal, shown on the top of the TGUI window.</li>
|
||
<li>buttons - The options that can be chosen by the user, each string is assigned a button on the UI.</li>
|
||
<li>timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout.</li>
|
||
<li>autofocus - The bool that controls if this alert should grab window focus.</li>
|
||
</ul><h3 id="proc/tgui_input_checkbox_list"><aside class="declaration">proc </aside>tgui_input_checkbox_list<aside>(/<a href="mob.html">mob</a>/user, message, title, /list/items, default, timeout, ui_state) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_input/input_checkbox.dm#L12"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_input/input_checkbox.dm 12"></a></aside></h3><p>Creates a TGUI input list window and returns the user's response in a ranked order.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>user - The user to show the input box to.</li>
|
||
<li>message - The content of the input box, shown in the body of the TGUI window.</li>
|
||
<li>title - The title of the input box, shown on the top of the TGUI window.</li>
|
||
<li>items - The options that can be chosen by the user, each string is assigned a button on the UI.</li>
|
||
<li>default - If an option is already preselected on the UI. Current values, etc.</li>
|
||
<li>timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.</li>
|
||
</ul><h3 id="proc/tgui_input_color"><aside class="declaration">proc </aside>tgui_input_color<aside>(/<a href="mob.html">mob</a>/user, message, title, default, timeout, autofocus, ui_state) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_input/color_input.dm#L11"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_input/color_input.dm 11"></a></aside></h3><p>Creates a TGUI color picker window and returns the user's response.</p>
|
||
<p>This proc should be used to create a color picker that the caller will wait for a response from.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>user - The user to show the picker to.</li>
|
||
<li>title - The of the picker modal, shown on the top of the TGUI window.</li>
|
||
<li>timeout - The timeout of the picker, after which the modal will close and qdel itself. Set to zero for no timeout.</li>
|
||
<li>autofocus - The bool that controls if this picker should grab window focus.</li>
|
||
</ul><h3 id="proc/tgui_input_keycombo"><aside class="declaration">proc </aside>tgui_input_keycombo<aside>(/<a href="mob.html">mob</a>/user, message, title, default, timeout, ui_state) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_input/keycombo_input.dm#L13"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_input/keycombo_input.dm 13"></a></aside></h3><p>Creates a TGUI window with a key input. Returns the user's response as a full key with modifiers, eg ShiftK.</p>
|
||
<p>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.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>user - The user to show the number input to.</li>
|
||
<li>message - The content of the number input, shown in the body of the TGUI window.</li>
|
||
<li>title - The title of the number input modal, shown on the top of the TGUI window.</li>
|
||
<li>default - The default (or current) key, shown as a placeholder.</li>
|
||
</ul><h3 id="proc/tgui_input_list"><aside class="declaration">proc </aside>tgui_input_list<aside>(/<a href="mob.html">mob</a>/user, message, title, /list/items, default, timeout, ui_state) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_input/list_input.dm#L13"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_input/list_input.dm 13"></a></aside></h3><p>Creates a TGUI input list window and returns the user's response.</p>
|
||
<p>This proc should be used to create alerts that the caller will wait for a response from.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>user - The user to show the input box to.</li>
|
||
<li>message - The content of the input box, shown in the body of the TGUI window.</li>
|
||
<li>title - The title of the input box, shown on the top of the TGUI window.</li>
|
||
<li>items - The options that can be chosen by the user, each string is assigned a button on the UI.</li>
|
||
<li>default - If an option is already preselected on the UI. Current values, etc.</li>
|
||
<li>timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.</li>
|
||
</ul><h3 id="proc/tgui_input_number"><aside class="declaration">proc </aside>tgui_input_number<aside>(/<a href="mob.html">mob</a>/user, message, title, default, max_value, min_value, timeout, round_value, ui_state) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_input/number_input.dm#L18"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_input/number_input.dm 18"></a></aside></h3><p>Creates a TGUI window with a number input. Returns the user's response as num | null.</p>
|
||
<p>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.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>user - The user to show the number input to.</li>
|
||
<li>message - The content of the number input, shown in the body of the TGUI window.</li>
|
||
<li>title - The title of the number input modal, shown on the top of the TGUI window.</li>
|
||
<li>default - The default (or current) value, shown as a placeholder. Users can press refresh with this.</li>
|
||
<li>max_value - Specifies a maximum value. If none is set, any number can be entered. Pressing "max" defaults to 1000.</li>
|
||
<li>min_value - Specifies a minimum value. Often 0.</li>
|
||
<li>timeout - The timeout of the number input, after which the modal will close and qdel itself. Set to zero for no timeout.</li>
|
||
<li>round_value - whether the inputted number is rounded down into an integer.</li>
|
||
</ul><h3 id="proc/tgui_input_ranked_list"><aside class="declaration">proc </aside>tgui_input_ranked_list<aside>(/<a href="mob.html">mob</a>/user, message, title, /list/items, default, timeout, ui_state) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_input/ranked_list_input.dm#L12"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_input/ranked_list_input.dm 12"></a></aside></h3><p>Creates a TGUI ranked input list window and returns the user's response in a ranked order.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>user - The user to show the input box to.</li>
|
||
<li>message - The content of the input box, shown in the body of the TGUI window.</li>
|
||
<li>title - The title of the input box, shown on the top of the TGUI window.</li>
|
||
<li>items - The options that can be chosen by the user, each string is assigned a button on the UI.</li>
|
||
<li>default - If an option is already preselected on the UI. Current values, etc.</li>
|
||
<li>timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.</li>
|
||
</ul><h3 id="proc/tgui_input_text"><aside class="declaration">proc </aside>tgui_input_text<aside>(/<a href="mob.html">mob</a>/user, message, title, default, max_length, multiline, encode, timeout, ui_state) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_input/text_input.dm#L18"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_input/text_input.dm 18"></a></aside></h3><p>Creates a TGUI window with a text input. Returns the user's response.</p>
|
||
<p>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.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>user - The user to show the text input to.</li>
|
||
<li>message - The content of the text input, shown in the body of the TGUI window.</li>
|
||
<li>title - The title of the text input modal, shown on the top of the TGUI window.</li>
|
||
<li>default - The default (or current) value, shown as a placeholder.</li>
|
||
<li>max_length - Specifies a max length for input. MAX_MESSAGE_LEN is default (1024)</li>
|
||
<li>multiline - Bool that determines if the input box is much larger. Good for large messages, laws, etc.</li>
|
||
<li>encode - Toggling this determines if input is filtered via html_encode. Setting this to FALSE gives raw input.</li>
|
||
<li>timeout - The timeout of the textbox, after which the modal will close and qdel itself. Set to zero for no timeout.</li>
|
||
</ul><h3 id="proc/tint_color"><aside class="declaration">proc </aside>tint_color<aside>(color, range) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/mob_helpers.dm#L121"><img src="git.png" width="16" height="16" title="code/__HELPERS/mob_helpers.dm 121"></a></aside></h3><p>Returns a purely random tint for specific color</p><h3 id="proc/to_chat"><aside class="declaration">proc </aside>to_chat<aside>(target, html, type, text, avoid_highlighting, avoid_blacklisting, handle_whitespace, trailing_newline, confidential, ticket_id) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_panel/to_chat.dm#L58"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_panel/to_chat.dm 58"></a></aside></h3><p>Sends the message to the recipient (target).</p>
|
||
<p>Recommended way to write to_chat calls:</p>
|
||
<pre><code>to_chat(client, "You have found <strong>[object]</strong>", MESSAGE_TYPE_INFO,
|
||
</code></pre>
|
||
<p>Always remember to close spans!</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>target: Refers to the target of the to_chat message. Valid targets include clients, mobs, and the static world controller</li>
|
||
<li>html: The Message to be sent to the TARGET. Converted to a string if not already one in this function</li>
|
||
<li>type: The chat tab that this message will be sent to, a list of all valid types can be found in chat.dm</li>
|
||
<li>text: Unused</li>
|
||
<li>avoid_highlighting: Unused</li>
|
||
</ul>
|
||
<p><code>trailing_newline</code>, <code>confidential</code>, and <code>handle_whitespace</code> currently have no effect, please fix this in the future or remove the arguments to lower cache!</p><h3 id="proc/to_chat_immediate"><aside class="declaration">proc </aside>to_chat_immediate<aside>(target, html, type, text, avoid_highlighting, avoid_blacklisting, handle_whitespace, trailing_newline, confidential, ticket_id) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/modules/tgui/tgui_panel/to_chat.dm#L10"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui_panel/to_chat.dm 10"></a></aside></h3><p>Circumvents the message queue and sends the message to the recipient (target) as soon as possible.
|
||
trailing_newline, confidential, and handle_whitespace currently have no effect, please fix this in the future or remove the arguments to lower cache!</p><h3 id="proc/trim_length"><aside class="declaration">proc </aside>trim_length<aside>(text, max_length) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/text.dm#L280"><img src="git.png" width="16" height="16" title="code/__HELPERS/text.dm 280"></a></aside></h3><p>Returns a string that does not exceed max_length characters in size</p><h3 id="proc/turf_peel"><aside class="declaration">proc </aside>turf_peel<aside>(outer_range, inner_range, center, view_based) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/spatial_info.dm#L349"><img src="git.png" width="16" height="16" title="code/__HELPERS/spatial_info.dm 349"></a></aside></h3><p>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.</p>
|
||
<p>@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.</p><h3 id="proc/type_list_to_counted_assoc_list"><aside class="declaration">proc </aside>type_list_to_counted_assoc_list<aside>(/list/origin_list) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/unsorted.dm#L1968"><img src="git.png" width="16" height="16" title="code/__HELPERS/unsorted.dm 1968"></a></aside></h3><p>This proc takes a list of types, and returns them in the format below.
|
||
[type] = amount of type in list.
|
||
Useful for recipes.</p><h3 id="proc/view_to_pixels"><aside class="declaration">proc </aside>view_to_pixels<aside>(view) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__DEFINES/hud.dm#L114"><img src="git.png" width="16" height="16" title="code/__DEFINES/hud.dm 114"></a></aside></h3><p>Takes a string or num view, and converts it to pixel width/height in a list(pixel_width, pixel_height)</p><h3 id="proc/wiki_link"><aside class="declaration">proc </aside>wiki_link<aside>(article_name, link_text) <a href="https://github.com/ParadiseSS13/Paradise/blob/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb/code/__HELPERS/text.dm#L776"><img src="git.png" width="16" height="16" title="code/__HELPERS/text.dm 776"></a></aside></h3><p>Creates a hyperlink for a specified wiki article.</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/ce34e64c211f5983d9ff6b368ef40015ccb6fdbb">ce34e64</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html> |