Goonstation 13 - Modules - Types

code/procs/helpers.dm

/proc/s_es Returns the plural based on a number provided.
/proc/isUpper Returns true if the char you feed it is uppercase.
/proc/showadminlist Shows the calling client admins.txt
/proc/getLineMatrix Returns the line matrix from a start atom to an end atom, used in creating line objects
/proc/showLine Creates and shows a line object. Line object has an "affected" var that contains the cross tiles.
/proc/get_angle Returns the angle between two given atoms
/proc/separate_radio_prefix_and_message Given a message, returns a list containing the radio prefix and the message, so that the message can be manipulated seperately in various functions.
/proc/english_list Given a list, returns a text string representation of the list's contents.
/proc/angle2text Returns the given degree converted to a text string in the form of a direction
/proc/IsGuestKey Returns true if the given key is a guest key
/proc/sanitize_frequency Returns f, ensured that it's a valid frequency
/proc/get_adjacent_floor Returns the turf facing the fab for cardinal directions (which should also be the user's turf), but for diagonals it returns a neighbouring turf depending on where you click Just in case you're attacking a corner diagonally. (made initially for lamp manufacturers, probably behaves funky above range 1)
/proc/is_hex Returns true if given value is a hex value
/proc/o_clock_time Returns the current timeofday in o'clock format
/proc/dead_player_list Returns a list of eligible dead players to be respawned as an antagonist or whatever (Convair880). Text messages: 1: alert | 2: alert (chatbox) | 3: alert acknowledged (chatbox) | 4: no longer eligible (chatbox) | 5: waited too long (chatbox)
/proc/whois Looks up a player based on a string. Searches a shit load of things ~whoa~. Returns a list of mob refs.
/proc/whois_ckey_to_mob_reference A universal ckey -> mob reference lookup proc, adapted from whois() (Convair880).
/proc/whodead Finds whoever's dead.
/proc/random_hex Returns random hex value of length given
/proc/hex2color_name Given hex color, returns string name of nearest named color
/proc/sonic_attack_environmental_effect Given center turf/atom, range, and list of things to smash, will damage said objects within range of center. Used for sonic grenades and similar. Avoiding C&P Code.
/proc/get_hud_style Returns hud style preferences of given client/mob
/proc/get_all_mobs_in Returns list of all mobs within an atom. Not cheap! (unlike ur mum)
/proc/get_standard_skintone Given user, will proompt user to select skin color from list (or custom) and returns skin tone after blending
/proc/blend_skintone Blends given rgb values with old human mob skin color (#ffca95) to return a new rgb value
/proc/getRole Returns a string based on the current job and antag role of the mob e.g. "Staff Assistant [Traitor]"
/proc/stripTextMacros Removes the special data inserted via use of \improper etc in strings
/proc/isadmin Returns true if given mob/client/mind is an admin
/proc/gradientText Returns span with a color gradient between two given colors of given message
/proc/radioGarbleText Returns given text replaced by nonsense chars, on a 40% or given % basis
/proc/illiterateGarbleText Returns given text replaced entirely by nonsense chars
/proc/flockBasedGarbleText Returns given text replaced by nonsense but its based off of a modifier + flock's garblyness
/proc/getTimeInSecondsSinceTime Returns the time in seconds since a given timestamp
/proc/getIconSize Handles the two states icon_size can be in: basic number, or string in WxH format
/proc/getClientFromCkey Finds a client by ckey, throws exception if not found
/proc/check_whitelist Removes non-whitelisted reagents from the reagents of TA
/proc/in_cone_of_vision This proc checks if one atom is in the cone of vision of another one.
/proc/lerp Linear interpolation
/proc/time_to_text Returns the passed decisecond-format time in the form of a text string
/proc/can_act Returns true if not incapicitated and unhandcuffed (by default)
/proc/is_incapacitated Returns true if the given mob is incapacitated
/proc/get_all_character_setup_ringtones sets up the list of ringtones players can select through character setup