These two vars allow for multiple unique areas to be linked to a master area
+and share some functionalities such as APC powernet nodes, fire alarms etc, without sacrificing
+their own flags, statuses, variables and more snowflakes.
+Friendly reminder: no map edited areas.
These two vars allow for multiple unique areas to be linked to a master area
+and share some functionalities such as APC powernet nodes, fire alarms etc, without sacrificing
+their own flags, statuses, variables and more snowflakes.
+Friendly reminder: no map edited areas.
The custom materials this atom is made of, used by a lot of things like furniture, walls, and floors (if I finish the functionality, that is.)
+The list referenced by this var can be shared by multiple objects and should not be directly modified. Instead, use set_custom_materials.
Creates a "Type-B" contextual screentip interaction.
+When a user hovers over this, this proc will be called in order
+to provide context for contextual screentips.
+You must call register_context() in order for this to be registered.
+A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
+that map to the action as text.
+If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
+source can, in all cases, be replaced with src, and only exists because this proc directly connects to a signal.
Create a "Type-B" contextual screentip interaction, registering to add_context().
+This will run add_context() when the atom is hovered over by an item for context.
+add_context() will not be called unless this is run.
+This is not necessary for Type-B interactions, as you can just apply the flag and register to the signal yourself.
Builds a list of overlays for the atom, this will not apply them.
+If you need to update overlays, use [update_icon(UPDATE_OVERLAYS)],
+This proc is intended to be overridden.
The custom materials this atom is made of, used by a lot of things like furniture, walls, and floors (if I finish the functionality, that is.)
+The list referenced by this var can be shared by multiple objects and should not be directly modified. Instead, use set_custom_materials.
Removes alternate apperances from huds that see them
+
qdels the reagent holder from atoms if it exists
+
clears the orbiters list
+
clears overlays and priority overlays
+
clears the light object
+
Initialize
+
+
The primary method that objects are setup in SS13 with
+
we don't use New as we have better control over when this is called and we can choose
+to delay calls or hook other logic in and so forth
+
During roundstart map parsing, atoms are queued for intialization in the base atom/New(),
+After the map has loaded, then Initalize is called on all atoms one by one. NB: this
+is also true for loading map templates as well, so they don't Initalize until all objects
+in the map file are parsed and present in the world
+
If you're creating an object at any point after SSInit has run then this proc will be
+immediately be called from New.
+
mapload: This parameter is true if the atom being loaded is either being intialized during
+the Atom subsystem intialization, or if the atom is being loaded from the map template.
+If the item is being created at runtime any time after the Atom subsystem is intialized then
+it's false.
+
You must always call the parent of this proc, otherwise failures will occur as the item
+will not be seen as initalized (this can lead to all sorts of strange behaviour, like
+the item being completely unclickable)
+
You must not sleep in this proc, or any subprocs
+
Any parameters from new are passed through (excluding loc), naturally if you're loading from a map
+there are no other arguments
Sends a signal that the new atom src, has been created at loc
+Late Intialization, for code that should run after all atoms have run Intialization
+
To have your LateIntialize proc be called, your atoms Initalization
+proc must return the hint
+INITIALIZE_HINT_LATELOAD otherwise you will never be called.
+
useful for doing things like finding other machines on GLOB.machines because you can guarantee
+that all atoms will actually exist in the "WORLD" at this time and that all their Intialization
+code has been run
New
+
+
Called when an atom is created in byond (built in engine proc)
+
Not a lot happens here in SS13 code, as we offload most of the work to the
+Intialization proc, mostly we run the preloader
+if the preloader is being used and then call InitAtom of which the ultimate
+result is that the Intialize proc is called.
+
We also generate a tag here if the DF_USE_TAG flag is set on the atom
_contents
+
+
Wrapper to return a copy of contents, as SDQL2 can't tell an internal list from a normal list.
add_context
+
+
Creates a "Type-B" contextual screentip interaction.
+When a user hovers over this, this proc will be called in order
+to provide context for contextual screentips.
+You must call register_context() in order for this to be registered.
+A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
+that map to the action as text.
+If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
+source can, in all cases, be replaced with src, and only exists because this proc directly connects to a signal.
audible_message
+
+
Show a message to all mobs in earshot of this atom
+
Use for objects performing audible actions
+
vars:
+
+
message is the message output to anyone who can hear.
+
deaf_message (optional) is what deaf people will see.
+
hearing_distance (optional) is the range, how many tiles away the message can be heard.
+
ignored_mobs (optional) doesn't show any message to any given mob in the list.
+
runechat_popup (optional) if TRUE, will display a runechat popup using rune_msg if set otherwise it will use message and self_message accordingly.
+
rune_msg (optional) is the message to display in the runechat popup.
+
balloon_alert
+
+
Creates text that will float from the atom upwards to the viewer.
balloon_alert_to_viewers
+
+
Create balloon alerts (text that floats up) to everything within range.
+Will only display to people who can see.
bullet_act
+
+
React to a hit by a projectile object
+
Default behaviour is to send the COMSIG_ATOM_BULLET_ACT and then call [on_hit][/obj/item/projectile/proc/on_hit] on the projectile
+
@params
+P - projectile
+def_zone - zone hit
+piercing_hit - is this hit piercing or normal?
check_projectile_ricochet
+
+
Checks if a projectile should ricochet off of us. Projectiles get final say.
+[__DEFINES/projectiles.dm] for return values.
connect_to_shuttle
+
+
Called after a shuttle is loaded from map template initially.
+
@params
+
+
port - Mobile port/shuttle
+
dock - Stationary dock the shuttle's at
+
idnum - ID number of the shuttle
+
examine_more
+
+
Called when a mob examines (shift click or verb) this atom twice (or more) within EXAMINE_MORE_TIME (default 1.5 seconds)
+
This is where you can put extra information on something that may be superfluous or not important in critical gameplay
+moments, while allowing people to manually double-examine to take a closer look
Generate the full examine string of this atom (including icon for goonchat)
has_gravity
+
+
Returns true if this atom has gravity for the passed in turf
+
Sends signals COMSIG_ATOM_HAS_GRAVITY and COMSIG_TURF_HAS_GRAVITY, both can force gravity with
+the forced gravity var
+
Gravity situations:
+
+
No gravity if you're not in a turf
+
No gravity if this atom is in is a space turf
+
Gravity if the area it's in always has gravity
+
Gravity if there's a gravity generator on the z level
+
Gravity if the Z level has an SSMappingTrait for ZTRAIT_GRAVITY
+
otherwise no gravity
+
mat_update_desc
+
+
This proc is called when a material updates an object's description
mech_melee_attack
+
+
Called when a mech melee attacks an atom
ninjadrain_act
+
+
Atom level proc for space ninja's glove interactions.
+
Proc which only occurs when space ninja uses his gloves on an atom.
+Does nothing by default, but effects will vary.
+Arguments:
+
+
ninja_suit - The offending space ninja's suit.
+
ninja - The human mob wearing the suit.
+
ninja_gloves - The offending space ninja's gloves.
+
onAwayMission
+
+
Is the atom in an away mission
+
Must be in the away mission z-level to return TRUE
+
Also used in gamemode code for win conditions
onCentCom
+
+
Is this atom currently located on centcom
+
Specifically, is it on the z level and within the centcom areas
+
You can also be in a shuttleshuttle during endgame transit
+
Used in gamemode to identify mobs who have escaped and for some other areas of the code
+who don't want atoms where they shouldn't be
onSyndieBase
+
+
Is the atom in any of the centcom syndicate areas
+
Either in the syndie base on centcom, or any of their shuttles
+
Also used in gamemode code for win conditions
register_context
+
+
Create a "Type-B" contextual screentip interaction, registering to add_context().
+This will run add_context() when the atom is hovered over by an item for context.
+add_context() will not be called unless this is run.
+This is not necessary for Type-B interactions, as you can just apply the flag and register to the signal yourself.
rust_heretic_act
+
+
Causes effects when the atom gets hit by a rust effect from heretics
+
Override this if you want custom behaviour in whatever gets hit by the rust
setClosed
+
+
Used to set something as 'closed' if it's being used as a supplypod
+
Override this if you want an atom to be usable as a supplypod.
setOpened
+
+
Used to set something as 'open' if it's being used as a supplypod
+
Override this if you want an atom to be usable as a supplypod.
set_custom_materials
+
+
Sets the custom materials for an item.
set_light_color
+
+
Setter for the light color of this atom.
set_light_range
+
+
Setter for the light range of this atom.
shuttleRotate
+
+
Base proc
update_appearance
+
+
Updates the appearence of the icon
+
Mostly delegates to update_name, update_desc, and update_icon
+
Arguments:
+
+
updates: A set of bitflags dictating what should be updated. Defaults to [ALL]
+
update_desc
+
+
Updates the description of the atom
update_icon
+
+
Updates the icon of the atom
update_icon_state
+
+
Updates the icon state of the atom
update_name
+
+
Updates the name of the atom
update_overlays
+
+
Builds a list of overlays for the atom, this will not apply them.
+If you need to update overlays, use [update_icon(UPDATE_OVERLAYS)],
+This proc is intended to be overridden.
visible_message
+
+
Generate a visible message from this atom
+
Show a message to all player mobs who sees this atom
+
Show a message to the src mob (if the src is a mob)
+
Use for atoms performing visible actions
+
message is output to anyone who can see, e.g. "The [src] does something!"
+
Vars:
+
+
self_message (optional) is what the src mob sees e.g. "You do something!"
+
blind_message (optional) is what blind people will hear e.g. "You hear something!"
+
vision_distance (optional) define how many tiles away the message can be seen.
+
ignored_mobs (optional) doesn't show any message to any given mob in the list.
+
target (optional) is the other mob involved with the visible message. For example, the attacker in many combat messages.
+
target_message (optional) is what the target mob will see e.g. "[src] does something to you!"
+
omni (optional) if TRUE, will show to users no matter what.
+
runechat_popup (optional) if TRUE, will display a runechat popup using rune_msg if set otherwise it will use message and self_message accordingly.
+
rune_msg (optional) is the message to display in the runechat popup.
+
wave_ex_act
+
+
Called when a wave explosion hits this atom.
+
Returns explosion power to "allow through". Standard handling and flag overrides in [wave_explode()].
wave_explode
+
+
Called when a wave explosion hits this atom. Do not override this.
+
Returns explosion power to "allow through".
zap_act
+
+
Respond to a electric bolt action on our item
+
Default behaviour is to return, we define here to allow for cleaner code later on
In case you have multiple types, you automatically use the most useful one.
+IE: Skating on ice, flippers on water, flying over chasm/space, etc.
+I reccomend you use the movetype_handler system and not modify this directly, especially for living mobs.
Called whenever an object moves and by mobs when they attempt to move themselves through space
+And when an object or action applies a force on src, see newtonian_move
meant for movement with zero side effects. only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts)
+if you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this
+most of the time you want forceMove()
Copies all languages into the supplied atom/language holder. Source should be overridden when you
+do not want the language overwritten by later atom updates or want to avoid blocked languages.
If set, will return a list for the tooltip (that will also be put together in a Join())
+However, if returning null, the tooltip will not be shown as #14942 changed it.
called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
Empties out the atom specific languages and updates them according to the current atoms language holder.
+As a side effect, it also creates missing language holders in the process.
In case you have multiple types, you automatically use the most useful one.
+IE: Skating on ice, flippers on water, flying over chasm/space, etc.
+I reccomend you use the movetype_handler system and not modify this directly, especially for living mobs.
Returns true or false to allow src to move through the blocker, mover has final say
Process_Spacemove
+
+
Called whenever an object moves and by mobs when they attempt to move themselves through space
+And when an object or action applies a force on src, see newtonian_move
+
Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
+
Mobs should return 1 if they should be able to move of their own volition, see [/client/proc/Move]
+
Arguments:
+
+
movement_dir - 0 when stopping or any dir when trying to move
+
abstract_move
+
+
meant for movement with zero side effects. only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts)
+if you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this
+most of the time you want forceMove()
add_blocked_language
+
+
Adds a language to the blocked language list. Use this over remove_language in cases where you will give languages back later.
admin_teleport
+
+
Proc to hook user-enacted teleporting behavior and keep logging of the event.
can_speak_language
+
+
Checks if atom can speak the language.
copy_languages
+
+
Copies all languages into the supplied atom/language holder. Source should be overridden when you
+do not want the language overwritten by later atom updates or want to avoid blocked languages.
could_speak_language
+
+
Returns the result of tongue specific limitations on spoken languages.
forceMove
+
+
FORCED MOVEMENT
get_language_holder
+
+
Gets or creates the relevant language holder. For mindless atoms, gets the local one. For atom with mind, gets the mind one.
get_random_spoken_language
+
+
Gets a random spoken language, useful for forced speech and such.
get_random_understood_language
+
+
Gets a random understood language, useful for hallucinations and such.
get_selected_language
+
+
Returns selected language, if it can be spoken, or finds, sets and returns a new selected language if possible.
get_tooltip_data
+
+
If set, will return a list for the tooltip (that will also be put together in a Join())
+However, if returning null, the tooltip will not be shown as #14942 changed it.
+
Though no tooltips will be created for atoms that have tooltips = FALSE
grant_all_languages
+
+
Grants every language.
grant_language
+
+
Grants the supplied language and sets omnitongue true.
has_language
+
+
Checks if atom has the language. If spoken is true, only checks if atom can speak the language.
newtonian_move
+
+
Only moves the object if it's under no gravity
on_enter_storage
+
+
called when this atom is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
on_exit_storage
+
+
called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
quoteless_say_quote
+
+
Quirky citadel proc for our custom sayverbs to strip the verb out. Snowflakey as hell, say rewrite 3.0 when?
recursive_pulled_glidesize_update
+
+
Recursively set glide size for atom's pulled things
remove_all_languages
+
+
Removes every language and sets omnitongue false.
remove_blocked_language
+
+
Removes a language from the blocked language list.
remove_language
+
+
Removes a single language.
say_emphasis
+
+
Converts specific characters, like +, |, and _ to formatted output.
setGrabState
+
+
Updates the grab state of the movable
+
This exists to act as a hook for behaviour
setMovetype
+
+
Proc to modify the movement_type and hook behavior associated with it changing.
set_anchored
+
+
Sets the anchored var and returns if it was sucessfully changed or not.
set_bark
+
+
Sets the vocal bark for the atom, using the bark's ID
set_pulledby
+
+
Reports the event of the change in value of the pulledby variable.
throw_at
+
+
If this returns FALSE then callback will not be called.
update_atom_languages
+
+
Empties out the atom specific languages and updates them according to the current atoms language holder.
+As a side effect, it also creates missing language holders in the process.
Internal atom that copies an appearance on to the blocker plane
+
Copies an appearance vis render_target and render_source on to the emissive blocking plane.
+This means that the atom in question will block any emissive sprites.
+This should only be used internally. If you are directly creating more of these, you're
+almost guaranteed to be doing something wrong.
An overrideable proc used simply to hand over the item when claimed, this is a proc so that high-fives can override them since nothing is actually transferred
Handles assigning most of the variables for the alert that pops up when an item is offered
Proc Details
check_in_range
+
+
Simply checks if the other person is still in range
handle_transfer
+
+
An overrideable proc used simply to hand over the item when claimed, this is a proc so that high-fives can override them since nothing is actually transferred
setup
+
+
Handles assigning most of the variables for the alert that pops up when an item is offered
+
Handles setting the name, description and icon of the alert and tracking the person giving
+and the item being offered, also registers a signal that removes the alert from anyone who moves away from the offerer
+Arguments:
Wanted level, affects the hud icon. Level 0 is default, and the level 0 icon is blank, so in case of no families gamemode (and thus no wanted level), this HUD element will never appear.
Wanted level, affects the hud icon. Level 0 is default, and the level 0 icon is blank, so in case of no families gamemode (and thus no wanted level), this HUD element will never appear.
moused over objects, currently capped at 7. this is awful, and should be replaced with a component to track it using signals for parrying at some point.
These next two vars are to apply movement for keypresses and releases made while move delayed.
+Because discarding that input makes the game less responsive.
+On next move, add this dir to the move that would otherwise be done
A lazy list of atoms we've examined in the last EXAMINE_MORE_TIME (default 1.5) seconds, so that we will call [atom/proc/examine_more()] instead of [atom/proc/examine()] on them when examining
Fully returns a player to lobby, allowing them to bypass all respawn restrictions
+Works on ghosts or new players (lobby players)
+If a lobby player is selected, their restrictions are removed.
Blocks until all currently sending browse and browse_rsc assets have been sent.
+Due to byond limitations, this proc will sleep for 1 client round trip even if the client has no pending asset sends.
+This proc will return an untrue value if it had to return before confirming the send, such as timeout or the client going away.
Redirect proc that makes it easier to call the unlock achievement proc. Achievement type is the typepath to the award, user is the mob getting the award, and value is an optional variable used for leaderboard value increments
moused over objects, currently capped at 7. this is awful, and should be replaced with a component to track it using signals for parrying at some point.
These next two vars are to apply movement for keypresses and releases made while move delayed.
+Because discarding that input makes the game less responsive.
+On next move, add this dir to the move that would otherwise be done
A lazy list of atoms we've examined in the last EXAMINE_MORE_TIME (default 1.5) seconds, so that we will call [atom/proc/examine_more()] instead of [atom/proc/examine()] on them when examining
Check if the key is short enough to even be a real key
+Keyup's all keys held down.
NONSENSICAL_VERB_THAT_DOES_NOTHING
+
+
*sigh
Process_Grab
+
+
Process_Grab(): checks for grab, attempts to break if so. Return TRUE to prevent movement.
Process_Incorpmove
+
+
Process_Incorpmove
+Called by client/Move()
+Allows mobs to run though walls
admin_cmd_remove_ghost_respawn_timer
+
+
Allows a ghost to bypass respawn delay without lifting respawn restrictions
admin_cmd_respawn_return_to_lobby
+
+
Fully returns a player to lobby, allowing them to bypass all respawn restrictions
+Works on ghosts or new players (lobby players)
+If a lobby player is selected, their restrictions are removed.
asset_cache_confirm_arrival
+
+
Process asset cache client topic calls for "asset_cache_confirm_arrival=[INT]"
asset_cache_preload_data
+
+
Process asset cache client topic calls for "asset_cache_preload_data=[HTML+JSON_STRING]"
asset_cache_update_json
+
+
Updates the client side stored json file used to keep track of what assets the client has between restarts/reconnects.
award_heart
+
+
Redirect proc that makes it easier to get the status of an achievement. Achievement type is the typepath to the award.
browse_queue_flush
+
+
Blocks until all currently sending browse and browse_rsc assets have been sent.
+Due to byond limitations, this proc will sleep for 1 client round trip even if the client has no pending asset sends.
+This proc will return an untrue value if it had to return before confirming the send, such as timeout or the client going away.
clear_all_maps
+
+
Clears all the maps of registered screen objects.
clear_map
+
+
Clears the map of registered screen objects.
+
Not really needed most of the time, as the client's screen list gets reset
+on relog. any of the buttons are going to get caught by garbage collection
+anyway. they're effectively qdel'd.
close_popup
+
+
Closes a popup.
create_popup
+
+
Creates a popup window with a basic map element in it, without any
+further initialization.
+
Ratio is how many pixels by how many pixels (keep it simple).
+
Returns a map name.
fix_tgui_panel
+
+
tgui panel / chat troubleshooting verb
forceEvent
+
+
Allows an admin to force an event
get_award_status
+
+
Redirect proc that makes it easier to get the status of an achievement. Achievement type is the typepath to the award.
give_award
+
+
Redirect proc that makes it easier to call the unlock achievement proc. Achievement type is the typepath to the award, user is the mob getting the award, and value is an optional variable used for leaderboard value increments
handle_popup_close
+
+
When the popup closes in any way (player or proc call) it calls this.
init_verbs
+
+
compiles a full list of verbs and sends it to the browser
register_map_obj
+
+
Registers screen obj with the client, which makes it visible on the
+assigned map, and becomes a part of the assigned map's lifecycle.
send_resources
+
+
Send resources to the client.
+Sends both game resources and browser assets.
set_tab
+
+
verbs that send information from the browser UI
setup_popup
+
+
Create the popup, and get it ready for generic use by giving
+it a background.
+
Width and height are multiplied by 64 by default.
uiclose
+
+
verb
+
Called by UIs when they are closed.
+Must be a verb so winset() can call it.
+
required uiref ref The UI that was closed.
update_clickcatcher
+
+
Makes a clickcatcher if necessary, and ensures it's fit to our size.
update_special_keybinds
+
+
Updates the keybinds for special keys
+
Handles adding macros for the keys that need it
+And adding movement keys to the clients movement_keys list
+At the time of writing this, communication(OOC, Say, IC) require macros
+Arguments:
+
+
direct_prefs - the preference we're going to get keybinds from
+
+
Returns list of special keybind in key = Mod1Mod2Mod3Key format, NOT Mod1+Mod2+Mod3+Key format.
Used for determining which wounds are applicable to this species.
+if we have flesh (can suffer slash/piercing/burn wounds, requires they don't have NOBLOOD)
Used for determining which wounds are applicable to this species.
+if we have flesh (can suffer slash/piercing/burn wounds, requires they don't have NOBLOOD)
Subsystem only runs on spare cpu (after all non-background subsystems have ran that tick)
+SS_BACKGROUND has its own priority bracket, this overrides SS_TICKER's priority bump
Treat wait as a tick count, not DS, run every wait ticks.
+(also forces it to run first in the tick (unless SS_BACKGROUND))
+(implies all runlevels because of how it works)
+This is designed for basically anything that works as a mini-mc (like SStimer)
keep the subsystem's timing on point by firing early if it fired late last fire because of lag
+ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds.
Calculate its next fire after its fired.
+(IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be)
+This flag overrides SS_KEEP_TIMING
Subsystem only runs on spare cpu (after all non-background subsystems have ran that tick)
+SS_BACKGROUND has its own priority bracket, this overrides SS_TICKER's priority bump
keep the subsystem's timing on point by firing early if it fired late last fire because of lag
+ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds.
Calculate its next fire after its fired.
+(IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be)
+This flag overrides SS_KEEP_TIMING
Treat wait as a tick count, not DS, run every wait ticks.
+(also forces it to run first in the tick (unless SS_BACKGROUND))
+(implies all runlevels because of how it works)
+This is designed for basically anything that works as a mini-mc (like SStimer)
Requires relative stillness to our target via dx and dy coordinate difference but only if both are spacedrifting. Specify DO_AFTER_ALLOW_NONSPACEDRIFT_RELATIVITY to say otherwise.
Requires relative stillness to our target via dx and dy coordinate difference but only if both are spacedrifting. Specify DO_AFTER_ALLOW_NONSPACEDRIFT_RELATIVITY to say otherwise.
This item can be used in the directional blocking system. Only a basic check used to determine if we should proceed with directional block handling at all.
This item can be used in the directional blocking system. Only a basic check used to determine if we should proceed with directional block handling at all.
This attack should discard last_action instead of flushing (storing) it). You should probably know what you're doing if you use this considering this is how clickdelay is enforced.
There are a number of "safety nets" intended to default-handle clickdelay. Return this flag to bypass ALL of them. Be sure
+you know EXACTLY what you are doing!
This attack should discard last_action instead of flushing (storing) it). You should probably know what you're doing if you use this considering this is how clickdelay is enforced.
There are a number of "safety nets" intended to default-handle clickdelay. Return this flag to bypass ALL of them. Be sure
+you know EXACTLY what you are doing!
for asay pings, this is the index in the return list for /proc/check_admin_pings that contains the message modified with underlines for the spotted names
for asay pings, this is the index in the return list for /proc/check_admin_pings that contains the message modified with underlines for the spotted names
The normal cost of an uplink implant; used for calcuating how many
+TC to charge someone if they get a free implant through choice or
+because they have nothing else that supports an implant.
The normal cost of an uplink implant; used for calcuating how many
+TC to charge someone if they get a free implant through choice or
+because they have nothing else that supports an implant.
The baseline unit for cargo crates. Adjusting this will change the cost of all in-game shuttles, crate export values, bounty rewards, and all supply pack import values, as they use this as their unit of measurement.
The baseline unit for cargo crates. Adjusting this will change the cost of all in-game shuttles, crate export values, bounty rewards, and all supply pack import values, as they use this as their unit of measurement.
Some defines to generalise colours used in lighting.
+
Important note: colors can end up significantly different from the basic html picture, especially when saturated
+Bright but quickly dissipating neon green. rgb(100, 200, 100)
Check whether or not we can block, without "triggering" a block. Basically run checks without effects like depleting shields.
+Wrapper for do_run_block(). The arguments on that means the same as for this.
Runs a block "sequence", effectively checking and then doing effects if necessary.
+Wrapper for do_run_block(). The arguments on that means the same as for this.
Bitflags for check_block() and handle_block(). Meant to be combined. You can be hit and still reflect, for example, if you do not use BLOCK_SUCCESS.
+Attack was not blocked
The below are for "metadata" on "how" the attack was blocked.
+Attack was and should be redirected according to list argument REDIRECT_METHOD (NOTE: the SHOULD here is important, as it says "the thing blocking isn't handling the reflecting for you so do it yourself"!)
Meta-flag for run_block/do_run_block : By default, BLOCK_SUCCESS tells do_run_block() to assume the attack is completely blocked and not continue the block chain. If this is present, it will continue to check other items in the chain rather than stopping.
These keys are generally only applied to the list if real_attack is FALSE. Used incase we want to make "smarter" mob AI in the future or something.
+Tells the caller how likely from 0 (none) to 100 (always) we are to reflect energy projectiles
Always set to 100 by run_block() if BLOCK_SUCCESS is in return value. Otherwise, defaults to mitigation percent if not set. Used by projectile/proc/on_hit().
Meta-flag for run_block/do_run_block : By default, BLOCK_SUCCESS tells do_run_block() to assume the attack is completely blocked and not continue the block chain. If this is present, it will continue to check other items in the chain rather than stopping.
Bitflags for check_block() and handle_block(). Meant to be combined. You can be hit and still reflect, for example, if you do not use BLOCK_SUCCESS.
+Attack was not blocked
Always set to 100 by run_block() if BLOCK_SUCCESS is in return value. Otherwise, defaults to mitigation percent if not set. Used by projectile/proc/on_hit().
These keys are generally only applied to the list if real_attack is FALSE. Used incase we want to make "smarter" mob AI in the future or something.
+Tells the caller how likely from 0 (none) to 100 (always) we are to reflect energy projectiles
The below are for "metadata" on "how" the attack was blocked.
+Attack was and should be redirected according to list argument REDIRECT_METHOD (NOTE: the SHOULD here is important, as it says "the thing blocking isn't handling the reflecting for you so do it yourself"!)
Check whether or not we can block, without "triggering" a block. Basically run checks without effects like depleting shields.
+Wrapper for do_run_block(). The arguments on that means the same as for this.
Runs a block "sequence", effectively checking and then doing effects if necessary.
+Wrapper for do_run_block(). The arguments on that means the same as for this.
Parry effects.
+Automatically melee attacks back normally, LMB equivalent action of an harm intent attack. List association should be defaulting to 1, being the attack damage multiplier for said counterattack
Parry effects.
+Automatically melee attacks back normally, LMB equivalent action of an harm intent attack. List association should be defaulting to 1, being the attack damage multiplier for said counterattack
Return this from /datum/component/Initialize or datum/component/OnTransfer to have the component be deleted if it's applied to an incorrect type.
+parent must not be modified if this is to be returned.
+This will be noted in the runtime logs
Only elements created with the same arguments given after id_arg_index share an element instance
+The arguments are the same when the text and number values are the same and all other values have the same ref
/ Identification ////
+Delete on successful broad identification (so the main way we "uncover" how an object works, since this won't be on it to obfuscate it)
Return this from /datum/component/Initialize or datum/component/OnTransfer to have the component be deleted if it's applied to an incorrect type.
+parent must not be modified if this is to be returned.
+This will be noted in the runtime logs
Only elements created with the same arguments given after id_arg_index share an element instance
+The arguments are the same when the text and number values are the same and all other values have the same ref
/ Identification ////
+Delete on successful broad identification (so the main way we "uncover" how an object works, since this won't be on it to obfuscate it)
Used to trigger signals and call procs registered for that signal
+The datum hosting the signal is automaticaly added as the first argument
+Returns a bitfield gathered from all registered procs
+Arguments given here are packaged in a list and given to _SendSignal
Used to trigger signals and call procs registered for that signal
+The datum hosting the signal is automaticaly added as the first argument
+Returns a bitfield gathered from all registered procs
+Arguments given here are packaged in a list and given to _SendSignal
called after an explosion happened : (epicenter, devastation_range, heavy_impact_range, light_impact_range, took, orig_dev_range, orig_heavy_range, orig_light_range)
sent from clicking while you have no equipment selected. Sent before cooldown and adjacency checks, so you can use this for infinite range things if you want.
called after an explosion happened : (epicenter, devastation_range, heavy_impact_range, light_impact_range, took, orig_dev_range, orig_heavy_range, orig_light_range)
sent from clicking while you have no equipment selected. Sent before cooldown and adjacency checks, so you can use this for infinite range things if you want.
A "Type-A" contextual screentip interaction.
+These are used for items that are defined by their behavior. They define their contextual text within themselves,
+not in their targets.
+Examples include syringes (LMB to inject, RMB to draw) and health analyzers (LMB to scan health/wounds, RMB for chems)
+Items can override add_item_context(), and call register_item_context() in order to easily connect to this.
+Called on /obj/item with a mutable screentip context list, the hovered target, and the mob hovering.
+A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
+that map to the action as text.
+If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
A "Type-B" contextual screentip interaction.
+These are atoms that are defined by what happens to them. These should define contextual text within themselves, and
+not in their operating tools.
+Examples include construction objects (LMB with glass to put in screen for computers).
+Called on /atom with a mutable screentip context list, the item being used, and the mob hovering.
+A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
+that map to the action as text.
+If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
A "Type-B" contextual screentip interaction.
+These are atoms that are defined by what happens to them. These should define contextual text within themselves, and
+not in their operating tools.
+Examples include construction objects (LMB with glass to put in screen for computers).
+Called on /atom with a mutable screentip context list, the item being used, and the mob hovering.
+A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
+that map to the action as text.
+If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
A "Type-A" contextual screentip interaction.
+These are used for items that are defined by their behavior. They define their contextual text within themselves,
+not in their targets.
+Examples include syringes (LMB to inject, RMB to draw) and health analyzers (LMB to scan health/wounds, RMB for chems)
+Items can override add_item_context(), and call register_item_context() in order to easily connect to this.
+Called on /obj/item with a mutable screentip context list, the hovered target, and the mob hovering.
+A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
+that map to the action as text.
+If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
Plane for balloon text (text that fades up)
+It's over lighting and every other crap because this is nearly as important as hud content and only visible to the user.
Plane for balloon text (text that fades up)
+It's over lighting and every other crap because this is nearly as important as hud content and only visible to the user.
Uses vis_overlays to leverage caching so that very few new items need to be made for the overlay. For anything that doesn't change outline or opaque area much or at all.
Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans.
The color matrix used to mask out emissive blockers on the emissive plane. Alpha should default to zero, be solely dependent on the RGB value of EMISSIVE_COLOR, and be independant of the RGB value of EM_BLOCK_COLOR.
Uses vis_overlays to leverage caching so that very few new items need to be made for the overlay. For anything that doesn't change outline or opaque area much or at all.
Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans.
The color matrix used to mask out emissive blockers on the emissive plane. Alpha should default to zero, be solely dependent on the RGB value of EMISSIVE_COLOR, and be independant of the RGB value of EM_BLOCK_COLOR.
Converts a probability/second chance to probability/delta_time chance
+For example, if you want an event to happen with a 10% per second chance, but your proc only runs every 5 seconds, do if(prob(100*DT_PROB_RATE(0.1, 5)))
Converts a probability/second chance to probability/delta_time chance
+For example, if you want an event to happen with a 10% per second chance, but your proc only runs every 5 seconds, do if(prob(100*DT_PROB_RATE(0.1, 5)))
The maximum for glide_size to be clamped to.
+This shouldn't be higher than the icon size, and generally you shouldn't be changing this, but it's here just in case.
Broken down, here's what this does:
+divides the world icon_size (32) by delay divided by ticklag to get the number of pixels something should be moving each tick.
+The division result is given a min value of 1 to prevent obscenely slow glide sizes from being set
+Then that's multiplied by the global glide size multiplier. 1.25 by default feels pretty close to spot on. This is just to try to get byond to behave.
+The whole result is then clamped to within the range above.
+Not very readable but it works
Broken down, here's what this does:
+divides the world icon_size (32) by delay divided by ticklag to get the number of pixels something should be moving each tick.
+The division result is given a min value of 1 to prevent obscenely slow glide sizes from being set
+Then that's multiplied by the global glide size multiplier. 1.25 by default feels pretty close to spot on. This is just to try to get byond to behave.
+The whole result is then clamped to within the range above.
+Not very readable but it works
The maximum for glide_size to be clamped to.
+This shouldn't be higher than the icon size, and generally you shouldn't be changing this, but it's here just in case.
Standard reagents value defines.
+Take a grain of salt, only "rare" reagents should have a decent value here, for balance reasons.
+TL;DR Think of it also like general market request price more than rarity.
Standard reagents value defines.
+Take a grain of salt, only "rare" reagents should have a decent value here, for balance reasons.
+TL;DR Think of it also like general market request price more than rarity.
Efficiency scaling for stock part level to ore factor. All code concerning lathing and production from raw ores to raw material sheets should be using this.
Efficiency scaling for stock part level to ore factor. All code concerning lathing and production from raw ores to raw material sheets should be using this.
A simple universal comsig for body bound skill modifiers.
+Technically they are still bound to the mind, but other signal procs will take care of adding and removing the modifier
+from/to new/old minds.
A simple universal comsig for body bound skill modifiers.
+Technically they are still bound to the mind, but other signal procs will take care of adding and removing the modifier
+from/to new/old minds.
Use the new volume system. Will automatically force rendering to use the new volume/baystation scaling UI so this is kind of incompatible with stuff like stack storage etc etc.
Use the new volume system. Will automatically force rendering to use the new volume/baystation scaling UI so this is kind of incompatible with stuff like stack storage etc etc.
call LateInitialize at the end of all atom Initalization
+
The item will be added to the late_loaders list, this is iterated over after
+initalization of subsystems is complete and calls LateInitalize on the atom
+see this file for the LateIntialize proc
Create this define if you want to do TGS configuration outside of this file.
+Before a reboot mode change, extras parameters are the current and new reboot mode enums
When a compile operation completes. Note, this event fires before the new .dmb is loaded into the watchdog. Consider using the TGS_EVENT_DEPLOYMENT_COMPLETE instead. Parameters: Game directory path
When a compile operation completes. Note, this event fires before the new .dmb is loaded into the watchdog. Consider using the TGS_EVENT_DEPLOYMENT_COMPLETE instead. Parameters: Game directory path
Create this define if you want to do TGS configuration outside of this file.
+Before a reboot mode change, extras parameters are the current and new reboot mode enums
below here, your skin is almost entirely falling off and your limb locks up more frequently. You are within a stone's throw of septic paralysis and losing the limb
dead people don't bleed, but they can clot! this is the minimum amount of clotting per tick on dead people, so even critical cuts will slowly clot in dead people
below here, your skin is almost entirely falling off and your limb locks up more frequently. You are within a stone's throw of septic paralysis and losing the limb
dead people don't bleed, but they can clot! this is the minimum amount of clotting per tick on dead people, so even critical cuts will slowly clot in dead people
This is used to add onto lazy assoc list when the value you're adding is a /list/. This one has extra safety over lazyaddassoc because the value could be null (and thus cant be used to += objects)
This is used to add onto lazy assoc list when the value you're adding is a /list/. This one has extra safety over lazyaddassoc because the value could be null (and thus cant be used to += objects)
Binary search sorted insert
+INPUT: Object to be inserted
+LIST: List to insert object into
+TYPECONT: The typepath of the contents of the list
+COMPARE: The object to compare against, usualy the same as INPUT
+COMPARISON: The variable on the objects to compare
+COMPTYPE: How should the values be compared? Either COMPARE_KEY or COMPARE_VALUE.
Binary search sorted insert
+INPUT: Object to be inserted
+LIST: List to insert object into
+TYPECONT: The typepath of the contents of the list
+COMPARE: The object to compare against, usualy the same as INPUT
+COMPARISON: The variable on the objects to compare
+COMPTYPE: How should the values be compared? Either COMPARE_KEY or COMPARE_VALUE.
This is used to add onto lazy assoc list when the value you're adding is a /list/. This one has extra safety over lazyaddassoc because the value could be null (and thus cant be used to += objects)
This is used to add onto lazy assoc list when the value you're adding is a /list/. This one has extra safety over lazyaddassoc because the value could be null (and thus cant be used to += objects)
Writes to a special log file if the log_suspicious_login config flag is set,
+which is intended to contain all logins that failed under suspicious circumstances.
Returns either null, or a list containing every sub area associated with our base area.
+If include_base is TRUE, the base area will also be added to the return list.
Proc used for purposes similar to get_areas_turfs(), but aimed to include associated areas.
+Only accepts area instances and paths for the first arg, no text strings.
+Returns a list of all turfs found in the sub areas (including the base's if include_base is TRUE)
+and located in a z level matching target_z, or anywhere if target_z is 0
Higher overhead "advanced" version of do_after.
+@params
+
+
atom/user is the atom doing the action or the "physical" user
+
delay is time in deciseconds
+
atom/target is the atom the action is being done to, defaults to user
+
do_after_flags see __DEFINES/flags/do_after.dm for details.
+
datum/callback/extra_checks - Every time this ticks, extra_checks() is invoked with (user, delay, target, time_left, do_after_flags, required_mobility_flags, required_combat_flags, mob_redirect, stage, initially_held_item, tool, passed_in).
+Stage can be DO_AFTER_STARTING, DO_AFTER_PROGRESSING, DO_AFTER_FINISHING
+If it returns DO_AFTER_STOP, this breaks.
+If it returns nothing, all other checks are done.
+If it returns DO_AFTER_PROCEED, all other checks are ignored.
+passed_in is a list[PROGRESS_MULTIPLIER], for modification.
+
required_mobility_flags is checked with CHECK_ALL_MOBILITY. Will immediately fail if the user isn't a mob.
+
requried_combat_flags is checked with CHECK_MULTIPLE_BITFIELDS. Will immediately fail if the user isn't a mob.
+
mob/living/mob_redirect - advanced option: If this is specified, movement and mobility/combat flag checks will use this instead of user. Progressbars will also go to this.
+
obj/item/tool - The tool we're using. See do_after flags for details.
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)
Moves all colors angle degrees around the color wheel while maintaining intensity of the color and not affecting whites
+TODO: Need a version that only affects one color (ie shift red to blue but leave greens and blues alone)
Gets the client of the mob, allowing for mocking of the client.
+You only need to use this if you know you're going to be mocking clients somewhere else.
Gets the client of the mob, allowing for mocking of the client.
+You only need to use this if you know you're going to be mocking clients somewhere else.
This file contains the stuff you need for using JPS (Jump Point Search) pathing, an alternative to A* that skips
+over large numbers of uninteresting tiles resulting in much quicker pathfinding solutions. Mind that diagonals
+cost the same as cardinal moves currently, so paths may look a bit strange, but should still be optimal.
A helper macro to see if it's possible to step from the first turf into the second one, minding things like door access and directional windows.
+Note that this can only be used inside the [datum/pathfind][pathfind datum] since it uses variables from said datum.
+If you really want to optimize things, optimize this, cuz this gets called a lot.
A helper macro to see if it's possible to step from the first turf into the second one, minding things like door access and directional windows.
+Note that this can only be used inside the [datum/pathfind][pathfind datum] since it uses variables from said datum.
+If you really want to optimize things, optimize this, cuz this gets called a lot.
Returns the top-most atom sitting on the turf.
+For example, using this on a disk, which is in a bag, on a mob,
+will return the mob because it's on the turf.
This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers.
+
Emissive overlays are pasted with an atom color that converts them to be entirely some specific color.
+Emissive blockers are pasted with an atom color that converts them to be entirely some different color.
+Emissive overlays and emissive blockers are put onto the same plane.
+The layers for the emissive overlays and emissive blockers cause them to mask eachother similar to normal BYOND objects.
+A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is.
+This is then used to alpha mask the lighting plane.
Enables the FoV component, which hides objects and mobs behind the parent from their sight, unless they turn around, duh.
+Camera mobs, AIs, ghosts and some other are of course exempt from this. This also doesn't influence simplemob AI, for the best.
maximum extensions until the round autoends.
+Set to 0 to force automatic crew transfer after the 'vote_autotransfer_initial' elapsed.
+Set to -1 to disable the maximum extensions cap.
Start of queue linked list
+End of queue linked list (used for appending to the list)
+Are we loading in a new map?
+for scheduling different subsystems for different stages of the round
In order to debug qdel() failures, there are several tools available.
+To enable these tools, define TESTING in _compile_options.dm.
+
First is a verb called "Find References", which lists every refererence to an object in the world. This allows you to track down any indirect or obfuscated references that you might have missed.
+
Complementing this is another verb, "qdel() then Find References".
+This does exactly what you'd expect; it calls qdel() on the object and then it finds all references remaining.
+This is great, because it means that Destroy() will have been called before it starts to find references,
+so the only references you'll find will be the ones preventing the object from qdel()ing gracefully.
+
If you have a datum or something you are not destroying directly (say via the singulo),
+the next tool is QDEL_HINT_FINDREFERENCE. You can return this in Destroy() (where you would normally return ..()),
+to print a list of references once it enters the GC queue.
+
Finally is a verb, "Show qdel() Log", which shows the deletion log that the garbage subsystem keeps. This is helpful if you are having race conditions or need to review the order of deletions.
+
Note that for any of these tools to work TESTING must be defined.
+By using these methods of finding references, you can make your life far, far easier when dealing with qdel() failures.
Qdel Item: Holds statistics on each type that passes thru qdel
+Holds the type as a string for this type
+Total number of times it's passed thru qdel.
+Total amount of milliseconds spent processing this type's Destroy()
+Times it was queued for soft deletion but failed to soft delete.
+Different from failures because it also includes QDEL_HINT_HARDDEL deletions
+Total amount of milliseconds spent hard deleting this type.
+Highest time spent hard_deleting this in ms.
+Number of times hard deletes took longer than the configured threshold
+Number of times it's not respected force=TRUE
+Number of times it's not even bother to give a qdel hint
+Number of times it's slept in its destroy
How material datums work
+Materials are now instanced datums, with an associative list of them being kept in SSmaterials. We only instance the materials once and then re-use these instances for everything.
+
These materials call on_applied() on whatever item they are applied to, common effects are adding components, changing color and changing description. This allows us to differentiate items based on the material they are made out of.area
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.
Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a SendSignal() call. Now every component that want's to can also know about this happening.
+
See this thread for an introduction to the system as a whole.
Combat mode component. It makes the user face whichever atom the mouse pointer is hovering,
+amongst other things designed outside of this file, namely PvP and PvE stuff, hence the name.
+Can be toggled on and off by clicking the screen hud object or by pressing the assigned hotkey (default 'C')
This component makes it possible to make things edible. What this means is that you can take a bite or force someone to take a bite (in the case of items).
+These items take a specific time to eat, and can do most of the things our original food items could.
+Behavior that's still missing from this component that original food items had that should either be put into seperate components or somewhere else:
+Components:
+Drying component (jerky etc)
+Customizable component (custom pizzas etc)
+Processable component (Slicing and cooking behavior essentialy, making it go from item A to B when conditions are met.)
+Dunkable component (Dunking things into reagent containers to absorb a specific amount of reagents)
+Misc:
+Something for cakes (You can store things inside)
Component specifically for explosion sensetive things, currently only applies to heat based explosions but can later perhaps be used for things that are dangerous to handle carelessly like nitroglycerin.
Byond doc is not entirely correct on the integrated arctan() proc.
+When both x and y are negative, the output is also negative, cycling clockwise instead of counter-clockwise.
+That's also why I am extensively using the SIMPLIFY_DEGREES macro here.
Byond doc is not entirely correct on the integrated arctan() proc.
+When both x and y are negative, the output is also negative, cycling clockwise instead of counter-clockwise.
+That's also why I am extensively using the SIMPLIFY_DEGREES macro here.
+
Overall this is the main macro that calculates wheter a target is within the shadow cone angle or not.
This component essentially encapsulates frying and utilizes the edible component
+This means fried items can work like regular ones, and generally the code is far less messy
This datum should be used for handling mineral contents of machines and whatever else is supposed to hold minerals and make use of them.
+
Variables:
+amount - raw amount of the mineral this container is holding, calculated by the defined value MINERAL_MATERIAL_AMOUNT=2000.
+max_amount - max raw amount of mineral this container can hold.
+sheet_type - type of the mineral sheet the container handles, used for output.
+parent - object that this container is being used by, used for output.
+MAX_STACK_SIZE - size of a stack of mineral sheets. Constant.
A simple component that spawns a mob of the same type and transfers itself to it when parent dies.
+For more complex behaviors, use the COMSIG_ON_MULTIPLE_LIVES_RESPAWN comsig.
The magical plumbing component used by the chemical filters. The different supply connects behave differently depending on the filters set on the chemical filter
The virtual reality turned component.
+Originally created to overcome issues of mob polymorphing locking the player inside virtual reality
+and allow for a more "immersive" virtual reality in a virtual reality experience.
+It relies on comically complex order of logic, expect things to break if procs such as mind/transfer_to() are revamped.
+In short, a barebone not so hardcoded VR framework.
+If you plan to add more devices that make use of this component, remember to isolate their code outta here where possible.
Contextual screentips (and when to not use this folder)
+
+
+
+
+
Contextual screentips provide information in the form of text at the top of your screen to inform you of the possibilities of an item. The "contextual" here refers to this being handled entirely through code, what it displays and when is completely up to you.
+
The elements (and this folder)
+
This folder provides several useful shortcuts to be able to handle 95% of situations.
+
/datum/element/contextual_screentip_bare_hands
+
This element is used to display screentips when the user hovers over the object with nothing in their active hand.
+
It takes parameters in the form of both non-combat mode and, optionally, combat mode.
This will display "LMB: Turn on | RMB: Turn off" when the user hovers over a fire alarm with an empty active hand.
+
/datum/element/contextual_screentip_tools
+
This element takes a map of tool behaviors to context lists. These will be displayed when the user hovers over the object with an item that has the tool behavior.
This will display "LMB: Craft bola" when the user hovers over cable restraints with metal in their hand.
+
The basic system (and when to not use this folder)
+
The basic system acknowledges the following two interactions:
+
Self-defining items (Type A)
+
These are items that are defined by their behavior. These should define their contextual text within themselves, and not in their targets.
+
+
Stun batons (LMB to stun, RMB to harm)
+
Syringes (LMB to inject, RMB to draw)
+
Health analyzers (LMB to scan for health/wounds [another piece of context], RMB to scans for chemicals)
+
+
Receiving action defining objects (Type B)
+
These are objects (not necessarily items) that are defined by what happens to them. These should define their contextual text within themselves, and not in their operating tools.
+
+
Tables (RMB with wrench to deconstruct)
+
Construction objects (LMB with glass to put in screen for computers)
+
Carbon copies (RMB to take a copy)
+
+
+
Both of these are supported, and can be hooked to through several means.
+
Note that you must return CONTEXTUAL_SCREENTIP_SET if you change the contextual screentip at all, otherwise you may not see it.
+
COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET
+
This signal is registered on items, and receives the hovering object, provided in the form of obj/item/source, list/context, atom/target, mob/living/user.
+
/atom/proc/register_item_context(), and /atom/proc/add_item_context()
+
/atom/proc/add_item_context() is a proc intended to be overridden to easily create Type-B interactions (ones where atoms are hovered over by items). It receives the exact same arguments as COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET: obj/item/source, list/context, atom/target, mob/living/user.
+
In order for your add_item_context() method to be run, you must call register_item_context().
+
COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM
+
This signal is registered on atoms, and receives what the user is hovering with, provided in the form of atom/source, list/context, obj/item/held_item, mob/living/user.
+
/atom/proc/register_context(), and /atom/proc/add_context()
+
/atom/proc/add_context() is a proc intended to be overridden to easily create Type-B interactions (ones where atoms are hovered over by items). It receives the exact same arguments as COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM: atom/source, list/context, obj/item/held_item, mob/living/user.
+
In order for your add_context() method to be run, you must call register_context().
+
+
When using any of these methods, you will receive a mutable context list.
+
Context lists
+
Context lists are lists with keys mapping from SCREENTIP_CONTEXT_* to a string. You can find these keys in code/__DEFINES/screentips.dm.
+
The signals and add_context() variants mutate the list directly, while shortcut elements will just have you pass them in directly.
Apply basic contextual screentips when the user hovers over this item with an empty hand.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
Apply basic contextual screentips when the user hovers over this item with a provided item.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
Apply basic contextual screentips when the user hovers over this item with an item of the given tool behavior.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
Apply basic contextual screentips when the user hovers over this item with an item of the given tool behavior.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
This type is responsible for any map generation behavior that is done in areas, override this to allow for area-specific map generation. This generation is ran by areas in initialize.
Simple datum which is instanced once per type and is used for every object of said material. It has a variety of variables that define behavior. Subtyping from this makes it easier to create your own materials.
Base skill modifier datum, used to modify a player skills without directly touching their values, levels and affinity
+and cause lots of edge cases. These are fairly simple overall... make a subtype though, don't use this one.
Status effect from multiple sources, when all sources are removed, so is the effect
+Adds itself to sources and destroys itself if one exists already, there are never multiple
scars are cosmetic datums that are assigned to bodyparts once they recover from wounds. Each wound type and severity have their own descriptions for what the scars
+look like, and then each body part has a list of "specific locations" like your elbow or wrist or wherever the scar can appear, to make it more interesting than "right arm"
log_wound() is for when someone is attacked and suffers a wound. Note that this only captures wounds from damage, so smites/forced wounds aren't logged, as well as demotions like cuts scabbing over
This threat is split into two separate budgets--round_start_budget and mid_round_budget. For example, a round with 50 threat might be split into a 30 roundstart budget, and a 20 midround budget. The roundstart budget is used to apply antagonists applied on readied players when the roundstarts (/datum/dynamic_ruleset/roundstart). The midround budget is used for two types of rulesets:
+
+
/datum/dynamic_ruleset/midround - Rulesets that apply to either existing alive players, or to ghosts. Think Blob or Space Ninja, which poll ghosts asking if they want to play as these roles.
+
/datum/dynamic_ruleset/latejoin - Rulesets that apply to the next player that joins. Think Syndicate Infiltrator, which converts a player just joining an existing round into traitor.
+
+
This split is done with a similar method, known as the "lorentz distribution", exists to create a bell curve that ensures that while most rounds will have a threat level around ~50, chaotic and tame rounds still exist for variety.
+
The process of creating these numbers occurs in /datum/game_mode/dynamic/proc/generate_threat (for creating the threat level) and /datum/game_mode/dynamic/proc/generate_budgets (for splitting the threat level into budgets).
+
Deciding roundstart threats
+
In /datum/game_mode/dynamic/proc/roundstart() (called when no admin chooses the rulesets explicitly), Dynamic uses the available roundstart budget to pick threats. This is done through the following system:
+
+
All roundstart rulesets (remember, /datum/dynamic_ruleset/roundstart) are put into an associative list with their weight as the values (drafted_rules).
+
Until there is either no roundstart budget left, or until there is no ruleset we can choose from with the available threat, a pickweight is done based on the drafted_rules. If the same threat is picked twice, it will "scale up". The meaning of this depends on the ruleset itself, using the scaled_times variable; traitors for instance will create more the higher they scale.
+
+
If a ruleset is chosen with the HIGH_IMPACT_RULESET in its flags, then all other HIGH_IMPACT_RULESETs will be removed from drafted_rules. This is so that only one can ever be chosen.
+
If a ruleset has LONE_RULESET in its flags, then it will be removed from drafted_rules. This is to ensure it will only ever be picked once. An example of this in use is Wizard, to avoid creating multiple wizards.
+
+
+
After all roundstart threats are chosen, /datum/dynamic_ruleset/proc/picking_roundstart_rule is called for each, passing in the ruleset and the number of times it is scaled.
+
+
In this stage, pre_execute is called, which is the function that will determine what players get what antagonists. If this function returns FALSE for whatever reason (in the case of an error), then its threat is refunded.
+
+
+
+
After this process is done, any leftover roundstart threat will be given to the existing midround budget (done in /datum/game_mode/dynamic/pre_setup()).
+
Deciding midround threats
+
Latejoin and midround injection cooldowns are set using exponential distribution between
+
+
5 minutes and 25 for latejoin (configurable as latejoin_delay_min and latejoin_delay_max)
+
15 minutes and 35 for midround (configurable as midround_delay_min and midround_delay_max)
+
+
this value is then added to world.time and assigned to the injection cooldown variables.
+
rigged_roundstart is called instead if there are forced rules (an admin set the mode)
Calls rule_process on every rule which is in the current_rules list.
+Every sixty seconds, update_playercounts()
+Midround injection time is checked against world.time to see if an injection should happen.
+If midround injection time is lower than world.time, it updates playercounts again, then tries to inject and generates a new cooldown regardless of whether a rule is picked.
+
Latejoin
+
make_antag_chance(newPlayer) -> (For each latespawn rule...)
+-> acceptable(living players, threat_level) -> trim_candidates() -> ready(forced=FALSE)
+**If true, add to drafted rules
+**NOTE that acceptable uses threat_level not threat!
+**NOTE Latejoin timer is ONLY reset if at least one rule was drafted.
+**NOTE the new_player.dm AttemptLateSpawn() calls OnPostSetup for all roles (unless assigned role is MODE)
For latejoin, it simply sets forced_latejoin_rule
+make_antag_chance(newPlayer) -> trim_candidates() -> ready(forced=TRUE) **NOTE no acceptable() call
+
For midround, calls the below proc with forced = TRUE
+picking_specific_rule(ruletype,forced) -> forced OR acceptable(living_players, threat_level) -> trim_candidates() -> ready(forced) -> spend threat -> execute()
+**NOTE specific rule can be called by RS traitor->MR autotraitor w/ forced=FALSE
+**NOTE that due to short circuiting acceptable() need not be called if forced.
+
Ruleset
+
acceptable(population,threat) just checks if enough threat_level for population indice.
+**NOTE that we currently only send threat_level as the second arg, not threat.
+ready(forced) checks if enough candidates and calls the map's map_ruleset(dynamic_ruleset) at the parent level
+
trim_candidates() varies significantly according to the ruleset type
+Roundstart: All candidates are new_player mobs. Check them for standard stuff: connected, desire role, not banned, etc.
+**NOTE Roundstart deals with both candidates (trimmed list of valid players) and mode.candidates (everyone readied up). Don't confuse them!
+Latejoin: Only one candidate, the latejoiner. Standard checks.
+Midround: Instead of building a single list candidates, candidates contains four lists: living, dead, observing, and living antags. Standard checks in trim_list(list).
+
Midround - Rulesets have additional types
+/from_ghosts: execute() -> send_applications() -> review_applications() -> finish_setup(mob/newcharacter, index) -> setup_role(role)
+**NOTE: execute() here adds dead players and observers to candidates list
+
Configuration and variables
Configuration
+
Configuration can be done through a config/dynamic.json file. One is provided as example in the codebase. This config file, loaded in /datum/game_mode/dynamic/pre_setup(), directly overrides the values in the codebase, and so is perfect for making some rulesets harder/easier to get, turning them off completely, changing how much they cost, etc.
+
The format of this file is:
+
{
+ "Dynamic": {
+ /* Configuration in here will directly override `/datum/game_mode/dynamic` itself. */
+ /* Keys are variable names, values are their new values. */
+ },
+
+ "Roundstart": {
+ /* Configuration in here will apply to `/datum/dynamic_ruleset/roundstart` instances. */
+ /* Keys are the ruleset names, values are another associative list with keys being variable names and values being new values. */
+ "Wizard": {
+ /* I, a head admin, have died to wizard, and so I made it cost a lot more threat than it does in the codebase. */
+ "cost": 80
+ }
+ },
+
+ "Midround": {
+ /* Same as "Roundstart", but for `/datum/dynamic_ruleset/midround` instead. */
+ },
+
+ "Latejoin": {
+ /* Same as "Roundstart", but for `/datum/dynamic_ruleset/latejoin` instead. */
+ }
+}
+
+
Note: Comments are not possible in this format, and are just in this document for the sake of readability.
+
Rulesets
+
Rulesets have the following variables notable to developers and those interested in tuning.
+
+
required_candidates - The number of people that must be willing (in their preferences) to be an antagonist with this ruleset. If the candidates do not meet this requirement, then the ruleset will not bother to be drafted.
+
antag_cap - Judges the amount of antagonists to apply, for both solo and teams. Note that some antagonists (such as traitors, lings, heretics, etc) will add more based on how many times they've been scaled. Written as a linear equation--ceil(x/denominator) + offset, or as a fixed constant. If written as a linear equation, will be in the form of list("denominator" = denominator, "offset" = offset).
+
+
Examples include:
+
+
Traitor: antag_cap = list("denominator" = 24). This means that for every 24 players, 1 traitor will be added (assuming no scaling).
+
Nuclear Emergency: antag_cap = list("denominator" = 18, "offset" = 1). For every 18 players, 1 nuke op will be added. Starts at 1, meaning at 30 players, 3 nuke ops will be created, rather than 2.
+
Revolution: antag_cap = 3. There will always be 3 rev-heads, no matter what.
+
+
+
+
+
minimum_required_age - The minimum age in order to apply for the ruleset.
+
weight - How likely this ruleset is to be picked. A higher weight results in a higher chance of drafting.
+
cost - The initial cost of the ruleset. This cost is taken from either the roundstart or midround budget, depending on the ruleset.
+
scaling_cost - Cost for every additional application of this ruleset.
+
+
Suppose traitors has a cost of 8, and a scaling_cost of 5. This means that buying 1 application of the traitor ruleset costs 8 threat, but buying two costs 13 (8 + 5). Buying it a third time is 18 (8 + 5 + 5), etc.
+
+
+
pop_per_requirement - The range of population each value in requirements represents. By default, this is 6.
+
+
If the value is five the range is 0-4, 5-9, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, 40-54, 45+.
+
If it is six the range is 0-5, 6-11, 12-17, 18-23, 24-29, 30-35, 36-41, 42-47, 48-53, 54+.
+
If it is seven the range is 0-6, 7-13, 14-20, 21-27, 28-34, 35-41, 42-48, 49-55, 56-62, 63+.
+
+
+
requirements - A list that represents, per population range (see: pop_per_requirement), how much threat is required to consider this ruleset. This is independent of how much it'll actually cost. This uses threat level, not the budget--meaning if a round has 50 threat level, but only 10 points of round start threat, a ruleset with a requirement of 40 can still be picked if it can be bought.
+
+
Suppose wizard has a requirements of list(90,90,70,40,30,20,10,10,10,10). This means that, at 0-5 and 6-11 players, A station must have 90 threat in order for a wizard to be possible. At 12-17, 70 threat is required instead, etc.
+
+
+
restricted_roles - A list of jobs that can't be drafted by this ruleset. For example, cyborgs cannot be changelings, and so are in the restricted_roles.
+
protected_roles - Serves the same purpose of restricted_roles, except it can be turned off through configuration (protect_roles_from_antagonist). For example, security officers shouldn't be made traitor, so they are in Traitor's protected_roles.
+
+
When considering putting a role in protected_roles or restricted_roles, the rule of thumb is if it is technically infeasible to support that job in that role. There's no technical reason a security officer can't be a traitor, and so they are simply in protected_roles. There are technical reasons a cyborg can't be a changeling, so they are in restricted_roles instead.
+
+
+
+
Dynamic
+
The "Dynamic" key has the following configurable values:
+
+
pop_per_requirement - The default value of pop_per_requirement for any ruleset that does not explicitly set it. Defaults to 6.
+
latejoin_delay_min, latejoin_delay_max - The time range, in deciseconds (take your seconds, and multiply by 10), for a latejoin to attempt rolling. Once this timer is finished, a new one will be created within the same range.
+
+
Suppose you have a latejoin_delay_min of 600 (60 seconds, 1 minute) and a latejoin_delay_max of 1800 (180 seconds, 3 minutes). Once the round starts, a random number in this range will be picked--let's suppose 1.5 minutes. After 1.5 minutes, Dynamic will decide if a latejoin threat should be created (a probability of /datum/game_mode/dynamic/proc/get_injection_chance()). Regardless of its decision, a new timer will be started within the range of 1 to 3 minutes, repeatedly.
+
+
+
midround_delay_min, midround_delay_max - Same as latejoin_delay_min and latejoin_delay_max, except for midround threats instead of latejoin ones.
+
higher_injection_chance, higher_injection_chance_minimum_threat - Manipulates the injection chance (/datum/game_mode/dynamic/proc/get_injection_chance()). If the current midround budget is above higher_injection_chance_minimum_threat, then this chance will be increased by higher_injection_chance.
+
+
For example: suppose you have a higher_injection_chance_minimum_threat of 70, and a higher_injection_chance of 15. This means that, if when a midround threat is trying to roll, there is 75 midround budget left, then the injection chance will go up 15%.
+
+
+
lower_injection_chance, lower_injection_chance_minimum_threat - The inverse of the higher_injection_chance variables. If the current midround budget is belowlower_injection_chance, then the chance is lowered by lower_injection_chance_minimum_threat.
+
+
For example: suppose you have a lower_injection_chance_minimum_threat of 30, and a lower_injection_chance of 15. This means if there is 20 midround budget left, then the chance will lower by 15%.
+
+
+
threat_curve_centre - A number between -5 and +5. A negative value will give a more peaceful round and a positive value will give a round with higher threat.
+
threat_curve_width - A number between 0.5 and 4. Higher value will favour extreme rounds and lower value rounds closer to the average.
+
roundstart_split_curve_centre - A number between -5 and +5. Equivalent to threat_curve_centre, but for the budget split. A negative value will weigh towards midround rulesets, and a positive value will weight towards roundstart ones.
+
roundstart_split_curve_width - A number between 0.5 and 4. Equivalent to threat_curve_width, but for the budget split. Higher value will favour more variance in splits and lower value rounds closer to the average.
+
random_event_hijack_minimum - The minimum amount of time for antag random events to be hijacked. (See Random Event Hijacking)
+
random_event_hijack_maximum - The maximum amount of time for antag random events to be hijacked. (See Random Event Hijacking)
+
hijacked_random_event_injection_chance - The amount of injection chance to give to Dynamic when a random event is hijacked. (See Random Event Hijacking)
+
+
Random Event "Hijacking"
+
Random events have the potential to be hijacked by Dynamic to keep the pace of midround injections, while also allowing greenshifts to contain some antagonists.
+
/datum/round_event_control/dynamic_should_hijack is a variable to random events to allow Dynamic to hijack them, and defaults to FALSE. This is set to TRUE for random events that spawn antagonists.
+
In /datum/game_mode/dynamic/on_pre_random_event (in dynamic_hijacking.dm), Dynamic hooks to random events. If the dynamic_should_hijack variable is TRUE, the following sequence of events occurs:
+
+
n is a random value between random_event_hijack_minimum and random_event_hijack_maximum. Injection chance, should it need to be raised, is increased by hijacked_random_event_injection_chance.
Probability the AI going malf will be accompanied by an ion storm announcement and some ion laws.
+The probability to replace an existing law with an ion law instead of adding a new ion law.
Upon completion of a civilian bounty, one of these is created. It is sold to cargo to give the cargo budget bounty money, and the person who completed it cash.
///// Attach a trail to any object, that spawns when it moves (like for the jetpack)
+just pass in the object to attach it to in set_up
+Then do start() to start it and stop() to stop it, obviously
+and don't call start() in a loop that will be repeated otherwise it'll get spammed!
playsound is a proc used to play a 3D sound in a specific range. This uses SOUND_RANGE + extra_range to determine that.
+
source - Origin of sound
+soundin - Either a file, or a string that can be used to get an SFX
+vol - The volume of the sound, excluding falloff and pressure affection.
+vary - bool that determines if the sound changes pitch every time it plays
+extrarange - modifier for sound range. This gets added on top of SOUND_RANGE
+falloff_exponent - Rate of falloff for the audio. Higher means quicker drop to low volume. Should generally be over 1 to indicate a quick dive to 0 rather than a slow dive.
+frequency - playback speed of audio
+channel - The channel the sound is played at
+pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space)
+ignore_walls - Whether or not the sound can pass through walls.
+falloff_distance - Distance at which falloff begins. Sound is at peak volume (in regards to falloff) aslong as it is in this range.
+
playsound
+
playsound_local is a proc used to play a sound directly on a mob from a specific turf.
+This is called by playsound to send sounds to players, in which case it also gets the max_distance of that sound.
+
turf_source - Origin of sound
+soundin - Either a file, or a string that can be used to get an SFX
+vol - The volume of the sound, excluding falloff
+vary - bool that determines if the sound changes pitch every time it plays
+frequency - playback speed of audio
+falloff_exponent - Rate of falloff for the audio. Higher means quicker drop to low volume. Should generally be over 1 to indicate a quick dive to 0 rather than a slow dive.
+channel - The channel the sound is played at
+pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space)
+max_distance - The peak distance of the sound, if this is a 3D sound
+falloff_distance - Distance at which falloff begins, if this is a 3D sound
+distance_multiplier - Can be used to multiply the distance at which the sound is heard
Action speed is now calculated by using modifier datums which are added to mobs. Some of them (nonvariable ones) are globally cached, the variable ones are instanced and changed based on need.
+
This gives us the ability to have multiple sources of actionspeed, reliabily keep them applied and remove them when they should be
+
THey can have unique sources and a bunch of extra fancy flags that control behaviour
+
Previously trying to update action speed was a shot in the dark that usually meant mobs got stuck going faster or slower
+
Actionspeed modification list is a simple key = datum system. Key will be the datum's ID if it is overridden to not be null, or type if it is not.
+
DO NOT override datum IDs unless you are going to have multiple types that must overwrite each other. It's more efficient to use types, ID functionality is only kept for cases where dynamic creation of modifiers need to be done.
+
When update actionspeed is called, the list of items is iterated, according to flags priority and a bunch of conditions
+this spits out a final calculated value which is used as a modifer to last_move + modifier for calculating when a mob
+can next move
Grabs a STATIC MODIFIER datum from cache. YOU MUST NEVER EDIT THESE DATUMS, OR IT WILL AFFECT ANYTHING ELSE USING IT TOO!
+
Used for variable slowdowns like hunger/health loss/etc, works somewhat like the old list-based modification adds. Returns the modifier datum if successful
+How this SHOULD work is:
+1. Ensures type_id_datum one way or another refers to a /variable datum. This makes sure it can't be cached. This includes if it's already in the modification list.
+2. Instantiate a new datum if type_id_datum isn't already instantiated + in the list, using the type. Obviously, wouldn't work for ID only.
+3. Add the datum if necessary using the regular add proc
+4. If any of the rest of the args are not null (see: multiplicative slowdown), modify the datum
+5. Update if necessary
What we want is the 3 tiles around the user and the tile under him to be rusted, so min(dist,1)-1 causes us to get 0 for these tiles, rest of the tiles are based on chance
We're not regenerating already completed/aborted/extracting contracts, but we don't want to repeat their targets.
+Reroll contracts without duplicates
+Set our target list with the new set we've generated.
Framework for managing browser assets (javascript,css,images,etc)
+
This manages getting the asset to the client without doing unneeded re-sends, as well as utilizing any configured cdns.
+
There are two frameworks for using this system:
+
Asset datum:
+
Make a datum in asset_list_items.dm with your browser assets for your thing.
+
Checkout asset_list.dm for the helper subclasses
+
The simple subclass will most likely be of use for most cases.
+
Call get_asset_datum() with the type of the datum you created to get your asset cache datum
+
Call .send(client|usr) on that datum to send the asset to the client. Depending on the asset transport this may or may not block.
+
Call .get_url_mappings() to get an associated list with the urls your assets can be found at.
+
Manual backend:
+
See the documentation for /datum/asset_transport for the backend api the asset datums utilize.
+
The global variable SSassets.transport contains the currently configured transport.
+
Notes:
+
Because byond browse() calls use non-blocking queues, if your code uses output() (which bypasses all of these queues) to invoke javascript functions you will need to first have the javascript announce to the server it has loaded before trying to invoke js functions.
+
To make your code work with any CDNs configured by the server, you must make sure assets are referenced from the url returned by get_url_mappings() or by asset_transport's get_asset_url(). (TGUI also has helpers for this.) If this can not be easily done, you can bypass the cdn using legacy assets, see the simple asset datum for details.
+
CSS files that use url() can be made to use the CDN without needing to rewrite all url() calls in code by using the namespaced helper datum. See the documentation for /datum/asset/simple/namespaced for details.
Namespace'ed assets (for static css and html files)
+When sent over a cdn transport, all assets in the same asset datum will exist in the same folder, as their plain names.
+Used to ensure css files can reference files by url() without having to generate the css at runtime, both the css file and the files it depends on must exist in the same namespace asset datum. (Also works for html)
+For example blah.css with asset blah.png will get loaded as namespaces/a3d..14f/f12..d3c.css and namespaces/a3d..14f/blah.png. allowing the css file to load blah.png by a relative url rather then compute the generated url with get_url_mappings().
+The namespace folder's name will change if any of the assets change. (excluding parent assets)
Places that shouldn't explode
+Subtypes from the above that actually should explode.
+A rare variant that drops a crate containing syndicate uplink items
This whole system is heavily based off of forum_account's keyboard library.
+Thanks to forum_account for saving the day, the library can be found
+here!
+
.dmf macros have some very serious shortcomings. For example, they do not allow reusing parts
+of one macro in another, so giving cyborgs their own shortcuts to swap active module couldn't
+inherit the movement that all mobs should have anyways. The webclient only supports one macro,
+so having more than one was problematic. Additionally each keybind has to call an actual
+verb, which meant a lot of hidden verbs that just call one other proc. Also our existing
+macro was really bad and tied unrelated behavior into Northeast(), Southeast(), Northwest(),
+and Southwest().
+
The basic premise of this system is to not screw with .dmf macro setup at all and handle
+pressing those keys in the code instead. We have every key call client.keyDown()
+or client.keyUp() with the pressed key as an argument. Certain keys get processed
+directly by the client because they should be doable at any time, then we call
+keyDown() or keyUp() on the client's holder and the client's mob's focus.
+By default mob.focus is the mob itself, but you can set it to any datum to give control of a
+client's keypresses to another object. This would be a good way to handle a menu or driving
+a mech. You can also set it to null to disregard input from a certain user.
+
Movement is handled by having each client call client.keyLoop() every game tick.
+As above, this calls holder and focus.keyLoop(). atom/movable/keyLoop() handles movement
+Try to keep the calculations in this proc light. It runs every tick for every client after all!
+
You can also tell which keys are being held down now. Each client a list of keys pressed called
+keys_held. Each entry is a key as a text string associated with the world.time when it was
+pressed.
+
No client-set keybindings at this time, but it shouldn't be too hard if someone wants.
+
Notes about certain keys:
+
+
Tab has client-sided behavior but acts normally
+
T, O, and M move focus to the input when pressed. This fires the keyUp macro right away.
+
\ needs to be escaped in the dmf so any usage is \\
+
+
You cannot TICK_CHECK or check world.tick_usage inside of procs called by key down and up
+events. They happen outside of a byond tick and have no meaning there. Key looping
+works correctly since it's part of a subsystem, not direct input.
Language holders will either exist in an atom/movable or a mind. Creation of language holders happens
+automatically when they are needed, for example when something tries to speak.
+Where a mind is available, the mind language holder will be the one "in charge". The mind holder
+will update its languages based on the atom holder, and will get updated as part of
+transformations and other events that cause new languages to become available.
+Every language holder has three lists of languages (and sources for each of them):
+
+
understood_languages
+
spoken_languages
+
blocked_languages
+Understood languages let you understand them, spoken languages lets you speak them
+(if your tongue is compatible), and blocked languages will let you do neither no matter
+what the source of the language is.
+Language holders are designed to mostly only ever require the use the helpers in atom/movable
+to achieve your goals, but it is also possible to work on them directly if needed. Any adding
+and removing of languages and sources should only happen through the procs, as directly changing
+these will mess something up somewhere down the line.
+All atom movables have the initial_language_holder var which allows you to set the default language
+holder to create. For example, /datum/language_holder/alien will give you xenocommon and a block for
+galactic common. Human species also have a default language holder var that will be updated on
+species change, initial_species_holder.
+Key procs
The code in this module originally evolved from dmm_suite and has since been
+specialized for SS13 and otherwise tweaked to fit /tg/station's needs.
+
+dmm_suite version 1.0
+ Released January 30th, 2011.
+
+NOTE: Map saving functionality removed
+
+defines the object /dmm_suite
+ - Provides the proc load_map()
+ - Loads the specified map file onto the specified z-level.
+ - provides the proc write_map()
+ - Returns a text string of the map in dmm format
+ ready for output to a file.
+ - provides the proc save_map()
+ - Returns a .dmm file if map is saved
+ - Returns FALSE if map fails to save
+
+The dmm_suite provides saving and loading of map files in BYOND's native DMM map
+format. It approximates the map saving and loading processes of the Dream Maker
+and Dream Seeker programs so as to allow editing, saving, and loading of maps at
+runtime.
+
+------------------------
+
+To save a map at runtime, create an instance of /dmm_suite, and then call
+write_map(), which accepts three arguments:
+ - A turf representing one corner of a three dimensional grid (Required).
+ - Another turf representing the other corner of the same grid (Required).
+ - Any, or a combination, of several bit flags (Optional, see documentation).
+
+The order in which the turfs are supplied does not matter, the /dmm_writer will
+determine the grid containing both, in much the same way as DM's block() function.
+write_map() will then return a string representing the saved map in dmm format;
+this string can then be saved to a file, or used for any other purose.
+
+------------------------
+
+To load a map at runtime, create an instance of /dmm_suite, and then call load_map(),
+which accepts two arguments:
+ - A .dmm file to load (Required).
+ - A number representing the z-level on which to start loading the map (Optional).
+
+The /dmm_suite will load the map file starting on the specified z-level. If no
+z-level was specified, world.maxz will be increased so as to fit the map. Note
+that if you wish to load a map onto a z-level that already has objects on it,
+you will have to handle the removal of those objects. Otherwise the new map will
+simply load the new objects on top of the old ones.
+
+Also note that all type paths specified in the .dmm file must exist in the world's
+code, and that the /dmm_reader trusts that files to be loaded are in fact valid
+.dmm files. Errors in the .dmm format will cause runtime errors.
+
CLICKDELAY HANDLING SYSTEM
+How this works is mobs can never do actions until their next_action is at or below world.time, but things can specify extra cooldown
+to check for either from the time of last_action or from the end of next_action.
Proc that actually does the grab resisting. Return TRUE if successful. Does not check that a grab exists! Use attempt_resist_grab() instead of this in general!
+Forced is if something other than the user mashing movement keys/pressing resist button did it, silent is if it makes messages (like "attempted to resist" and "broken free").
+Forced does NOT force success!
A stronger, faster variation of the goliath. Has the ability to spawn baby goliaths, which it can later detonate at will.
+When it's health is below half, tendrils will spawn randomly around it. When it is below a quarter of health, this effect is doubled.
+It's attacks are as follows:
A slow-moving projectile user with a few tricks up it's sleeve. Less unga-bunga than Colossus, with more cleverness in it's fighting style.
+As it's health gets lower, the amount of projectiles fired per-attack increases.
+It's attacks are as follows:
A box with a similar design to the Hierophant which trades large, single attacks for more frequent smaller ones.
+As it's health gets lower, the time between it's attacks decrease.
+It's attacks are as follows:
Injector - No piercing syringes, replace another time
+Organ Thrower
+Patrient Transport
+Defibrillator - Gives the suit an extendable pair of shock paddles.
Ok. so a quick rundown on how to make a program. This is kind of a shitty documentation, but oh well I was asked to.
+
Base setup
+
This is how the base program is setup. the rest is mostly tgui stuff. I'll use the ntnetmonitor as a base
+
/datum/computer_file/program/ntnetmonitor
+ /// This is obviously the name of the file itself. not much to be said
+ filename = "ntmonitor"
+
+ /// This is sort of the official name. it's what shows up on the main menu
+ filedesc = "NTNet Diagnostics and Monitoring"
+
+ /// This is what the screen will look like when the program is active
+ program_icon_state = "comm_monitor"
+
+ /// This is a sort of a description, visible when looking on the ntnet
+ extended_desc = "This program is a dummy."
+
+ /// size of the program. Big programs need more hard drive space. Don't
+ /// make it too big though.
+ size = 12
+
+ /// If this is set, the program will not run without an ntnet connection,
+ /// and will close if the connection is lost. Mainly for primarily online
+ /// programs.
+ requires_ntnet = 1
+
+ /// This is access required to run the program itself. ONLY SET THIS FOR
+ /// SUPER SECURE SHIT. This also acts as transfer_access as well.
+ required_access = access_network
+
+ /// This is the access needed to download from ntnet or host on the ptp
+ /// program. This is what you want to use most of the time.
+ transfer_access = access_change_ids
+
+ /// If it's available to download on ntnet. pretty self explanatory.
+ available_on_ntnet = 1
+
+ /// ditto but on emagged syndie net. Use this for antag programs
+ available_on_syndinet = 0
+
+ /// Bitflags (PROGRAM_CONSOLE, PROGRAM_LAPTOP, PROGRAM_TABLET combination)
+ /// or PROGRAM_ALL. Use this to limit what kind of machines can run the
+ /// program. For example, comms program should be limited to consoles and laptops.
+ usage_flags = PROGRAM_ALL
+
+ /// This one is kinda cool. If you have the program minimized, this will
+ /// show up in the header of the computer screen. You can even have the
+ /// program change what the header is based on the situation! See `alarm.dm`
+ /// for an example.
+ var/ui_header = "downloader_finished.gif"
+
+
Preinstalls
+
Now. for pre-installing stuff.
+
Primarily done for consoles, there's an install_programs() proc in the console presets file in the machines folder.
Basically, you want to do cpu.hard_drive.store_file(new/program path here()) and put it in the subtype's install_programs().
+Probably pretty self explanatory, but just in case.
+
Will probably be expanded when new features come around or I get asked to mention something.
This recharger exists only in borg built-in tablets. I would have tied it to the borg's cell but
+the program that displays laws should always be usable, and the exceptions were starting to pile.
Move speed is now calculated by using modifier datums which are added to mobs. Some of them (nonvariable ones) are globally cached, the variable ones are instanced and changed based on need.
+
This gives us the ability to have multiple sources of movespeed, reliabily keep them applied and remove them when they should be
+
THey can have unique sources and a bunch of extra fancy flags that control behaviour
+
Previously trying to update move speed was a shot in the dark that usually meant mobs got stuck going faster or slower
+
Movespeed modification list is a simple key = datum system. Key will be the datum's ID if it is overridden to not be null, or type if it is not.
+
DO NOT override datum IDs unless you are going to have multiple types that must overwrite each other. It's more efficient to use types, ID functionality is only kept for cases where dynamic creation of modifiers need to be done.
+
When update movespeed is called, the list of items is iterated, according to flags priority and a bunch of conditions
+this spits out a final calculated value which is used as a modifer to last_move + modifier for calculating when a mob
+can next move
Grabs a STATIC MODIFIER datum from cache. YOU MUST NEVER EDIT THESE DATUMS, OR IT WILL AFFECT ANYTHING ELSE USING IT TOO!
+
Used for variable slowdowns like hunger/health loss/etc, works somewhat like the old list-based modification adds. Returns the modifier datum if successful
+How this SHOULD work is:
+1. Ensures type_id_datum one way or another refers to a /variable datum. This makes sure it can't be cached. This includes if it's already in the modification list.
+2. Instantiate a new datum if type_id_datum isn't already instantiated + in the list, using the type. Obviously, wouldn't work for ID only.
+3. Add the datum if necessary using the regular add proc
+4. If any of the rest of the args are not null (see: multiplicative slowdown), modify the datum
+5. Update if necessary
A unique version of c4 possessed only by the space ninja. Has a stronger blast radius.
+Can only be detonated by space ninjas with the bombing objective. Can only be set up where the objective says it can.
+When it primes, the space ninja responsible will have their objective set to complete.
Paper is now using markdown (like in github pull notes) for ALL rendering
+so we do loose a bit of functionality but we gain in easy of use of
+paper and getting rid of that crashing bug
Basic plumbing object.
+It doesn't really hold anything special, YET.
+Objects that are plumbing but not a subtype are as of writing liquid pumps and the reagent_dispenser tank
+Also please note that the plumbing component is toggled on and off by the component using a signal from default_unfasten_wrench, so dont worry about it
see if machine has enough to fill
+pick a reagent_container that could be used
+see if it would overflow else inject
+glass was full so we move it away
+slime extracts need inject
+no need to move slimecross industrial things
it splits the reagents however you want. So you can "every 60 units, 45 goes left and 15 goes straight". The side direction is EAST, you can change this in the component
What is this?
+Moderators list (Not gonna keep this accurate forever):
+Fuel Type:
+Oxygen: Power production multiplier. Allows you to run a low plasma, high oxy mix, and still get a lot of power.
+Plasma: Power production gas. More plasma -> more power, but it enriches your fuel and makes the reactor much, much harder to control.
+Tritium: Extremely efficient power production gas. Will cause chernobyl if used improperly.
+Moderation Type:
+N2: Helps you regain control of the reaction by increasing control rod effectiveness, will massively boost the rad production of the reactor.
+CO2: Super effective shutdown gas for runaway reactions. MASSIVE RADIATION PENALTY!
+Pluoxium: Same as N2, but no cancer-rads!
+Permeability Type:
+BZ: Increases your reactor's ability to transfer its heat to the coolant, thus letting you cool it down faster (but your output will get hotter)
+Water Vapour: More efficient permeability modifier
+Hyper Noblium: Extremely efficient permeability increase. (10x as efficient as bz)
+Depletion type:
+Nitryl: When you need weapons grade plutonium yesterday. Causes your fuel to deplete much, much faster. Not a huge amount of use outside of sabotage.
+Sabotage:
+Meltdown:
+Flood reactor moderator with plasma, they won't be able to mitigate the reaction with control rods.
+Shut off coolant entirely. Raise control rods.
+Swap all fuel out with spent fuel, as it's way stronger.
+Blowout:
+Shut off exit valve for quick overpressure.
+Cause a pipefire in the coolant line (LETHAL).
+Tack heater onto coolant line (can also cause straight meltdown)
+Tips:
+Be careful to not exhaust your plasma supply. I recommend you DON'T max out the moderator input when youre running plasma + o2, or you're at a tangible risk of running out of those gasses from atmos.
+The reactor CHEWS through moderator. It does not do this slowly. Be very careful with that!
NOTE: IF YOU UPDATE THE REAGENT-SYSTEM, ALSO UPDATE THIS README.
+
Structure: /////////////////// //////////////////////////
+ // Mob or object // -------> // Reagents var (datum) // Is a reference to the datum that holds the reagents.
+ /////////////////// //////////////////////////
+ | |
+ The object that holds everything. V
+ reagent_list var (list) A List of datums, each datum is a reagent.
+
+ | | |
+ V V V
+
+ reagents (datums) Reagents. I.e. Water , cryoxadone or mercury.
+
+
Random important notes:
+
An objects on_reagent_change will be called every time the objects reagents change. Useful if you want to update the objects icon etc.
+
About the Holder:
+
The holder (reagents datum) is the datum that holds a list of all reagents currently in the object.It also has all the procs needed to manipulate reagents
+
remove_any(var/amount)
+ This proc removes reagents from the holder until the passed amount
+ is matched. It'll try to remove some of ALL reagents contained.
+
+ remove_all(var/amount)
+ This proc removes reagents from the holder equally.
+
+ trans_to(var/obj/target, var/amount)
+ This proc equally transfers the contents of the holder to another
+ objects holder. You need to pass it the object (not the holder) you want
+ to transfer to and the amount you want to transfer. Its return value is the
+ actual amount transfered (if one of the objects is full/empty)
+
+ trans_id_to(var/obj/target, var/reagent, var/amount)
+ Same as above but only for a specific reagent in the reagent list.
+ If the specified amount is greater than what is available, it will use
+ the amount of the reagent that is available. If no reagent exists, returns null.
+
+ metabolize(var/mob/living/carbon/C)
+ This proc is called by the mobs life proc. It simply calls on_mob_life for
+ all contained reagents. You shouldnt have to use this one directly.
+
+ handle_reactions()
+ This proc check all recipes and, on a match, uses them.
+ It will also call the recipe's on_reaction proc (for explosions or w/e).
+ Currently, this proc is automatically called by trans_to.
+
+ isolate_reagent(var/reagent)
+ Pass it a reagent id and it will remove all reagents but that one.
+ It's that simple.
+
+ del_reagent(var/reagent)
+ Completely remove the reagent with the matching id.
+
+ reaction_fire(exposed_temp)
+ Simply calls the reaction_fire procs of all contained reagents.
+
+ update_total()
+ This one simply updates the total volume of the holder.
+ (the volume of all reagents added together)
+
+ clear_reagents()
+ This proc removes ALL reagents from the holder.
+
+ reaction(var/atom/A, var/method=TOUCH, var/volume_modifier=0)
+ This proc calls the appropriate reaction procs of the reagents.
+ I.e. if A is an object, it will call the reagents reaction_obj
+ proc. The method var is used for reaction on mobs. It simply tells
+ us if the mob TOUCHed the reagent, if it INGESTed the reagent, if the reagent
+ was VAPORIZEd on them, if the reagent was INJECTed, or transfered via a PATCH to them.
+ Since the volume can be checked in a reagents proc, you might want to
+ use the volume_modifier var to modifiy the passed value without actually
+ changing the volume of the reagents.
+ If you're not sure if you need to use this the answer is very most likely 'No'.
+ You'll want to use this proc whenever an atom first comes in
+ contact with the reagents of a holder. (in the 'splash' part of a beaker i.e.)
+ More on the reaction in the reagent part of this readme.
+
+ add_reagent(var/reagent, var/amount, var/data)
+ Attempts to add X of the matching reagent to the holder.
+ You wont use this much. Mostly in new procs for pre-filled
+ objects.
+
+ remove_reagent(var/reagent, var/amount)
+ The exact opposite of the add_reagent proc.
+
+ has_reagent(var/reagent, var/amount)
+ Returns 1 if the holder contains this reagent.
+ Or 0 if not.
+ If you pass it an amount it will additionally check
+ if the amount is matched. This is optional.
+
+ get_reagent_amount(var/reagent)
+ Returns the amount of the matching reagent inside the
+ holder. Returns 0 if the reagent is missing.
+
+ Important variables:
+
+ total_volume
+ This variable contains the total volume of all reagents in this holder.
+
+ reagent_list
+ This is a list of all contained reagents. More specifically, references
+ to the reagent datums.
+
+ maximum_volume
+ This is the maximum volume of the holder.
+
+ my_atom
+ This is the atom the holder is 'in'. Useful if you need to find the location.
+ (i.e. for explosions)
+
+
About Reagents:
+
Reagents are all the things you can mix and fille in bottles etc. This can be anything from rejuvs over water to ... iron. Each reagent also has a few procs - i'll explain those below.
+
reaction_mob(var/mob/living/L, var/method=TOUCH)
+ This is called by the holder's reation proc.
+ This version is only called when the reagent
+ reacts with a mob. The method var can be either
+ TOUCH or INGEST. You'll want to put stuff like
+ acid-facemelting in here.
+
+ reaction_obj(var/obj/O)
+ This is called by the holder's reation proc.
+ This version is called when the reagents reacts
+ with an object. You'll want to put stuff like
+ object melting in here ... or something. i dunno.
+
+ reaction_turf(var/turf/T)
+ This is called by the holder's reation proc.
+ This version is called when the reagents reacts
+ with a turf. You'll want to put stuff like extra
+ slippery floors for lube or something in here.
+
+ on_mob_life(var/mob/living/L)
+ This proc is called everytime the mobs life proc executes.
+ This is the place where you put damage for toxins ,
+ drowsyness for sleep toxins etc etc.
+ You'll want to call the parents proc by using ..() .
+ If you dont, the chemical will stay in the mob forever -
+ unless you write your own piece of code to slowly remove it.
+ (Should be pretty easy, 1 line of code)
+
+
Important variables:
+
holder
+ This variable contains a reference to the holder the chemical is 'in'
+
+ volume
+ This is the volume of the reagent.
+
+ id
+ The id of the reagent
+
+ name
+ The name of the reagent.
+
+ data
+ This var can be used for whatever the fuck you want. I used it for the sleep
+ toxins to make them work slowly instead of instantly. You could also use this
+ for DNA in a blood reagent or ... well whatever you want.
+
+ color
+ This is a hexadecimal color that represents the reagent outside of containers,
+ you define it as "#RRGGBB", or, red green blue. You can also define it using the
+ rgb() proc, which returns a hexadecimal value too. The color is black by default.
+
+
A good website for color calculations: http://www.psyclops.com/tools/rgb/
+
About Recipes:
+
Recipes are simple datums that contain a list of required reagents and a result. They also have a proc that is called when the recipe is matched.
+
on_reaction(var/datum/reagents/holder, var/created_volume)
+ This proc is called when the recipe is matched.
+ You'll want to add explosions etc here.
+ To find the location you'll have to do something
+ like get_turf(holder.my_atom)
+
+ name & id
+ Should be pretty obvious.
+
+ results
+ This var contains a list of the id(s) of the resulting reagents and their result amounts.
+ I recommend you set this to the total volume of all required reagent.
+
+ required_reagents
+ This is a list of ids of the required reagents.
+ Each id also needs an associated value that gives us the minimum required amount
+ of that reagent. The handle_reaction proc can detect mutiples of the same recipes
+ so for most cases you want to set the required amount to 1.
+
+ required_catalysts
+ This is a list of the ids of the required catalysts.
+ Functionally similar to required_reagents, it is a list of reagents that are required
+ for the reaction. However, unlike required_reagents, catalysts are NOT consumed.
+ They mearly have to be present in the container.
+
+ required_container
+ The container the recipe has to take place in in order to happen. Leave this blank/null
+ if you want the reaction to happen anywhere.
+
+ required_other
+ Basically like a reagent's data variable. You can set extra requirements for a
+ reaction with this.
+
+ required_temp
+ This is the required temperature.
+
+
About the Tools:
+
By default, all atom have a reagents var - but its empty. if you want to use an object for the chem. system you'll need to add something like this in its new proc:
+
var/datum/reagents/R = new/datum/reagents(100) <<<<< create a new datum , 100 is the maximum_volume of the new holder datum.
+ reagents = R <<<<< assign the new datum to the objects reagents var
+ R.my_atom = src <<<<< set the holders my_atom to src so that we know where we are.
+
+ This can also be done by calling a convenience proc:
+ atom/proc/create_reagents(var/max_volume)
+
+
Other important stuff:
+
amount_per_transfer_from_this var
+ This var is mostly used by beakers and bottles.
+ It simply tells us how much to transfer when
+ 'pouring' our reagents into something else.
+
+ atom/proc/is_open_container()
+ Checks atom/var/reagents.reagents_holder_flags & OPENCONTAINER.
+ If this returns 1 , you can use syringes, beakers etc
+ to manipulate the contents of this object.
+ If it's 0, you'll need to write your own custom reagent
+ transfer code since you will not be able to use the standard
+ tools to manipulate it.
+
+ atom/proc/is_injectable()
+ Checks if something can be injected to.
+ If this returns 1, you can use syringes and droppers
+ to draw from and add to the contents of this object.
+
+ atom/proc/is_drawable()
+ Checks if something can be drawn from.
+ If this returns 1, you can use syringes and droppers
+ to draw from the contents of this object.
+
+
GOON CHEMS README:
+
Credit goes to Cogwerks, and all the other goonstation coders for the original idea and implementation of this over at goonstation.
+
+
THE REQUESTED DON'T PORT LIST: IF YOU PORT THESE THE GOONS WILL MURDER US IN OUR SLEEP SO PLEASE DON'T KTHX - Iamgoofball
How to code fermichem reactions:
+First off, probably read though the readme for standard reagent mechanisms, this builds on top of that.
+
#bitflags
+for datum/reagent/ you have the following options with var/chemical_flags:
+
REAGENT_DEAD_PROCESS calls on_mob_dead() if present in a dead body
+REAGENT_DONOTSPLIT Do not split the chem at all during processing
+REAGENT_ONLYINVERSE Only invert chem, no splitting
+REAGENT_ONMOBMERGE Call on_mob_life proc when reagents are merging.
+REAGENT_INVISIBLE Doesn't appear on handheld health analyzers.
+REAGENT_FORCEONNEW Forces a on_new() call without a data overhead
+REAGENT_SNEAKYNAME When inverted, the inverted chem uses the name of the original chem
+REAGENT_SPLITRETAINVOL Retains initial volume of chem when splitting
+
+
for datum/chemical_reaction/ under var/clear_conversion
+
REACTION_CLEAR_IMPURE Convert into impure/pure on reaction completion
+REACTION_CLEAR_INVERSE Convert into inverse on reaction completion when purity is low enough
+
HELPER FILE FOR SHIELDING
+Gets hull exterior adjacent tiles of a certain area
+Area method.
+EXPENSIVE.
+If the area itself is already considered exterior, it'll find all tiles inside it that's next to an interior area.
anything above this requires adminbus, to prevent a cultist from stacking chaplain + cult + specific listener = 8x, which is enough to instantly kill someone with damage.
anything above this requires adminbus, to prevent a cultist from stacking chaplain + cult + specific listener = 8x, which is enough to instantly kill someone with damage.
APIs communicate with TGS in two ways. All versions implement TGS -> DM communication using /world/Topic. DM -> TGS communication, called the bridge method, is different for each version.
This folder contains all DMAPI code not directly involved in an API.
+
+
_definitions.dm contains defines needed across DMAPI internals.
+
core.dm contains the implementations of the /world/proc/TgsXXX() procs. Many map directly to the /datum/tgs_api functions. It also contains the /datum selection and setup code.
+
datum.dm contains the /datum/tgs_api declarations that all APIs must implement.
+
tgs_version.dm contains the /datum/tgs_version definition
Returns a UI status such that users adjacent to source will be able to interact,
+far away users will be able to see, and anyone farther won't see anything.
+Dead users will receive updates no matter what, though you likely want to add
+a [ui_status_only_living] check for finer observer interactions.
Returns a UI status such that users with debilitating conditions, such as
+being dead or not having power for silicons, will not be able to interact.
+Being dead will disable UI, being incapacitated will continue updating it,
+and anything else will make it interactive.
Returns a UI status such that silicons will be able to interact with whatever
+they would have access to if this was a machine. For example, AIs can
+interact if there's cameras with wireless control is enabled.
On their most basic level, when UNIT_TESTS is defined, all subtypes of /datum/unit_test will have their Run proc executed. From here, if Fail is called at any point, then the tests will report as failed.
+
How do I write one?
+
+
Find a relevant file.
+
+
All unit test related code is in code/modules/unit_tests. If you are adding a new test for a surgery, for example, then you'd open surgeries.dm. If a relevant file does not exist, simply create one in this folder, then #include it in _unit_tests.dm.
+
+
Create the unit test.
+
+
To make a new unit test, you simply need to define a /datum/unit_test.
+
For example, let's suppose that we are creating a test to make sure a proc square correctly raises inputs to the power of two. We'd start with first:
+
/datum/unit_test/square/Run()
+
+
This defines our new unit test, /datum/unit_test/square. Inside this function, we're then going to run through whatever we want to check. Tests provide a few assertion functions to make this easy. For now, we're going to use TEST_ASSERT_EQUAL.
+
/datum/unit_test/square/Run()
+ TEST_ASSERT_EQUAL(square(3), 9, "square(3) did not return 9")
+ TEST_ASSERT_EQUAL(square(4), 16, "square(4) did not return 16")
+
+
As you can hopefully tell, we're simply checking if the output of square matches the output we are expecting. If the test fails, it'll report the error message given as well as whatever the actual output was.
+
+
Run the unit test
+
+
Open code/_compile_options.dm and uncomment the following line.
+
//#define UNIT_TESTS //If this is uncommented, we do a single run though of the game setup and tear down process with unit tests in between
+
+
Then, run tgstation.dmb in Dream Daemon. Don't bother trying to connect, you won't need to. You'll be able to see the outputs of all the tests. You'll get to see which tests failed and for what reason. If they all pass, you're set!
+
How to think about tests
+
Unit tests exist to prevent bugs that would happen in a real game. Thus, they should attempt to emulate the game world wherever possible. For example, the quick swap sanity test emulates a real scenario of the bug it fixed occurring by creating a character and giving it real items. The unrecommended alternative would be to create special test-only items. This isn't a hard rule, the reagent method exposure tests create a test-only reagent for example, but do keep it in mind.
+
Unit tests should also be just that--testing units of code. For example, instead of having one massive test for reagents, there are instead several smaller tests for testing exposure, metabolization, etc.
+
The unit testing API
+
You can find more information about all of these from their respective doc comments, but for a brief overview:
+
/datum/unit_test - The base for all tests to be ran. Subtypes must override Run(). New() and Destroy() can be used for setup and teardown. To fail, use Fail(reason).
+
/datum/unit_test/proc/allocate(type, ...) - Allocates an instance of the provided type with the given arguments. Is automatically destroyed when the test is over. Commonly seen in the form of var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human).
+
TEST_ASSERT(assertion, reason) - Stops the unit test and fails if the assertion is not met. For example: TEST_ASSERT(powered(), "Machine is not powered").
+
TEST_ASSERT_EQUAL(a, b, message) - Same as TEST_ASSERT, but checks if a == b. If not, gives a helpful message showing what both a and b were. For example: TEST_ASSERT_EQUAL(2 + 2, 4, "The universe is falling apart before our eyes!").
+
TEST_ASSERT_NOTEQUAL(a, b, message) - Same as TEST_ASSERT_EQUAL, but reversed.
+
TEST_FOCUS(test_path) - Only run the test provided within the parameters. Useful for reducing noise. For example, if we only want to run our example square test, we can add TEST_FOCUS(/datum/unit_test/square). Should never be pushed in a pull request--you will be laughed at.
+
Final Notes
+
+
Writing tests before you attempt to fix the bug can actually speed up development a lot! It means you don't have to go in game and folllow the same exact steps manually every time. This process is known as "TDD" (test driven development). Write the test first, make sure it fails, then start work on the fix/feature, and you'll know you're done when your tests pass. If you do try this, do make sure to confirm in a non-testing environment just to double check.
+
Make sure that your tests don't accidentally call RNG functions like prob. Since RNG is seeded during tests, you may not realize you have until someone else makes a PR and the tests fail!
+
Do your best not to change the behavior of non-testing code during tests. While it may sometimes be necessary in the case of situations such as the above, it is still a slippery slope that can lead to the code you're testing being too different from the production environment to be useful.
Only run the test provided within the parentheses
+This is useful for debugging when you want to reduce noise, but should never be pushed
+Intended to be used in the manner of TEST_FOCUS(/datum/unit_test/math)
Only run the test provided within the parentheses
+This is useful for debugging when you want to reduce noise, but should never be pushed
+Intended to be used in the manner of TEST_FOCUS(/datum/unit_test/math)
Shield processing
+*An object to take the hit for us when using the Durand's defense mode.
+It is spawned in during the durand's initilization, and always stays on the same tile.
+Normally invisible, until defense mode is actvated. When the durand detects an attack that should be blocked, the
+attack is passed to the shield. The shield takes the damage, uses it to calculate charge cost, and then sets its
+own integrity back to max. Shield is automatically dropped if we run out of power or the user gets out.
A datum instantiated has no physical world prescence, use an atom if you want something
+that actually lives in the world
+
Be very mindful about adding variables to this class, they are inherited by every single
+thing in the entire game, and so you can easily cause memory usage to rise a lot with careless
+use of variables at this level
Return any component assigned to this datum of the given type
+This will throw an error if it's possible to have more than one component of that type on the parent
Return any component assigned to this datum of the exact given type
+This will throw an error if it's possible to have more than one component of that type on the parent
Creates an instance of new_type in the datum and attaches to it as parent
+Sends the COMSIG_COMPONENT_ADDED signal to the datum
+Returns the component that was created. Or the old component in a dupe situation where COMPONENT_DUPE_UNIQUE was set
+If this tries to add an component to an incompatible type, the component will be deleted and the result will be null. This is very unperformant, try not to do it
+Properly handles duplicate situations based on the dupe_mode var
Finds the singleton for the element type given and detaches it from src
+You only need additional arguments beyond the type if you're using ELEMENT_BESPOKE
Internal proc to handle most all of the signaling procedure
+Will runtime if used on datums with an empty component list
+Use the SEND_SIGNAL define instead
This proc is called on a datum on every "cycle" if it is being processed by a subsystem. The time between each cycle is determined by the subsystem's "wait" setting.
+You can start and stop processing a datum using the START_PROCESSING and STOP_PROCESSING defines.
If this is non zero then the object has been garbage collected and is awaiting either
+a hard del by the GC subsystme, or to be autocollected (if it has no references)
This should be overridden to remove all references pointing to the object being destroyed, if
+you do override it, make sure to call the parent and return it's return value by default
+
Return an appropriate QDEL_HINT to modify handling of your deletion;
+in most cases this is QDEL_HINT_QUEUE.
+
The base case is responsible for doing the following
+
+
Erasing timers pointing to this datum
+
Erasing compenents on this datum
+
Notifying datums listening to signals from this datum that we are going away
Return any component assigned to this datum of the given type
+This will throw an error if it's possible to have more than one component of that type on the parent
+
Arguments:
+
+
datum/component/c_type The typepath of the component you want to get a reference to
+
GetComponents
+
+
Get all components of a given type that are attached to this datum
+
Arguments:
+
+
c_type The component type path
+
GetExactComponent
+
+
Return any component assigned to this datum of the exact given type
+This will throw an error if it's possible to have more than one component of that type on the parent
+
Arguments:
+
+
datum/component/c_type The typepath of the component you want to get a reference to
+
LoadComponent
+
+
Get existing component of type, or create it and return a reference to it
+
Use this if the item needs to exist at the time of this call, but may not have been created before now
+
Arguments:
+
+
component_type The typepath of the component to create or return
+
... additional arguments to be passed when creating the component if it does not exist
+
RegisterSignal
+
+
Register to listen for a signal from the passed in target
+
This sets up a listening relationship such that when the target object emits a signal
+the source datum this proc is called upon, will recieve a callback to the given proctype
+Return values from procs registered must be a bitfield
+
Arguments:
+
+
datum/target The target to listen for signals from
+
sig_type_or_types Either a string signal name, or a list of signal names (strings)
+
proctype The proc to call back when the signal is emitted
+
override If a previous registration exists you must explicitly set this
+
TakeComponent
+
+
Transfer this component to another parent
+
Component is taken from source datum
+
Arguments:
+
+
datum/component/target Target datum to transfer to
/datum/target the target to move the components to
+
UnregisterSignal
+
+
Stop listening to a given signal from target
+
Breaks the relationship between target and source datum, removing the callback when the signal fires
+Doesn't care if a registration exists or not
+
Arguments:
+
+
datum/target Datum to stop listening to signals from
+
sig_typeor_types Signal string key or list of signal keys to stop listening to specifically
+
_AddComponent
+
+
Creates an instance of new_type in the datum and attaches to it as parent
+Sends the COMSIG_COMPONENT_ADDED signal to the datum
+Returns the component that was created. Or the old component in a dupe situation where COMPONENT_DUPE_UNIQUE was set
+If this tries to add an component to an incompatible type, the component will be deleted and the result will be null. This is very unperformant, try not to do it
+Properly handles duplicate situations based on the dupe_mode var
_AddElement
+
+
Finds the singleton for the element type given and attaches it to src
_RemoveElement
+
+
Finds the singleton for the element type given and detaches it from src
+You only need additional arguments beyond the type if you're using ELEMENT_BESPOKE
_SendSignal
+
+
Internal proc to handle most all of the signaling procedure
+Will runtime if used on datums with an empty component list
+Use the SEND_SIGNAL define instead
deserialize_json
+
+
Deserializes from JSON. Does not parse type.
deserialize_list
+
+
Accepts a LIST from deserialize_datum. Should return src or another datum.
process
+
+
This proc is called on a datum on every "cycle" if it is being processed by a subsystem. The time between each cycle is determined by the subsystem's "wait" setting.
+You can start and stop processing a datum using the START_PROCESSING and STOP_PROCESSING defines.
+
Since the wait setting of a subsystem can be changed at any time, it is important that any rate-of-change that you implement in this proc is multiplied by the delta_time that is sent as a parameter,
+Additionally, any "prob" you use in this proc should instead use the DT_PROB define to make sure that the final probability per second stays the same even if the subsystem's wait is altered.
+Examples where this must be considered:
+
+
Implementing a cooldown timer, use mytimer -= delta_time, not mytimer -= 1. This way, mytimer will always have the unit of seconds
+
Damaging a mob, do L.adjustFireLoss(20 * delta_time), not L.adjustFireLoss(20). This way, the damage per second stays constant even if the wait of the subsystem is changed
+
Probability of something happening, do if(DT_PROB(25, delta_time)), not if(prob(25)). This way, if the subsystem wait is e.g. lowered, there won't be a higher chance of this event happening per second
+
+
If you override this do not call parent, as it will return PROCESS_KILL. This is done to prevent objects that dont override process() from staying in the processing list
serialize_json
+
+
Serializes into JSON. Does not encode type.
serialize_list
+
+
Return a LIST for serialize_datum to encode! Not the actual json!
ui_act
+
+
public
+
Called on a UI when the UI receieves a href.
+Think of this as Topic().
+
required action string The action/button that has been invoked by the user.
+required params list A list of parameters attached to the button.
+
return bool If the user's input has been handled and the UI should update.
ui_assets
+
+
public
+
Called on an object when a tgui object is being created, allowing you to
+push various assets to tgui, for examples spritesheets.
+
return list List of asset datums or file paths.
ui_close
+
+
public
+
Called on a UI's object when the UI is closed, not to be confused with
+client/verb/uiclose(), which closes the ui window
ui_data
+
+
public
+
Data to be sent to the UI.
+This must be implemented for a UI to work.
+
required user mob The mob interacting with the UI.
+
return list Data to be sent to the UI.
ui_host
+
+
private
+
The UI's host object (usually src_object).
+This allows modules/datums to have the UI attached to them,
+and be a part of another object.
ui_interact
+
+
public
+
Used to open and update UIs.
+If this proc is not implemented properly, the UI will not update correctly.
+
required user mob The mob who opened/is using the UI.
+optional ui datum/tgui The UI to be updated, if it exists.
ui_state
+
+
private
+
The UI's state controller to be used for created uis
+This is a proc over a var for memory reasons
ui_static_data
+
+
public
+
Static Data to be sent to the UI.
+
Static data differs from normal data in that it's large data that should be
+sent infrequently. This is implemented optionally for heavy uis that would
+be sending a lot of redundant data frequently. Gets squished into one
+object on the frontend side, but the static part is cached.
+
required user mob The mob interacting with the UI.
+
return list Statuic Data to be sent to the UI.
ui_status
+
+
public
+
Checks the UI state for a mob.
+
required user mob The mob who opened/is using the UI.
+required state datum/ui_state The state to check.
+
return UI_state The state of the UI.
update_static_data
+
+
public
+
Forces an update on static data. Should be done manually whenever something
+happens to change static data.
+
required user the mob currently interacting with the ui
+optional ui ui to be updated
Recursively prints out an object to text list for SDQL2 output to admins, with VV links and all.
+Recursion limit: 50
+Limit imposed by callers should be around 10000 objects
+Seriously, if you hit those limits, you're doing something wrong.
Proc Details
SDQL_print
+
+
Recursively prints out an object to text list for SDQL2 output to admins, with VV links and all.
+Recursion limit: 50
+Limit imposed by callers should be around 10000 objects
+Seriously, if you hit those limits, you're doing something wrong.
Unlocks an achievement of a specific type. achievement type is a typepath to the award, user is the mob getting the award, and value is an optional value to be used for defining a score to add to the leaderboard
Updates local cache with db data for the given achievement type if it wasn't loaded yet.
reset
+
+
Resets an achievement to default values.
unlock
+
+
Unlocks an achievement of a specific type. achievement type is a typepath to the award, user is the mob getting the award, and value is an optional value to be used for defining a score to add to the leaderboard
// NOTICE: This currently doens't support skin tone - if anyone wants to add this to non slimes, it's up to YOU to do this.
+/ (someone should also add genital color switching, more mutant color selection)
+maybe just make this entire thing tgui based. maybe.
Proc Details
change_form
+
+
// NOTICE: This currently doens't support skin tone - if anyone wants to add this to non slimes, it's up to YOU to do this.
+/ (someone should also add genital color switching, more mutant color selection)
+maybe just make this entire thing tgui based. maybe.
Rallies your army of stickmen to whichever target the user is pointing.
+Should the user be on harm intent and the target be a living mob that's not the user or a fellow stickman,
+said target will be added to a list of foes which the stickmen will gladly dispose regardless of faction.
+This is designed so stickmen will move toward whatever you point at even when you don't want to, that's the downside.
Proc Details
rally
+
+
Rallies your army of stickmen to whichever target the user is pointing.
+Should the user be on harm intent and the target be a living mob that's not the user or a fellow stickman,
+said target will be added to a list of foes which the stickmen will gladly dispose regardless of faction.
+This is designed so stickmen will move toward whatever you point at even when you don't want to, that's the downside.
Unique ID. You can never have different modifications with the same ID. By default, this SHOULD NOT be set. Only set it for cases where you're dynamically making modifiers/need to have two types overwrite each other. If unset, uses path (converted to text) as ID.
Higher ones override lower priorities. This is NOT used for ID, ID must be unique, if it isn't unique the newer one overwrites automatically if overriding.
Whether or not this is a variable modifier. Variable modifiers can NOT be ever auto-cached. ONLY CHECKED VIA INITIAL(), EFFECTIVELY READ ONLY (and for very good reason)
Unique ID. You can never have different modifications with the same ID. By default, this SHOULD NOT be set. Only set it for cases where you're dynamically making modifiers/need to have two types overwrite each other. If unset, uses path (converted to text) as ID.
Higher ones override lower priorities. This is NOT used for ID, ID must be unique, if it isn't unique the newer one overwrites automatically if overriding.
Whether or not this is a variable modifier. Variable modifiers can NOT be ever auto-cached. ONLY CHECKED VIA INITIAL(), EFFECTIVELY READ ONLY (and for very good reason)
String dialogue that is added to the player's in-round notes and memories regarding specifics of that antagonist, eg. the nuke code for nuke ops, or your unlock code for traitors.
This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
Proc that sends fluff or instructional messages to the player when they lose this antag datum.
+Use this proc for playing sounds, sending alerts, or otherwise informing the player that they're no longer a specific antagonist type.
Given an icon, will crop it to be consistent of those in the preferences menu.
+Not necessary, and in fact will look bad if it's anything other than a human.
Proc that will return the team this antagonist belongs to, when called. Helpful with antagonists that may belong to multiple potential teams in a single round, like families.
Proc that sends fluff or instructional messages to the player when they are given this antag datum.
+Use this proc for playing sounds, sending alerts, or helping to setup non-gameplay influencing aspects of the antagonist type.
Gets how fast we can hijack the shuttle, return 0 for can not hijack.
+Defaults to hijack_speed var, override for custom stuff like buffing hijack speed for hijack objectives or something.
Called by the transfer_to() mind proc after the mind (mind.current and new_character.mind) has moved but before the player (key and client) is transfered.
Creates an icon from the preview outfit.
+Custom implementors of get_preview_icon should use this, as the
+result of get_preview_icon is expected to be the completed version.
Proc that sends string information for the end-round report window to the server.
+This runs on every instance of every antagonist that exists at the end of the round.
+This is the body of the message, sandwiched between roundend_report_header and roundend_report_footer.
Proc that sends string data for the round-end report.
+Displayed after roundend_report and roundend_report_footer.
+Appears at the end of the roundend_catagory section.
Proc that sends string data for the round-end report.
+Displayed before roundend_report and roundend_report_footer.
+Appears at start of roundend_catagory section.
String dialogue that is added to the player's in-round notes and memories regarding specifics of that antagonist, eg. the nuke code for nuke ops, or your unlock code for traitors.
This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
name of the UI that will try to open, right now having nothing means this won't exist but in the future all should.
Proc Details
antag_panel_data
+
+
Additional data to display in the antagonist panel section.
+For example, nuke disk code, genome count, etc
clean_request_from_del_objective
+
+
Clears change requests from deleted objectives to avoid broken references.
clear_antag_moodies
+
+
Proc that removes this antagonist's ascribed moodlet from the player.
farewell
+
+
Proc that sends fluff or instructional messages to the player when they lose this antag datum.
+Use this proc for playing sounds, sending alerts, or otherwise informing the player that they're no longer a specific antagonist type.
finish_preview_icon
+
+
Given an icon, will crop it to be consistent of those in the preferences menu.
+Not necessary, and in fact will look bad if it's anything other than a human.
get_admin_commands
+
+
List of ["Command"] = CALLBACK(), user will be appeneded to callback arguments on execution
get_objectives
+
+
generic helper to send objectives as data through tgui. supports smart objectives too!
get_preview_icon
+
+
Returns the icon to show on the preferences menu.
get_team
+
+
Proc that will return the team this antagonist belongs to, when called. Helpful with antagonists that may belong to multiple potential teams in a single round, like families.
give_antag_moodies
+
+
Proc that assigns this antagonist's ascribed moodlet to the player.
greet
+
+
Proc that sends fluff or instructional messages to the player when they are given this antag datum.
+Use this proc for playing sounds, sending alerts, or helping to setup non-gameplay influencing aspects of the antagonist type.
handle_clown_mutation
+
+
Handles adding and removing the clumsy mutation from clown antags. Gets called in apply/remove_innate_effects
hijack_speed
+
+
Gets how fast we can hijack the shuttle, return 0 for can not hijack.
+Defaults to hijack_speed var, override for custom stuff like buffing hijack speed for hijack objectives or something.
is_banned
+
+
Proc that checks the sent mob aganst the banlistfor this antagonist.
+Returns FALSE if no mob is sent, or the mob is not found to be banned.
+
+
mob/M: The mob that you are looking for on the banlist.
+
on_body_transfer
+
+
Called by the transfer_to() mind proc after the mind (mind.current and new_character.mind) has moved but before the player (key and client) is transfered.
on_gain
+
+
Called by the add_antag_datum() mind proc after the instanced datum is added to the mind's antag_datums list.
on_mindshield
+
+
This is called when the antagonist is successfully mindshielded.
on_removal
+
+
Called by the remove_antag_datum() and remove_all_antag_datums() mind procs for the antag datum to handle its own removal and deletion.
pre_mindshield
+
+
This is called when the antagonist is being mindshielded.
remove_blacklisted_quirks
+
+
Removes invalid quirks.
render_preview_outfit
+
+
Creates an icon from the preview outfit.
+Custom implementors of get_preview_icon should use this, as the
+result of get_preview_icon is expected to be the completed version.
replace_banned_player
+
+
Proc that replaces a player who cannot play a specific antagonist due to being banned via a poll, and alerts the player of their being on the banlist.
roundend_report
+
+
Proc that sends string information for the end-round report window to the server.
+This runs on every instance of every antagonist that exists at the end of the round.
+This is the body of the message, sandwiched between roundend_report_header and roundend_report_footer.
roundend_report_footer
+
+
Proc that sends string data for the round-end report.
+Displayed after roundend_report and roundend_report_footer.
+Appears at the end of the roundend_catagory section.
roundend_report_header
+
+
Proc that sends string data for the round-end report.
+Displayed before roundend_report and roundend_report_footer.
+Appears at start of roundend_catagory section.
threat
+
+
Gets our threat level. Override this proc for custom functionality/dynamic threat level.
A reference to the handler datum that manages the families gamemode. In case of no handler (admin-spawned during round), this will be null; this is fine.
A reference to the handler datum that manages the families gamemode. In case of no handler (admin-spawned during round), this will be null; this is fine.
Namespace'ed assets (for static css and html files)
+When sent over a cdn transport, all assets in the same asset datum will exist in the same folder, as their plain names.
+Used to ensure css files can reference files by url() without having to generate the css at runtime, both the css file and the files it depends on must exist in the same namespace asset datum. (Also works for html)
+For example blah.css with asset blah.png will get loaded as namespaces/a3d..14f/f12..d3c.css and namespaces/a3d..14f/blah.png. allowing the css file to load blah.png by a relative url rather then compute the generated url with get_url_mappings().
+The namespace folder's name will change if any of the assets change. (excluding parent assets)
parents - list of the parent asset or assets (in name = file assoicated format) for this namespace.
+parent assets must be referenced by their generated url, but if an update changes a parent asset, it won't change the namespace's identity.
parents - list of the parent asset or assets (in name = file assoicated format) for this namespace.
+parent assets must be referenced by their generated url, but if an update changes a parent asset, it won't change the namespace's identity.
Proc Details
get_htmlloader
+
+
Get a html string that will load a html asset.
+Needed because byond doesn't allow you to browse() to a url.
Used by the cdn system to keep legacy css assets with their parent
+css file. (css files resolve urls relative to the css file, so the
+legacy system can't be used if the css file itself could go out over
+the cdn)
Used by the cdn system to keep legacy css assets with their parent
+css file. (css files resolve urls relative to the css file, so the
+legacy system can't be used if the css file itself could go out over
+the cdn)
Don't mutate the filename of assets when sending via browse_rsc.
+This is to make it easier to debug issues with assets, and allow server operators to bypass issues that make it to production.
+If turning this on fixes asset issues, something isn't using get_asset_url and the asset isn't marked legacy, fix one of those.
Returns a url for a given asset.
+asset_name - Name of the asset.
+asset_cache_item - asset cache item datum for the asset, optional, overrides asset_name
Register a browser asset with the asset cache system
+asset_name - the identifier of the asset
+asset - the actual asset file (or an asset_cache_item datum)
+returns a /datum/asset_cache_item.
+mutiple calls to register the same asset under the same asset_name return the same datum
Sends a list of browser assets to a client
+client - a client or mob
+asset_list - A list of asset filenames to be sent to the client. Can optionally be assoicated with the asset's asset_cache_item datum.
+Returns TRUE if any assets were sent.
Don't mutate the filename of assets when sending via browse_rsc.
+This is to make it easier to debug issues with assets, and allow server operators to bypass issues that make it to production.
+If turning this on fixes asset issues, something isn't using get_asset_url and the asset isn't marked legacy, fix one of those.
Proc Details
Initialize
+
+
Initialize - Called when SSassets initializes.
Load
+
+
Called when the transport is loaded by the config controller, not called on the default transport unless it gets loaded by a config change.
get_asset_url
+
+
Returns a url for a given asset.
+asset_name - Name of the asset.
+asset_cache_item - asset cache item datum for the asset, optional, overrides asset_name
register_asset
+
+
Register a browser asset with the asset cache system
+asset_name - the identifier of the asset
+asset - the actual asset file (or an asset_cache_item datum)
+returns a /datum/asset_cache_item.
+mutiple calls to register the same asset under the same asset_name return the same datum
send_assets
+
+
Sends a list of browser assets to a client
+client - a client or mob
+asset_list - A list of asset filenames to be sent to the client. Can optionally be assoicated with the asset's asset_cache_item datum.
+Returns TRUE if any assets were sent.
send_assets_slow
+
+
Precache files without clogging up the browse() queue, used for passively sending files on connection start.
validate_config
+
+
Check the config is valid to load this transport
+Returns TRUE or FALSE
Returns a url for a given asset.
+asset_name - Name of the asset.
+asset_cache_item - asset cache item datum for the asset, optional, overrides asset_name
Register a browser asset with the asset cache system
+We also save it to the CDN webroot at this step instead of waiting for send_assets()
+asset_name - the identifier of the asset
+asset - the actual asset file or an asset_cache_item datum.
Returns a url for a given asset.
+asset_name - Name of the asset.
+asset_cache_item - asset cache item datum for the asset, optional, overrides asset_name
load_existing_assets
+
+
Processes thru any assets that were registered before we were loaded as a transport.
register_asset
+
+
Register a browser asset with the asset cache system
+We also save it to the CDN webroot at this step instead of waiting for send_assets()
+asset_name - the identifier of the asset
+asset - the actual asset file or an asset_cache_item datum.
save_asset_to_webroot
+
+
Saves the asset to the webroot taking into account namespaces and hashes.
send_assets
+
+
webroot asset sending - does nothing unless passed legacy assets
Default damage-to-stamina coefficient, higher is better. This is based on amount of damage BLOCKED, not initial damage, to prevent damage from "double dipping".
//////// BLOCKING ////////////
+NOTE: FOR ATTACK_TYPE_DEFINE, you MUST wrap it in "[DEFINE_HERE]"! The defines are bitflags, and therefore, NUMBERS!
+See defines. Point of reference is someone facing north.
//////// PARRYING ////////////
+Priority for mob/do_run_block() while we're being used to parry.
+Parry doesn't work if you aren't able to otherwise attack due to clickdelay
Generates a HTML render of this datum for self-documentation
+Maybe make this tgui-next someday haha god this is ugly as sin.
+Does NOT include the popout or title or anything. Just the variables and explanations..
Default damage-to-stamina coefficient, higher is better. This is based on amount of damage BLOCKED, not initial damage, to prevent damage from "double dipping".
//////// BLOCKING ////////////
+NOTE: FOR ATTACK_TYPE_DEFINE, you MUST wrap it in "[DEFINE_HERE]"! The defines are bitflags, and therefore, NUMBERS!
+See defines. Point of reference is someone facing north.
//////// PARRYING ////////////
+Priority for mob/do_run_block() while we're being used to parry.
+Parry doesn't work if you aren't able to otherwise attack due to clickdelay
Quirky proc to get average of flags in list that are in attack_type because why is attack_type a flag.
get_parry_efficiency
+
+
Gets the percentage efficiency of our parry.
+
Returns a percentage in normal 0 to 100 scale, but not clamped to just 0 to 100.
+This is a proc to allow for overriding.
+@params
+
+
attack_type - int, bitfield of the attack type(s)
+
parry_time - deciseconds since start of the parry.
+
render_html_readout
+
+
Generates a HTML render of this datum for self-documentation
+Maybe make this tgui-next someday haha god this is ugly as sin.
+Does NOT include the popout or title or anything. Just the variables and explanations..
A datum that holds a proc to be called on another object, used to track proccalls to other objects
+
USAGE
+
var/datum/callback/C = new(object|null, /proc/type/path|"procstring", arg1, arg2, ... argn)
+var/timerid = addtimer(C, time, timertype)
+you can also use the compiler define shorthand
+var/timerid = addtimer(CALLBACK(object|null, /proc/type/path|procstring, arg1, arg2, ... argn), time, timertype)
+
+
Note: proc strings can only be given for datum proc calls, global procs must be proc paths
+
Also proc strings are strongly advised against because they don't compile error if the proc stops existing
+
In some cases you can provide a shortform of the procname, see the proc typepath shortcuts documentation below
+
INVOKING THE CALLBACK
+
var/result = C.Invoke(args, to, add) additional args are added after the ones given when the callback was created
+
var/result = C.InvokeAsync(args, to, add) Asyncronous - returns . on the first sleep then continues on in the background
+after the sleep/block ends, otherwise operates normally.
+
PROC TYPEPATH SHORTCUTS
+
(these operate on paths, not types, so to these shortcuts, datum is NOT a parent of atom, etc...)
+
global proc while in another global proc:
+
.procname
+
CALLBACK(GLOBAL_PROC, .some_proc_here)
+
proc defined on current(src) object (when in a /proc/ and not an override) OR overridden at src or any of it's parents:
+
.procname
+
CALLBACK(src, .some_proc_here)
+
when the above doesn't apply:
+
.proc/procname
+
CALLBACK(src, .proc/some_proc_here)
+
proc defined on a parent of a some type
+
/some/type/.proc/some_proc_here
+
Otherwise you must always provide the full typepath of the proc (/type/of/thing/proc/procname)
Cached icons to show what language the user is speaking
+Applies final animations to overlay CHAT_MESSAGE_EOL_FADE deciseconds prior to message deletion
+Arguments:
Contains the scheduled destruction time, used for scheduling EOL
Proc Details
New
+
+
Constructs a chat message overlay
+
Arguments:
+
+
text - The text content of the overlay
+
target - The target atom to display the overlay at
+
owner - The mob that owns this overlay, only this mob will be able to view it
+
language - The language this message was spoken in
+
extra_classes - Extra classes to apply to the span that holds the text
+
lifespan - The lifespan of the message in deciseconds
+
colorize_string
+
+
Gets a color for a name, will return the same color for a given string consistently within a round.atom
+
Note that this proc aims to produce pastel-ish colors using the HSL colorspace. These seem to be favorable for displaying on the map.
+
Arguments:
+
+
name - The name to generate a color for
+
sat_shift - A value between 0 and 1 that will be multiplied against the saturation
+
lum_shift - A value between 0 and 1 that will be multiplied against the luminescence
+
end_of_life
+
+
Cached icons to show what language the user is speaking
+Applies final animations to overlay CHAT_MESSAGE_EOL_FADE deciseconds prior to message deletion
+Arguments:
+
+
fadetime - The amount of time to animate the message's fadeout for
+
enter_subsystem
+
+
Enters the runechat subsystem with this chatmessage, inserting it into the end-of-life queue
+
This will also account for a chatmessage already being registered, and in which case
+the position will be updated to remove it from the previous location if necessary
+
Arguments:
+
+
new_sched_destruction Optional, when provided is used to update an existing message with the new specified time
+
generate_image
+
+
Generates a chat message image representation
+
Arguments:
+
+
text - The text content of the overlay
+
target - The target atom to display the overlay at
+
owner - The mob that owns this overlay, only this mob will be able to view it
+
language - The language this message was spoken in
+
extra_classes - Extra classes to apply to the span that holds the text
+
lifespan - The lifespan of the message in deciseconds
+
leave_subsystem
+
+
Removes this chatmessage datum from the runechat subsystem
on_parent_qdel
+
+
Calls qdel on the chatmessage when its parent is deleted, used to register qdel signal
A component should be a single standalone unit
+of functionality, that works by receiving signals from it's parent
+object to provide some single functionality (i.e a slippery component)
+that makes the object it's attached to cause people to slip over.
+Useful when you want shared behaviour independent of type inheritance
Only set to true if you are able to properly transfer this component
+At a minimum RegisterWithParent and UnregisterFromParent should be used
+Make sure you also implement PostTransfer for any post transfer handling
Called on a component when a component of the same type was added to the same parent with COMPONENT_DUPE_SELECTIVE
+See /datum/component/var/dupe_mode
+C's type will always be the same of the called component
+return TRUE if you are absorbing the component, otherwise FALSE if you are fine having it exist as a duplicate component
Called on a component when a component of the same type was added to the same parent
+See /datum/component/var/dupe_mode
+C's type will always be the same of the called component
Called during component creation with the same arguments as in new excluding parent.
+Do not call qdel(src) from this function, return COMPONENT_INCOMPATIBLE instead
Only set to true if you are able to properly transfer this component
+At a minimum RegisterWithParent and UnregisterFromParent should be used
+Make sure you also implement PostTransfer for any post transfer handling
Called on a component when a component of the same type was added to the same parent with COMPONENT_DUPE_SELECTIVE
+See /datum/component/var/dupe_mode
+C's type will always be the same of the called component
+return TRUE if you are absorbing the component, otherwise FALSE if you are fine having it exist as a duplicate component
Destroy
+
+
Properly removes the component from parent and cleans up references
+
Arguments:
+
+
force - makes it not check for and remove the component from the parent
Called on a component when a component of the same type was added to the same parent
+See /datum/component/var/dupe_mode
+C's type will always be the same of the called component
Initialize
+
+
Called during component creation with the same arguments as in new excluding parent.
+Do not call qdel(src) from this function, return COMPONENT_INCOMPATIBLE instead
New
+
+
Create a new component.
+Additional arguments are passed to Initialize()
+
Arguments:
+
+
datum/P the parent datum this component reacts to signals from
+
PostTransfer
+
+
Callback Just after a component is transferred
+
Use this to do any special setup you need to do after being moved to a new object
+Do not call qdel(src) from this function, return COMPONENT_INCOMPATIBLE instead
PreTransfer
+
+
Callback Just before this component is transferred
+
Use this to do any special cleanup you might need to do before being deregged from an object
RegisterWithParent
+
+
Register the component with the parent object
+
Use this proc to register with your parent object
+Overridable proc that's called when added to a new parent
RemoveComponent
+
+
Removes the component from parent, ends up with a null parent
UnregisterFromParent
+
+
Unregister from our parent object
+
Use this proc to unregister from your parent object
+Overridable proc that's called when removed from a parent
_GetInverseTypeList
+
+
Internal proc to create a list of our type and all parent types
_JoinParent
+
+
Internal proc to handle behaviour of components when joining a parent
_RemoveFromParent
+
+
Internal proc to handle behaviour when being removed from a parent
ui_host
+
+
Return the object that is the host of any UI's that this component has
Combat mode component. It makes the user face whichever atom the mouse pointer is hovering,
+amongst other things designed outside of this file, namely PvP and PvE stuff, hence the name.
+Can be toggled on and off by clicking the screen hud object or by pressing the assigned hotkey (default 'C')
Toggles whether the user is intentionally in combat mode. THIS should be the proc you generally use! Has built in visual/to other player feedback, as well as an audible cue to ourselves.
Proc Details
check_flags
+
+
Returns a field of flags that are contained in both the second arg and our bitfield variable.
disable_combat_mode
+
+
Disables combat mode. Please use 'safe_disable_combat_mode' instead, if you wish to also disable the toggle flag.
enable_combat_mode
+
+
Enables combat mode. Please use 'safe_enable_combat_mode' instead, if you wish to also enable the toggle flag.
onMouseMove
+
+
Changes the user direction to (try) match the pointer.
on_death
+
+
Disables combat mode upon death.
on_logout
+
+
Disables combat mode upon logout
on_mob_hud_created
+
+
Creates the hud screen object.
on_move
+
+
Changes the user direction to (try) keep match the pointer.
safe_disable_combat_mode
+
+
Disables intentionally being in combat mode. Please try to use the COMSIG_COMBAT_MODE_CHECK signal for feedback when possible.
safe_enable_combat_mode
+
+
Enables intentionally being in combat mode. Please try to use the COMSIG_COMBAT_MODE_CHECK signal for feedback when possible.
update_combat_lock
+
+
Combat mode can be locked out, forcibly disabled by a status trait.
user_toggle_intentional_combat_mode
+
+
Toggles whether the user is intentionally in combat mode. THIS should be the proc you generally use! Has built in visual/to other player feedback, as well as an audible cue to ourselves.
This proc handles if something knocked the invisible item loose from the turf somehow (probably an explosion). Just make it visible and say it fell loose, then get outta here.
Called every time a carbon with a harmful embed moves, rolling a chance for the item to cause pain. The chance is halved if the carbon is crawling or walking.
Items embedded/stuck to carbons both check whether they randomly fall out (if applicable), as well as if the target mob and limb still exists.
+Items harmfully embedded in carbons have an additional check for random pain (if applicable)
Called when a carbon with an object embedded/stuck to them inspects themselves and clicks the appropriate link to begin ripping the item out. This handles the ripping attempt, descriptors, and dealing damage, then calls safe_remove()
This proc handles the final step and actual removal of an embedded/stuck item from a carbon, whether or not it was actually removed safely.
+Pass TRUE for to_hands if we want it to go to the victim's hands when they pull it out
if both our pain multiplier and jostle pain multiplier are 0, we're harmless and can omit most of the damage related stuff
Proc Details
Topic
+
+
Someone is ripping out the item from the turf by hand
byeItemCarbon
+
+
Something deleted or moved our weapon while it was embedded, how rude!
fallOutCarbon
+
+
Called when then item randomly falls out of a carbon. This handles the damage and descriptors, then calls safe_remove()
initCarbon
+
+
//////////HUMAN PROCS////////////////
+
Set up an instance of embedding for a carbon. This is basically an extension of Initialize() so not much to say
initTurf
+
+
///////////TURF PROCS////////////////
+
Turfs are much lower maintenance, since we don't care if they're in pain, but since they don't bleed or scream, we draw an overlay to show their status.
+The only difference pointy/sticky items make here is text descriptors and pointy objects making a spark shower on impact.
itemMoved
+
+
This proc handles if something knocked the invisible item loose from the turf somehow (probably an explosion). Just make it visible and say it fell loose, then get outta here.
jostleCheck
+
+
Called every time a carbon with a harmful embed moves, rolling a chance for the item to cause pain. The chance is halved if the carbon is crawling or walking.
processCarbon
+
+
Items embedded/stuck to carbons both check whether they randomly fall out (if applicable), as well as if the target mob and limb still exists.
+Items harmfully embedded in carbons have an additional check for random pain (if applicable)
ripOutCarbon
+
+
Called when a carbon with an object embedded/stuck to them inspects themselves and clicks the appropriate link to begin ripping the item out. This handles the ripping attempt, descriptors, and dealing damage, then calls safe_remove()
safeRemoveCarbon
+
+
This proc handles the final step and actual removal of an embedded/stuck item from a carbon, whether or not it was actually removed safely.
+Pass TRUE for to_hands if we want it to go to the victim's hands when they pull it out
Component specifically for explosion sensetive things, currently only applies to heat based explosions but can later perhaps be used for things that are dangerous to handle carelessly like nitroglycerin.
A circle image used to somewhat uncover the adjacent portion of the shadow cone, making mobs and objects behind us somewhat visible.
+The owner mask is still required for those mob going over the default 32x32 px size btw.
An image whose render_source is kept up to date to prevent the mob (or the topmost movable holding it) from being hidden by the mask.
+Will make it use vis_contents instead once a few byonds bugs with images and vis contents are fixed.
A static list of offsets based on icon width and height, because render sources are centered unlike most other visuals,
+and that gives us some problems when the icon is larger or smaller than world.icon_size
Generates the holder and images (if not generated yet) and adds them to client.images.
+Run when the component is registered to a player mob, or upon login.
Resizes the shadow to match the current screen size.
+Run when the client view size is changed, or if the player has a viewsize different than "15x15" on login/comp registration.
A circle image used to somewhat uncover the adjacent portion of the shadow cone, making mobs and objects behind us somewhat visible.
+The owner mask is still required for those mob going over the default 32x32 px size btw.
An image whose render_source is kept up to date to prevent the mob (or the topmost movable holding it) from being hidden by the mask.
+Will make it use vis_contents instead once a few byonds bugs with images and vis contents are fixed.
A static list of offsets based on icon width and height, because render sources are centered unlike most other visuals,
+and that gives us some problems when the icon is larger or smaller than world.icon_size
Proc Details
generate_fov_holder
+
+
Generates the holder and images (if not generated yet) and adds them to client.images.
+Run when the component is registered to a player mob, or upon login.
hide_fov
+
+
Hides the shadow, other visibility comsig procs will take it into account. Called when the mob dies.
manual_centered_render_source
+
+
A hacky comsig proc for things that somehow decide to change icon on the go. may make a change_icon_file() proc later but...
on_change_view
+
+
Called when the client view size is changed.
on_loc_moved
+
+
Pretty much like the above, but meant for other movables the mob is stored in (bodybags, boxes, mechs etc).
on_mob_moved
+
+
Called when the owner mob moves around. Used to keep shadow located right behind us,
+As well as modify the owner mask to match the topmost item.
on_reset_perspective
+
+
Hides the shadow when looking through other items, shows it otherwise.
resize_fov
+
+
Resizes the shadow to match the current screen size.
+Run when the client view size is changed, or if the player has a viewsize different than "15x15" on login/comp registration.
rotate_shadow_cone
+
+
Rotates the shadow cone to a certain degree. Backend shenanigans.
callback to invoke with (parent, victim) before standard detonation - useful for losing a reference to this component or implementing custom behavior. return FALSE to prevent explosion.
callback to invoke with (parent, victim) before standard detonation - useful for losing a reference to this component or implementing custom behavior. return FALSE to prevent explosion.
This component is used to manage labels applied by the hand labeler.
+
Atoms can only have one instance of this component, and therefore only one label at a time.
+This is to avoid having names like "Backpack (label1) (label2) (label3)". This is annoying and abnoxious to read.
+
When a player clicks the atom with a hand labeler to apply a label, this component gets applied to it.
+If the labeler is off, the component will be removed from it, and the label will be removed from its name.
This proc will trigger when someone examines the parent.
+It will attach the text found in the body of the proc to the examine_list and display it to the player examining the parent.
This proc will fire after the parent is hit by a hand labeler which is trying to apply another label.
+Since the parent already has a label, it will remove the old one from the parent's name, and apply the new one.
The name of the label the player is applying to the parent.
Proc Details
Examine
+
+
This proc will trigger when someone examines the parent.
+It will attach the text found in the body of the proc to the examine_list and display it to the player examining the parent.
+
Arguments:
+
+
source: The parent.
+
user: The mob exmaining the parent.
+
examine_list: The current list of text getting passed from the parent's normal examine() proc.
+
InheritComponent
+
+
This proc will fire after the parent is hit by a hand labeler which is trying to apply another label.
+Since the parent already has a label, it will remove the old one from the parent's name, and apply the new one.
OnAttackby
+
+
This proc will trigger when any object is used to attack the parent.
+
If the attacking object is not a hand labeler, it will return.
+If the attacking object is a hand labeler it will restore the name of the parent to what it was before this component was added to it, and the component will be deleted.
+
Arguments:
+
+
source: The parent.
+
attacker: The object that is hitting the parent.
+
user: The mob who is wielding the attacking object.
+
apply_label
+
+
Applies a label to the name of the parent in the format of: "parent_name (label)"
For consuming a dictionary of materials. mats is the map of materials to use and the corresponding amounts, example: list(M/datum/material/glass =100, datum/material/iron=200)
The total amount of materials this material container contains
Proc Details
Initialize
+
+
Sets up the proper signals and fills the list of materials with the appropriate references.
amount2sheet
+
+
Turns a material amount into the amount of sheets it should output
can_hold_material
+
+
The default check for whether we can add materials to this material container.
+
Arguments:
+
+
mat: The material we are checking for insertability.
+
can_insert_amount_mat
+
+
Proc for checking if there is room in the component, returning the amount or else the amount lacking.
get_categories
+
+
Returns all the categories in a recipe.
get_item_material_amount
+
+
returns the amount of material relevant to this container; if this container does not support glass, any glass in 'I' will not be taken into account
get_material_amount
+
+
Returns the amount of a specific material in this container.
has_enough_of_category
+
+
Returns TRUE if you have enough of a specified material category (Which could be multiple materials)
has_enough_of_material
+
+
Returns TRUE if you have enough of the specified material.
has_materials
+
+
Checks if its possible to afford a certain amount of materials. Takes a dictionary of materials.
has_space
+
+
Proc that returns TRUE if the container has space
insert_amount_mat
+
+
For inserting an amount of material
insert_item
+
+
Proc specifically for inserting items, returns the amount of materials entered.
insert_item_materials
+
+
Inserts the relevant materials from an item into this material container.
+
Arguments:
+
+
source: The source of the materials we are inserting.
+
multiplier: The multiplier for the materials being inserted.
+
breakdown_flags: The breakdown bitflags that will be used to retrieve the materials from the source
+
on_attackby
+
+
Proc that allows players to fill the parent with mats
retrieve_all
+
+
Proc to get all the materials and dump them as sheets
retrieve_sheets
+
+
For spawning mineral sheets at a specific location. Used by machines to output sheets.
sheet2amount
+
+
Turns an amount of sheets into the amount of material amount it should output
transer_amt_to
+
+
Proc for transfering materials to another container.
use_amount_mat
+
+
Uses an amount of a specific material, effectively removing it.
use_materials
+
+
For consuming a dictionary of materials. mats is the map of materials to use and the corresponding amounts, example: list(M/datum/material/glass =100, datum/material/iron=200)
A simple component that spawns a mob of the same type and transfers itself to it when parent dies.
+For more complex behaviors, use the COMSIG_ON_MULTIPLE_LIVES_RESPAWN comsig.
Adds a nanite program, replacing existing unique programs of the same type. A source program can be specified to copy its programming onto the new one.
Timestamp to when the nanites were first inserted in the host
Proc Details
add_permanent_program
+
+
Adds permanent programs
+
WARNING: Has no sanity checks. Make sure you know what you are doing! (make sure programs do not conflict)
add_program
+
+
Adds a nanite program, replacing existing unique programs of the same type. A source program can be specified to copy its programming onto the new one.
adjust_nanites
+
+
Modifies the current nanite volume, then checks if the nanites are depleted or exceeding the maximum amount
check_console_locking
+
+
Checks if we can block out console modification
check_host_lockout
+
+
Checks if we can lock out host internal conscious modification
check_viral_prevention
+
+
Checks if we can block out viral replica
cloud_sync
+
+
Syncs the nanites to their assigned cloud copy, if it is available. If it is not, there is a small chance of a software error instead.
delete_nanites
+
+
Used to rid ourselves
+Deletes nanites!
nanites_depleted
+
+
Called when nanites are depleted.
+Deletes ourselves by default.
reject_excess_nanites
+
+
Handles how nanites leave the host's body if they find out that they're currently exceeding the maximum supported amount
+
+
IC explanation:
+Normally nanites simply discard excess volume by slowing replication or 'sweating' it out in imperceptible amounts,
+but if there is a large excess volume, likely due to a programming change that leaves them unable to support their current volume,
+the nanites attempt to leave the host as fast as necessary to prevent nanite poisoning. This can range from minor oozing to nanites
+rapidly bursting out from every possible pathway, causing temporary inconvenience to the host.
set_nanite_bar
+
+
Updates the nanite volume bar visible in diagnostic HUDs
sync
+
+
Syncs the nanite component to another, making it so programs are the same with the same programming (except activation status)
omen.dm: For when you want someone to have a really bad day
+
When you attach an omen component to someone, they start running the risk of all sorts of bad environmental injuries, like nearby vending machines randomly falling on you,
+or hitting your head really hard when you slip and fall, or... well, for now those two are all I have. More will come.
+
Omens are removed once the victim is either maimed by one of the possible injuries, or if they receive a blessing (read: bashing with a bible) from the chaplain.
Whatever's causing the omen, if there is one. Destroying the vessel won't stop the omen, but we destroy the vessel (if one exists) upon the omen ending
Whatever's causing the omen, if there is one. Destroying the vessel won't stop the omen, but we destroy the vessel (if one exists) upon the omen ending
Proc Details
check_accident
+
+
check_accident() is called each step we take
+
While we're walking around, roll to see if there's any environmental hazards (currently only vending machines) on one of the adjacent tiles we can trigger.
+We do the prob() at the beginning to A. add some tension for /when/ it will strike, and B. (more importantly) ameliorate the fact that we're checking up to 5 turfs's contents each time
check_bless
+
+
Hijack the mood system to see if we get the blessing mood event to cancel the omen
check_slip
+
+
If we get knocked down, see if we have a really bad slip and bash our head hard
How many shrapnel projectiles are we responsible for tracking? May be reduced for grenades if someone dives on top of it. Defined by ammo casing for casings, derived from magnitude otherwise
For grenades, tracking how many pellets are removed due to martyrs and how many pellets are added due to the last person to touch it being on top of it
create_blast_pellets() is for when we have a central point we want to shred the surroundings of with a ring of shrapnel, namely frag grenades and landmines.
handle_martyrs() is used for grenades that shoot shrapnel to check if anyone threw themselves/were thrown on top of the grenade, thus absorbing a good chunk of the shrapnel
One of our pellets disappeared due to hitting their max range (or just somehow got qdel'd), remove it from our list and check if we're done (terminated == num_pellets)
How many shrapnel projectiles are we responsible for tracking? May be reduced for grenades if someone dives on top of it. Defined by ammo casing for casings, derived from magnitude otherwise
For grenades, tracking how many pellets are removed due to martyrs and how many pellets are added due to the last person to touch it being on top of it
Another associated list for hit bodyparts on carbons so we can track how much wounding potential we have for each bodypart
Proc Details
create_blast_pellets
+
+
create_blast_pellets() is for when we have a central point we want to shred the surroundings of with a ring of shrapnel, namely frag grenades and landmines.
+
Note that grenades have extra handling for someone throwing themselves/being thrown on top of it, while landmines do not (obviously, it's a landmine!). See [/datum/component/pellet_cloud/proc/handle_martyrs()]
create_casing_pellets
+
+
create_casing_pellets() is for directed pellet clouds for ammo casings that have multiple pellets (buckshot and scatter lasers for instance)
+
Honestly this is mostly just a rehash of [/obj/item/ammo_casing/proc/fire_casing()] for pellet counts > 1, except this lets us tamper with the pellets and hook onto them for tracking purposes.
+The arguments really don't matter, this proc is triggered by COMSIG_PELLET_CLOUD_INIT which is only for this really, it's just a big mess of the state vars we need for doing the stuff over here.
finalize
+
+
All of our pellets are accounted for, time to go target by target and tell them how many things they got hit by.
grenade_armed
+
+
Look alive, we're armed! Now we start watching to see if anyone's covering us
grenade_dropped
+
+
Someone dropped the grenade, so set them to the shooter in case they're on top of it when it goes off
grenade_moved
+
+
Our grenade has moved, reset var/list/bodies so we're "on top" of any mobs currently on the tile
grenade_uncrossed
+
+
Someone who was originally "under" the grenade has moved off the tile and is now eligible for being a martyr and "covering" it
handle_martyrs
+
+
handle_martyrs() is used for grenades that shoot shrapnel to check if anyone threw themselves/were thrown on top of the grenade, thus absorbing a good chunk of the shrapnel
+
Between the time the grenade is armed and the actual detonation, we set var/list/bodies to the list of mobs currently on the new tile, as if the grenade landed on top of them, tracking if any of them move off the tile and removing them from the "under" list
+Once the grenade detonates, handle_martyrs() is called and gets all the new mobs on the tile, and add the ones not in var/list/bodies to var/list/martyrs
+We then iterate through the martyrs and reduce the shrapnel magnitude for each mob on top of it, shredding each of them with some of the shrapnel they helped absorb. This can snuff out all of the shrapnel if there's enough bodies
+
Note we track anyone who's alive and client'd when they get shredded in var/list/purple_hearts, for achievement checking later
nullspace_parent
+
+
Our grenade or landmine or caseless shell or whatever tried deleting itself, so we intervene and nullspace it until we're done here
on_target_qdel
+
+
Someone who was originally "under" the grenade has moved off the tile and is now eligible for being a martyr and "covering" it
pellet_hit
+
+
One of our pellets hit something, record what it was and check if we're done (terminated == num_pellets)
pellet_range
+
+
One of our pellets disappeared due to hitting their max range (or just somehow got qdel'd), remove it from our list and check if we're done (terminated == num_pellets)
pew
+
+
Minor convenience function for creating each shrapnel piece with circle explosions, mostly stolen from the MIRV component
Toggle our machinery on or off. This is called by a hook from default_unfasten_wrench with anchored as only param, so we dont have to copypaste this on every object that can move
We update our connects only when we settle down by taking our current and original direction to find our new connects
+If someone wants it to fucking spin while connected to something go actually knock yourself out
TRUE if we wanna add proper pipe outless under our parent object. this is pretty good if i may so so myself
Proc Details
can_add
+
+
Can we be added to the ductnet?
can_give
+
+
returns TRUE when they can give the specified amount and reagent. called by process request
create_overlays
+
+
We create our luxurious piping overlays/underlays, to indicate where we do what. only called once if use_overlays = TRUE in Initialize()
disable
+
+
we stop acting like a plumbing thing and disconnect if we are, so we can safely be moved and stuff
enable
+
+
settle wherever we are, and start behaving like a piece of plumbing
get_original_direction
+
+
Give the direction of a pipe, and it'll return wich direction it originally was when it's object pointed SOUTH
process_request
+
+
check who can give us what we want, and how many each of them will give us
send_request
+
+
called from in process(). only calls process_request(), but can be overwritten for children with special behaviour
toggle_active
+
+
Toggle our machinery on or off. This is called by a hook from default_unfasten_wrench with anchored as only param, so we dont have to copypaste this on every object that can move
transfer_to
+
+
this is where the reagent is actually transferred and is thus the finish point of our process()
update_dir
+
+
We update our connects only when we settle down by taking our current and original direction to find our new connects
+If someone wants it to fucking spin while connected to something go actually knock yourself out
We're overriding process and not send_request, because all process does is do the requests, so we might aswell cut out the middle man and save some code from running
Proc Details
process
+
+
We're overriding process and not send_request, because all process does is do the requests, so we might aswell cut out the middle man and save some code from running
The magical plumbing component used by the chemical filters. The different supply connects behave differently depending on the filters set on the chemical filter
Check if we should trigger on_found()
+If this returns TRUE, it means an on_found() returned TRUE and immediately broke the chain.
+In most contexts, this should mean to stop.
Generates a list of numbered_display datums for the numerical display system.
check_on_found
+
+
Check if we should trigger on_found()
+If this returns TRUE, it means an on_found() returned TRUE and immediately broke the chain.
+In most contexts, this should mean to stop.
get_max_volume
+
+
Gets our max volume
get_ui_boxes
+
+
Gets our ui_boxes, making it if it doesn't exist.
get_ui_close
+
+
Gets our ui_close, making it if it doesn't exist.
get_ui_continuous
+
+
Gets our ui_continuous, making it if it doesn't exist.
get_ui_left
+
+
Gets our ui_left, making it if it doesn't exist.
on_logout
+
+
Proc triggered by signal to ensure logging out clients don't linger.
orient2hud_legacy
+
+
Orients all objects in legacy mode, and returns the objects to show to the user.
orient2hud_volumetric
+
+
Orients all objects in .. volumetric mode. Does not support numerical display!
ui_hide
+
+
Hides our UI from a mob
ui_show
+
+
Shows our UI to a mob.
volumetric_ui
+
+
Returns TRUE if we are using volumetric UI instead of box UI
For when you want to throw a person at something and have fun stuff happen
+
This component is made for carbon mobs (really, humans), and allows its parent to throw themselves and perform tackles. This is done by enabling throw mode, then clicking on your
+intended target with an empty hand. You will then launch toward your target. If you hit a carbon, you'll roll to see how hard you hit them. If you hit a solid non-mob, you'll
+roll to see how badly you just messed yourself up. If, along your journey, you hit a table, you'll slam onto it and send up to MAX_TABLE_MESSES (8) /obj/items on the table flying,
+and take a bit of extra damage and stun for each thing launched.
+
There are 2 """skill rolls""" involved here, which are handled and explained in sack() and rollTackle() (for roll 1, carbons), and splat() (for roll 2, walls and solid objects)
Some gloves, generally ones that increase mobility, may have a minimum distance to fly. Rocket gloves are especially dangerous with this, be sure you'll hit your target or have a clear background if you miss, or else!
A flat modifier to your roll against your target, as described in rollTackle(). Slightly misleading, skills aren't relevant here, this is a matter of what type of gloves (or whatever) is granting you the ability to tackle.
How fast you sail through the air. Standard tackles are 1 speed, but gloves that throw you faster come at a cost: higher speeds make it more likely you'll be badly injured if you fly into a non-mob obstacle.
Some gloves, generally ones that increase mobility, may have a minimum distance to fly. Rocket gloves are especially dangerous with this, be sure you'll hit your target or have a clear background if you miss, or else!
A flat modifier to your roll against your target, as described in rollTackle(). Slightly misleading, skills aren't relevant here, this is a matter of what type of gloves (or whatever) is granting you the ability to tackle.
How fast you sail through the air. Standard tackles are 1 speed, but gloves that throw you faster come at a cost: higher speeds make it more likely you'll be badly injured if you fly into a non-mob obstacle.
The throwdatum we're currently dealing with, if we need it
Proc Details
checkObstacle
+
+
Check to see if we hit a table, and if so, make a big mess!
checkTackle
+
+
See if we can tackle or not. If we can, leap!
registerTackle
+
+
Store the thrownthing datum for later use
rollTackle
+
+
If cat, "pounce" instead of "tackle".
+rollTackle()
+
This handles all of the modifiers for the actual carbon-on-carbon tackling, and gets its own proc because of how many there are (with plenty more in mind!)
+
The base roll is between (-3, 3), with negative numbers favoring the target, and positive numbers favoring the tackler. The target and the tackler are both assessed for
+how easy they are to knock over, with clumsiness and dwarfiness being strong maluses for each, and gigantism giving a bonus for each. These numbers and ideas
+are absolutely subject to change.
+
In addition, after subtracting the defender's mod and adding the attacker's mod to the roll, the component's base (skill) mod is added as well. Some sources of tackles
+are better at taking people down, like the bruiser and rocket gloves, while the dolphin gloves have a malus in exchange for better mobility.
sack
+
+
If cat, "pounce" instead of "leap".
+sack()
+
sack() is called when you actually smack into something, assuming we're mid-tackle. First it deals with smacking into non-carbons, in two cases:
+
+
If it's a non-carbon mob, we don't care, get out of here and do normal thrown-into-mob stuff
+
Else, if it's something dense (walls, machinery, structures, most things other than the floor), go to splat() and get ready for some high grade shit
+
+
If it's a carbon we hit, we'll call rollTackle() which rolls a die and calculates modifiers for both the tackler and target, then gives us a number. Negatives favor the target, while positives favor the tackler.
+Check rollTackle() for a more thorough explanation on the modifiers at play.
+
Then, we figure out what effect we want, and we get to work! Note that with standard gripper gloves and no modifiers, the range of rolls is (-3, 3). The results are as follows, based on what we rolled:
+
+
-inf to -5: Seriously botched tackle, tackler suffers a concussion, brute damage, and a 3 second paralyze, target suffers nothing
+
-4 to -2: weak tackle, tackler gets 3 second knockdown, target gets shove slowdown but is otherwise fine
+
-1 to 0: decent tackle, tackler gets up a bit quicker than the target
+
1: solid tackle, tackler has more of an advantage getting up quicker
+
2 to 4: expert tackle, tackler has sizeable advantage and lands on their feet with a free passive grab
+
5 to inf: MONSTER tackle, tackler gets up immediately and gets a free aggressive grab, target takes sizeable stamina damage from the hit and is paralyzed for one and a half seconds and knocked down for three seconds
+
+
Finally, we return a bitflag to [COMSIG_MOVABLE_IMPACT] that forces the hitpush to false so that we don't knock them away.
splat
+
+
splat()
+
This is where we handle diving into dense atoms, generally with effects ranging from bad to REALLY bad. This works as a percentile roll that is modified in two steps as detailed below. The higher
+the roll, the more severe the result.
+
Mod 1: Speed
+* Base tackle speed is 1, which is what normal gripper gloves use. For other sources with higher speed tackles, like dolphin and ESPECIALLY rocket gloves, we obey Newton's laws and hit things harder.
+* For every unit of speed above 1, move the lower bound of the roll up by 15. Unlike Mod 2, this only serves to raise the lower bound, so it can't be directly counteracted by anything you can control.
+
Mod 2: Misc
+-Flat modifiers, these take whatever you rolled and add/subtract to it, with the end result capped between the minimum from Mod 1 and 100. Note that since we can't roll higher than 100 to start with,
+wearing a helmet should be enough to remove any chance of permanently paralyzing yourself and dramatically lessen knocking yourself unconscious, even with rocket gloves. Will expand on maybe
+* Wearing a helmet: -6
+* Wearing armor: -6
+* Clumsy: +6
+
Effects: Below are the outcomes based off your roll, in order of increasing severity
+* 1-63: Knocked down for a few seconds and a bit of brute and stamina damage
+* 64-83: Knocked silly, gain some confusion as well as the above
+* 84-93: Cranial trauma, get a concussion and more confusion, plus more damage
+* 94-98: Knocked unconscious, significant chance to get a random mild brain trauma, as well as a fair amount of damage
+* 99-100: Break your spinal cord, get paralyzed, take a bunch of damage too. Very unlucky!
All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.'
+Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink.
+You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it.
The virtual reality turned component.
+Originally created to overcome issues of mob polymorphing locking the player inside virtual reality
+and allow for a more "immersive" virtual reality in a virtual reality experience.
+It relies on comically complex order of logic, expect things to break if procs such as mind/transfer_to() are revamped.
+In short, a barebone not so hardcoded VR framework.
+If you plan to add more devices that make use of this component, remember to isolate their code outta here where possible.
Takes care of moving the component from a mob to another when their mind or ckey is transferred.
+The very reason this component even exists (else one would be stuck playing as a monky if monkyified)
Called when someone or something else is somewhat about to replace the mastermind's mob key somehow.
+And potentially lock the player in a broken virtual reality plot. Not really something to be proud of.
Called to stop the player mind from being transferred should the new mob happen to be one of our masterminds'.
+Since the target's mind.current is going to be null'd in the mind transfer process,
+This has to be done in a different signal proc than on_player_transfer(), by then the mastermind.current will be null.
Takes care of deleting itself, moving the player back to the mastermind's current and queueing the parent for deletion.
+It supports nested virtual realities by recursively calling vr_in_a_vr(), which in turns calls quit(),
+up to the deepest level, where the ckey will be transferred back to our mastermind's mob instead.
+The above operation is skipped when session_paused is TRUE (ergo no player in control of the current mob).
+vars:
Called when the mastermind mind is transferred to another mob.
+This is pretty much just going to simply quit the session until machineries support polymorphed occupants etcetera.
emag_act() hook. Makes the game deadlier, killing the mastermind mob too should the parent die.
Proc Details
PostTransfer
+
+
Required for the component to be transferable from mob to mob.
action_trigger
+
+
The following procs simply acts as hooks for quit(), since components do not use callbacks anymore
connect
+
+
Called when attempting to connect a mob to a virtual reality mob.
+This will return FALSE if the mob is without player or dead. TRUE otherwise
on_player_transfer
+
+
Takes care of moving the component from a mob to another when their mind or ckey is transferred.
+The very reason this component even exists (else one would be stuck playing as a monky if monkyified)
player_hijacked
+
+
Called when someone or something else is somewhat about to replace the mastermind's mob key somehow.
+And potentially lock the player in a broken virtual reality plot. Not really something to be proud of.
pre_player_transfer
+
+
Called to stop the player mind from being transferred should the new mob happen to be one of our masterminds'.
+Since the target's mind.current is going to be null'd in the mind transfer process,
+This has to be done in a different signal proc than on_player_transfer(), by then the mastermind.current will be null.
quit
+
+
Takes care of deleting itself, moving the player back to the mastermind's current and queueing the parent for deletion.
+It supports nested virtual realities by recursively calling vr_in_a_vr(), which in turns calls quit(),
+up to the deepest level, where the ckey will be transferred back to our mastermind's mob instead.
+The above operation is skipped when session_paused is TRUE (ergo no player in control of the current mob).
+vars:
+
+
deathcheck is used to kill the master, you want this FALSE unless for stuff that doesn't involve emagging.
+
cleanup is used to queue the parent for the next vr_clean_master's run, where they'll be deleted should they be dead.
+
mob/override is used for the recursive virtual reality explained above and shouldn't be used outside of vr_in_a_vr().
+
switch_player
+
+
Called when the mastermind mind is transferred to another mob.
+This is pretty much just going to simply quit the session until machineries support polymorphed occupants etcetera.
vr_in_a_vr
+
+
Used for recursive virtual realities shenanigeans and should be called by the above proc.
you_only_live_once
+
+
emag_act() hook. Makes the game deadlier, killing the mastermind mob too should the parent die.
Whether to highlight our program in the main screen. Intended for alerts, but loosely available for any need to notify of changed conditions. Think Windows task bar highlighting. Available even if alerts are muted.
NTNet status, updated every tick by computer running this program. Don't use this for checks if NTNet works, computers do that. Use this for calculations, etc.
Optional, if above is set to 1 checks for specific function of NTNet (currently NTNET_SOFTWAREDOWNLOAD, NTNET_PEERTOPEER, NTNET_SYSTEMCONTROL and NTNET_COMMUNICATION)
Example: "something.gif" - a header image that will be rendered in computer's UI when this program is running at background. Images are taken from /icons/program_icons. Be careful not to use too large images!
Check if the user can run program. Only humans can operate computer. Automatically called in run_program()
+ID must be inserted into a card slot to be read. If the program is not currently installed (as is the case when
+NT Software Hub is checking available software), a list can be given to be used instead.
+Arguments:
+user is a ref of the mob using the device.
+loud is a bool deciding if this proc should use to_chats
+access_to_check is an access level that will be checked against the ID
+transfer, if TRUE and access_to_check is null, will tell this proc to use the program's transfer_access in place of access_to_check
+access can contain a list of access numbers to check against. If access is not empty, it will be used istead of checking any inserted ID.
Whether to highlight our program in the main screen. Intended for alerts, but loosely available for any need to notify of changed conditions. Think Windows task bar highlighting. Available even if alerts are muted.
NTNet status, updated every tick by computer running this program. Don't use this for checks if NTNet works, computers do that. Use this for calculations, etc.
Optional, if above is set to 1 checks for specific function of NTNet (currently NTNET_SOFTWAREDOWNLOAD, NTNET_PEERTOPEER, NTNET_SYSTEMCONTROL and NTNET_COMMUNICATION)
Example: "something.gif" - a header image that will be rendered in computer's UI when this program is running at background. Images are taken from /icons/program_icons. Be careful not to use too large images!
Bitflags (PROGRAM_CONSOLE, PROGRAM_LAPTOP, PROGRAM_TABLET combination) or PROGRAM_ALL
Proc Details
can_run
+
+
Check if the user can run program. Only humans can operate computer. Automatically called in run_program()
+ID must be inserted into a card slot to be read. If the program is not currently installed (as is the case when
+NT Software Hub is checking available software), a list can be given to be used instead.
+Arguments:
+user is a ref of the mob using the device.
+loud is a bool deciding if this proc should use to_chats
+access_to_check is an access level that will be checked against the ID
+transfer, if TRUE and access_to_check is null, will tell this proc to use the program's transfer_access in place of access_to_check
+access can contain a list of access numbers to check against. If access is not empty, it will be used istead of checking any inserted ID.
run_emag
+
+
Called by the device when it is emagged.
+
Emagging the device allows certain programs to unlock new functions. However, the program will
+need to be downloaded first, and then handle the unlock on their own in their run_emag() proc.
+The device will allow an emag to be run multiple times, so the user can re-emag to run the
+override again, should they download something new. The run_emag() proc should return TRUE if
+the emagging affected anything, and FALSE if no change was made (already emagged, or has no
+emag functions).
tap
+
+
Runs when the device is used to attack an atom in non-combat mode.
+
Simulates using the device to read or scan something. Tap is called by the computer during pre_attack
+and sends us all of the related info. If we return TRUE, the computer will stop the attack process
+there. What we do with the info is up to us, but we should only return TRUE if we actually perform
+an action of some sort.
+Arguments:
+A is the atom being tapped
+user is the person making the attack action
+params is anything the pre_attack() proc had in the same-named variable.
This proc is used to determin if a borg should be shown in the list (based on the borg's scrambledcodes var). Syndicate version overrides this to show only syndicate borgs.
Progress of current download, 0 to 100, -1 for no current download
checkID
+
+
Gets the ID's name, if one is inserted into the device. This is a seperate proc solely to be overridden by the syndicate version of the app.
evaluate_borg
+
+
This proc is used to determin if a borg should be shown in the list (based on the borg's scrambledcodes var). Syndicate version overrides this to show only syndicate borgs.
The name of the shuttle template being used as the cargo shuttle. 'supply' is default and contains critical code. Don't change this unless you know what you're doing.
The name of the shuttle template being used as the cargo shuttle. 'supply' is default and contains critical code. Don't change this unless you know what you're doing.
Ref of the last trackable object selected by the user in the tgui window. Updated in the ui_act() proc.
Proc Details
find_atom
+
+
Finds the atom in the appropriate list that the selected var indicates
+
The selected var holds a REF, which is a string. A mob REF may be
+something like "mob_209". In order to find the actual atom, we need
+to search the appropriate list for the REF string. This is dependant
+on the program (Lifeline uses GLOB.human_list, while Fission360 uses
+GLOB.poi_list), but the result will be the same; evaluate the string and
+return an atom reference.
scan
+
+
Runs a scan of all the trackable atoms.
+
Checks each entry in the GLOB of the specific trackable atoms against
+the track() proc, and fill the objects list with lists containing the
+atoms' names and REFs. The objects list is handed to the tgui screen
+for displaying to, and being selected by, the user. A two second
+sleep is used to delay the scan, both for thematical reasons as well
+as to limit the load players may place on the server using these
+somewhat costly loops.
track
+
+
Updates tracking information of the selected target.
+
The track() proc updates the entire set of information about the location
+of the target, including whether the Ntos window should use a pinpointer
+crosshair over the up/down arrows, or none in favor of a rotating arrow
+for far away targets. This information is returned in the form of a list.
trackable
+
+
Checks the trackability of the selected target.
+
If the target is on the computer's Z level, or both are on station Z
+levels, and the target isn't untrackable, return TRUE.
+Arguments:
+*arg1 is the atom being evaluated.
Sets up the signal listener for Supermatter delaminations.
Proc Details
clear_signals
+
+
Removes the signal listener for Supermatter delaminations from the selected supermatter.
+
Pretty much does what it says.
send_alert
+
+
Sends an SM delam alert to the computer.
+
Triggered by a signal from the selected supermatter, this proc sends a notification
+to the computer if the program is either closed or minimized. We do not send these
+notifications to the comptuer if we're the active program, because engineers fixing
+the supermatter probably don't need constant beeping to distract them.
send_start_alert
+
+
Sends an SM delam start alert to the computer.
+
Triggered by a signal from the selected supermatter at the start of a delamination,
+this proc sends a notification to the computer if this program is the active one.
+We do this so that people carrying a tablet with NT CIMS open but with the NTOS window
+closed will still get one audio alert. This is not sent to computers with the program
+minimized or closed to avoid double-notifications.
set_signals
+
+
Sets up the signal listener for Supermatter delaminations.
+
Unregisters any old listners for SM delams, and then registers one for the SM refered
+to in the active variable. This proc is also used with no active SM to simply clear
+the signal and exit.
Log associated with [/proc/log_suspicious_login()] - Intended to hold all logins that failed due to suspicious circumstances such as ban detection, CID randomisation etc.
Adding a wizard area teleport list because motherfucking lag -- Urist
+I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game
Log associated with [/proc/log_suspicious_login()] - Intended to hold all logins that failed due to suspicious circumstances such as ban detection, CID randomisation etc.
Start of queue linked list
+End of queue linked list (used for appending to the list)
+Are we loading in a new map?
+for scheduling different subsystems for different stages of the round
Set to 0 to prevent fire() calls, mostly for admin use or subsystems that may be resumed later
+use the SS_NO_FIRE flag instead for systems that never fire to keep it from even being added to list that is checked every tick
Subsystem Flags to control binary behavior. Flags must be set at compile time or before preinit finishes to take full effect. (You can also restart the mc to force them to process again)
Order of initialization. Higher numbers are initialized first, lower numbers later. Use or create defines such as [INIT_ORDER_DEFAULT] so we can see the order in one file.
Priority Weight: When mutiple subsystems need to run in the same tick, higher priority subsystems will be given a higher share of the tick before MC_TICK_CHECK triggers a sleep, higher priority subsystems also run before lower priority subsystems
Tracks the current execution state of the subsystem. Used to handle subsystems that sleep in fire so the mc doesn't run them again while they are sleeping
Set to 0 to prevent fire() calls, mostly for admin use or subsystems that may be resumed later
+use the SS_NO_FIRE flag instead for systems that never fire to keep it from even being added to list that is checked every tick
Subsystem Flags to control binary behavior. Flags must be set at compile time or before preinit finishes to take full effect. (You can also restart the mc to force them to process again)
Order of initialization. Higher numbers are initialized first, lower numbers later. Use or create defines such as [INIT_ORDER_DEFAULT] so we can see the order in one file.
Priority Weight: When mutiple subsystems need to run in the same tick, higher priority subsystems will be given a higher share of the tick before MC_TICK_CHECK triggers a sleep, higher priority subsystems also run before lower priority subsystems
Tracks the current execution state of the subsystem. Used to handle subsystems that sleep in fire so the mc doesn't run them again while they are sleeping
Should only really happen during april fools.
+Checks to see that it's been at least 5 minutes since the last emergency meeting call.
+Arguments:
+
+
user - Mob who called the meeting
+
emergency_meeting
+
+
Call an emergency meeting
+
Communications subsystem wrapper for the call_emergency_meeting world proc.
+Checks to make sure the proc can be called, and handles
+relevant logging and timing. See that proc definition for more detail.
+Arguments:
New hotkey mode macro set. All input goes into map, game keeps incessently setting your focus to map, we can use ANY all we want here; we don't care about the input bar, the user has to force the input bar every time they want to type.
New hotkey mode macro set. All input goes into map, game keeps incessently setting your focus to map, we can use ANY all we want here; we don't care about the input bar, the user has to force the input bar every time they want to type.
Proc Details
setup_macrosets
+
+
Sets up the key list for classic mode for when badmins screw up vv's.
Generates an obfuscated but constant id for an original id for cases where you don't want players codediving for an id.
+WARNING: MAKE SURE PLAYERS ARE NOT ABLE TO ACCESS THIS. To save performance, it's just secret + an incrementing number. Very guessable if you know what the secret is.
Generates an obfuscated but constant id for an original id for cases where you don't want players codediving for an id.
+WARNING: MAKE SURE PLAYERS ARE NOT ABLE TO ACCESS THIS. To save performance, it's just secret + an incrementing number. Very guessable if you know what the secret is.
Returns null or list(speed, dir deg clockwise from north, windup, turnrate)
+THE RETURNED LIST MUST BE A 4-TUPLE, OR PARALLAX WILL CRASH.
+DO NOT SCREW WITH THIS UNLESS YOU KNOW WHAT YOU ARE DOING.
Generates an id for bespoke elements when given the argument list
+Generating the id here is a bit complex because we need to support named arguments
+Named arguments can appear in any order and we need them to appear after ordered arguments
+We assume that no one will pass in a named argument with a value of null
Proc Details
GetIdFromArguments
+
+
Generates an id for bespoke elements when given the argument list
+Generating the id here is a bit complex because we need to support named arguments
+Named arguments can appear in any order and we need them to appear after ordered arguments
+We assume that no one will pass in a named argument with a value of null
Deciseconds between hearchecks. Too high and instruments seem to lag when people are moving around in terms of who can hear it. Too low and the server lags from this.
Deciseconds between hearchecks. Too high and instruments seem to lag when people are moving around in terms of who can hear it. Too low and the server lags from this.
lower iteration position - Incremented and looped to get "random" sound channels for normal sounds. The channel at this index is returned when asking for a random channel.
higher reserve position - decremented and incremented to reserve sound channels, anything above this is reserved. The channel at this index is the highest unreserved channel.
Amount of channels to reserve for random usage rather than reservations being allowed to reserve all channels. Also a nice safeguard for when someone screws up.
lower iteration position - Incremented and looped to get "random" sound channels for normal sounds. The channel at this index is returned when asking for a random channel.
higher reserve position - decremented and incremented to reserve sound channels, anything above this is reserved. The channel at this index is the highest unreserved channel.
Amount of channels to reserve for random usage rather than reservations being allowed to reserve all channels. Also a nice safeguard for when someone screws up.
Close all UIs regardless of their attachment to src_object.
+
return int The number of UIs closed.
close_uis
+
+
public
+
Close all UIs attached to src_object.
+
required src_object datum The object/datum which owns the UIs.
+
return int The number of UIs closed.
close_user_uis
+
+
public
+
Close all UIs belonging to a user.
+
required user mob The mob who opened/is using the UI.
+optional src_object datum If provided, only close UIs belonging this src_object.
+
return int The number of UIs closed.
force_close_all_windows
+
+
public
+
Force closes all tgui windows.
+
required user mob
force_close_window
+
+
public
+
Force closes the tgui window by window_id.
+
required user mob
+required window_id string
get_open_ui
+
+
public
+
Get a open UI given a user and src_object.
+
required user mob The mob who opened/is using the UI.
+required src_object datum The object/datum which owns the UI.
+
return datum/tgui The found UI.
on_close
+
+
private
+
Remove a UI from the list of open UIs.
+
required ui datum/tgui The UI to be removed.
+
return bool If the UI was removed or not.
on_logout
+
+
private
+
Handle client logout, by closing all their UIs.
+
required user mob The mob which logged out.
+
return int The number of UIs closed.
on_open
+
+
private
+
Add a UI to the list of open UIs.
+
required ui datum/tgui The UI to be added.
on_transfer
+
+
private
+
Handle clients switching mobs, by transferring their UIs.
+
required user source The client's original mob.
+required user target The client's new mob.
+
return bool If the UIs were transferred.
request_pooled_window
+
+
public
+
Requests a usable tgui window from the pool.
+Returns null if pool was exhausted.
+
required user mob
+return datum/tgui
try_update_ui
+
+
public
+
Try to find an instance of a UI, and push an update to it.
+
required user mob The mob who opened/is using the UI.
+required src_object datum The object/datum which owns the UI.
+optional ui datum/tgui The UI to be updated, if it exists.
+optional force_open bool If the UI should be re-opened instead of updated.
+
return datum/tgui The found UI.
update_uis
+
+
public
+
Update all UIs attached to src_object.
+
required src_object datum The object/datum which owns the UIs.
+
return int The number of UIs updated.
update_user_uis
+
+
public
+
Update all UIs belonging to a user.
+
required user mob The mob who opened/is using the UI.
+optional src_object datum If provided, only update UIs belonging this src_object.
If the gamemode fails to be run too many times, we swap to a preset gamemode, this should give admins time to set their preferred one
Proc Details
HandleRandomHardcoreScore
+
+
Handles random hardcore point rewarding if it applies.
antag_report
+
+
gotta escape nerd
declare_completion
+
+
no score no glory
hardcore_random_report
+
+
Generate a report for all players who made it out alive with a hardcore random character and prints their final score
log_roundend_report
+
+
Log the round-end report as an HTML file
+
Composits the roundend report, and saves it in two locations.
+The report is first saved along with the round's logs
+Then, the report is copied to a fixed directory specifically for
+housing the server's last roundend report. In this location,
+the file will be overwritten at the end of each shift.
market_report
+
+
Generate a report for how much money is on station, as well as the richest crewmember on the station.
medal_report
+
+
This is the richest account on station at roundend.
+This is the station's total wealth at the end of the round.
+How many players joined the round.
user: The /mob that initiated the crafting
+collected_requirements: A list of lists of /obj/item instances that satisfy reqs. Top level list is keyed by requirement path.
Remove a duct from our network and commit suicide, because this is probably easier than to check who that duct was connected to and what part of us was lost
remove a plumber. we dont delete ourselves because ductnets dont persist through plumbing objects
Proc Details
add_duct
+
+
Add a duct to our network
add_plumber
+
+
add a plumbing object to either demanders or suppliers
assimilate
+
+
we combine ductnets. this occurs when someone connects to seperate sets of fluid ducts
destroy_network
+
+
destroy the network and tell all our ducts and plumbers we are gone
remove_duct
+
+
Remove a duct from our network and commit suicide, because this is probably easier than to check who that duct was connected to and what part of us was lost
remove_plumber
+
+
remove a plumber. we dont delete ourselves because ductnets dont persist through plumbing objects
Judges the amount of antagonists to apply, for both solo and teams.
+Note that some antagonists (such as traitors, lings, heretics, etc) will add more based on how many times they've been scaled.
+Written as a linear equation--ceil(x/denominator) + offset, or as a fixed constant.
+If written as a linear equation, will be in the form of `list("denominator" = denominator, "offset" = offset).
Base probability used in scaling. The higher it is, the more likely to scale. Kept as a var to allow for config editing._SendSignal(sigtype, list/arguments)
Delay for when execute will get called from the time of post_setup (roundstart) or process (midround/latejoin).
+Make sure your ruleset works with execute being called during the game when using this, and that the clean_up proc reverts it properly in case of faliure.
If set, there needs to be a certain amount of players doing those roles (among the players who won't be drafted) for the rule to be drafted IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
If set, rule will only accept candidates from those roles. If on a roundstart ruleset, requires the player to have the correct antag pref enabled and any of the possible roles enabled.
If enemy_roles was set, this is the amount of enemy job workers needed per threat_level range (0-10,10-20,etc) IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
Requirements are the threat level requirements per pop range.
+With the default values, The rule will never get drafted below 10 threat level (aka: "peaceful extended"), and it requires a higher threat level at lower pops.
By default, a rule is acceptable if it satisfies the threat level/population requirements.
+If your rule has extra checks, such as counting security officers, do that in ready() instead
Runs from gamemode process() if ruleset fails to start, like delayed rulesets not getting valid candidates.
+This one only handles refunding the threat, override in ruleset to clean up the rest.
Called on post_setup on roundstart and when the rule executes on midround and latejoin.
+Give your candidates or assignees equipment and antag datum here.
Gets weight of the ruleset
+Note that this decreases weight if repeatable is TRUE and repeatable_weight_decrease is higher than 0
+Note: If you don't want repeatable rulesets to decrease their weight use the weight variable directly
Here you can perform any additional checks you want. (such as checking the map etc)
+Remember that on roundstart no one knows what their job is at this point.
+IMPORTANT: If ready() returns TRUE, that means pre_execute() or execute() should never fail!
When picking rulesets, if dynamic picks the same one multiple times, it will "scale up".
+However, doing this blindly would result in lowpop rounds (think under 10 people) where over 80% of the crew is antags!
+This function is here to ensure the antag ratio is kept under control while scaling up.
+Returns how much threat to actually spend in the end.
Here you can remove candidates that do not meet your requirements.
+This means if their job is not correct or they have disconnected you can remove them from candidates here.
+Usually this does not need to be changed unless you need some specific requirements from your candidates.
Judges the amount of antagonists to apply, for both solo and teams.
+Note that some antagonists (such as traitors, lings, heretics, etc) will add more based on how many times they've been scaled.
+Written as a linear equation--ceil(x/denominator) + offset, or as a fixed constant.
+If written as a linear equation, will be in the form of `list("denominator" = denominator, "offset" = offset).
Base probability used in scaling. The higher it is, the more likely to scale. Kept as a var to allow for config editing._SendSignal(sigtype, list/arguments)
Delay for when execute will get called from the time of post_setup (roundstart) or process (midround/latejoin).
+Make sure your ruleset works with execute being called during the game when using this, and that the clean_up proc reverts it properly in case of faliure.
If set, there needs to be a certain amount of players doing those roles (among the players who won't be drafted) for the rule to be drafted IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
If set, rule will only accept candidates from those roles. If on a roundstart ruleset, requires the player to have the correct antag pref enabled and any of the possible roles enabled.
If enemy_roles was set, this is the amount of enemy job workers needed per threat_level range (0-10,10-20,etc) IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
Requirements are the threat level requirements per pop range.
+With the default values, The rule will never get drafted below 10 threat level (aka: "peaceful extended"), and it requires a higher threat level at lower pops.
0 -> 9, probability for this rule to be picked against other rules. If zero this will effectively disable the rule.
Proc Details
acceptable
+
+
By default, a rule is acceptable if it satisfies the threat level/population requirements.
+If your rule has extra checks, such as counting security officers, do that in ready() instead
clean_up
+
+
Runs from gamemode process() if ruleset fails to start, like delayed rulesets not getting valid candidates.
+This one only handles refunding the threat, override in ruleset to clean up the rest.
execute
+
+
Called on post_setup on roundstart and when the rule executes on midround and latejoin.
+Give your candidates or assignees equipment and antag datum here.
get_antag_cap
+
+
Returns what the antag cap with the given population is.
get_weight
+
+
Gets weight of the ruleset
+Note that this decreases weight if repeatable is TRUE and repeatable_weight_decrease is higher than 0
+Note: If you don't want repeatable rulesets to decrease their weight use the weight variable directly
pre_execute
+
+
Called on game mode pre_setup for roundstart rulesets.
+Do everything you need to do before job is assigned here.
+IMPORTANT: ASSIGN special_role HERE
ready
+
+
Here you can perform any additional checks you want. (such as checking the map etc)
+Remember that on roundstart no one knows what their job is at this point.
+IMPORTANT: If ready() returns TRUE, that means pre_execute() or execute() should never fail!
round_result
+
+
Set mode result and news report here.
+Only called if ruleset is flagged as HIGH_IMPACT_RULESET
rule_process
+
+
This is called if persistent variable is true everytime SSTicker ticks.
scale_up
+
+
When picking rulesets, if dynamic picks the same one multiple times, it will "scale up".
+However, doing this blindly would result in lowpop rounds (think under 10 people) where over 80% of the crew is antags!
+This function is here to ensure the antag ratio is kept under control while scaling up.
+Returns how much threat to actually spend in the end.
trim_candidates
+
+
Here you can remove candidates that do not meet your requirements.
+This means if their job is not correct or they have disconnected you can remove them from candidates here.
+Usually this does not need to be changed unless you need some specific requirements from your candidates.
What knowledge is incompatible with this. This will simply make it impossible to research knowledges that are in banned_knowledge once this gets researched.
What knowledge is incompatible with this. This will simply make it impossible to research knowledges that are in banned_knowledge once this gets researched.
Apply basic contextual screentips when the user hovers over this item with an empty hand.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
Apply basic contextual screentips when the user hovers over this item with a provided item.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
Apply basic contextual screentips when the user hovers over this item with an item of the given tool behavior.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
Apply basic contextual screentips when the user hovers over this item with an item of the given tool behavior.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
whether we can skip assigning all the vars (since these are bespoke elements, we don't have to reset the vars every time we attach to something, we already know what we are!)
whether we can skip assigning all the vars (since these are bespoke elements, we don't have to reset the vars every time we attach to something, we already know what we are!)
Proc Details
checkEmbedMob
+
+
Checking to see if we're gonna embed into a human
checkEmbedOther
+
+
We need the hit_zone if we're embedding into a human, so this proc only handles if we're embedding into a turf
checkEmbedProjectile
+
+
checkEmbedProjectile() is what we get when a projectile with a defined shrapnel_type impacts a target.
+
If we hit a valid target (carbon or closed turf), we create the shrapnel_type object and immediately call tryEmbed() on it, targeting what we impacted. That will lead
+it to call tryForceEmbed() on its own embed element (it's out of our hands here, our projectile is done), where it will run through all the checks it needs to.
detachFromWeapon
+
+
If we don't want to be embeddable anymore (deactivating an e-dagger for instance)
examined
+
+
Someone inspected our embeddable item
severancePackage
+
+
A different embed element has been attached, so we'll detach and let them handle things
tryForceEmbed
+
+
Arguments:
+
+
I- the item we're trying to insert into the target
+
target- what we're trying to shish-kabob, either a bodypart or a carbon
+
hit_zone- if our target is a carbon, try to hit them in this zone, if we don't have one, pick a random one. If our target is a bodypart, we already know where we're hitting.
A proc path that returns TRUE/FALSE if we should show the strip panel for this entity.
+If it does not exist, the strip menu will always show.
+Will be called with (mob/user).
A proc path that returns TRUE/FALSE if we should show the strip panel for this entity.
+If it does not exist, the strip menu will always show.
+Will be called with (mob/user).
This proc sets up the signals to handle updating viscontents when turfs above/below update. Handle plane and layer here too so that they don't cover other obs/turfs in Dream Maker
Updates the viscontents or underlays below this tile.
Proc Details
Attach
+
+
This proc sets up the signals to handle updating viscontents when turfs above/below update. Handle plane and layer here too so that they don't cover other obs/turfs in Dream Maker
show_bottom_level
+
+
Called when there is no real turf below this turf
update_multiz
+
+
Updates the viscontents or underlays below this tile.
A number between -5 and +5.
+Equivalent to threat_curve_centre, but for the budget split.
+A negative value will weigh towards midround rulesets, and a positive
+value will weight towards roundstart ones.
A number between 0.5 and 4.
+Equivalent to threat_curve_width, but for the budget split.
+Higher value will favour more variance in splits and
+lower value rounds closer to the average.
* If the value is five the range is:
+* 0-4, 5-9, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, 40-54, 45+
+* If it is six the range is:
+* 0-5, 6-11, 12-17, 18-23, 24-29, 30-35, 36-41, 42-47, 48-53, 54+
+* If it is seven the range is:
+* 0-6, 7-13, 14-20, 21-27, 28-34, 35-41, 42-48, 49-55, 56-62, 63+
+
A number between -5 and +5.
+Equivalent to threat_curve_centre, but for the budget split.
+A negative value will weigh towards midround rulesets, and a positive
+value will weight towards roundstart ones.
A number between 0.5 and 4.
+Equivalent to threat_curve_width, but for the budget split.
+Higher value will favour more variance in splits and
+lower value rounds closer to the average.
A special datum used by the families gamemode and dynamic rulesets to centralize code. "Family" and "gang" used interchangeably in code.
+
This datum centralizes code used for the families gamemode / dynamic rulesets. Families incorporates a significant
+amount of unique processing; without this datum, that could would be duplicated. To ensure the maintainability
+of the families gamemode / rulesets, the code was moved to this datum. The gamemode / rulesets instance this
+datum, pass it lists (lists are passed by reference; removing candidates here removes candidates in the gamemode),
+and call its procs. Additionally, the families antagonist datum and families induction package also
+contain vars that reference this datum, allowing for new families / family members to add themselves
+to this datum's lists thereof (primarily used for point calculation). Despite this, the basic team mechanics
+themselves should function regardless of this datum's instantiation, should a player have the gang or cop
+antagonist datum added to them through methods external to the families gamemode / rulesets.
List of all eligible starting family members / undercover cops. Set externally (passed by reference) by gamemode / ruleset; used internally. Note that dynamic uses a list of mobs to handle candidates while game_modes use lists of minds! Don't be fooled!
Keeps track of the amount of deaths since the calling of pre_setup_analogue() if this is a midround handler. Used to prevent a high wanted level due to a large amount of deaths during the shift prior to the activation of this handler / the midround ruleset.
List of all family member minds. Used internally; added to internally, and externally by /obj/item/gang_induction_package when used to induct a new family member.
Internal. Checks if our wanted level has changed; calls update_wanted_level. Only updates wanted level post the initial announcement and until the cops show up. After that, it's locked.
Internal. Polls ghosts and sends in a team of space cops according to the wanted level, accompanied by an announcement. Will let the shuttle leave 10 minutes after sending. Freezes the wanted level.
List of all eligible starting family members / undercover cops. Set externally (passed by reference) by gamemode / ruleset; used internally. Note that dynamic uses a list of mobs to handle candidates while game_modes use lists of minds! Don't be fooled!
Keeps track of the amount of deaths since the calling of pre_setup_analogue() if this is a midround handler. Used to prevent a high wanted level due to a large amount of deaths during the shift prior to the activation of this handler / the midround ruleset.
List of all family member minds. Used internally; added to internally, and externally by /obj/item/gang_induction_package when used to induct a new family member.
The current wanted level. Set internally; used internally, and for updating the wanted HUD.
Proc Details
New
+
+
Sets antag_candidates and restricted_jobs.
+
Sets the antag_candidates and restricted_jobs lists to the equivalent
+lists of its instantiating game_mode / dynamic_ruleset datum. As lists
+are passed by reference, the variable set in this datum and the passed list
+list used to set it are literally the same; changes to one affect the other.
+Like all New() procs, called when the datum is first instantiated.
+There's an annoying caveat here, though -- dynamic rulesets don't have
+lists of minds for candidates, they have lists of mobs. Ghost mobs, before
+the round has started. But we still want to preserve the structure of the candidates
+list by not duplicating it and making sure to remove the candidates as we use them.
+So there's a little bit of boilerplate throughout to preserve the sanctity of this reference.
+Arguments:
+
+
given_candidates - The antag_candidates list or equivalent of the datum instantiating this one.
+
revised_restricted - The restricted_jobs list or equivalent of the datum instantiating this one.
+
announce_gang_locations
+
+
Internal. Announces the presence of families to the entire station and sets sent_announcement to true to allow other checks to occur.
check_wanted_level
+
+
Internal. Checks if our wanted level has changed; calls update_wanted_level. Only updates wanted level post the initial announcement and until the cops show up. After that, it's locked.
on_gain_wanted_level
+
+
Internal. Updates the end_time and sends out an announcement if the wanted level has increased. Called by update_wanted_level().
on_lower_wanted_level
+
+
Internal. Updates the end_time and sends out an announcement if the wanted level has decreased. Called by update_wanted_level().
post_setup_analogue
+
+
post_setup() or execute() equivalent.
+
This proc is always called externally, by the instantiating game_mode / dynamic_ruleset.
+This is done during the post_setup() or execute() phase, after the pre_setup() / pre_execute() phase.
+It is intended to take the place of the code that would normally occupy the pre_setup()
+or pre_execute() proc. As such, it ensures that all prospective starting family members /
+undercover cops are eligible, and picks replacements if there were ineligible cops / family members.
+It then assigns gear to the finalized family members and undercover cops, adding them to its lists,
+and sets the families announcement proc (that does the announcing) to trigger in five minutes.
+Additionally, if given the argument TRUE, it will return FALSE if there are no eligible starting family members.
+This is only to be done if the instantiating datum is a dynamic_ruleset, as these require returns
+while a game_mode is not expected to return early during this phase.
+Arguments:
+
+
return_if_no_gangs - Boolean that determines if the proc should return FALSE should it find no eligible family members. Should be used for dynamic only.
+
pre_setup_analogue
+
+
pre_setup() or pre_execute() equivalent.
+
This proc is always called externally, by the instantiating game_mode / dynamic_ruleset.
+This is done during the pre_setup() or pre_execute() phase, after first instantiation
+and the modification of gangs_to_generate, gang_balance_cap, and midround_ruleset.
+It is intended to take the place of the code that would normally occupy the pre_setup()
+or pre_execute() proc, were the code localized to the game_mode or dynamic_ruleset datum respectively
+as opposed to this handler. As such, it picks players to be chosen for starting familiy members
+or undercover cops prior to assignment to jobs. Sets start_time, default end_time,
+and the current value of deaths_during_shift, to ensure the wanted level only cares about
+the deaths since this proc has been called.
+Takes no arguments.
process_analogue
+
+
process() or rule_process() equivalent.
+
This proc is always called externally, by the instantiating game_mode / dynamic_ruleset.
+This is done during the process() or rule_process() phase, after post_setup() or
+execute() and at regular intervals thereafter. process() and rule_process() are optional
+for a game_mode / dynamic_ruleset, but are important for this gamemode. It is of central
+importance to the gamemode's flow, calculating wanted level updates, family point gain,
+and announcing + executing the arrival of the space cops, achieved through calling internal procs.
+Takes no arguments.
send_in_the_fuzz
+
+
Internal. Polls ghosts and sends in a team of space cops according to the wanted level, accompanied by an announcement. Will let the shuttle leave 10 minutes after sending. Freezes the wanted level.
set_round_result_analogue
+
+
set_round_result() or round_result() equivalent.
+
This proc is always called externally, by the instantiating game_mode / dynamic_ruleset.
+This is done by the set_round_result() or round_result() procs, at roundend.
+Sets the ticker subsystem to the correct result based off of the relative populations
+of space cops and family members.
+Takes no arguments.
update_wanted_level
+
+
Internal. Updates the icon states for everyone, and calls procs that send out announcements / change the end_time if the wanted level has changed.
Whether or not screentips are enabled.
+This is updated by the preference for cheaper reads than would be
+had with a proc call, especially on one of the hottest procs in the
+game (MouseEntered).
+The color to use for the screentips.
+This is updated by the preference for cheaper reads than would be
+had with a proc call, especially on one of the hottest procs in the
+game (MouseEntered).
Whether or not screentips are enabled.
+This is updated by the preference for cheaper reads than would be
+had with a proc call, especially on one of the hottest procs in the
+game (MouseEntered).
+The color to use for the screentips.
+This is updated by the preference for cheaper reads than would be
+had with a proc call, especially on one of the hottest procs in the
+game (MouseEntered).
Write here however many samples, follow this syntax: "%note num%"='%sample file%' eg. "27"='synthesizer/e2.ogg'. Key must never be lower than 0 and higher than 127
Volume multiplier. Synthesized instruments are quite loud and I don't like to cut off potential detail via editing. (someone correct me if this isn't a thing)
Write here however many samples, follow this syntax: "%note num%"='%sample file%' eg. "27"='synthesizer/e2.ogg'. Key must never be lower than 0 and higher than 127
Volume multiplier. Synthesized instruments are quite loud and I don't like to cut off potential detail via editing. (someone correct me if this isn't a thing)
How many steps it's taken to get here from the start (currently pulling double duty as steps taken & cost to get here, since all moves incl diagonals cost 1 rn)
How many steps it's taken to get here from the start (currently pulling double duty as steps taken & cost to get here, since all moves incl diagonals cost 1 rn)
Copies all languages from the supplied atom/language holder. Source should be overridden when you
+do not want the language overwritten by later atom updates or want to avoid blocked languages.
Initializes, and copies in the languages from the current atom if available.
add_blocked_language
+
+
Adds a single language or list of languages to the blocked language list.
can_speak_language
+
+
Checks if you can speak the language. Tongue limitations should be supplied as an argument.
copy_languages
+
+
Copies all languages from the supplied atom/language holder. Source should be overridden when you
+do not want the language overwritten by later atom updates or want to avoid blocked languages.
get_atom
+
+
Gets the atom, since we some times need to check if the tongue has limitations.
get_random_spoken_language
+
+
Gets a random spoken language, useful for forced speech and such.
get_random_understood_language
+
+
Gets a random understood language, useful for hallucinations and such.
get_selected_language
+
+
Returns selected language if it can be spoken, or decides, sets and returns a new selected language if possible.
grant_all_languages
+
+
Grants every language to understood and spoken, and gives omnitongue.
grant_language
+
+
Grants the supplied language.
has_language
+
+
Checks if you have the language. If spoken is true, only checks if you can speak the language.
open_language_menu
+
+
Opens a language menu reading from the language holder.
remove_all_languages
+
+
Removes every language and optionally sets omnitongue false. If a non default source is supplied, only removes that source.
remove_blocked_language
+
+
Removes a single language or list of languages from the blocked language list.
remove_language
+
+
Removes a single language or source, removing all sources returns the pre-removal state of the language.
update_atom_languages
+
+
Empties out the atom specific languages and updates them according to the supplied atoms language holder.
used for debugging in testing (doesn't put people out of the game, some other shit i forgot, who knows just don't set this in live) honestly kinda deprecated
and these (judgement_innocent_votes, judgement_abstain_votes and judgement_guilty_votes) are the judgement phase votes, aka people sorting themselves into guilty and innocent, and "eh, i don't really care" lists. whichever has more inno or guilty wins!
Helper proc that adds a random role of a type to a setup. if it doesn't exist in the setup, it adds the path to the list and otherwise bumps the path in the list up one. unique roles can only get added once.
PHASE ONE: TALLY UP ALL NUMBERS OF PEOPLE STILL ALIVE
+PHASE TWO: SEND STATS TO SOLO ANTAGS, SEE IF THEY WON OR TEAMS CANNOT WIN
+Lets the game award roles with all their checks and sanity, prevents achievements given out for debug games
Called when the game is setting up, AFTER map is loaded but BEFORE the phase timers start. Creates and places each role's body and gives the correct player key
Triggers at beginning of the game when there is a confirmed list of valid, ready players.
+Creates a 100% ready game that has NOT started (no players in bodies)
+Followed by start game
The actual start of night for players. Mostly info is given at the start of the night as the end of the night is when votes and actions are submitted and tried.
The end of the game is in two procs, because we want a bit of time for players to see eachothers roles.
+Because of how check_victory works, the game is halted in other places by this point.
used for debugging in testing (doesn't put people out of the game, some other shit i forgot, who knows just don't set this in live) honestly kinda deprecated
and these (judgement_innocent_votes, judgement_abstain_votes and judgement_guilty_votes) are the judgement phase votes, aka people sorting themselves into guilty and innocent, and "eh, i don't really care" lists. whichever has more inno or guilty wins!
Helper proc that adds a random role of a type to a setup. if it doesn't exist in the setup, it adds the path to the list and otherwise bumps the path in the list up one. unique roles can only get added once.
award_role
+
+
PHASE ONE: TALLY UP ALL NUMBERS OF PEOPLE STILL ALIVE
+PHASE TWO: SEND STATS TO SOLO ANTAGS, SEE IF THEY WON OR TEAMS CANNOT WIN
+Lets the game award roles with all their checks and sanity, prevents achievements given out for debug games
+
Arguments:
+
+
award: path of the award
+
role: mafia_role datum to reward.
+
basic_setup
+
+
Called when enough players have signed up to fill a setup. DOESN'T NECESSARILY MEAN THE GAME WILL START.
+
Checks for a custom setup, if so gets the required players from that and if not it sets the player requirement to MAFIA_MAX_PLAYER_COUNT and generates one IF basic setup starts a game.
+Checks if everyone signed up is an observer, and is still connected. If people aren't, they're removed from the list.
+If there aren't enough players post sanity, it aborts. otherwise, it selects enough people for the game and starts preparing the game for real.
check_signups
+
+
Filters inactive player into a different list until they reconnect, and removes players who are no longer ghosts.
+
If a disconnected player gets a non-ghost mob and reconnects, they will be first put back into mafia_signup then filtered by that.
check_trial
+
+
Players have voted someone up, and now the person must defend themselves while the town votes innocent or guilty.
+
What players do in this phase:
+
+
Vote innocent or guilty, if they are not on trial.
+
Defend themselves and wait for judgement, if they are.
+
Leads to the lynch phase.
+Arguments:
+
verbose: boolean, announces whether there were votes or not. after judgement it goes back here with no voting period to end the day.
+
check_victory
+
+
Checks to see if a faction (or solo antagonist) has won.
+
Calculates in this order:
+
+
counts up town, mafia, and solo
+
solos can count as town members for the purposes of mafia winning
+
sends the amount of living people to the solo antagonists, and see if they won OR block the victory of the teams
+
checks if solos won from above, then if town, then if mafia
+
starts the end of the game if a faction won
+
returns TRUE if someone won the game, halting other procs from continuing in the case of a victory
+
create_bodies
+
+
Called when the game is setting up, AFTER map is loaded but BEFORE the phase timers start. Creates and places each role's body and gives the correct player key
+
Notably:
+
+
Toggles godmode so the mafia players cannot kill themselves
+
Adds signals for voting overlays, see display_votes proc
+
gives mafia panel
+
sends the greeting text (goals, role name, etc)
+
display_votes
+
+
Adds mutable appearances to people who get publicly voted on (so not night votes) showing how many people are picking them
+Arguments:
+
+
source: the body of the role getting the overlays
+
overlay_list: signal var passing the overlay list of the mob
+
end_game
+
+
Cleans up the game, resetting variables back to the beginning and removing the map with the generator.
generate_random_setup
+
+
Returns a semirandom setup with 12 roles. balance not guaranteed!
+
please check the variables at the top of the proc to see how much of each role types it picks
get_random_voter
+
+
Returns a random person who voted for whatever vote (day vote, night kill vote)
+Arguments:
+
+
vote_type: vote type (getting a random day voter, or mafia night voter)
+
get_vote_count
+
+
Returns how many people voted for the role, in whatever vote (day vote, night kill vote)
+Arguments:
+
+
role: the mafia role the proc tries to get the amount of votes for
+
vote_type: the vote type (getting how many day votes were for the role, or mafia night votes for the role)
+
get_vote_winner
+
+
Returns whichever role got the most votes, in whatever vote (day vote, night kill vote)
+returns null if no votes
+Arguments:
+
+
vote_type: the vote type (getting the role that got the most day votes, or the role that got the most mafia votes)
+
lockdown
+
+
After the voting and judgement phases, the game goes to night shutting the windows and beginning night with a proc.
lynch
+
+
Players have voted innocent or guilty on the person on trial, and that person is now killed or returned home.
+
What players do in this phase:
+
+
r/watchpeopledie
+
If the accused is killed, their true role is revealed to the rest of the players.
+
prepare_game
+
+
Triggers at beginning of the game when there is a confirmed list of valid, ready players.
+Creates a 100% ready game that has NOT started (no players in bodies)
+Followed by start game
+
Does the following:
+
+
Picks map, and loads it
+
Grabs landmarks if it is the first time it's loading
+
Sets up the role list
+
Puts players in each role randomly
+Arguments:
+
setup_list: list of all the datum setups (fancy list of roles) that would work for the game
+
ready_players: list of filtered, sane players (so not playing or disconnected) for the game to put into roles
+
reset_votes
+
+
Clears out the votes of a certain type (day votes, mafia kill votes) while leaving others untouched
resolve_night
+
+
The end of the night, and a series of signals for the order of events on a night.
+
Order of events, and what they mean:
+
+
Start of resolve (NIGHT_START) is for activating night abilities that MUST go first
+
Action phase (NIGHT_ACTION_PHASE) is for non-lethal day abilities
+
Mafia then tallies votes and kills the highest voted person (note: one random voter visits that person for the purposes of roleblocking)
+
Killing phase (NIGHT_KILL_PHASE) is for lethal night abilities
+
End of resolve (NIGHT_END) is for cleaning up abilities that went off and i guess doing some that must go last
+
Finally opens the curtains and calls the start of day phase, completing the cycle until check victory returns TRUE
+
send_home
+
+
Teenie helper proc to move players back to their home.
+Used in the above, but also used in the debug button "send all players home"
+Arguments:
+
+
role: mafia role that is getting sent back to the game.
+
start_day
+
+
How every day starts.
+
What players do in this phase:
+
+
If day one, just a small starting period to see who is in the game and check role, leading to the night phase.
+
Otherwise, it's a longer period used to discuss events that happened during the night, leading to the voting phase.
+
start_game
+
+
The game by this point is now all set up, and so we can put people in their bodies and start the first phase.
+
Does the following:
+
+
Creates bodies for all of the roles with the first proc
+
Starts the first day manually (so no timer) with the second proc
+
start_night
+
+
The actual start of night for players. Mostly info is given at the start of the night as the end of the night is when votes and actions are submitted and tried.
+
What players do in this phase:
+
+
Mafia are told to begin voting on who to kill
+
Powers that are picked during the day announce themselves right now
+
start_the_end
+
+
The end of the game is in two procs, because we want a bit of time for players to see eachothers roles.
+Because of how check_victory works, the game is halted in other places by this point.
+
What players do in this phase:
+
+
See everyone's role postgame
+
See who won the game
+Arguments:
+
message: string, if non-null it sends it to all players. used to announce team victories while solos are handled in check victory
+
start_voting_phase
+
+
Players have finished the discussion period, and now must put up someone to the chopping block.
+
What players do in this phase:
+
+
Vote on which player to put up for lynching, leading to the judgement phase.
+
If no votes are case, the judgement phase is skipped, leading to the night phase.
+
toggle_night_curtains
+
+
Shuts poddoors attached to mafia.
+Arguments:
+
+
close: boolean, the state you want the curtains in.
+
try_autostart
+
+
Called when someone signs up, and sees if there are enough people in the signup list to begin.
+
Only checks if everyone is actually valid to start (still connected and an observer) if there are enough players (basic_setup)
vote_for
+
+
Proc that goes off when players vote for something with their mafia panel.
+
If teams, it hides the tally overlay and only sends the vote messages to the team that is voting
+Arguments:
+
+
voter: the mafia role that is trying to vote for...
+
target: the mafia role that is getting voted for
+
vote_type: type of vote submitted (is this the day vote? is this the mafia night vote?)
+
teams: see mafia team defines for what to put in, makes the messages only send to a specific team (so mafia night votes only sending messages to mafia at night)
This type is responsible for any map generation behavior that is done in areas, override this to allow for area-specific map generation. This generation is ran by areas in initialize.
Proc to trigger a load at a specific area. Calls on_map_loaded(T.z, loaded_bounds) afterwards.
Proc Details
load
+
+
Proc to trigger a load at a specific area. Calls on_map_loaded(T.z, loaded_bounds) afterwards.
+
@params
+
+
turf/T - Turf to load at
+
centered - Center at T or load with the bottomright corner being at T
+
orientation - SOUTH is default, anything else rotates the map to face it with the point of reference being the map itself is facing south by default. Cardinals only, don't be a 4head and put in multiple flags. It won't work or be pretty if you try.
+
annihilate - Should we destroy stuff in our bounds while loading
+
force_cache - Should we force the parsed shuttle to cache instead of being GC'd post loading if it wasn't going to be cached by default
+
rotate_placement_to_orientation - Has no effect if centered. Should we rotate where we load it around the turf we're loading at? Used for stuff like engine submaps when the station is rotated.
How much does this shuttle cost the cargo budget to purchase? Put in terms of CARGO_CRATE_VALUE to properly scale the cost with the current balance of cargo's income.
How much does this shuttle cost the cargo budget to purchase? Put in terms of CARGO_CRATE_VALUE to properly scale the cost with the current balance of cargo's income.
Set this variable to something not null, this'll be the preferred unarmed parry in most cases if [can_martial_parry] is TRUE. YOU MUST RUN [get_block_parry_data(this)] INSTEAD OF DIRECTLY ACCESSING!
Set this variable to something not null, this'll be the preferred unarmed parry in most cases if [can_martial_parry] is TRUE. YOU MUST RUN [get_block_parry_data(this)] INSTEAD OF DIRECTLY ACCESSING!
this var is so that the strong punch is always aiming for the body part the user is targeting and not trying to apply to the chest before deviating
+this is the critical hit damage added to the attack if it rolls, it starts at 0 because it'll be changed when rolled
+Crashing Wave Kick: Harm Disarm combo, throws people seven tiles backwards
Gnashing Teeth: Harm Harm, high force punch on every second harm punch, has a chance to crit for near triple damage
Proc Details
dropKick
+
+
Keelhaul: Harm Grab combo, knocks people down, deals stamina damage while they're on the floor
launchKick
+
+
this var is so that the strong punch is always aiming for the body part the user is targeting and not trying to apply to the chest before deviating
+this is the critical hit damage added to the attack if it rolls, it starts at 0 because it'll be changed when rolled
+Crashing Wave Kick: Harm Disarm combo, throws people seven tiles backwards
strongPunch
+
+
Gnashing Teeth: Harm Harm, high force punch on every second harm punch, has a chance to crit for near triple damage
Bitflags that influence how SSmaterials handles this material.
+Materials "Traits". its a map of key = category | Value = Bool. Used to define what it can be used for
Bitflags that influence how SSmaterials handles this material.
+Materials "Traits". its a map of key = category | Value = Bool. Used to define what it can be used for
Unique ID. You can never have different modifications with the same ID. By default, this SHOULD NOT be set. Only set it for cases where you're dynamically making modifiers/need to have two types overwrite each other. If unset, uses path (converted to text) as ID.
Whether or not this is a variable modifier. Variable modifiers can NOT be ever auto-cached. ONLY CHECKED VIA INITIAL(), EFFECTIVELY READ ONLY (and for very good reason)
Unique ID. You can never have different modifications with the same ID. By default, this SHOULD NOT be set. Only set it for cases where you're dynamically making modifiers/need to have two types overwrite each other. If unset, uses path (converted to text) as ID.
Whether or not this is a variable modifier. Variable modifiers can NOT be ever auto-cached. ONLY CHECKED VIA INITIAL(), EFFECTIVELY READ ONLY (and for very good reason)
Proc Details
apply_multiplicative
+
+
Returns new multiplicative movespeed after modification.
Checks damage of a hulk's arm and applies bone wounds as necessary.
Proc Details
break_an_arm
+
+
Checks damage of a hulk's arm and applies bone wounds as necessary.
+
Called by specific atoms being attacked, such as walls. If an atom
+does not call this proc, than punching that atom will not cause
+arm breaking (even if the atom deals recoil damage to hulks).
+Arguments:
+arg1 is the arm to evaluate damage of and possibly break.
This is a clean system of applying outfits to mobs, if you need to equip someone in a uniform
+this is the way to do it cleanly and properly.
+
You can also specify an outfit datum on a job to have it auto equipped to the mob on join
+
/mob/living/carbon/human/proc/equipOutfit(outfit) is the mob level proc to equip an outfit
+and you pass it the relevant datum outfit
+
outfits can also be saved as json blobs downloadable by a client and then can be uploaded
+by that user to recreate the outfit, this is used by admins to allow for custom event outfits
+that can be restored at a later date
current scroll turn - applied after angle. if angle is 0 (picture moving north) and turn is 90, it would be like if you turned your viewport 90 deg clockwise.
current scroll turn - applied after angle. if angle is 0 (picture moving north) and turn is 90, it would be like if you turned your viewport 90 deg clockwise.
@params
+speed - ds per loop
+turn - angle clockwise from north to turn the motion to
+windup - ds to spend on windups. 0 for immediate.
+turn_speed - ds to spend on turning. 0 for immediate.
Eye
+
+
Gets the eye we should be centered on
GetPlaneMaster
+
+
Gets the base parallax planemaster for things like turning
HardResetAnimations
+
+
fully resets animation state
StopScrolling
+
+
Smoothly stops the animation, turning to a certain angle as needed.
Sync
+
+
Syncs us to our parallax objects. Does NOT check if we should have those objects, that's Reset()'s job.
+
Doesn't move/update positions/screen locs either.
+
Also ensures movedirs are correct for the eye's pos.
Parse a map, possibly cropping it.
+Do not use the crop function unless strictly necessary.
+WARNING: Crop function crops based on the tiles you'd see in the map editor. If you're planning to load it in in a different orientation later, you better have done the math.
+It's recommended that you do not crop using this at all.
Parse a map, possibly cropping it.
+Do not use the crop function unless strictly necessary.
+WARNING: Crop function crops based on the tiles you'd see in the map editor. If you're planning to load it in in a different orientation later, you better have done the math.
+It's recommended that you do not crop using this at all.
Called when we've hit the goal with the node that represents the last tile, then sets the path var to that path so it can be returned by datum/pathfind/proc/search
For performing diagonal scans from a given starting turf.
+
Unlike lateral scans, these only are called from the main search loop, so we don't need to worry about returning anything,
+though we do need to handle the return values of our lateral subscans of course.
+
Arguments:
+
+
original_turf: What turf did we start this scan at?
+
heading: What direction are we going in? Obviously, should be diagonal
+
parent_node: We should always have a parent node for diagonals
+
lateral_scan_spec
+
+
For performing lateral scans from a given starting turf.
+
These scans are called from both the main search loop, as well as subscans for diagonal scans, and they treat finding interesting turfs slightly differently.
+If we're doing a normal lateral scan, we already have a parent node supplied, so we just create the new node and immediately insert it into the heap, ezpz.
+If we're part of a subscan, we still need for the diagonal scan to generate a parent node, so we return a node datum with just the turf and let the diag scan
+proc handle transferring the values and inserting them into the heap.
+
Arguments:
+
+
original_turf: What turf did we start this scan at?
+
heading: What direction are we going in? Obviously, should be cardinal
+
parent_node: Only given for normal lateral scans, if we don't have one, we're a diagonal subscan.
+
search
+
+
search() is the proc you call to kick off and handle the actual pathfinding, and kills the pathfind datum instance when it's done.
+
If a valid path was found, it's returned as a list. If invalid or cross-z-level params are entered, or if there's no valid path found, we
+return null, which /proc/get_path_to translates to an empty list (notable for simple bots, who need empty lists)
unwind_path
+
+
Called when we've hit the goal with the node that represents the last tile, then sets the path var to that path so it can be returned by datum/pathfind/proc/search
Someone thought we were nice! We get a little heart in OOC until we join the server past the below time (we can keep it until the end of the round otherwise)
List with a key string associated to a list of keybindings. Unlike key_bindings, this one operates on raw key, allowing for binding a key that triggers regardless of if a modifier is depressed as long as the raw key is sent.
The playtime_reward_cloak variable can be set to TRUE from the prefs menu only once the user has gained over 5K playtime hours. If true, it allows the user to get a cool looking roundstart cloak.
Which of the 5 persistent scar slots we randomly roll to load for this round, if enabled. Actually rolled in [/datum/preferences/proc/load_character(slot)]
We have 5 slots for persistent scars, if enabled we pick a random one to load (empty by default) and scars at the end of the shift if we survived as our original person
Someone thought we were nice! We get a little heart in OOC until we join the server past the below time (we can keep it until the end of the round otherwise)
List with a key string associated to a list of keybindings. Unlike key_bindings, this one operates on raw key, allowing for binding a key that triggers regardless of if a modifier is depressed as long as the raw key is sent.
The playtime_reward_cloak variable can be set to TRUE from the prefs menu only once the user has gained over 5K playtime hours. If true, it allows the user to get a cool looking roundstart cloak.
Which of the 5 persistent scar slots we randomly roll to load for this round, if enabled. Actually rolled in [/datum/preferences/proc/load_character(slot)]
We have 5 slots for persistent scars, if enabled we pick a random one to load (empty by default) and scars at the end of the shift if we survived as our original person
New, standardized method for chemicals to affect hydroponics trays.
+Defined on a per-chem level as opposed to by the tray.
+Can affect plant's health, stats, or cause the plant to react in certain ways.
Proc Details
on_hydroponics_apply
+
+
New, standardized method for chemicals to affect hydroponics trays.
+Defined on a per-chem level as opposed to by the tray.
+Can affect plant's health, stats, or cause the plant to react in certain ways.
Whether we've had at least WOUND_DETERMINATION_SEVERE (2.5u) of determination at any given time. No damage slowdown immunity or indication we're having a second wind if it's just a single moderate wound
Whether we've had at least WOUND_DETERMINATION_SEVERE (2.5u) of determination at any given time. No damage slowdown immunity or indication we're having a second wind if it's just a single moderate wound
If we have multiple bleeding wounds, we count the number of bleeding wounds, then multiply the clot rate by this^(n) before applying it to each cut, so more cuts = less clotting per cut (though still more total clotting)
If we have multiple bleeding wounds, we count the number of bleeding wounds, then multiply the clot rate by this^(n) before applying it to each cut, so more cuts = less clotting per cut (though still more total clotting)
scars are cosmetic datums that are assigned to bodyparts once they recover from wounds. Each wound type and severity have their own descriptions for what the scars
+look like, and then each body part has a list of "specific locations" like your elbow or wrist or wherever the scar can appear, to make it more interesting than "right arm"
How many tiles away someone can see this scar, goes up with severity. Clothes covering this limb will decrease visibility by 1 each, except for the head/face which is a binary "is mask obscuring face" check
How many tiles away someone can see this scar, goes up with severity. Clothes covering this limb will decrease visibility by 1 each, except for the head/face which is a binary "is mask obscuring face" check
Proc Details
format
+
+
Used to format a scar to safe in preferences for persistent scars
format_amputated
+
+
Used to format a scar to safe in preferences for persistent scars
generate
+
+
generate() is used to actually fill out the info for a scar, according to the limb and wound it is provided.
+
After creating a scar, call this on it while targeting the scarred bodypart with a given wound to apply the scar.
+
Arguments:
+
+
BP- The bodypart being targeted
+
W- The wound being used to generate the severity and description info
+
add_to_scars- Should always be TRUE unless you're just storing a scar for later usage, like how cuts want to store a scar for the highest severity of cut, rather than the severity when the wound is fully healed (probably demoted to moderate)
+
get_examine_description
+
+
What will show up in examine_more() if this scar is visible
is_visible
+
+
Whether a scar can currently be seen by the viewer
Here is the big, bad function that broadcasts a message given the appropriate
+parameters.
+
@param M:
+Reference to the mob/speaker, stored in signal.data["mob"]
+
@param vmask:
+Boolean value if the mob is "hiding" its identity via voice mask, stored in
+signal.data["vmask"]
+
@param vmessage:
+If specified, will display this as the message; such as "chimpering"
+for monkeys if the mob is not understood. Stored in signal.data["vmessage"].
+
@param radio:
+Reference to the radio broadcasting the message, stored in signal.data["radio"]
+
@param message:
+The actual string message to display to mobs who understood mob M. Stored in
+signal.data["message"]
+
@param name:
+The name to display when a mob receives the message. signal.data["name"]
+
@param job:
+The name job to display for the AI when it receives the message. signal.data["job"]
+
@param realname:
+The "real" name associated with the mob. signal.data["realname"]
+
@param vname:
+If specified, will use this name when mob M is not understood. signal.data["vname"]
+
@param data:
+If specified:
+1 -- Will only broadcast to intercoms
+2 -- Will only broadcast to intercoms and station-bounced radios
+3 -- Broadcast to syndicate frequency
+4 -- AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob
+
@param compression:
+If 0, the signal is audible
+If nonzero, the signal may be partially inaudible or just complete gibberish.
+
@param level:
+The list of Z levels that the sending radio is broadcasting to. Having 0 in the list broadcasts on all levels
Sets the new value of this skill in the holder skills list.
+As well as possible feedback messages or secondary effects on value change, that's on you.
Ensures what someone's setting as a value for this skill is valid.
set_skill_value
+
+
Sets the new value of this skill in the holder skills list.
+As well as possible feedback messages or secondary effects on value change, that's on you.
Base skill modifier datum, used to modify a player skills without directly touching their values, levels and affinity
+and cause lots of edge cases. These are fairly simple overall... make a subtype though, don't use this one.
Playing variables
+Build by compile_chords()
+Must be rebuilt on instrument switch.
+Compilation happens when we start playing and is cleared after we finish playing.
+Format: list of chord lists, with chordlists having (key1, key2, key3, tempodiv)
Compiles our lines into "chords" with filenames for legacy playback. This makes there have to be a bit of lag at the beginning of the song, but repeats will not have to parse it again, and overall playback won't be impacted by as much lag.
Compiles our lines into "chords" with numbers. This makes there have to be a bit of lag at the beginning of the song, but repeats will not have to parse it again, and overall playback won't be impacted by as much lag.
Playing variables
+Build by compile_chords()
+Must be rebuilt on instrument switch.
+Compilation happens when we start playing and is cleared after we finish playing.
+Format: list of chord lists, with chordlists having (key1, key2, key3, tempodiv)
Compiles our lines into "chords" with filenames for legacy playback. This makes there have to be a bit of lag at the beginning of the song, but repeats will not have to parse it again, and overall playback won't be impacted by as much lag.
compile_synthesized
+
+
Compiles our lines into "chords" with numbers. This makes there have to be a bit of lag at the beginning of the song, but repeats will not have to parse it again, and overall playback won't be impacted by as much lag.
do_hearcheck
+
+
Checks and stores which mobs can hear us. Terminates sounds for mobs that leave our range.
get_bpm
+
+
Gets our beats per minute based on our tempo.
play_chord
+
+
Plays a chord.
playkey_legacy
+
+
Proc to play a legacy note. Just plays the sound to hearing mobs (and does hearcheck if necessary), no fancy channel/sustain/management.
+
Arguments:
+
+
note is a number from 1-7 for A-G
+
acc is either "b", "n", or "#"
+
oct is 1-8 (or 9 for C)
+
playkey_synth
+
+
Plays a specific numerical key from our instrument to anyone who can hear us.
+Does a hearing check if enough time has passed.
pop_channel
+
+
Pops a channel we have reserved so we don't have to release and re-request them from SSsounds every time we play a note. This is faster.
process_decay
+
+
Decays our channels and updates their volumes to mobs who can hear us.
+
Arguments:
+
+
wait_ds - the deciseconds we should decay by. This is to compensate for any lag, as otherwise songs would get pretty nasty during high time dilation.
+
process_song
+
+
Processes our song.
sanitize_tempo
+
+
Sanitizes tempo to a value that makes sense and fits the current world.tick_lag.
set_bpm
+
+
Sets our tempo from a beats-per-minute, sanitizing it to a valid number first.
set_dropoff_volume
+
+
Setter for setting how low the volume has to get before a note is considered "dead" and dropped
set_exponential_drop_rate
+
+
Setter for setting exponential falloff factor.
set_instrument
+
+
Sets our instrument, caching anything necessary for faster accessing. Accepts an ID, typepath, or instantiated instrument datum.
set_linear_falloff_duration
+
+
Setter for setting linear falloff duration.
set_volume
+
+
Setter for setting output volume.
should_stop_playing
+
+
Checks if we should halt playback.
start_playing
+
+
Attempts to start playing our song.
stop_playing
+
+
Stops playing, terminating all sounds if in synthesized mode. Clears hearing_mobs.
tempodiv_to_delay
+
+
Converts a tempodiv to ticks to elapse before playing the next chord, taking into account our tempo.
terminate_all_sounds
+
+
Stops all sounds we are "responsible" for. Only works in synthesized mode.
terminate_sound_mob
+
+
Stops all sounds we are responsible for in a given person. Only works in synthesized mode.
updateDialog
+
+
Updates the window for our users. Override down the line.
update_sustain
+
+
Updates our cached linear/exponential falloff stuff, saving calculations down the line.
Like gallopLeft, except that if the range contains an element equal to
+key, gallopRight returns the index after the rightmost equal element.
Proc Details
gallopRight
+
+
Like gallopLeft, except that if the range contains an element equal to
+key, gallopRight returns the index after the rightmost equal element.
+
@param key the key whose insertion point to search for
+@param a the array in which to search
+@param base the index of the first element in the range
+@param len the length of the range; must be > 0
+@param hint the index at which to begin the search, 0 <= hint < n.
+The closer hint is to the result, the faster this method will run.
+@param c the comparator used to order the range, and to search
+@return the int k, 0 <= k <= n such that a[b + k - 1] <= key < a[b + k]
This datum handles species in the game, such as lizardpeople, mothmen, zombies, skeletons, etc.
+It is used in carbon humans to determine various things about them, like their food preferences, if they have biological genders, their damage resistances, and more.
What gas does this species breathe? Used by suffocation screen alerts, most of actual gas breathing is handled by mutantlungs. See [life.dm][code/modules/mob/living/carbon/human/life.dm]
This allows races to have specific hair colors. If null, it uses the H's hair/facial hair colors. If "mutcolor", it uses the H's mutant_color. If "fixedmutcolor", it uses fixedmutcolor
Visible CURRENT bodyparts that are unique to a species.
+DO NOT USE THIS AS A LIST OF ALL POSSIBLE BODYPARTS AS IT WILL FUCK
+SHIT UP! Changes to this list for non-species specific bodyparts (ie
+cat ears and tails) should be assigned at organ level if possible.
+Assoc values are defaults for given bodyparts, also modified by aforementioned organs.
+They also allow for faster '[]' list access versus 'in'. Other than that, they are useless right now.
+Layer hiding is handled by [/datum/species/proc/handle_mutant_bodyparts] below.
Forces an item into this species' hands. Only an honorary mutantthing because this is not an organ and not loaded in the same way, you've been warned to do your research.
The human species version of /mob/living/carbon/proc/get_biological_state. Depends on the HAS_FLESH and HAS_BONE species traits, having bones lets you have bone wounds, having flesh lets you have burn, slash, and piercing wounds
What gas does this species breathe? Used by suffocation screen alerts, most of actual gas breathing is handled by mutantlungs. See [life.dm][code/modules/mob/living/carbon/human/life.dm]
This allows races to have specific hair colors. If null, it uses the H's hair/facial hair colors. If "mutcolor", it uses the H's mutant_color. If "fixedmutcolor", it uses fixedmutcolor
Visible CURRENT bodyparts that are unique to a species.
+DO NOT USE THIS AS A LIST OF ALL POSSIBLE BODYPARTS AS IT WILL FUCK
+SHIT UP! Changes to this list for non-species specific bodyparts (ie
+cat ears and tails) should be assigned at organ level if possible.
+Assoc values are defaults for given bodyparts, also modified by aforementioned organs.
+They also allow for faster '[]' list access versus 'in'. Other than that, they are useless right now.
+Layer hiding is handled by [/datum/species/proc/handle_mutant_bodyparts] below.
Forces an item into this species' hands. Only an honorary mutantthing because this is not an organ and not loaded in the same way, you've been warned to do your research.
Checks if a species is eligible to be picked at roundstart.
+
Checks the config to see if this species is allowed to be picked in the character setup menu.
+Used by /proc/generate_selectable_species.
copy_properties_from
+
+
Copies some vars and properties over that should be kept when creating a copy of this species.
+
Used by slimepeople to copy themselves, and by the DNA datum to hardset DNA to a species
+Arguments:
+
+
old_species - The species that the carbon used to be before copying
+
get_biological_state
+
+
The human species version of /mob/living/carbon/proc/get_biological_state. Depends on the HAS_FLESH and HAS_BONE species traits, having bones lets you have bone wounds, having flesh lets you have burn, slash, and piercing wounds
handle_digestion
+
+
LIFE
on_species_gain
+
+
Proc called when a carbon becomes this species.
+
This sets up and adds/changes/removes things, qualities, abilities, and traits so that the transformation is as smooth and bugfree as possible.
+Produces a [COMSIG_SPECIES_GAIN] signal.
+Arguments:
+
+
C - Carbon, this is whoever became the new species.
+
old_species - The species that the carbon used to be before becoming this race, used for regenerating organs.
+
pref_load - Preferences to be loaded from character setup, loads in preferred mutant things like bodyparts, digilegs, skin color, etc.
+
random_name
+
+
Generates a random name for a carbon.
+
This generates a random unique name based on a human's species and gender.
+Arguments:
+
+
gender - The gender that the name should adhere to. Use MALE for male names, use anything else for female names.
+
unique - If true, ensures that this new name is not a duplicate of anyone else's name currently on the station.
+
lastname - Does this species' naming system adhere to the last name system? Set to false if it doesn't.
+
regenerate_organs
+
+
Corrects organs in a carbon, removing ones it doesn't need and adding ones it does.
+
Takes all organ slots, removes organs a species should not have, adds organs a species should have.
+can use replace_current to refresh all organs, creating an entirely new set.
+
Arguments:
+
+
C - carbon, the owner of the species datum AKA whoever we're regenerating organs in
+
old_species - datum, used when regenerate organs is called in a switching species to remove old mutant organs.
+
replace_current - boolean, forces all old organs to get deleted whether or not they pass the species' ability to keep that organ
+
excluded_zones - list, add zone defines to block organs inside of the zones from getting handled. see headless mutation for an example
Tries to equip the item onto the given source.
+Returns TRUE/FALSE depending on if it is allowed.
+This should be used for checking if an item CAN be equipped.
+It should not perform the equipping itself.
Tries to unequip the item from the given source.
+Returns TRUE/FALSE depending on if it is allowed.
+This should be used for checking if it CAN be unequipped.
+It should not perform the unequipping itself.
Performs an alternative action on this strippable_item.
+has_alternate_action needs to be TRUE.
finish_equip
+
+
The proc that places the item on the source. This should not yield.
finish_unequip
+
+
The proc that unequips the item from the source. This should not yield.
get_alternate_action
+
+
Returns the ID of this item's strippable action.
+Return null if there is no alternate action.
+Any return value of this must be in StripMenu.
get_item
+
+
Gets the item from the given source.
get_obscuring
+
+
Returns a STRIPPABLE_OBSCURING_* define to report on whether or not this is obscured.
should_show
+
+
Returns whether or not this item should show.
start_equip
+
+
Start the equipping process. This is the proc you should yield in.
+Returns TRUE/FALSE depending on if it is allowed.
start_unequip
+
+
Start the unequipping process. This is the proc you should yield in.
+Returns TRUE/FALSE depending on if it is allowed.
try_equip
+
+
Tries to equip the item onto the given source.
+Returns TRUE/FALSE depending on if it is allowed.
+This should be used for checking if an item CAN be equipped.
+It should not perform the equipping itself.
try_unequip
+
+
Tries to unequip the item from the given source.
+Returns TRUE/FALSE depending on if it is allowed.
+This should be used for checking if it CAN be unequipped.
+It should not perform the unequipping itself.
Reset() - makes it go back to its master.
+Target() - locks onto a target for a duration
+
The biggest challenge is synchronizing animations.
+Variables keep track of when things tick, but,
+animations are client-timed, and not server-timed
+
Animations:
+The weapon can only track its "intended" angle and dist
+"Current" pixel x/y are always calculated relative to a target from the current orbiting atom the physical effect is on
+There's 3 animations,
+MoveTo(location, angle, dist, rotation)
+Orbit(location)
+Rotate(degrees)
+
And an non-animation that just snaps it to a location,
+HardReset(location)
active projectiles - refreshing a projectile reorders the list, so if they all have the same stack durations, you can trust the list to have last-refreshed at [1]
active projectiles - refreshing a projectile reorders the list, so if they all have the same stack durations, you can trust the list to have last-refreshed at [1]
The specific, occupied family member antagonist datum that is used to reach the handler / check objectives, and from which the above properties (sans points) are inherited.
The specific, occupied family member antagonist datum that is used to reach the handler / check objectives, and from which the above properties (sans points) are inherited.
Proc Details
rename_gangster
+
+
Allow gangs to have custom naming schemes for their gangsters.
Updates the state of the world depending on if revs won or loss.
+Returns who won, at which case this method should no longer be called.
+If revs_win_injection_amount is passed, then that amount of threat will be added if the revs win.
Mutates the ticker to report that the revs have won
Proc Details
check_heads_victory
+
+
Checks if heads have won
check_rev_victory
+
+
Checks if revs have won
process_victory
+
+
Updates the state of the world depending on if revs won or loss.
+Returns who won, at which case this method should no longer be called.
+If revs_win_injection_amount is passed, then that amount of threat will be added if the revs win.
round_result
+
+
Mutates the ticker to report that the revs have won
required user mob The mob who opened/is using the UI.
+required src_object datum The object or datum which owns the UI.
+required interface string The interface used to render the UI.
+optional title string The title of the UI.
+optional ui_x int Deprecated: Window width.
+optional ui_y int Deprecated: Window height.
+
return datum/tgui The requested UI.
close
+
+
public
+
Close the UI.
+
optional can_be_suspended bool
get_payload
+
+
private
+
Package the data to send to the UI, as JSON.
+
return list
on_message
+
+
private
+
Callback for handling incoming tgui messages.
open
+
+
public
+
Open this UI (and initialize it with data).
+
return bool - TRUE if a new pooled window is opened, FALSE in all other situations including if a new pooled window didn't open because one already exists.
process
+
+
private
+
Run an update cycle for this UI. Called internally by SStgui
+every second or so.
process_status
+
+
private
+
Updates the status, and returns TRUE if status has changed.
send_asset
+
+
public
+
Makes an asset available to use in tgui.
+
required asset datum/asset
+
return bool - true if an asset was actually sent
send_full_update
+
+
public
+
Send a full update to the client (includes static data).
+
optional custom_data list Custom data to send instead of ui_data.
+optional force bool Send an update even if UI is not interactive.
send_update
+
+
public
+
Send a partial update to the client (excludes static data).
+
optional custom_data list Custom data to send instead of ui_data.
+optional force bool Send an update even if UI is not interactive.
required client /client
+required id string A unique window identifier.
acquire_lock
+
+
public
+
Acquire the window lock. Pool will not be able to provide this window
+to other UIs for the duration of the lock.
+
Can be given an optional tgui datum, which will be automatically
+subscribed to incoming messages via the on_message proc.
+
optional ui /datum/tgui
can_be_suspended
+
+
public
+
Checks if the window can be sanely suspended.
+
return bool
close
+
+
public
+
Close the UI.
+
optional can_be_suspended bool
flush_message_queue
+
+
private
+
Sends queued messages if the queue wasn't empty.
initialize
+
+
public
+
Initializes the window with a fresh page. Puts window into the "loading"
+state. You can begin sending messages right after initializing. Messages
+will be put into the queue until the window finishes loading.
+
optional inline_assets list List of assets to inline into the html.
+optional inline_html string Custom HTML to inject.
+optional fancy bool If TRUE, will hide the window titlebar.
is_ready
+
+
public
+
Checks if the window is ready to receive data.
+
return bool
on_message
+
+
private
+
Callback for handling incoming tgui messages.
release_lock
+
+
public
+
Release the window lock.
send_asset
+
+
public
+
Makes an asset available to use in tgui.
+
required asset datum/asset
+
return bool - TRUE if any assets had to be sent to the client
send_message
+
+
public
+
Sends a message to tgui window.
+
required type string Message type
+required payload list Message payload
+optional force bool Send regardless of the ready status.
send_raw_message
+
+
public
+
Sends a raw payload to tgui window.
+
required message string JSON+urlencoded blob to send.
+optional force bool Send regardless of the ready status.
subscribe
+
+
public
+
Subscribes the datum to consume window messages on a specified proc.
+
Note, that this supports only one subscriber, because code for that
+is simpler and therefore faster. If necessary, this can be rewritten
+to support multiple subscribers.
unsubscribe
+
+
public
+
Unsubscribes the datum. Do not forget to call this when cleaning up.
Removes this timed event from any relevant buckets, or the secondary queue
bucketJoin
+
+
Attempts to add this timed event to a bucket, will enter the secondary queue
+if there are no appropriate buckets at this time.
+
Secondary queueing of timed events will occur when the timespan covered by the existing
+buckets is exceeded by the time at which this timed event is scheduled to be invoked.
+If the timed event is tracking client time, it will be added to a special bucket.
getcallingtype
+
+
Returns a string of the type of the callback for this timer
Allocates an instance of the provided type, and places it somewhere in an available loc
+Instances allocated through this proc will be destroyed when the test is over
Allocates an instance of the provided type, and places it somewhere in an available loc
+Instances allocated through this proc will be destroyed when the test is over
the limbs have no wound resistance like the chest and head do, so let's go with the r_arm
+In order of the wound types we're trying to inflict, what sharpness do we need to deal them?
+Since burn wounds need burn damage, duh
Proc Details
Run
+
+
the limbs have no wound resistance like the chest and head do, so let's go with the r_arm
+In order of the wound types we're trying to inflict, what sharpness do we need to deal them?
+Since burn wounds need burn damage, duh
This test is used to make sure a flesh-and-bone base human can suffer all the types of wounds, and that suffering more severe wounds removes and replaces the lesser wound. Also tests that [/mob/living/carbon/proc/fully_heal] removes all wounds
Proc Details
Run
+
+
This test is used to make sure a flesh-and-bone base human can suffer all the types of wounds, and that suffering more severe wounds removes and replaces the lesser wound. Also tests that [/mob/living/carbon/proc/fully_heal] removes all wounds
the limbs have no wound resistance like the chest and head do, so let's go with the r_arm
+In order of the wound types we're trying to inflict, what sharpness do we need to deal them?
+Since burn wounds need burn damage, duh
+This test is used for making sure species with bones but no flesh (skeletons, plasmamen) can only suffer BONE_WOUNDS, and nothing tagged with FLESH_WOUND (it's possible to require both)
Proc Details
Run
+
+
the limbs have no wound resistance like the chest and head do, so let's go with the r_arm
+In order of the wound types we're trying to inflict, what sharpness do we need to deal them?
+Since burn wounds need burn damage, duh
+This test is used for making sure species with bones but no flesh (skeletons, plasmamen) can only suffer BONE_WOUNDS, and nothing tagged with FLESH_WOUND (it's possible to require both)
Causes weather to occur on a z level in certain area types
+
The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures.
+Weather always occurs on different z levels at different times, regardless of weather type.
+Can have custom durations, targets, and can automatically protect indoor areas.
Either WOUND_SEVERITY_TRIVIAL (meme wounds like stubbed toe), WOUND_SEVERITY_MODERATE, WOUND_SEVERITY_SEVERE, or WOUND_SEVERITY_CRITICAL (or maybe WOUND_SEVERITY_LOSS)
Used when we're being dragged while bleeding, the value we return is how much bloodloss this wound causes from being dragged. Since it's a proc, you can let bandages soak some of the blood
get_examine_description() is used in carbon/examine and human/examine to show the status of this wound. Useful if you need to show some status like the wound being splinted or bandaged.
Called when the patient is undergoing stasis, so that having fully treated a wound doesn't make you sit there helplessly until you think to unbuckle them
When synthflesh is applied to the victim, we call this. No sense in setting up an entire chem reaction system for wounds when we only care for a few chems. Probably will change in the future
Called from cryoxadone and pyroxadone when they're proc'ing. Wounds will slowly be fixed separately from other methods when these are in effect. crappy name but eh
Remove the wound from whatever it's afflicting, and cleans up whateverstatus effects it had or modifiers it had on interaction times. ignore_limb is used for detachments where we only want to forget the victim
replace_wound() is used when you want to replace the current wound with a new wound, presumably of the same category, just of a different severity (either up or down counts)
try_treating() is an intercept run from [/mob/living/carbon/proc/attackby] right after surgeries but before anything else. Return TRUE here if the item is something that is relevant to treatment to take over the interaction.
Either WOUND_SEVERITY_TRIVIAL (meme wounds like stubbed toe), WOUND_SEVERITY_MODERATE, WOUND_SEVERITY_SEVERE, or WOUND_SEVERITY_CRITICAL (or maybe WOUND_SEVERITY_LOSS)
The list of wounds it belongs in, WOUND_LIST_BLUNT, WOUND_LIST_SLASH, or WOUND_LIST_BURN
Proc Details
apply_wound
+
+
apply_wound() is used once a wound type is instantiated to assign it to a bodypart, and actually come into play.
+
Arguments:
+
+
L: The bodypart we're wounding, we don't care about the person, we can get them through the limb
+
silent: Not actually necessary I don't think, was originally used for demoting wounds so they wouldn't make new messages, but I believe old_wound took over that, I may remove this shortly
+
old_wound: If our new wound is a replacement for one of the same time (promotion or demotion), we can reference the old one just before it's removed to copy over necessary vars
+
smited- If this is a smite, we don't care about this wound for stat tracking purposes (not yet implemented)
Called when we're crushed in an airlock or firedoor, for one of the improvised joint dislocation fixes
drag_bleed_amount
+
+
Used when we're being dragged while bleeding, the value we return is how much bloodloss this wound causes from being dragged. Since it's a proc, you can let bandages soak some of the blood
get_examine_description
+
+
get_examine_description() is used in carbon/examine and human/examine to show the status of this wound. Useful if you need to show some status like the wound being splinted or bandaged.
+
Return the full string line you want to show, note that we're already dealing with the 'warning' span at this point, and that \n is already appended for you in the place this is called from
+
Arguments:
+
+
mob/user: The user examining the wound's owner, if that matters
+
handle_process
+
+
If var/processing is TRUE, this is run on each life tick
on_stasis
+
+
Called when the patient is undergoing stasis, so that having fully treated a wound doesn't make you sit there helplessly until you think to unbuckle them
on_synthflesh
+
+
When synthflesh is applied to the victim, we call this. No sense in setting up an entire chem reaction system for wounds when we only care for a few chems. Probably will change in the future
on_xadone
+
+
Called from cryoxadone and pyroxadone when they're proc'ing. Wounds will slowly be fixed separately from other methods when these are in effect. crappy name but eh
receive_damage
+
+
When our parent bodypart is hurt
remove_wound
+
+
Remove the wound from whatever it's afflicting, and cleans up whateverstatus effects it had or modifiers it had on interaction times. ignore_limb is used for detachments where we only want to forget the victim
replace_wound
+
+
replace_wound() is used when you want to replace the current wound with a new wound, presumably of the same category, just of a different severity (either up or down counts)
+
This proc actually instantiates the new wound based off the specific type path passed, then returns the new instantiated wound datum.
+
Arguments:
+
+
new_type- The TYPE PATH of the wound you want to replace this, like /datum/wound/slash/severe
+
smited- If this is a smite, we don't care about this wound for stat tracking purposes (not yet implemented)
+
second_wind
+
+
Additional beneficial effects when the wound is gained, in case you want to give a temporary boost to allow the victim to try an escape or last stand
still_exists
+
+
For use in do_after callback checks
treat
+
+
Someone is using something that might be used for treating the wound on this limb
try_handling
+
+
Like try_treating() but for unhanded interactions from humans, used by joint dislocations for manual bodypart chiropractice for example.
try_treating
+
+
try_treating() is an intercept run from [/mob/living/carbon/proc/attackby] right after surgeries but before anything else. Return TRUE here if the item is something that is relevant to treatment to take over the interaction.
+
This proc leads into /datum/wound/proc/treat and probably shouldn't be added onto in children types. You can specify what items or tools you want to be intercepted
+with var/list/treatable_by and var/treatable_tool, then if an item fulfills one of those requirements and our wound claims it first, it goes over to treat() and treat_self().
+
Arguments:
+
+
I: The item we're trying to use
+
user: The mob trying to use it on us
+
wound_injury
+
+
The immediate negative effects faced as a result of the wound
Our current counter for how much flesh regeneration we have stacked from regenerative mesh/synthflesh/whatever, decrements each tick and lowers flesh_damage
Our current level of sanitization/anti-infection, from disinfectants/alcohol/UV lights. While positive, totally pauses and slowly reverses infestation effects each tick
Once we reach infestation beyond WOUND_INFESTATION_SEPSIS, we get this many warnings before the limb is completely paralyzed (you'd have to ignore a really bad burn for a really long time for this to happen)
Our current counter for how much flesh regeneration we have stacked from regenerative mesh/synthflesh/whatever, decrements each tick and lowers flesh_damage
Our current level of sanitization/anti-infection, from disinfectants/alcohol/UV lights. While positive, totally pauses and slowly reverses infestation effects each tick
Once we reach infestation beyond WOUND_INFESTATION_SEPSIS, we get this many warnings before the limb is completely paralyzed (you'd have to ignore a really bad burn for a really long time for this to happen)
A bad system I'm using to track the worst scar we earned (since we can demote, we want the biggest our wound has been, not what it was when it was cured (probably moderate))
A bad system I'm using to track the worst scar we earned (since we can demote, we want the biggest our wound has been, not what it was when it was cured (probably moderate))
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.
Moves all colors angle degrees around the color wheel while maintaining intensity of the color and not affecting whites
+TODO: Need a version that only affects one color (ie shift red to blue but leave greens and blues alone)
Returns the top-most atom sitting on the turf.
+For example, using this on a disk, which is in a bag, on a mob,
+will return the mob because it's on the turf.
This file contains the stuff you need for using JPS (Jump Point Search) pathing, an alternative to A* that skips
+over large numbers of uninteresting tiles resulting in much quicker pathfinding solutions. Mind that diagonals
+cost the same as cardinal moves currently, so paths may look a bit strange, but should still be optimal.
Returns either null, or a list containing every sub area associated with our base area.
+If include_base is TRUE, the base area will also be added to the return list.
Proc used for purposes similar to get_areas_turfs(), but aimed to include associated areas.
+Only accepts area instances and paths for the first arg, no text strings.
+Returns a list of all turfs found in the sub areas (including the base's if include_base is TRUE)
+and located in a z level matching target_z, or anywhere if target_z is 0
HELPER FILE FOR SHIELDING
+Gets hull exterior adjacent tiles of a certain area
+Area method.
+EXPENSIVE.
+If the area itself is already considered exterior, it'll find all tiles inside it that's next to an interior area.
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)
Writes to a special log file if the log_suspicious_login config flag is set,
+which is intended to contain all logins that failed under suspicious circumstances.
log_wound() is for when someone is attacked and suffers a wound. Note that this only captures wounds from damage, so smites/forced wounds aren't logged, as well as demotions like cuts scabbing over
Returns a UI status such that silicons will be able to interact with whatever
+they would have access to if this was a machine. For example, AIs can
+interact if there's cameras with wireless control is enabled.
Returns a UI status such that users with debilitating conditions, such as
+being dead or not having power for silicons, will not be able to interact.
+Being dead will disable UI, being incapacitated will continue updating it,
+and anything else will make it interactive.
Returns a UI status such that users adjacent to source will be able to interact,
+far away users will be able to see, and anyone farther won't see anything.
+Dead users will receive updates no matter what, though you likely want to add
+a [ui_status_only_living] check for finer observer interactions.
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
Maintains a timer-like system to handle destruction of runechat messages. Much of this code is modeled
+after or adapted from the timer subsystem.
+
Note that this has the same structure for storing and queueing messages as the timer subsystem does
+for handling timers: the bucket_list is a list of chatmessage datums, each of which are the head
+of a circularly linked list. Any given index in bucket_list could be null, representing an empty bucket.
Handles creation, callbacks, and destruction of timed events.
+
It is important to understand the buckets used in the timer subsystem are just a series of circular doubly-linked
+lists. The object at a given index in bucket_list is a /datum/timedevent, the head of a circular list, which has prev
+and next references for the respective elements in that bucket's circular list.
Proc Details
CreateBans
+
+
DEBUG
GetJobName
+
+
Gets the job title, if the job name is an alt title, locates the original title using a prebuilt cache
HeapPathWeightCompare
+
+
TODO: Macro this to reduce proc overhead
WrapAdminProcCall
+
+
Wrapper for proccalls where the datum is flagged as vareditted
___TraitAdd
+
+
DO NOT USE ___TraitAdd OR ___TraitRemove as a replacement for ADD_TRAIT / REMOVE_TRAIT defines. To be used explicitly for callback.
___TraitRemove
+
+
DO NOT USE ___TraitAdd OR ___TraitRemove as a replacement for ADD_TRAIT / REMOVE_TRAIT defines. To be used explicitly for callback.
_addtimer
+
+
Create a new timer and insert it in the queue.
+You should not call this directly, and should instead use the addtimer macro, which includes source information.
+
Arguments:
+
+
callback the callback to call on timer finish
+
wait deciseconds to run the timer for
+
flags flags for this timer, see: code__DEFINES\subsystems.dm
+
_turf_in_offset
+
+
Locating turfs
actionspeed_data_null_check
+
+
Checks if a action speed modifier is valid and not missing any data
add_keybinding
+
+
Adds an instanced keybinding to the global tracker
add_verb
+
+
handles adding verbs and updating the stat panel browser
+
pass the verb type path to this instead of adding it directly to verbs so the statpanel can update
+Arguments:
+
+
target - Who the verb is being added to, client or mob typepath
+
verb - typepath to a verb, or a list of verbs, supports lists of lists
+
announce_arrival
+
+
Send a message in common radio when a player arrives
baseturfs_string_list
+
+
A wrapper for baseturf string lists, to offer support of non list values, and a stack_trace if we have major issues
block_calculate_resultant_damage
+
+
Considers a block return_list and calculates damage to use from that.
callHook
+
+
@file hooks.dm
+Implements hooks, a simple way to run code on pre-defined events.
+
+
+
@page hooks Code hooks
+
+
+
@section hooks Hooks
+
+
+
A hook is defined under /hook in the type tree.
+
+
+
To add some code to be called by the hook, define a proc under the type, as so:
All hooks must return nonzero on success, as runtimes will force return null.
+
+
+
Calls a hook, executing every piece of code that's attached to it.
+@param hook Identifier of the hook to call.
+@returns 1 if all hooked code runs successfully, 0 otherwise.
call_emergency_meeting
+
+
If the announcer overrides alert messages, use that message.
+Summon the crew for an emergency meeting
+
Teleports the crew to a specified area, and tells everyone (via an announcement) who called the meeting. Should only be used during april fools!
+Arguments:
+
+
user - Mob who called the meeting
+
button_zone - Area where the meeting was called and where everyone will get teleported to
+
callback_select
+
+
Runs a list of callbacks asyncronously, returning only when all have finished
+
Callbacks can be repeated, to call it multiple times
+
Arguments:
+
+
list/callbacks the list of callbacks to be called
+
list/callback_args the list of lists of arguments to pass into each callback
+
savereturns Optionally save and return the list of returned values from each of the callbacks
+
resolution The number of byond ticks between each time you check if all callbacks are complete
+
check_admin_pings
+
+
Checks a given message to see if any of the words contain an active admin's ckey with an @ before it
+
Returns nothing if no pings are found, otherwise returns an associative list with ckey -> client
+Also modifies msg to underline the pings, then stores them in the key ADMINSAY_PING_UNDERLINE_NAME_INDEX for returning
+
Arguments:
+
+
msg - the message being scanned
+
color_matrix_contrast_percent
+
+
Exxagerates or removes brightness
color_matrix_hsv
+
+
Builds a color matrix that transforms the hue, saturation, and value, all in one operation.
color_matrix_rotation
+
+
Moves all colors angle degrees around the color wheel while maintaining intensity of the color and not affecting whites
+TODO: Need a version that only affects one color (ie shift red to blue but leave greens and blues alone)
color_matrix_saturation_percent
+
+
Exxagerates or removes colors
completed_bounty_count
+
+
Subtype Gens
+
Strict Type Gens
+
Dynamic Gens
+
Cutoff for Non-Low Priority Bounties
+
Low Priority Gens
create_mafia_game
+
+
Creates the global datum for playing mafia games, destroys the last if that's required and returns the new.
create_strippable_list
+
+
Creates an assoc list of keys to /datum/strippable_item
cultslur
+
+
Makes you talk like you got cult stunned, which is slurring but with some dark messages
dd_file2list
+
+
Reading files
dd_hasprefix
+
+
Prefix checking
dd_hassuffix
+
+
Suffix checking
dd_replacetext
+
+
Replacing text
dd_text2list
+
+
Turning text into lists
debug_variable
+
+
Get displayed variable in VV variable list
default_ui_state
+
+
The sane defaults for a UI such as a computer or a machine.
delete_all_SS_and_recreate_master
+
+
Delete all existing SS to basically start over
deltimer
+
+
Delete a timer
+
Arguments:
+
+
id a timerid or a /datum/timedevent
+
emissive_appearance
+
+
Produces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the EMISSIVE_COLOR.
end_cooldown
+
+
Callback called by a timer to end an associative-list-indexed cooldown.
+
Arguments:
+
+
source - datum storing the cooldown
+
index - string index storing the cooldown on the cooldowns associative list
+
+
This sends a signal reporting the cooldown end.
english_list_assoc
+
+
English_list but associative supporting. Higher overhead.
+@depricated
find_record
+
+
Returns datum/data/record
finish_unequip_mob
+
+
A utility function for /datum/strippable_items to finish unequipping an item from a mob.
firing_squad
+
+
firing_squad is a proc for the :B:erforate smite to shoot each individual bullet at them, so that we can add actual delays without sleep() nonsense
+
Hilariously, if you drag someone away mid smite, the bullets will still chase after them from the original spot, possibly hitting other people. Too funny to fix imo
+
Arguments:
+
+
target- guy we're shooting obviously
+
source_turf- where the bullet begins, preferably on a turf next to the target
+
body_zone- which bodypart we're aiming for, if there is one there
+
wound_bonus- the wounding power we're assigning to the bullet, since we don't care about the base one
+
damage- the damage we're assigning to the bullet, since we don't care about the base one
+
format_frequency
+
+
Format frequency by moving the decimal.
generate_asset_name
+
+
Generate a filename for this asset
+The same asset will always lead to the same asset name
+(Generated names do not include file extention.)
generate_bitfields
+
+
Turns /datum/bitfield subtypes into a list for use in debugging
Generates species available to choose in character setup at roundstart
+
This proc generates which species are available to pick from in character setup.
+If there are no available roundstart species, defaults to human.
get_allowed_instrument_ids
+
+
Get all non admin_only instruments.
get_atom_on_turf
+
+
Returns the top-most atom sitting on the turf.
+For example, using this on a disk, which is in a bag, on a mob,
+will return the mob because it's on the turf.
+
Arguments
+
+
something_in_turf - a movable within the turf, somewhere.
+
stop_type - optional - stops looking if stop_type is found in the turf, returning that type (if found).
+
get_base_area
+
+
Returns the base area the target is located in if there is one.
+Alternatively, returns the area as is.
get_bbox_of_atoms
+
+
Get a bounding box of a list of atoms.
+
Arguments:
+
+
atoms - List of atoms. Can accept output of view() and range() procs.
+
+
Returns: list(x1, y1, x2, y2)
get_cached_actionspeed_modifier
+
+
Grabs a STATIC MODIFIER datum from cache. YOU MUST NEVER EDIT THESE DATUMS, OR IT WILL AFFECT ANYTHING ELSE USING IT TOO!
get_cached_movespeed_modifier
+
+
Grabs a STATIC MODIFIER datum from cache. YOU MUST NEVER EDIT THESE DATUMS, OR IT WILL AFFECT ANYTHING ELSE USING IT TOO!
get_path_to
+
+
This file contains the stuff you need for using JPS (Jump Point Search) pathing, an alternative to A* that skips
+over large numbers of uninteresting tiles resulting in much quicker pathfinding solutions. Mind that diagonals
+cost the same as cardinal moves currently, so paths may look a bit strange, but should still be optimal.
+
This is the proc you use whenever you want to have pathfinding more complex than "try stepping towards the thing".
+If no path was found, returns an empty list, which is important for bots like medibots who expect an empty list rather than nothing.
+
Arguments:
+
+
caller: The movable atom that's trying to find the path
+
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
+
max_distance: The maximum number of steps we can take in a given path to search (default: 30, 0 = infinite)
+
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.
+
id: An ID card representing what access we have and what doors we can open. Its location relative to the pathing atom is irrelevant
+
simulated_only: Whether we consider turfs without atmos simulation (AKA do we want to ignore space)
+
exclude: If we want to avoid a specific turf, like if we're a mulebot who already got blocked by some turf
+
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.
+
get_ranged_target_turf_direct
+
+
Get ranged target turf, but with direct targets as opposed to directions
+
Starts at atom A and gets the exact angle between A and target
+Moves from A with that angle, Range amount of times, until it stops, bound to map size
+Arguments:
+
+
A - Initial Firer / Position
+
target - Target to aim towards
+
range - Distance of returned target turf from A
+
offset - Angle offset, 180 input would make the returned target turf be in the opposite direction
+
get_sub_areas
+
+
Returns either null, or a list containing every sub area associated with our base area.
+If include_base is TRUE, the base area will also be added to the return list.
get_sub_areas_contents
+
+
Simple proc that returns a sum of all contents from every sub area,
+Think of the above but for all contents, not just turfs, and without target z.
get_sub_areas_turfs
+
+
Proc used for purposes similar to get_areas_turfs(), but aimed to include associated areas.
+Only accepts area instances and paths for the first arg, no text strings.
+Returns a list of all turfs found in the sub areas (including the base's if include_base is TRUE)
+and located in a z level matching target_z, or anywhere if target_z is 0
get_vog_special
+
+
get special role multiplier for voice of god. No double dipping.
getleftblocks
+
+
DNA HELPER-PROCS
hull_shielding_get_tiles_around_area
+
+
HELPER FILE FOR SHIELDING
+Gets hull exterior adjacent tiles of a certain area
+Area method.
+EXPENSIVE.
+If the area itself is already considered exterior, it'll find all tiles inside it that's next to an interior area.
hull_shielding_get_tiles_in_z
+
+
Gets hull adjacent exterior tiles of an entire zlevel
+EXPENSIVE.
+Gets the tiles in the exterior area touching to a non-exterior area
icon2base64
+
+
Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
+exporting it as text, and then parsing the base64 from that.
+(This relies on byond automatically storing icons in savefiles as base64)
init_keybindings
+
+
Creates and sorts all the keybinding datums
is_ctf_target
+
+
hey uhhh don't hit anyone behind them
is_energy_reflectable_projectile
+
+
//// MISC HELPERS ////////
+Is this atom reflectable with ""standardized"" reflection methods like you know eshields and deswords and similar
is_guest_key
+
+
Returns whether or not a player is a guest using their ckey as an input
isemptylist
+
+
@depricated
json_deserialize_datum
+
+
Convert a list of json to datum
json_serialize_datum
+
+
Convert a datum into a json blob
listgetindex
+
+
@depricated
load_map
+
+
Shortcut function to parse a map and apply it to the world.
+
+
dmm_file: A .dmm file to load (Required).
+
x_offset, y_offset, z_offset: Positions representign where to load the map (Optional).
+
cropMap: When true, the map will be cropped to fit the existing world dimensions (Optional).
+
measureOnly: When true, no changes will be made to the world (Optional).
+
no_changeturf: When true, turf/AfterChange won't be called on loaded turfs
+
x_lower, x_upper, y_lower, y_upper: Coordinates (relative to the game world) to crop to (Optional).
atom/user - argument is the actor performing the action
+
atom/target - argument is the target of the action
+
what_done - is a verb describing the action (e.g. punched, throwed, kicked, etc.)
+
atom/object - is a tool with which the action was made (usually an item)
+
addition - is any additional text, which will be appended to the rest of the log line
+
log_suspicious_login
+
+
Writes to a special log file if the log_suspicious_login config flag is set,
+which is intended to contain all logins that failed under suspicious circumstances.
+
Mirrors this log entry to log_access when access_log_mirror is TRUE, so this proc
+doesn't need to be used alongside log_access and can replace it where appropriate.
log_tgui
+
+
Appends a tgui-related log entry. All arguments are optional.
log_wound
+
+
log_wound() is for when someone is attacked and suffers a wound. Note that this only captures wounds from damage, so smites/forced wounds aren't logged, as well as demotions like cuts scabbing over
+
Note that this has no info on the attack that dealt the wound: information about where damage came from isn't passed to the bodypart's damaged proc. When in doubt, check the attack log for attacks at that same time
+TODO later: Add logging for healed wounds, though that will require some rewriting of healing code to prevent admin heals from spamming the logs. Not high priority
+
Arguments:
+
+
victim- The guy who got wounded
+
suffered_wound- The wound, already applied, that we're logging. It has to already be attached so we can get the limb from it
+
dealt_damage- How much damage is associated with the attack that dealt with this wound.
+
dealt_wound_bonus- The wound_bonus, if one was specified, of the wounding attack
+
dealt_bare_wound_bonus- The bare_wound_bonus, if one was specified and applied, of the wounding attack. Not shown if armor was present
+
base_roll- Base wounding ability of an attack is a random number from 1 to (dealt_damage ** WOUND_DAMAGE_EXPONENT). This is the number that was rolled in there, before mods
+
make_datum_references_lists
+
+
Initial Building
md5asfile
+
+
Save file as an external file then md5 it.
+Used because md5ing files stored in the rsc sometimes gives incorrect md5 results.
md5filepath
+
+
Returns the md5 of a file at a given path.
message_centcom
+
+
Used by communications consoles to message CentCom
message_syndicate
+
+
Used by communications consoles to message the Syndicate
message_to_html
+
+
Message-related procs
+
Message format (/list):
+
+
type - Message type, must be one of defines in code/__DEFINES/chat.dm
+
text - Plain message text
+
html - HTML message text
+
Optional metadata, can be any key/value pair.
+
+
Copyright (c) 2020 Aleksej Komarov
+SPDX-License-Identifier: MIT
movespeed_data_null_check
+
+
Checks if a move speed modifier is valid and not missing any data
nuke_request
+
+
Used by communications consoles to request the nuclear launch codes
parse_caught_click_modifiers
+
+
Returns a turf based on text inputs, original turf and viewing client
pick_n_take
+
+
Pick a random element from the list and remove it from the list.
process_teleport_locs
+
+
Generate a list of turfs you can teleport to from the areas list
+
Includes areas if they're not a shuttle or not not teleport or have no contents
+
The chosen turf is the first item in the areas contents that is a station level
+
The returned list of turfs is sorted by name
qdel
+
+
Should be treated as a replacement for the 'del' keyword.
+
Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
recover_all_SS_and_recreate_master
+
+
Recreate all SSs which will still cause data survive due to Recover(), the new Master will then find and take them from global.vars
recursive_organ_check
+
+
+
recursive_organ_check
+
+
inputs: O (object to start with)
+
outputs:
+
description: A pseudo-recursive loop based off of the recursive mob check, this check looks for any organs held
+
+
within 'O', toggling their frozen flag. This check excludes items held within other safe organ
+
+
+
+
storage units, so that only the lowest level of container dictates whether we do or don't decompose
+
+
+
+
+
release_gas_to
+
+
Releases gas from src to output air. This means that it can not transfer air to gas mixture with higher pressure.
+a global proc due to rustmos
remove_image_from_client
+
+
Removes an image from a client's .images. Useful as a callback.
remove_verb
+
+
handles removing verb and sending it to browser to update, use this for removing verbs
+
pass the verb type path to this instead of removing it from verbs so the statpanel can update
+Arguments:
+
+
target - Who the verb is being removed from, client or mob typepath
+
verb - typepath to a verb, or a list of verbs, supports lists of lists
+
reset_cooldown
+
+
Proc used by stoppable timers to end a cooldown before the time has ran out.
+
Arguments:
+
+
source - datum storing the cooldown
+
index - string index storing the cooldown on the cooldowns associative list
+
+
This sends a signal reporting the cooldown end, passing the time left as an argument.
return_unused_frequency
+
+
returns a random unused frequency between MIN_FREE_FREQ & MAX_FREE_FREQ if free = TRUE, and MIN_FREQ & MAX_FREQ if FALSE
rgb_construct_color_matrix
+
+
Assembles a color matrix, defaulting to identity
rgba_construct_color_matrix
+
+
Assembles a color matrix, defaulting to identity
rustg_get_version
+
+
Gets the version of rust_g
safepick
+
+
@depricated
sanitize_css_class_name
+
+
Sandstorm content
+Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts
sanitize_frequency
+
+
Ensure the frequency is within bounds of what it should be sending/receiving at
sanitize_hexcolor
+
+
Sanitizes a hexadecimal color. Always outputs lowercase.
+
@params
+
+
color - input color, 3 or 6 characters without the #.
+
desired_format - 3 or 6 characters without the potential #. can only put in 3 or 6 here.
+
include_crunch - do we put a # at the start
+
default - default color. must be 3 or 6 characters with or without #.
+
default_replacement - what we replace broken letters with.
+
sanitize_ooccolor
+
+
Makes sure the input color is text with a # at the start followed by 6 hexadecimal characters. Examples: "#ff1234", "#A38321", COLOR_GREEN_GRAY
scramble_message_replace_chars
+
+
Slightly expensive proc to scramble a message using equal probabilities of character replacement from a list. DOES NOT SUPPORT HTML!
seedify
+
+
Finds and extracts seeds from an object
+
Checks if the object is such that creates a seed when extracted. Used by seed
+extractors or posably anything that would create seeds in some way. The seeds
+are dropped either at the extractor, if it exists, or where the original object
+was and it qdel's the object
+
Arguments:
+
+
O - Object containing the seed, can be the loc of the dumping of seeds
+
t_max - Amount of seed copies to dump, -1 is ranomized
+
extractor - Seed Extractor, used as the dumping loc for the seeds and seed multiplier
+
user - checks if we can remove the object from the inventory
+
send2adminchat
+
+
Sends a message to TGS admin chat channels.
+
category - The category of the mssage.
+message - The message to send.
send2chat
+
+
Sends a message to TGS chat channels.
+
message - The message to send.
+channel_tag - Required. If "", the message with be sent to all connected (Game-type for TGS3) channels. Otherwise, it will be sent to TGS4 channels with that tag (Delimited by ','s).
send2otherserver
+
+
Sends a message to a set of cross-communications-enabled servers using world topic calls
+
Arguments:
+
+
source - Who sent this message
+
msg - The message body
+
type - The type of message, becomes the topic command under the hood
+
target_servers - A collection of servers to send the message to, defined in config
+
additional_data - An (optional) associated list of extra parameters and data to send with this world topic call
+
setup_mod_themes
+
+
Global proc that sets up all MOD themes as singletons in a list and returns it.
single_path_typecache_immutable
+
+
Makes a typecache of a single typecache
+
Obviously in BYOND we don't have the efficiency around here to have proper enforcement so
+If you use this you better know what you're doing. The list you get back is globally cached and if it's modified, you might break multiple things.
slur
+
+
Makes you speak like you're drunk
sound_to_playing_players
+
+
Citadel edit - Citadel reverb
+End
stars
+
+
Convert random parts of a passed in message to stars
+
+
phrase - the string to convert
+
probability - probability any character gets changed
+
+
This proc is dangerously laggy, avoid it or die
start_unequip_mob
+
+
A utility function for /datum/strippable_items to start unequipping an item from a mob.
string_list
+
+
Caches lists with non-numeric stringify-able values (text or typepath).
stripped_multiline_input_or_reflect
+
+
stripped_multiline_input but reflects to the user instead if it's too big and returns null.
stutter
+
+
Adds stuttering to the message passed in
tgalert
+
+
DEPRECATED: USE tgui_alert(...) INSTEAD
+
Designed as a drop in replacement for alert(); functions the same. (outside of needing User specified)
+Arguments:
+
+
User - The user to show the alert to.
+
Message - The textual body of the alert.
+
Title - The title of the alert's window.
+
Button1 - The first button option.
+
Button2 - The second button option.
+
Button3 - The third button option.
+
StealFocus - Boolean operator controlling if the alert will steal the user's window focus.
+
Timeout - The timeout of the window, after which no responses will be valid.
+
tgui_Topic
+
+
Middleware for /client/Topic.
+
return bool If TRUE, prevents propagation of the topic call.
tgui_alert
+
+
Creates a TGUI alert window and returns the user's response.
+
This proc should be used to create alerts that the caller will wait for a response from.
+Arguments:
+
+
user - The user to show the alert to.
+
message - The content of the alert, shown in the body of the TGUI window.
+
title - The of the alert modal, shown on the top of the TGUI window.
+
buttons - The options that can be chosen by the user, each string is assigned a button on the UI.
+
timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout.
+
autofocus - The bool that controls if this alert should grab window focus.
+
tgui_alert_async
+
+
Creates an asynchronous TGUI alert window with an associated callback.
+
This proc should be used to create alerts that invoke a callback with the user's chosen option.
+Arguments:
+
+
user - The user to show the alert to.
+
message - The content of the alert, shown in the body of the TGUI window.
+
title - The of the alert modal, shown on the top of the TGUI window.
+
buttons - The options that can be chosen by the user, each string is assigned a button on the UI.
+
callback - The callback to be invoked when a choice is made.
+
timeout - The timeout of the alert, after which the modal will close and qdel itself. Disabled by default, can be set to seconds otherwise.
+
autofocus - The bool that controls if this alert should grab window focus.
+
tgui_input_list
+
+
Creates a TGUI input list window and returns the user's response.
+
This proc should be used to create alerts that the caller will wait for a response from.
+Arguments:
+
+
user - The user to show the input box to.
+
message - The content of the input box, shown in the body of the TGUI window.
+
title - The title of the input box, shown on the top of the TGUI window.
+
buttons - The options that can be chosen by the user, each string is assigned a button on the UI.
+
timeout - The timeout of the input box, after which the input box will close and qdel itself. Set to zero for no timeout.
+
tgui_input_list_async
+
+
Creates an asynchronous TGUI input list window with an associated callback.
+
This proc should be used to create inputs that invoke a callback with the user's chosen option.
+Arguments:
+
+
user - The user to show the input box to.
+
message - The content of the input box, shown in the body of the TGUI window.
+
title - The title of the input box, shown on the top of the TGUI window.
+
buttons - The options that can be chosen by the user, each string is assigned a button on the UI.
+
callback - The callback to be invoked when a choice is made.
+
timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.
+
timeleft
+
+
Get the remaining deciseconds on a timer
+
Arguments:
+
+
id a timerid or a /datum/timedevent
+
to_chat
+
+
Sends the message to the recipient (target).
+
Recommended way to write to_chat calls:
+
to_chat(client,
+ type = MESSAGE_TYPE_INFO,
+ html = "You have found <strong>[object]</strong>")
+
to_chat_immediate
+
+
Circumvents the message queue and sends the message
+to the recipient (target) as soon as possible.
transform_matrix_construct
+
+
constructs a transform matrix, defaulting to identity
typecacheof
+
+
Like typesof() or subtypesof(), but returns a typecache instead of a list
ui_status_only_living
+
+
Returns a UI status such that the dead will be able to watch, but not interact.
ui_status_silicon_has_access
+
+
Returns a UI status such that silicons will be able to interact with whatever
+they would have access to if this was a machine. For example, AIs can
+interact if there's cameras with wireless control is enabled.
ui_status_user_has_free_hands
+
+
Returns a UI status such that those without blocked hands will be able to interact,
+but everyone else can only watch.
ui_status_user_is_abled
+
+
Returns a UI status such that users with debilitating conditions, such as
+being dead or not having power for silicons, will not be able to interact.
+Being dead will disable UI, being incapacitated will continue updating it,
+and anything else will make it interactive.
ui_status_user_is_adjacent
+
+
Returns a UI status such that users adjacent to source will be able to interact,
+far away users will be able to see, and anyone farther won't see anything.
+Dead users will receive updates no matter what, though you likely want to add
+a [ui_status_only_living] check for finer observer interactions.
ui_status_user_is_advanced_tool_user
+
+
Returns a UI status such that advanced tool users will be able to interact,
+but everyone else can only watch.
ui_status_user_is_conscious_and_lying_down
+
+
Returns UI_INTERACTIVE if the user is conscious and lying down.
+Returns UI_UPDATE otherwise.
ui_status_user_strictly_adjacent
+
+
Return UI_INTERACTIVE if the user is strictly adjacent to the target atom, whether they can see it or not.
+Return UI_CLOSE otherwise.
unformat_frequency
+
+
Opposite of format, returns as a number
url2htmlloader
+
+
Return html to load a url.
+for use inside of browse() calls to html assets that might be loaded on a cdn.
valid_window_location
+
+
Checks whether the target turf is in a valid state to accept a directional window
+or other directional pseudo-dense object such as railings.
+
Returns FALSE if the target turf cannot accept a directional window or railing.
+Returns TRUE otherwise.
+
Arguments:
+
+
dest_turf - The destination turf to check for existing windows and railings
+
test_dir - The prospective dir of some atom you'd like to put on this turf.
+
is_fulltile - Whether the thing you're attempting to move to this turf takes up the entire tile or whether it supports multiple movable atoms on its tile.
+
velvetspeech
+
+
FermiChem
voice_of_god
+
+
VOICE OF GOD
wave_explosion
+
+
Creates a wave explosion at a certain place
woundscan
+
+
Displays wounds with extended information on their status vs medscanners
zone2body_parts_covered
+
+
For finding out what body parts a body zone covers, the inverse of the below basically
materials - How material datums work
+Materials are now instanced datums, with an associative list of them being kept in SSmaterials. We only instance the materials once and then re-use these instances for everything.
edible - This component makes it possible to make things edible. What this means is that you can take a bite or force someone to take a bite (in the case of items).
+These items take a specific time to eat, and can do most of the things our original food items could.
+Behavior that's still missing from this component that original food items had that should either be put into seperate components or somewhere else:
+Components:
+Drying component (jerky etc)
+Customizable component (custom pizzas etc)
+Processable component (Slicing and cooking behavior essentialy, making it go from item A to B when conditions are met.)
+Dunkable component (Dunking things into reagent containers to absorb a specific amount of reagents)
+Misc:
+Something for cakes (You can store things inside)
fried - This component essentially encapsulates frying and utilizes the edible component
+This means fried items can work like regular ones, and generally the code is far less messy
material_container - This datum should be used for handling mineral contents of machines and whatever else is supposed to hold minerals and make use of them.
Contextual screentips (and when to not use this folder) - Contextual screentips provide information in the form of text at the top of your screen to inform you of the possibilities of an item. The "contextual" here refers to this being handled entirely through code, what it displays and when is completely up to you.
In-code keypress handling system - This whole system is heavily based off of forum_account's keyboard library.
+Thanks to forum_account for saving the day, the library can be found
+here!
+
language/language_holder - Language holders will either exist in an atom/movable or a mind. Creation of language holders happens
+automatically when they are needed, for example when something tries to speak.
+Where a mind is available, the mind language holder will be the one "in charge". The mind holder
+will update its languages based on the atom holder, and will get updated as part of
+transformations and other events that cause new languages to become available.
+Every language holder has three lists of languages (and sources for each of them):
living - Proc that actually does the grab resisting. Return TRUE if successful. Does not check that a grab exists! Use attempt_resist_grab() instead of this in general!
+Forced is if something other than the user mashing movement keys/pressing resist button did it, silent is if it makes messages (like "attempted to resist" and "broken free").
+Forced does NOT force success!
/tg/station build script - This build script is the recommended way to compile the game, including not only the DM code but also the JavaScript and any other dependencies.
Git Integration Hooks - This folder contains installable scripts for Git hooks and merge drivers.
+Use of these hooks and drivers is optional and they must be installed
+explicitly before they take effect.
+
Map Merger - The Map Merger is a collection of scripts that keep this repository's maps
+in a format which is easier to track in Git and less likely to cause merge
+conflicts. When merge conflicts do occur, it can sometimes resolve them.
emissive_blocker - Internal atom that copies an appearance on to the blocker plane
+
fov_holder - The shadow cone's mask and visual images holder which can't locate inside the mob,
+lest they inherit the mob opacity and cause a lot of hindrance
background - A generic background object.
+It is also implicitly used to allocate a rectangle on the map, which will
+be used for auto-scaling the map.
ready - Button that appears before the game has started
+
+
+
map_view - A screen object, which acts as a container for turfs and other things
+you want to show on the map, which you usually attach to "vis_contents".
namespaced - Namespace'ed assets (for static css and html files)
+When sent over a cdn transport, all assets in the same asset datum will exist in the same folder, as their plain names.
+Used to ensure css files can reference files by url() without having to generate the css at runtime, both the css file and the files it depends on must exist in the same namespace asset datum. (Also works for html)
+For example blah.css with asset blah.png will get loaded as namespaces/a3d..14f/f12..d3c.css and namespaces/a3d..14f/blah.png. allowing the css file to load blah.png by a relative url rather then compute the generated url with get_url_mappings().
+The namespace folder's name will change if any of the assets change. (excluding parent assets)
biome - This datum handles the transitioning from a turf to a specific biome, and handles spawning decorative structures and mobs.
+
bitfield - Specifies a bitfield for smarter debugging
+
block_parry_data - Carries data like list data that would be a waste of memory if we initialized the list on every /item as we can cache datums easier.
Callback Datums - A datum that holds a proc to be called on another object, used to track proccalls to other objects
+
callback_select - Helper datum for the select callbacks proc
+
centcom_announcer - Data holder for the announcers that can be used in a game, this can be used to have alternative announcements outside of the default e.g.the intern
area_sound_manager - Allows you to set a theme for a set of areas without tying them to looping sounds explicitly
+
butchering/recycler - Special snowflake component only used for the recycler.
+
combat_mode - Combat mode component. It makes the user face whichever atom the mouse pointer is hovering,
+amongst other things designed outside of this file, namely PvP and PvE stuff, hence the name.
+Can be toggled on and off by clicking the screen hud object or by pressing the assigned hotkey (default 'C')
explodable - Component specifically for explosion sensetive things, currently only applies to heat based explosions but can later perhaps be used for things that are dangerous to handle carelessly like nitroglycerin.
+
field_of_vision - Field of Vision component. Does totally what you probably think it does,
+ergo preventing players from seeing what's behind them.
+
footstep - Footstep component. Plays footsteps at parents location when it is appropriate.
+
gps - GPS component. Atoms that have this show up on gps. Pretty simple stuff.
+
item - GPS component subtype. Only gps/item's can be used to open the UI.
multiple_lives - A simple component that spawns a mob of the same type and transfers itself to it when parent dies.
+For more complex behaviors, use the COMSIG_ON_MULTIPLE_LIVES_RESPAWN comsig.
filter - The magical plumbing component used by the chemical filters. The different supply connects behave differently depending on the filters set on the chemical filter
+
simple_demand - has one pipe input that only takes, example is manual output pipe
+
simple_supply - has one pipe output that only supplies. example is liquid pump and manual input pipe
virtual_reality - The virtual reality turned component.
+Originally created to overcome issues of mob polymorphing locking the player inside virtual reality
+and allow for a more "immersive" virtual reality in a virtual reality experience.
+It relies on comically complex order of logic, expect things to break if procs such as mind/transfer_to() are revamped.
+In short, a barebone not so hardcoded VR framework.
+If you plan to add more devices that make use of this component, remember to isolate their code outta here where possible.
log_suspicious_login - Config entry which special logging of failed logins under suspicious circumstances.
+
log_telecomms - log telecomms messages
+
log_twitter - log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases.
+
log_victim - log attack messages
+
log_virus - log virology data
+
log_vote - log voting
+
log_whisper - log client whisper
+
log_world_topic - log all world.Topic() calls
+
persistent_debris - Whether or not to use the persistence system for cleanable objects
+
persistent_debris_only - Whether or not to nuke all roundstart debris that isn't due to persistence if the above is true
+
persistent_debris_wipe_on_nuke - Wipe dirty stuff on nuke
+
picture_logging_camera - This is... shitcode, literally same as above, if one of them is inactive, won't log at all, PLEASE FUCKING REMOVE THIS.
+
protolock_during_lowpop - R&D Machinery
+
respawn_penalty_includes_observe - Observing penalizes for respawns, not just joining.
+
respawns_enabled - Allows usage of respawn system
+
tetris_no_science - TETRIS ARCADE MACHINE
+
use_field_of_vision - Enables the FoV component, which hides objects and mobs behind the parent from their sight, unless they turn around, duh.
+Camera mobs, AIs, ghosts and some other are of course exempt from this. This also doesn't influence simplemob AI, for the best.
+
+
keyed_list
+
cross_server_bunker_override - cit config
+
respawn_chaos_gamemodes - Gamemode config tags that are banned from respawning
+
+
number
+
autodoc_time_surgery_base - AUTODOC
+
bluespaceminer_mult_output - BLUESPACE MINER
+
defib_cmd_time_limit - Seconds for CMD on defib-with-memory-loss policy config to display instead of defib-intact config
+
dirt_alpha_starting - Alpha dirt starts at
+
error_cooldown - The "cooldown" time for each occurrence of a unique error
+
error_limit - How many occurrences before the next will silence them
+
error_msg_delay - How long to wait between messaging admins about occurrences of a unique error
+
error_silence_time - How long a unique error will be silenced for
+
initial_gear_points - Initial loadout points
+
outdated_movedelay - Outdated move delay
+
persistent_debris_global_max - Max amount of objects to store, total
+
persistent_debris_type_max - Max amount of objects to store per type
+
respawn_delay - Minutes before allowing respawns.
+
respawn_delay_cryo - Minutes before allowing respawn, if user cryo'd.
+
respawn_minimum_delay_roundstart - Minutes from roundstart before someone can respawn
+
stamina_combat
+
base_regeneration - Base regeneration per second
+
buffer_max - Maximum stamina buffer
+
out_of_combat_timer - Seconds until percent_regeneration_out_of_combat kicks in
+
overdraw_penalty_factor - Factor to multiply by for stamina usage past buffer into health
+
percent_regeneration_out_of_combat - After out_of_combat_timer elapses, additionally regenerate this percent of total stamina per second. Unaffected by combat mode.
+
post_action_penalty_delay - Seconds after an action for which your regeneration is penalized
+
post_action_penalty_factor - Factor to multiply by for penalizing post-action-stamina-regen
+
+
turf_dirt_threshold - Amount of dirtyness tiles need to spawn dirt.
+
turf_dirty_multiplier - Dirtyness multiplier for making turfs dirty
+
vote_autotransfer_initial - Length of time before the first autotransfer vote is called (deciseconds, default 2 hours)
+Set to 0 to disable the subsystem altogether.
+
vote_autotransfer_interval - length of time to wait before subsequent autotransfer votes (deciseconds, default 30 minutes)
+
vote_autotransfer_maximum - maximum extensions until the round autoends.
+Set to 0 to force automatic crew transfer after the 'vote_autotransfer_initial' elapsed.
+Set to -1 to disable the maximum extensions cap.
+
+
+
contractor_item
+
blackout - We give a reference to the mind that'll be the support unit
+
contractor_pinpointer - We're not regenerating already completed/aborted/extracting contracts, but we don't want to repeat their targets.
+Reroll contracts without duplicates
+Set our target list with the new set we've generated.
master - Start of queue linked list
+End of queue linked list (used for appending to the list)
+Are we loading in a new map?
+for scheduling different subsystems for different stages of the round
traitor - Probability the AI going malf will be accompanied by an ion storm announcement and some ion laws.
+The probability to replace an existing law with an ion law instead of adding a new ion law.
+
+
+
dynamic_snapshot - A "snapshot" of dynamic at an important point in time.
+Exported to JSON in the dynamic.json log file.
effect_system/trail_follow - ///// Attach a trail to any object, that spawns when it moves (like for the jetpack)
+just pass in the object to attach it to in set_up
+Then do start() to start it and stop() to stop it, obviously
+and don't call start() in a loop that will be repeated otherwise it'll get spammed!
element - A holder for simple behaviour that can be attached to many different types
+
bed_tuckable - Tucking element, for things that can be tucked into bed.
+
connect_loc - This element hooks a signal onto the loc the current object is on.
+When the object moves, it will unhook the signal and rehook it to the new object.
+
contextual_screentip_bare_hands - Apply basic contextual screentips when the user hovers over this item with an empty hand.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
+
contextual_screentip_item_typechecks - Apply basic contextual screentips when the user hovers over this item with a provided item.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
+
contextual_screentip_sharpness - Apply basic contextual screentips when the user hovers over this item with an item of the given tool behavior.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
+
contextual_screentip_tools - Apply basic contextual screentips when the user hovers over this item with an item of the given tool behavior.
+A "Type B" interaction.
+This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
+
dwarfism - Very similar to squish, but for dwarves and shorties
Families gamemode / dynamic ruleset handler - A special datum used by the families gamemode and dynamic rulesets to centralize code. "Family" and "gang" used interchangeably in code.
+
gang_theme - Gang themes for the Families gamemode. Used to determine the RP theme of the round, what gangs are present, and what their objectives are.
map_generator - This type is responsible for any map generation behavior that is done in areas, override this to allow for area-specific map generation. This generation is ran by areas in initialize.
Outfit datums - This is a clean system of applying outfits to mobs, if you need to equip someone in a uniform
+this is the way to do it cleanly and properly.
qdel_item - Qdel Item: Holds statistics on each type that passes thru qdel
+Holds the type as a string for this type
+Total number of times it's passed thru qdel.
+Total amount of milliseconds spent processing this type's Destroy()
+Times it was queued for soft deletion but failed to soft delete.
+Different from failures because it also includes QDEL_HINT_HARDDEL deletions
+Total amount of milliseconds spent hard deleting this type.
+Highest time spent hard_deleting this in ms.
+Number of times hard deletes took longer than the configured threshold
+Number of times it's not respected force=TRUE
+Number of times it's not even bother to give a qdel hint
+Number of times it's slept in its destroy
stray_cargo - Spawns a cargo pod containing a random cargo supply pack on a random area of the station
+
syndicate - Places that shouldn't explode
+Subtypes from the above that actually should explode.
+A rare variant that drops a crate containing syndicate uplink items
scar - scars are cosmetic datums that are assigned to bodyparts once they recover from wounds. Each wound type and severity have their own descriptions for what the scars
+look like, and then each body part has a list of "specific locations" like your elbow or wrist or wherever the scar can appear, to make it more interesting than "right arm"
skill_holder - Skill holder datums
+All procs are tied to the mind, since they are always expected to have a skill holder anyway.
+
skill_modifier - Base skill modifier datum, used to modify a player skills without directly touching their values, levels and affinity
+and cause lots of edge cases. These are fairly simple overall... make a subtype though, don't use this one.
+
job - Jobbie skill modifiers.
+
level - Level skill modifiers below.
+
+
+
Song datum - These are the actual backend behind instruments.
+They attach to an atom and provide the editor + playback functionality.
grouped - Status effect from multiple sources, when all sources are removed, so is the effect
+Adds itself to sources and destroys itself if one exists already, there are never multiple
tgui_list_input - Datum used for instantiating and using a TGUI-controlled list input that prompts the user with
+a message and shows a list of selectable options
+
async tgui_list_input - An asynchronous version of tgui_list_input to be used with callbacks instead of waiting on user responses.
+
+
tgui_modal - Datum used for instantiating and using a TGUI-controlled modal that prompts the user with
+a message and has buttons for responses.
+
async tgui_modal - An asynchronous version of tgui_modal to be used with callbacks instead of waiting on user responses.
+
+
tgui_panel - tgui_panel datum
+Hosts tgchat and other nice features.
mob - CLICKDELAY HANDLING SYSTEM
+How this works is mobs can never do actions until their next_action is at or below world.time, but things can specify extra cooldown
+to check for either from the time of last_action or from the end of next_action.
Goliath Broodmother - A stronger, faster variation of the goliath. Has the ability to spawn baby goliaths, which it can later detonate at will.
+When it's health is below half, tendrils will spawn randomly around it. When it is below a quarter of health, this effect is doubled.
+It's attacks are as follows:
+
Candy - Kind of like bubblegum's rebellious teenage son/daughter.
+Has 4 attacks.
+Charge - Charges at it's target.
+Bloody Trap - Traps it's target between some walls, and then charges at them.
+Meat Shield - Knockbacks all targets in the 3 tiles he faces, and then creates a wall.
+Knockdown - Deals damage and knockbacks all targets in a 2 tile radius.
+
Drakeling - A small drake/dragon.
+Has four attacks.
+
Herald - A slow-moving projectile user with a few tricks up it's sleeve. Less unga-bunga than Colossus, with more cleverness in it's fighting style.
+As it's health gets lower, the amount of projectiles fired per-attack increases.
+It's attacks are as follows:
+
Legionnaire - A towering skeleton, embodying the power of Legion.
+As it's health gets lower, the head does more damage.
+It's attacks are as follows:
+
Necropolis priest - Kind of like BD miner's son trying to impress their dad.
+Has four attacks.
+
Pandora - A box with a similar design to the Hierophant which trades large, single attacks for more frequent smaller ones.
+As it's health gets lower, the time between it's attacks decrease.
+It's attacks are as follows:
durand_shield - Shield processing
+*An object to take the hit for us when using the Durand's defense mode.
+It is spawned in during the durand's initilization, and always stays on the same tile.
+Normally invisible, until defense mode is actvated. When the durand detects an attack that should be blocked, the
+attack is passed to the shield. The shield takes the damage, uses it to calculate charge cost, and then sets its
+own integrity back to max. Shield is automatically dropped if we run out of power or the user gets out.
rust_conversion/small - What we want is the 3 tiles around the user and the tile under him to be rusted, so min(dist,1)-1 causes us to get 0 for these tiles, rest of the tiles are based on chance
bounty_cube - Upon completion of a civilian bounty, one of these is created. It is sold to cargo to give the cargo budget bounty money, and the person who completed it cash.
hard_drive/small/nukeops - For tablets given to nuke ops
+
recharger/cyborg - This recharger exists only in borg built-in tablets. I would have tied it to the borg's cell but
+the program that displays laws should always be usable, and the exceptions were starting to pile.
Hyperstation 13 fleshlight - Humbley request this doesnt get ported to other code bases, we strive to make things unique on our server and we dont have a lot of coders
+but if you absolutely must. please give us some credit~ <3
+made by quotefox and heavily modified by SandPoot
Spider Charge - A unique version of c4 possessed only by the space ninja. Has a stronger blast radius.
+Can only be detonated by space ninjas with the bombing objective. Can only be set up where the objective says it can.
+When it primes, the space ninja responsible will have their objective set to complete.
antigrav - Anti-Gravity - Makes the user weightless.
+
teleporter - Teleporter - Lets the user teleport to a nearby location.
+
+
balloon - Rave Visor - Pointless
+Tanner - Maybe another time
+Balloon Blower - Blows a balloon.
+
bikehorn - Criminal Capture
+Mirage grenade dispenser
+Projectile Dampener
+Active Sonar
+Bike Horn - Plays a bike horn sound.
+
clamp - Hydraulic Clamp - Lets you pick up and drop crates.
+
constructor - Constructor - Lets you build quicker and create RCD holograms.
+
defibrillator - Injector - No piercing syringes, replace another time
+Organ Thrower
+Patrient Transport
+Defibrillator - Gives the suit an extendable pair of shock paddles.
+
dispenser - Dispenser - Dispenses an item after a time passes.
+
dna_lock - Longfall
+Thermal Regulator - Naw.
+DNA Lock - Prevents people without the set DNA from activating the suit.
+
drill - Drill - Lets you dig through rock and basalt.
+
emp_shield - EMP Shield - Protects the suit from EMPs.
+
flashlight - Flashlight - Gives the suit a customizable flashlight.
+
gps - Internal GPS - Extends a GPS you can use.
+
health_analyzer - Health Analyzer - Gives the user a ranged health analyzer and their health status in the panel.
+
holster - Pepper Shoulders
+Holster - Instantly holsters any not huge gun.
+
jetpack - Ion Jetpack - Lets the user fly freely through space using battery charge.
+
magboot - Magnetic Stability - Gives the user a slowdown but makes them negate gravity and be immune to slips.
+
magnetic_harness - Magnetic Harness - Automatically puts guns in your suit storage when you drop them.
paper_dispenser - Paper Dispenser - Dispenses (sometimes burning) paper sheets.
+
quick_carry - Quick Carry - Lets the user carry bodies quicker.
+
rad_protection - Radiation Protection - Protects the user from radiation, gives them a geiger counter and rad info in the panel.
+
reagent_scanner - Reagent Scanner - Lets the user scan reagents.
+
springlock - Sign Language Translator - I want, but no
+Springlock Mechanism - allows your modsuit to activate faster, but reagents are very dangerous.
+
stamp - Stamper - Extends a stamp that can switch between accept/deny modes.
+
stealth - Cloaking - Lowers the user's visibility, can be interrupted by being touched or attacked.
+
storage - Storage - Adds a storage component to the suit.
+
surgical_processor - Thread Ripper
+Surgical Processor - Lets you do advanced surgeries portably.
+
t_ray - T-Ray Scan - Scans the terrain for undertile objects.
+
tether - Emergency Tether - Shoots a grappling hook projectile in 0g that throws the user towards it.
+
visor - Base Visor - Adds a specific HUD and traits to you.
+
welding - Welding Protection - Makes the helmet protect from flashes and welding.
paper - Paper is now using markdown (like in github pull notes) for ALL rendering
+so we do loose a bit of functionality but we gain in easy of use of
+paper and getting rid of that crashing bug
trinary/nuclear_reactor - What is this?
+Moderators list (Not gonna keep this accurate forever):
+Fuel Type:
+Oxygen: Power production multiplier. Allows you to run a low plasma, high oxy mix, and still get a lot of power.
+Plasma: Power production gas. More plasma -> more power, but it enriches your fuel and makes the reactor much, much harder to control.
+Tritium: Extremely efficient power production gas. Will cause chernobyl if used improperly.
+Moderation Type:
+N2: Helps you regain control of the reaction by increasing control rod effectiveness, will massively boost the rad production of the reactor.
+CO2: Super effective shutdown gas for runaway reactions. MASSIVE RADIATION PENALTY!
+Pluoxium: Same as N2, but no cancer-rads!
+Permeability Type:
+BZ: Increases your reactor's ability to transfer its heat to the coolant, thus letting you cool it down faster (but your output will get hotter)
+Water Vapour: More efficient permeability modifier
+Hyper Noblium: Extremely efficient permeability increase. (10x as efficient as bz)
+Depletion type:
+Nitryl: When you need weapons grade plutonium yesterday. Causes your fuel to deplete much, much faster. Not a huge amount of use outside of sabotage.
+Sabotage:
+Meltdown:
+Flood reactor moderator with plasma, they won't be able to mitigate the reaction with control rods.
+Shut off coolant entirely. Raise control rods.
+Swap all fuel out with spent fuel, as it's way stronger.
+Blowout:
+Shut off exit valve for quick overpressure.
+Cause a pipefire in the coolant line (LETHAL).
+Tack heater onto coolant line (can also cause straight meltdown)
+Tips:
+Be careful to not exhaust your plasma supply. I recommend you DON'T max out the moderator input when youre running plasma + o2, or you're at a tangible risk of running out of those gasses from atmos.
+The reactor CHEWS through moderator. It does not do this slowly. Be very careful with that!
plumbing - Basic plumbing object.
+It doesn't really hold anything special, YET.
+Objects that are plumbing but not a subtype are as of writing liquid pumps and the reagent_dispenser tank
+Also please note that the plumbing component is toggled on and off by the component using a signal from default_unfasten_wrench, so dont worry about it
+
acclimator - this the plumbing version of a heater/freezer.
disposer - see if machine has enough to fill
+pick a reagent_container that could be used
+see if it would overflow else inject
+glass was full so we move it away
+slime extracts need inject
+no need to move slimecross industrial things
filter - chemical plumbing filter. If it's not filtered by left and right, it goes straight.
+
input - We can empty beakers in here and everything
+
liquid_pump - We pump liquids from activated(plungerated) geysers to a plumbing outlet. We don't need to be wired.
+
output - We can fill beakers in here and everything. we dont inheret from input because it has nothing that we need
+
pill_press - We take a constant input of reagents, and produce a pill once a set volume is reached
+
reaction_chamber - a reaction chamber for plumbing. pretty much everything can react, but this one keeps the reagents seperated and only reacts under your given terms
+
splitter - it splits the reagents however you want. So you can "every 60 units, 45 goes left and 15 goes straight". The side direction is EAST, you can change this in the component
+
synthesizer - A single machine that produces a single chem. Can be placed in unison with others through plumbing to create chemical factories
basalt/lava_land_surface - Surface. The surface is warm, but survivable without a suit. Internals are required. The floors break to chasms, which drop you into the underground.
CLICKDELAY HANDLING SYSTEM
+How this works is mobs can never do actions until their next_action is at or below world.time, but things can specify extra cooldown
+to check for either from the time of last_action or from the end of next_action.
+
Clickdelay should always be checked via [CheckActionCooldown()], never manually!
Simple modification variable added to amount on adjust and on checking time since last action using [CheckActionCooldown()].
+This should only be manually modified via addition.
Simple modification variable multiplied to next action modifier on adjust and on checking time since last action using [CheckActionCooldown()].
+This should only be manually modified using multipliers.
Ability system based on action buttons. Can be ported to base /mob or /mob/living later if needed, easily - the procs are currently on living/carbon/human/innate_abilities.dm
+datum traits-style lazylist of abilities
Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set or set using [DelayNextAction()]. This should only be checked using [CheckActionCooldown()].
The difference between the above and this is this is set immediately before even the pre-attack begins to ensure clickdelay is respected.
+Then, it is flushed or discarded using [FlushLastAttack()] or [DiscardLastAttack()] respectively.
Whether or not the mob is currently being transformed into another mob or into another state of being. This will prevent it from moving or doing realistically anything.
+Don't you DARE use this for a cheap way to ensure someone is stunned in your code.
Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()].
Current state of our typing indicator. Used for cut overlay, DO NOT RUNTIME ASSIGN OTHER THAN FROM SHOW/CLEAR. Used to absolutely ensure we do not get stuck overlays.
Add a action speed modifier to a mob. If a variable subtype is passed in as the first argument, it will make a new datum. If ID conflicts, it will overwrite the old ID.
Add a move speed modifier to a mob. If a variable subtype is passed in as the first argument, it will make a new datum. If ID conflicts, it will overwrite the old ID.
Adds the cliented mob reference to the list of all player-mobs, besides to either the of dead or alive player-mob lists, as appropriate. Called on Login().
Proc to resist a grab. moving_resist is TRUE if this began by someone attempting to move. Return FALSE if still grabbed/failed to break out. Use this instead of resist_grab() directly.
Displays typing indicator.
+@param timeout_override - Sets how long until this will disappear on its own without the user finishing their message or logging out. Defaults to src.typing_indicator_timeout
+@param state_override - Sets the state that we will fetch. Defaults to src.get_typing_indicator_icon_state()
+@param force - shows even if src.typing_indcator_enabled is FALSE.
Gets the movespeed modifier datum of a modifier on a mob. Returns null if not found.
+DANGER: IT IS UP TO THE PERSON USING THIS TO MAKE SURE THE MODIFIER IS NOT MODIFIED IF IT HAPPENS TO BE GLOBAL/CACHED.
handle_eye_contact() is called when we examine() something. If we examine an alive mob with a mind who has examined us in the last second within 5 tiles, we make eye contact!
Removes the mob reference from the list of all player-mobs, besides from either the of dead or alive player-mob lists, as appropriate. Called on Logout().
Go through the list of actionspeed modifiers and calculate a final actionspeed. ANY ADD/REMOVE DONE IN UPDATE_actionspeed MUST HAVE THE UPDATE ARGUMENT SET AS FALSE!
Go through the list of movespeed modifiers and calculate a final movespeed. ANY ADD/REMOVE DONE IN UPDATE_MOVESPEED MUST HAVE THE UPDATE ARGUMENT SET AS FALSE!
Simple modification variable added to amount on adjust and on checking time since last action using [CheckActionCooldown()].
+This should only be manually modified via addition.
Simple modification variable multiplied to next action modifier on adjust and on checking time since last action using [CheckActionCooldown()].
+This should only be manually modified using multipliers.
Ability system based on action buttons. Can be ported to base /mob or /mob/living later if needed, easily - the procs are currently on living/carbon/human/innate_abilities.dm
+datum traits-style lazylist of abilities
Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set or set using [DelayNextAction()]. This should only be checked using [CheckActionCooldown()].
The difference between the above and this is this is set immediately before even the pre-attack begins to ensure clickdelay is respected.
+Then, it is flushed or discarded using [FlushLastAttack()] or [DiscardLastAttack()] respectively.
Whether or not the mob is currently being transformed into another mob or into another state of being. This will prevent it from moving or doing realistically anything.
+Don't you DARE use this for a cheap way to ensure someone is stunned in your code.
Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()].
Current state of our typing indicator. Used for cut overlay, DO NOT RUNTIME ASSIGN OTHER THAN FROM SHOW/CLEAR. Used to absolutely ensure we do not get stuck overlays.
Default clickdelay for an UnarmedAttack() that successfully passes. Respects action_cooldown_mod.
Proc Details
CheckActionCooldown
+
+
Checks if we can do another action.
+Returns TRUE if we can and FALSE if we cannot.
+
@params
+
+
cooldown - Time required since last action. Defaults to 0.5
+
from_next_action - Defaults to FALSE. Should we check from the tail end of next_action instead of last_action?
+
ignore_mod - Defaults to FALSE. Ignore all adjusts and multipliers. Do not use this unless you know what you are doing and have a good reason.
+
ignore_next_action - Defaults to FALSE. Ignore next_action and only care about cooldown param and everything else. Generally unused.
+
immediate - Defaults to FALSE. Checks last action using immediate, used on the head end of an attack. This is to prevent colliding attacks in case of sleep. Not that you should sleep() in an attack but.. y'know.
+
CheckResistCooldown
+
+
Checks if we can resist again.
CommonClickOn
+
+
Common mob click code
DelayNextAction
+
+
Applies a delay to next_action before we can do our next action.
+
@params
+
+
amount - Amount to delay by
+
ignore_mod - ignores next action adjust and mult
+
considered_action - Defaults to TRUE - If TRUE, sets last_action to world.time.
+
immediate - defaults to TRUE - if TRUE, writes to cached/last_attack_immediate instead of last_attack. This ensures it can't collide with any delay checks in the actual attack.
+
flush - defaults to FALSE - Use this while using this proc outside of clickcode to ensure everything is set properly. This should never be set to TRUE if this is called from clickcode.
+
DiscardCurrentAction
+
+
Discards last_action and next_action
Dizzy
+
+
Set the dizzyness of a mob to a passed in amount
+
Except if dizziness is already higher in which case it does nothing
EstimatedNextActionTime
+
+
Get estimated time of next attack.
FlushCurrentAction
+
+
Flushes last_action and next_action
GetActionCooldownAdjust
+
+
Gets action_cooldown_adjust
GetActionCooldownMod
+
+
Gets action_cooldown_mod.
Jitter
+
+
Set the jitter of a mob
MarkResistTime
+
+
Mark the last resist as now.
+
@params
+
+
extra_cooldown - Extra cooldown to apply to next_resist. Defaults to this mob's resist_cooldown.
+
override - Defaults to FALSE - if TRUE, extra_cooldown will replace the old next_resist even if the old is longer.
+
Process_Spacemove
+
+
Process_Spacemove
+Called by /client/Move()
+For moving in space
+return TRUE for movement 0 for none
SetNextAction
+
+
Sets our next action to. The difference is DelayNextAction cannot reduce next_action under any circumstances while this can.
add_actionspeed_modifier
+
+
Add a action speed modifier to a mob. If a variable subtype is passed in as the first argument, it will make a new datum. If ID conflicts, it will overwrite the old ID.
add_movespeed_modifier
+
+
Add a move speed modifier to a mob. If a variable subtype is passed in as the first argument, it will make a new datum. If ID conflicts, it will overwrite the old ID.
add_to_alive_mob_list
+
+
Adds the mob reference to the list of all mobs alive. If mob is cliented, it adds it to the list of all living player-mobs.
add_to_current_dead_players
+
+
Adds the cliented mob reference to either the list of dead player-mobs or to the list of observers, depending on how they joined the game.
add_to_current_living_antags
+
+
Adds the cliented mob reference to the list of living antag player-mobs.
add_to_current_living_players
+
+
Adds the cliented mob reference to the list of living player-mobs. If the mob is an antag, it adds it to the list of living antag player-mobs.
add_to_dead_mob_list
+
+
Adds the mob reference to the list of all the dead mobs. If mob is cliented, it adds it to the list of all dead player-mobs.
add_to_mob_list
+
+
Adds the mob reference to the list and directory of all mobs. Called on Initialize().
add_to_player_list
+
+
Adds the cliented mob reference to the list of all player-mobs, besides to either the of dead or alive player-mob lists, as appropriate. Called on Login().
adjust_blindness
+
+
Adjust a mobs blindness by an amount
+
Will apply the blind alerts if needed
adjust_blurriness
+
+
Adjust the current blurriness of the mobs vision by amount
adjust_bodytemperature
+
+
Adjust the body temperature of a mob, with min/max settings
adjust_disgust
+
+
Adjust the disgust level of a mob
adjust_drugginess
+
+
Adjust the drugginess of a mob
adjust_nutrition
+
+
Adjust the nutrition of a mob
attempt_resist_grab
+
+
Proc to resist a grab. moving_resist is TRUE if this began by someone attempting to move. Return FALSE if still grabbed/failed to break out. Use this instead of resist_grab() directly.
audible_message
+
+
Show a message to all mobs in earshot of this one
+
This would be for audible actions by the src mob
+
vars:
+
+
message is the message output to anyone who can hear.
+
self_message (optional) is what the src mob hears.
+
deaf_message (optional) is what deaf people will see.
+
hearing_distance (optional) is the range, how many tiles away the message can be heard.
+
ignored_mobs (optional) doesn't show any message to any given mob in the list.
+
blind_eyes
+
+
Sets a mob's blindness to an amount if it was not above it already, similar to how status effects work
blur_eyes
+
+
Make the mobs vision blurry
can_resist
+
+
Set position
+Set rotation
check_obscured_slots
+
+
Checks for slots that are currently obscured by other garments.
clear_fullscreen
+
+
Wipes a fullscreen of a certain category
+
Second argument is for animation delay.
clear_typing_indicator
+
+
Removes typing indicator.
create_chat_message
+
+
Creates a message overlay at a defined location for a given speaker
+
Arguments:
+
+
speaker - The atom who is saying this message
+
message_language - The language that the message is said in
+
raw_message - The text content of the message
+
spans - Additional classes to be added to the message
+
message_mode - Bitflags relating to the mode of the message
+
display_typing_indicator
+
+
Displays typing indicator.
+@param timeout_override - Sets how long until this will disappear on its own without the user finishing their message or logging out. Defaults to src.typing_indicator_timeout
+@param state_override - Sets the state that we will fetch. Defaults to src.get_typing_indicator_icon_state()
+@param force - shows even if src.typing_indcator_enabled is FALSE.
dispose_rendering
+
+
destroys screen rendering. call on mob del
equipped_speed_mods
+
+
Gets the combined speed modification of all worn items
+Except base mob type doesnt really wear items
examinate
+
+
Examine a mob
+
mob verbs are faster than object verbs. See
+this byond forum post
+for why this isn't atom/verb/examine()
generate_typing_indicator
+
+
Generates the mutable appearance for typing indicator. Should prevent stuck overlays.
get_ability_property
+
+
Gets an ability property
get_actionspeed_modifiers
+
+
Get the action speed modifiers list of the mob
get_active_hand
+
+
Get the bodypart for whatever hand we have active, Only relevant for carbons
get_config_multiplicative_speed
+
+
Get the global config movespeed of a mob by type
get_indicator_overlay
+
+
Fetches the typing indicator we'll use from GLOB.typing_indicator_overlays
get_movespeed_modifier_datum
+
+
Gets the movespeed modifier datum of a modifier on a mob. Returns null if not found.
+DANGER: IT IS UP TO THE PERSON USING THIS TO MAKE SURE THE MODIFIER IS NOT MODIFIED IF IT HAPPENS TO BE GLOBAL/CACHED.
get_movespeed_modifiers
+
+
Get the move speed modifiers list of the mob
get_num_held_items
+
+
Find number of held items, multihand compatible
get_proc_holders
+
+
Gets all relevant proc holders for the browser statpenl
get_spells_for_statpanel
+
+
Convert a list of spells into a displyable list for the statpanel
+
Shows charge and other important info
get_status_tab_items
+
+
Adds this list to the output to the stat browser
get_top_level_mob
+
+
SUBTLE COMMAND
get_typing_indicator_icon_state
+
+
Gets the state we will use for typing indicators. Defaults to src.typing_indicator_state
grant_ability_from_source
+
+
Grants an ability from a source
handle_eye_contact
+
+
handle_eye_contact() is called when we examine() something. If we examine an alive mob with a mind who has examined us in the last second within 5 tiles, we make eye contact!
+
Note that if either party has their face obscured, the other won't get the notice about the eye contact
+Also note that examine_more() doesn't proc this or extend the timer, just because it's simpler this way and doesn't lose much.
+The nice part about relying on examining is that we don't bother checking visibility, because we already know they were both visible to each other within the last second, and the one who triggers it is currently seeing them
has_actionspeed_modifier
+
+
Is there a actionspeed modifier for this mob
has_movespeed_modifier
+
+
Is there a movespeed modifier for this mob
hide_fullscreens
+
+
Removes fullscreens from client but not the mob
init_rendering
+
+
initializes screen rendering. call on mob new
initialize_actionspeed
+
+
Adds a default action speed
interact_with
+
+
Attempts to open the tgui menu
list_interaction_attributes
+
+
# Interactions code by HONKERTRON feat TestUnit
+
+
+
Contains a lot ammount of ERP and MEHANOYEBLYA
+
CREDIT TO ATMTA STATION FOR MOST OF THIS CODE, I ONLY MADE IT WORK IN /vg/ - Matt
+
Rewritten 30/08/16 by Zuhayr, sry if I removed anything important.
+
I removed ERP and replaced it with handholding. Nothing of worth was lost. - Vic
+
Fuck you, Vic. ERP is back. - TT
+
+
+
using var/ on everything, also TRUE
+
+
+
"TGUIzes" the panel because yes - SandPoot
+
Makes all the code good because yes as well - SandPoot
+
onShuttleMove
+
+
Mob move procs
on_item_dropped
+
+
Mostly called by doUnEquip()
+Like item dropped() on mob side.
overlay_fullscreen
+
+
Adds a fullscreen overlay
+
@params
+
+
category - string - must exist. will overwrite any other screen in this category. defaults to type.
+
type - the typepath of the screen
+
severity - severity - different screen objects have differing severities
+
pointed
+
+
Point at an atom
+
mob verbs are faster than object verbs. See
+this byond forum post
+for why this isn't atom/verb/pointed()
+
note: ghosts can point, this is intended
+
visible_message will handle invisibility properly
+
overridden here and in /mob/dead/observer for different point span classes and sanity checks
reload_fullscreen
+
+
Ensures all fullscreens are on client.
reload_rendering
+
+
loads screen rendering. call on mob login
remove_ability_from_source
+
+
Removes an ability from a source
remove_actionspeed_modifier
+
+
Remove a action speed modifier from a mob, whether static or variable.
remove_from_alive_mob_list
+
+
Removes the mob reference from the list of all mobs alive. If mob is cliented, it removes it from the list of all living player-mobs.
remove_from_current_dead_players
+
+
Removes the mob reference from either the list of dead player-mobs or from the list of observers, depending on how they joined the game.
remove_from_current_living_antags
+
+
Removes the mob reference from the list of living antag player-mobs.
remove_from_current_living_players
+
+
Removes the mob reference from the list of living player-mobs. If the mob is an antag, it removes it from the list of living antag player-mobs.
remove_from_dead_mob_list
+
+
Remvoes the mob reference from list of all the dead mobs. If mob is cliented, it adds it to the list of all dead player-mobs.
remove_from_mob_list
+
+
Removes the mob reference from the list and directory of all mobs. Called on Destroy().
remove_from_player_list
+
+
Removes the mob reference from the list of all player-mobs, besides from either the of dead or alive player-mob lists, as appropriate. Called on Logout().
remove_movespeed_modifier
+
+
Remove a move speed modifier from a mob, whether static or variable.
setGrabState
+
+
Updates the grab state of the mob and updates movespeed
set_ability_property
+
+
Sets an ability property
set_blindness
+
+
Force set the blindness of a mob to some level
set_blurriness
+
+
Set the mobs blurriness of vision to an amount
set_disgust
+
+
Set the disgust level of a mob
set_dizziness
+
+
FOrce set the dizzyness of a mob
set_drugginess
+
+
Set the drugginess of a mob
set_nutrition
+
+
Force set the mob nutrition
set_species
+
+
DNA MOB-PROCS
shared_ui_interaction
+
+
public
+
Standard interaction/sanity checks. Different mob types may have overrides.
+
return UI_state The state of the UI.
shuttleRotate
+
+
Mob rotate procs
total_multiplicative_slowdown
+
+
Calculate the total slowdown of all movespeed modifiers
update_actionspeed
+
+
Go through the list of actionspeed modifiers and calculate a final actionspeed. ANY ADD/REMOVE DONE IN UPDATE_actionspeed MUST HAVE THE UPDATE ARGUMENT SET AS FALSE!
update_blindness
+
+
proc that adds and removes blindness overlays when necessary
update_config_movespeed
+
+
Set or update the global movespeed config on a mob
update_movespeed
+
+
Go through the list of movespeed modifiers and calculate a final movespeed. ANY ADD/REMOVE DONE IN UPDATE_MOVESPEED MUST HAVE THE UPDATE ARGUMENT SET AS FALSE!
visible_message
+
+
Adds the functionality to self_message.
vv_edit_var
+
+
Handles the special case of editing the movement var
Our block_parry_data for unarmed blocks/parries. Currently only used for parrying, as unarmed block isn't implemented yet. YOU MUST RUN [get_block_parry_data(this)] INSTEAD OF DIRECTLY ACCESSING!
Handles biological life processes like chemical metabolism, breathing, etc
+Returns TRUE or FALSE based on if we were interrupted. This is used by overridden variants to check if they should stop.
Handles physical life processes like being on fire. Don't ask why this is considered "Life".
+Returns TRUE or FALSE based on if we were interrupted. This is used by overridden variants to check if they should stop.
whether or not we can slide under another living mob. defaults to if we're not dense. CanPass should check "overriding circumstances" like buckled mobs/having PASSMOB flag, etc.
Our block_parry_data for unarmed blocks/parries. Currently only used for parrying, as unarmed block isn't implemented yet. YOU MUST RUN [get_block_parry_data(this)] INSTEAD OF DIRECTLY ACCESSING!
Handles biological life processes like chemical metabolism, breathing, etc
+Returns TRUE or FALSE based on if we were interrupted. This is used by overridden variants to check if they should stop.
HealAllImmobilityUpTo
+
+
Makes sure all 5 of the non-knockout immobilizing status effects are lower or equal to amount.
IsDazed
+
+
DAZED
IsFrozen
+
+
FROZEN
IsImmobilized
+
+
IMMOBILIZED
IsKnockdown
+
+
KNOCKDOWN
IsParalyzed
+
+
PARALYZED
IsSleeping
+
+
SLEEPING
IsStaggered
+
+
STAGGERED
IsStun
+
+
STUN
IsUnconscious
+
+
UNCONSCIOUS
Life
+
+
Called by SSmobs at an interval of 2 seconds.
+Splits off into PhysicalLife() and BiologicalLife(). Override those instead of this.
PhysicalLife
+
+
Handles physical life processes like being on fire. Don't ask why this is considered "Life".
+Returns TRUE or FALSE based on if we were interrupted. This is used by overridden variants to check if they should stop.
RechargeStaminaBuffer
+
+
Boosts our stamina buffer by this much.
ShoveOffBalance
+
+
OFF BALANCE/SHOVIES
UpdateStaminaBuffer
+
+
Updates our stamina buffer amount.
UseStaminaBuffer
+
+
Attempts to use an amount of stamina from our stamina buffer.
+Does not use anything if we don't have enough.
+
Returns TRUE or FALSE based on if we have it.
active_block_effect_end
+
+
Visual effect cleanup for starting a directional block
active_block_effect_start
+
+
Visual effect setup for starting a directional block
active_parry_reflex_counter
+
+
Called when an attack is parried and block_parra_data indicates to use a proc to handle counterattack.
add_movespeed_mod_immunities
+
+
Ignores specific slowdowns. Accepts a list of slowdowns.
add_quirk
+
+
DISABILITIES
add_stun_absorption
+
+
STUN ABSORPTION
apply_damage
+
+
Applies damage to this mob
+
Sends [COMSIG_MOB_APPLY_DAMAGE]
+
Arguuments:
+
+
damage - amount of damage
+
damagetype - one of [BRUTE], [BURN], [TOX], [OXY], [CLONE], [STAMINA]
+
def_zone - zone that is being hit if any
+
blocked - armor value applied
+
forced - bypass hit percentage
+
spread_damage - used in overrides
+
+
Returns TRUE if damage applied
attempt_auto_parry
+
+
Attempts to automatically parry an attacker.
bleedDragAmount
+
+
Returns how much blood we're losing from being dragged a tile, from [mob/living/proc/makeTrail]
can_move_under_living
+
+
whether or not we can slide under another living mob. defaults to if we're not dense. CanPass should check "overriding circumstances" like buckled mobs/having PASSMOB flag, etc.
check_unarmed_parry_activation_special
+
+
Check if we can unarmed parry
cure_blind
+
+
TRAIT PROCS
determine_parry_method
+
+
Massive snowflake proc for getting something to parry with.
+
@return list of [method, data, tool], where method is the parry method define, data is the block_parry_data var that must be run through return_block_parry_data, and tool is the concept/object/martial art/etc used.
do_resist
+
+
The actual proc for resisting. Return TRUE to give CLICK_CD_RESIST clickdelay.
do_run_block
+
+
+
The actual proc for block checks. DO NOT USE THIS DIRECTLY UNLESS YOU HAVE VERY GOOD REASON TO. To reduce copypaste for differences between handling for real attacks and virtual checks.
+
+
Automatically checks all held items for /obj/item/proc/run_block() with the same parameters.
+
@params
+
real_attack - If this attack is real. This one is quirky; If it's real, run_block is called. If it's not, check_block is called and none of the regular checks happen, and this is effectively only useful
+
+
for populating return_list with blocking metadata.
+
+
+
object - Whatever /atom is actually hitting us, in essence. For example, projectile if gun, item if melee, structure/whatever if it's a thrown, etc.
+
damage - The nominal damage this would do if it was to hit. Obviously doesn't take into effect explosions/magic/similar things.. unless you implement it to raise the value.
+
attack_text - The text that this attack should show, in the context of something like "[src] blocks [attack_text]!"
+
attack_type - See __DEFINES/combat.dm - Attack types, to distinguish between, for example, someone throwing an item at us vs bashing us with it.
+
armour_penetration - 0-100 value of how effectively armor penetrating the attack should be.
+
attacker - Set to the mob attacking IF KNOWN. Do not expect this to always be set!
+
def_zone - The zone this'll impact.
+
return_list - If something wants to grab things from what items/whatever put into list/block_return on obj/item/run_block and the comsig, pass in a list so you can grab anything put in it after block runs.
+
attack_direction - Direction of the attack. It is highly recommended to put this in, as the automatic guesswork that's done otherwise is quite inaccurate at times.
+
+
+
electrocute_act
+
+
As the name suggests, this should be called to apply electric shocks.
end_parry_sequence
+
+
Called via timer when the parry sequence ends.
find_active_block_item
+
+
Gets the first item we can that can block, but if that fails, default to active held item.COMSIG_ENABLE_COMBAT_MODE
find_backup_parry_item
+
+
Tries to find a backup parry item.
+Does not look at active held item.
get_blocking_items
+
+
Gets an unsortedlist of objects to run block checks on. List must have associative values for priorities!
get_equipped_items
+
+
Used to return a list of equipped items on a mob; does not include held items (use get_all_gear)
+
Argument(s):
+
+
Optional - include_pockets (TRUE/FALSE), whether or not to include the pockets and suit storage in the returned list
+
get_parry_data
+
+
Gets the datum/block_parry_data we're going to use to parry.
get_parry_stage
+
+
Gets the stage of our parry sequence we're currently in.
get_parry_time
+
+
Gets the current decisecond "frame" of an active parry.
handle_block_parry
+
+
Called every life tick to handle blocking/parrying effects.
handle_parry_ending_effects
+
+
Handles ending effects for parrying.
handle_parry_starting_effects
+
+
Handles starting effects for parrying.
handle_post_sex
+
+
Handles the sex, if cumming returns true.
hasparasites
+
+
parasite tracking/finding procs
hud_set_nanite_indicator
+
+
Diagnostic HUDs!
ignore_slowdown
+
+
Ignores all slowdowns that lack the IGNORE_NOSLOW flag.
initiate_parry_sequence
+
+
Initiates a parrying sequence.
is_barefoot
+
+
Are we wearing something that covers our shoes?
is_bottomless
+
+
Are we wearing something that covers our groin?
is_topless
+
+
Are we wearing something that covers our chest?
keybind_parry
+
+
Called from keybindings.
keybind_start_active_blocking
+
+
Proc called by keybindings to start active blocking.
keybind_stop_active_blocking
+
+
Proc called by keybindings to stop active blocking.
keybind_toggle_active_blocking
+
+
Proc called by keybindings to toggle active blocking.
remove_movespeed_mod_immunities
+
+
Unignores specific slowdowns. Accepts a list of slowdowns.
resist
+
+
Resist verb for attempting to get out of whatever is restraining your motion. Gives you resist clickdelay if do_resist() returns true.
run_parry
+
+
same return values as normal blocking, called with absolute highest priority in the block "chain".
run_parry_countereffects
+
+
Run counterattack if any
shared_living_ui_distance
+
+
public
+
Distance versus interaction check.
+
required src_object atom/movable The object which owns the UI.
+
return UI_state The state of the UI.
subtle
+
+
VERB CODE
subtler
+
+
VERB CODE 2
subtler_table
+
+
VERB CODE 3
transfer_blood_to
+
+
BLOOD TRANSFERS
unignore_slowdown
+
+
Unignores all slowdowns that lack the IGNORE_NOSLOW flag.
Check ourselves to see if we've got any shrapnel, return true if we do. This is a much simpler version of what humans do, we only indicate we're checking ourselves if there's actually shrapnel
generate_fake_scars()- for when you want to scar someone, but you don't want to hurt them first. These scars don't count for temporal scarring (hence, fake)
get_biological_state is a helper used to see what kind of wounds we roll for. By default we just assume carbons (read:monkeys) are flesh and bone, but humans rely on their species datums
inputs: slot (organ slot, like ORGAN_SLOT_HEART), amount (damage to be done), and maximum (currently an arbitrarily large number, can be set so as to limit damage)
+
outputs:
+
description: If an organ exists in the slot requested, and we are capable of taking damage (we don't have GODMODE on), call the damage proc on that organ.
+
+
+
check_self_for_injuries
+
+
Check ourselves to see if we've got any shrapnel, return true if we do. This is a much simpler version of what humans do, we only indicate we're checking ourselves if there's actually shrapnel
check_virus
+
+
Medical HUD! Basic mode needs suit sensors on.
doSprintLossTiles
+
+
Sprint buffer
electrocute_act
+
+
Adds to the parent by also adding functionality to propagate shocks through pulling and doing some fluff effects.
generate_fake_scars
+
+
generate_fake_scars()- for when you want to scar someone, but you don't want to hurt them first. These scars don't count for temporal scarring (hence, fake)
+
If you want a specific wound scar, pass that wound type as the second arg, otherwise you can pass a list like WOUND_LIST_SLASH to generate a random cut scar.
+
Arguments:
+
+
num_scars- A number for how many scars you want to add
+
forced_type- Which wound or category of wounds you want to choose from, WOUND_LIST_BLUNT, WOUND_LIST_SLASH, or WOUND_LIST_BURN (or some combination). If passed a list, picks randomly from the listed wounds. Defaults to all 3 types
+
getOrganLoss
+
+
+
getOrganLoss
+
+
inputs: slot (organ slot, like ORGAN_SLOT_HEART)
+
outputs: organ damage
+
description: If an organ exists in the slot requested, return the amount of damage that organ has
+
+
+
get_biological_state
+
+
get_biological_state is a helper used to see what kind of wounds we roll for. By default we just assume carbons (read:monkeys) are flesh and bone, but humans rely on their species datums
Returns a list of bodyparts with wounds (in case someone has a wound on an otherwise fully healed limb)
give
+
+
Proc called when offering an item to another player
+
This handles creating an alert and adding an overlay to it
humanize
+
+
Humanize
immortality
+
+
For the Wishgranter
remove_all_embedded_objects
+
+
Remove all embedded objects from all limbs on the carbon mob
remove_embedded_object
+
+
Remove a specific embedded item from the carbon mob
secondary_shock
+
+
Called slightly after electrocute act to reduce jittering and apply a secondary stun.
setOrganLoss
+
+
+
setOrganLoss
+
+
inputs: slot (organ slot, like ORGAN_SLOT_HEART), amount(damage to be set to)
+
outputs:
+
description: If an organ exists in the slot requested, and we are capable of taking damage (we don't have GODMODE on), call the set damage proc on that organ, which can
+
+
set or clear the failing variable on that organ, making it either cease or start functions again, unlike adjustOrganLoss.
+
+
+
+
+
take
+
+
Proc called when the player clicks the give alert
+
Handles checking if the player taking the item has open slots and is in range of the offerer
+Also deals with the actual transferring of the item to the players hands
+Arguments:
When an braindead player has their equipment fiddled with, we log that info here for when they come back so they know who took their ID while they were DC'd for 30 seconds
When an braindead player has their equipment fiddled with, we log that info here for when they come back so they know who took their ID while they were DC'd for 30 seconds
copies over clothing preferences like underwear to another human
electrocute_act
+
+
Calculates the siemens coeff based on clothing and species, can also restart hearts.
format_scars
+
+
For use formatting all of the scars this human has for saving for persistent scarring
get_equipped_items
+
+
Used to return a list of equipped items on a human mob; does not include held items (use get_all_gear)
+
Argument(s):
+
+
Optional - include_pockets (TRUE/FALSE), whether or not to include the pockets and suit storage in the returned list
+
handle_fire
+
+
FIRE CODE
load_scar
+
+
Takes a single scar from the persistent scar loader and recreates it from the saved data
sec_hud_set_ID
+
+
Security HUDs! Basic mode shows only the job.
socks_hidden
+
+
Proc to check if socks are hidden.
something_horrible
+
+
DNA HELPER-PROCS
spec_trait_examine_font
+
+
spec_trait_examine_font()
+
This gets a humanoid's special examine font, which is used to color their species name during examine / health analyzing.
+The first of these that applies is returned.
+Returns:
+
+
Metallic font if robotic
+
Cyan if a toxinlover
+
Purple if plasmaperson
+
Rock / Brownish if a golem
+
Green if none of the others apply (aka, generic organic)
Checking Exited() to detect if a hat gets up and walks off.
+Drones and pAIs might do this, after all.
activate_module
+
+
Finds the first available slot and attemps to put item item_module in it.
+
Arguments
+
+
item_module - the item being equipped to a slot.
+
activated
+
+
Checks if the item is currently in a slot.
+
If the item is found in a slot, this returns TRUE. Otherwise, it returns FALSE
+Modified to accept items inside of grippers, used for code\modules\tgui\states\hands.dm:27
+Arguments
+
+
item_module - the item being checked
+
add_to_upgrades
+
+
Use this to add upgrades to robots. It'll register signals for when the upgrade is moved or deleted, if not single use.
break_all_cyborg_slots
+
+
Breaks all of a cyborg's slots.
break_cyborg_slot
+
+
Breaks the slot number, changing the icon.
+
Arguments
+
+
module_num - the slot number being repaired.
+
cycle_modules
+
+
Cycles through the list of enabled modules, deselecting the current one and selecting the next one.
deploy_init
+
+
deploy_init: Deploys AI unit into AI shell
+
Arguments:
+
+
AI - AI unit that initiated the deployment into the AI shell
+
deselect_module
+
+
Deselects the module in the slot module_num.
+Arguments
+
+
module_num - the slot number being de-selected
+
equip_module_to_slot
+
+
What's the first free slot for the borg?
+Is passed an item and a module slot. Equips the item to that borg slot.
+
Arguments
+
+
item_module - the item being equipped to a slot
+
module_num - the slot number being equipped to.
+
get_active_held_item
+
+
Returns the thing in our active hand (whatever is in our active module-slot, in this case)
+
Arguments
+
+
get_gripper - If the active module is a gripper, should we return the gripper or the contained item? (if the gripper contains nothing, returns the gripper anyways)
+
get_selected_module
+
+
The number of module slots we're checking
+Returns the slot number of the selected module, or zero if no modules are selected.
is_invalid_module_number
+
+
Checks if the provided module number is a valid number.
+
If the number is between 1 and 3 (if check_all_slots is true) or between 1 and the number of disabled
+modules (if check_all_slots is false), then it returns FALSE. Otherwise, it returns TRUE.
+Arguments
+
+
module_num - the passed module num that is checked for validity.
+
check_all_slots - TRUE = the proc checks all slots | FALSE = the proc only checks un-disabled slots
+
logevent
+
+
Records an IC event log entry in the cyborg's internal tablet.
+
Creates an entry in the borglog list of the cyborg's internal tablet, listing the current
+in-game time followed by the message given. These logs can be seen by the cyborg in their
+BorgUI tablet app. By design, logging fails if the cyborg is dead.
+
Arguments:
+arg1: a string containing the message to log.
make_shell
+
+
make_shell: Makes an AI shell out of a cyborg unit
+
Arguments:
+
+
board - B.O.R.I.S. module board used for transforming the cyborg into AI shell
+
observer_screen_update
+
+
Updates the observers's screens with cyborg itemss.
+Arguments
+
+
item_module - the item being added or removed from the screen
+
add - whether or not the item is being added, or removed.
+
on_upgrade_deleted
+
+
Called when an applied upgrade is deleted.
remove_from_upgrades
+
+
Called when an upgrade is moved outside the robot. So don't call this directly, use forceMove etc.
repair_all_cyborg_slots
+
+
Repairs all slots. Unbroken slots are unaffected.
repair_cyborg_slot
+
+
Repairs the slot number, updating the icon.
+
Arguments
+
+
module_num - the module number being repaired.
+
revert_shell
+
+
revert_shell: Reverts AI shell back into a normal cyborg unit
select_module
+
+
Selects the module in the slot module_num.
+Arguments
+
+
module_num - the slot number being selected
+
smash_headlamp
+
+
Handles headlamp smashing
+
When called (such as by the shadowperson lighteater's attack), this proc will break the borg's headlamp
+and then call toggle_headlamp to disable the light. It also plays a sound effect of glass breaking, and
+tells the borg what happened to its chat. Broken lights can be repaired by using a flashlight on the borg.
toggle_gender
+
+
Allows "cyborg" players to change gender at will
toggle_headlamp
+
+
Handles headlamp toggling, disabling, and color setting.
+
The initial if statment is a bit long, but the gist of it is that should the lamp be on AND the update_color
+arg be true, we should simply change the color of the lamp but not disable it. Otherwise, should the turn_off
+arg be true, the lamp already be enabled, any of the normal reasons the lamp would turn off happen, or the
+update_color arg be passed with the lamp not on, we should set the lamp off. The update_color arg is only
+ever true when this proc is called from the borg tablet, when the color selection feature is used.
+
Arguments:
+
+
arg1 - turn_off, if enabled will force the lamp into an off state (rather than toggling it if possible)
+
arg2 - update_color, if enabled, will adjust the behavior of the proc to change the color of the light if it is already on.
+
toggle_module
+
+
Toggles selection of the module in the slot module_num.
+Arguments
+
+
module_num - the slot number being toggled
+
uneq_active
+
+
Unequips the active held item, if there is one.
+
Will always consider dropping gripper contents first.
uneq_all
+
+
Unequips all held items.
unequip_module_from_slot
+
+
Unequips item item_module from slot module_num. Deletes it if delete_after = TRUE.
The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever), AI_Z_OFF (Temporarily off due to nonpresence of players).
Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
In the event that you want to have a buffing effect on the mob, but don't want it to stack with other effects, any outside force that applies a buff to a simple mob should at least set this to TRUE, so we have something to check against.
The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever), AI_Z_OFF (Temporarily off due to nonpresence of players).
Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
In the event that you want to have a buffing effect on the mob, but don't want it to stack with other effects, any outside force that applies a buff to a simple mob should at least set this to TRUE, so we have something to check against.
A stronger, faster variation of the goliath. Has the ability to spawn baby goliaths, which it can later detonate at will.
+When it's health is below half, tendrils will spawn randomly around it. When it is below a quarter of health, this effect is doubled.
+It's attacks are as follows:
+
+
Spawns a 3x3/plus shape of tentacles on the target location
+
Spawns 2 baby goliaths on its tile, up to a max of 8. Children blow up when they die.
+
The broodmother lets out a noise, and is able to move faster for 6.5 seconds.
+
Summons your children around you.
+The broodmother is a fight revolving around stage control, as the activator has to manage the baby goliaths and the broodmother herself, along with all the tendrils.
A slow-moving projectile user with a few tricks up it's sleeve. Less unga-bunga than Colossus, with more cleverness in it's fighting style.
+As it's health gets lower, the amount of projectiles fired per-attack increases.
+It's attacks are as follows:
+
+
Fires three projectiles in a a given direction.
+
Fires a spread in every cardinal and diagonal direction at once, then does it again after a bit.
+
Shoots a single, golden bolt. Wherever it lands, the herald will be teleported to the location.
+
Spawns a mirror which reflects projectiles directly at the target.
+Herald is a more concentrated variation of the Colossus fight, having less projectiles overall, but more focused attacks.
A towering skeleton, embodying the power of Legion.
+As it's health gets lower, the head does more damage.
+It's attacks are as follows:
+
+
Charges at the target after a telegraph, throwing them across the arena should it connect.
+
Legionnaire's head detaches, attacking as it's own entity. Has abilities of it's own later into the fight. Once dead, regenerates after a brief period. If the skill is used while the head is off, it will be killed.
+
Leaves a pile of bones at your location. Upon using this skill again, you'll swap locations with the bone pile.
+
Spews a cloud of smoke from it's maw, wherever said maw is.
+A unique fight incorporating the head mechanic of legion into a whole new beast. Combatants will need to make sure the tag-team of head and body don't lure them into a deadly trap.
A box with a similar design to the Hierophant which trades large, single attacks for more frequent smaller ones.
+As it's health gets lower, the time between it's attacks decrease.
+It's attacks are as follows:
+
+
Fires hierophant blasts in a straight line. Can only fire in a straight line in 8 directions, being the diagonals and cardinals.
+
Creates a box of hierophant blasts around the target. If they try to run away to avoid it, they'll very likely get hit.
+
Teleports the pandora from one location to another, almost identical to Hierophant.
+
Spawns a 5x5 AOE at the location of choice, spreading out from the center.
+Pandora's fight mirrors Hierophant's closely, but has stark differences in attack effects. Instead of long-winded dodge times and long cooldowns, Pandora constantly attacks the opponent, but leaves itself open for attack.
Lobstrosities, the poster boy of charging AI mobs. Drops crab meat and bones.
+
+
Outside of charging, it's intended behavior is that it is generally slow moving, but makes up for that with a knockdown attack to score additional hits.
A space-faring leviathan-esque monster which breathes fire and summons carp. Spawned during its respective midround antagonist event.
+
A space-faring monstrosity who has the ability to breathe dangerous fire breath and uses its powerful wings to knock foes away.
+Normally spawned as an antagonist during the Space Dragon event, Space Dragon's main goal is to open three rifts from which to pull a great tide of carp onto the station.
+Space Dragon can summon only one rift at a time, and can do so anywhere a blob is allowed to spawn. In order to trigger his victory condition, Space Dragon must summon and defend three rifts while they charge.
+Space Dragon, when spawned, has five minutes to summon the first rift. Failing to do so will cause Space Dragon to return from whence he came.
+When the rift spawns, ghosts can interact with it to spawn in as space carp to help complete the mission. One carp is granted when the rift is first summoned, with an extra one every 30 seconds.
+Once the victory condition is met, all current rifts become invulnerable to damage, are allowed to spawn infinite sentient space carp, and Space Dragon gets unlimited rage.
+Alternatively, if the shuttle arrives while Space Dragon is still active, their victory condition will automatically be met and all the rifts will immediately become fully charged.
+If a charging rift is destroyed, Space Dragon will be incredibly slowed, and the endlag on his gust attack is greatly increased on each use.
+Space Dragon has the following abilities to assist him with his objective:
+
+
Can shoot fire in straight line, dealing 30 burn damage and setting those suseptible on fire.
+
Can use his wings to temporarily stun and knock back any nearby mobs. This attack has no cooldown, but instead has endlag after the attack where Space Dragon cannot act. This endlag's time decreases over time, but is added to every time he uses the move.
+
Can swallow mob corpses to heal for half their max health. Any corpses swallowed are stored within him, and will be regurgitated on death.
+
Can tear through any type of wall. This takes 4 seconds for most walls, and 12 seconds for reinforced walls.
A list of all of the rifts created by Space Dragon. Used for setting them all to infinite carp spawn when Space Dragon wins, and removing them when Space Dragon dies.
A list of all of the rifts created by Space Dragon. Used for setting them all to infinite carp spawn when Space Dragon wins, and removing them when Space Dragon dies.
Determines whether or not Space Dragon is in the middle of using wing gust. If set to true, prevents him from moving and doing certain actions.
Proc Details
add_dragon_overlay
+
+
Adds the proper overlay to the space dragon.
+
Clears the current overlay on space dragon and adds a proper one for whatever animation he's in.
color_selection
+
+
Allows space dragon to choose a color for itself.
+
Prompts the space dragon to choose a color, from which it will then apply to itself.
+If an invalid color is given, will re-prompt the dragon until a proper color is chosen.
destroy_rifts
+
+
Destroys all of Space Dragon's current rifts.
+
QDeletes all the current rifts after removing their references to other objects.
+Currently, the only reference they have is to the Dragon which created them, so we clear that before deleting them.
+Currently used when Space Dragon dies or one of his rifts is destroyed.
dragon_fire_line
+
+
What occurs on each tile to actually create the fire.
+
Creates a fire on the given turf.
+It creates a hotspot on the given turf, damages any living mob with 30 burn damage, and damages mechs by 50.
+It can only hit any given target once.
+Arguments:
+
+
turf/T - The turf to trigger the effects on.
+
dragon_name
+
+
Allows space dragon to choose its own name.
+
Prompts the space dragon to choose a name, which it will then apply to itself.
+If the name is invalid, will re-prompt the dragon until a proper name is chosen.
eat
+
+
Handles consuming and storing consumed things inside Space Dragon
+
Plays a sound and then stores the consumed thing inside Space Dragon.
+Used in AttackingTarget(), paired with a heal should it succeed.
+Arguments:
+
+
atom/movable/A - The thing being consumed
+
empty_contents
+
+
Disperses the contents of the mob on the surrounding tiles.
+
Randomly places the contents of the mob onto surrounding tiles.
+Has a 10% chance to place on the same tile as the mob.
fire_stream
+
+
Spawns fire at each position in a line from the source to the target.
+
Spawns fire at each position in a line from the source to the target.
+Stops if it comes into contact with a solid wall, a window, or a door.
+Delays the spawning of each fire by 1.5 deciseconds.
+Arguments:
+
+
atom/at - The target
+
line_target
+
+
Determines a line of turfs from sources's position to the target with length range.
+
Determines a line of turfs from the source's position to the target with length range.
+The line will extend on past the target if the range is large enough, and not reach the target if range is small enough.
+Arguments:
+
+
offset - whether or not to aim slightly to the left or right of the target
+
range - how many turfs should we go out for
+
atom/at - The target
+
permanant_empower
+
+
Gives Space Dragon their the rift speed buff permanantly.
+
Gives Space Dragon the enraged speed buff from charging rifts permanantly.
+Only happens in circumstances where Space Dragon completes their objective.
reset_status
+
+
Resets Space Dragon's status after using wing gust.
+
Resets Space Dragon's status after using wing gust.
+If it isn't dead by the time it calls this method, reset the sprite back to the normal living sprite.
+Also sets the using_special variable to FALSE, allowing Space Dragon to move and attack freely again.
rift_depower
+
+
Removes Space Dragon's rift speed buff.
+
Removes Space Dragon's speed buff from charging a rift. This is only called
+in rift_empower, which uses a timer to call this after 30 seconds. Also
+removes the red glow from Space Dragon which is synonymous with the speed buff.
rift_empower
+
+
Handles Space Dragon's temporary empowerment after boosting a rift.
+
Empowers and depowers Space Dragon after a successful rift charge.
+Empowered, Space Dragon regains all his health and becomes temporarily faster for 30 seconds, along with being tinted red.
useGust
+
+
Handles wing gust from the windup all the way to the endlag at the end.
+
Handles the wing gust attack from start to finish, based on the timer.
+When intially triggered, starts at 0. Until the timer reaches 10, increase Space Dragon's y position by 2 and call back to the function in 1.5 deciseconds.
+When the timer is at 10, trigger the attack. Change Space Dragon's sprite. reset his y position, and push all living creatures back in a 3 tile radius and stun them for 5 seconds.
+Stay in the ending state for how much our tiredness dictates and add to our tiredness.
+Arguments:
+
+
timer - The timer used for the windup.
+
victory
+
+
Sets up Space Dragon's victory for completing the objectives.
+
Triggers when Space Dragon completes his objective.
+Calls the shuttle with a coefficient of 3, making it impossible to recall.
+Sets all of his rifts to allow for infinite sentient carp spawns
+Also plays appropiate sounds and CENTCOM messages.
The result of a kudzu flower bud, these enemies use vines to drag prey close to them for attack.
+
A carnivorious plant which uses vines to catch and ensnare prey. Spawns from kudzu flower buds.
+Each one has a maximum of four vines, which can be attached to a variety of things. Carbons are stunned when a vine is attached to them, and movable entities are pulled closer over time.
+Attempting to attach a vine to something with a vine already attached to it will pull all movable targets closer on command.
+Once the prey is in melee range, melee attacks from the venus human trap heals itself for 10% of its max health, assuming the target is alive.
+Akin to certain spiders, venus human traps can also be possessed and controlled by ghosts.
Sets a ghost to control the plant if the plant is eligible
+
Asks the interacting ghost if they would like to control the plant.
+If they answer yes, and another ghost hasn't taken control, sets the ghost to control the plant.
+Arguments:
+
+
mob/user - The ghost to possibly control the plant
+
pull_vines
+
+
Manages how the vines should affect the things they're attached to.
+
Pulls all movable targets of the vines closer to the plant
+If the target is on the same tile as the plant, destroy the vine
+Removes any QDELETED vines from the vines list.
remove_vine
+
+
Removes a vine from the list.
+
Removes the vine from our list.
+Called specifically when the vine is about to be destroyed, so we don't have any null references.
+Arguments:
+
+
datum/beam/vine - The vine to be removed from the list.
Things that modify core files without directly touching said core files go here. This is similar to how Hippie handles things.
+This stops dreammaker from throwing errors and warnings if you try to compile these files while they're inside code/citadel/.
Things that modify core files without directly touching said core files go here. This is similar to how Hippie handles things.
+This stops dreammaker from throwing errors and warnings if you try to compile these files while they're inside code/citadel/.
Humbley request this doesnt get ported to other code bases, we strive to make things unique on our server and we dont have a lot of coders
+but if you absolutely must. please give us some credit~ <3
+made by quotefox and heavily modified by SandPoot
Kind of like bubblegum's rebellious teenage son/daughter.
+Has 4 attacks.
+Charge - Charges at it's target.
+Bloody Trap - Traps it's target between some walls, and then charges at them.
+Meat Shield - Knockbacks all targets in the 3 tiles he faces, and then creates a wall.
+Knockdown - Deals damage and knockbacks all targets in a 2 tile radius.
Drakeborg & drakeplushies are created by deviantart.com/mizartz
+
+https://creativecommons.org/licenses/by-nc-sa/3.0/
+Attribution-NonCommercial-ShareAlike 3.0 Unported
+
+CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
+License
+THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
+
+BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
+
+1. Definitions
+
+"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
+"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(g) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
+"Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
+"License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, Noncommercial, ShareAlike.
+"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
+"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
+"Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
+"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
+"Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
+"Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
+2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
+
+3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
+
+to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;
+to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";
+to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
+to Distribute and Publicly Perform Adaptations.
+The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights described in Section 4(e).
+
+4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
+
+You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(d), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(d), as requested.
+You may Distribute or Publicly Perform an Adaptation only under: (i) the terms of this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-NonCommercial-ShareAlike 3.0 US) ("Applicable License"). You must include a copy of, or the URI, for Applicable License with every copy of each Adaptation You Distribute or Publicly Perform. You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License. You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License.
+You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in con-nection with the exchange of copyrighted works.
+If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and, (iv) consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(d) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
+For the avoidance of doubt:
+
+Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
+Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(c) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and,
+Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(c).
+Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.
+5. Representations, Warranties and Disclaimer
+
+UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING AND TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THIS EXCLUSION MAY NOT APPLY TO YOU.
+
+6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. Termination
+
+This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
+Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
+8. Miscellaneous
+
+Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
+Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
+If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
+This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
+The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.
+Creative Commons Notice
+Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.
+
+Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License.
+
+Creative Commons may be contacted at https://creativecommons.org/.```
+
modular_sand/icons/obj/plushies.dmi's icon state of secdrake and meddrake by Mizartz. It has been licensed under the CC BY-NC-SA 3.0 license.
+
+CC BY-NC-SA 3.0 https://creativecommons.org/licenses/by-nc-sa/3.0/```
+
If this attacks a human with no wound armor on the affected body part, add this to the wound mod. Some attacks may be significantly worse at wounding if there's even a slight layer of armor to absorb some of it vs bare flesh
If this attacks a human with no wound armor on the affected body part, add this to the wound mod. Some attacks may be significantly worse at wounding if there's even a slight layer of armor to absorb some of it vs bare flesh
How good a given object is at causing wounds on carbons. Higher values equal better shots at creating serious wounds.
Proc Details
CanAStarPass
+
+
This proc is used for telling whether something can pass by this object in a given direction, for use by the pathfinding system.
+
Trying to generate one long path across the station will call this proc on every single object on every single tile that we're seeing if we can move through, likely
+multiple times per tile since we're likely checking if we can access said tile from multiple directions, so keep these as lightweight as possible.
+
Arguments:
+
+
ID- An ID card representing what access we have (and thus if we can open things like airlocks or windows to pass through them). The ID card's physical location does not matter, just the reference
+
to_dir- What direction we're trying to move in, relevant for things like directional windows that only block movement in certain directions
+
caller- The movable we're checking pass flags for, if we're making any such checks
+
fire_act
+
+
FIRE
reskin_obj
+
+
Do you want to make overrides, of course you do! Will be called if an object was reskinned successfully
The identifier of the port or ship.
+This will be used in numerous other places like the console,
+stationary ports and whatnot to tell them your ship's mobile
+port can be used in these places, or the docking port is compatible, etc.
The identifier of the port or ship.
+This will be used in numerous other places like the console,
+stationary ports and whatnot to tell them your ship's mobile
+port can be used in these places, or the docking port is compatible, etc.
Both lists are associative with a turf:bitflag structure. (new_turfs bitflag space unused currently)
+The bitflag contains the data for what inhabitants of that coordinate should be moved to the new location
+The bitflags can be found in __DEFINES/shuttles.dm
used as a timer (if you want time left to complete move, use timeLeft proc)
Proc Details
get_status_text_tgui
+
+
Gets shuttle location status in a form of string for tgui interfaces
initiate_docking
+
+
This is the main proc. It instantly moves our mobile port to stationary port new_dock.
preflight_check
+
+
Both lists are associative with a turf:bitflag structure. (new_turfs bitflag space unused currently)
+The bitflag contains the data for what inhabitants of that coordinate should be moved to the new location
+The bitflags can be found in __DEFINES/shuttles.dm
Shield processing
+*An object to take the hit for us when using the Durand's defense mode.
+It is spawned in during the durand's initilization, and always stays on the same tile.
+Normally invisible, until defense mode is actvated. When the durand detects an attack that should be blocked, the
+attack is passed to the shield. The shield takes the damage, uses it to calculate charge cost, and then sets its
+own integrity back to max. Shield is automatically dropped if we run out of power or the user gets out.
Handles activating and deactivating the shield. This proc is called by a signal sent from the mech's action button
+and relayed by the mech itself. The "forced" variabe, signal_args[1], will skip the to-pilot text and is meant for when
+the shield is disabled by means other than the action button (like running out of power)
+Arguments:
Handles activating and deactivating the shield. This proc is called by a signal sent from the mech's action button
+and relayed by the mech itself. The "forced" variabe, signal_args[1], will skip the to-pilot text and is meant for when
+the shield is disabled by means other than the action button (like running out of power)
+Arguments:
How this works: On LateInitialize, detect all directions that this should be applicable to, and do what it needs to do, and then inform all network builders in said directions that it's been around since it won't be around afterwards.
How this works: On LateInitialize, detect all directions that this should be applicable to, and do what it needs to do, and then inform all network builders in said directions that it's been around since it won't be around afterwards.
Scans directions, sets network_directions to have every direction that we can link to. If there's another power cable builder detected, make sure they know we're here by adding us to their cable directions list before we're deleted.
Scans directions, sets network_directions to have every direction that we can link to. If there's another power cable builder detected, make sure they know we're here by adding us to their cable directions list before we're deleted.
Scans directions, sets network_directions to have every direction that we can link to. If there's another power cable builder detected, make sure they know we're here by adding us to their cable directions list before we're deleted.
Scans directions, sets network_directions to have every direction that we can link to. If there's another power cable builder detected, make sure they know we're here by adding us to their cable directions list before we're deleted.
We manually check to see if we've been triggered in case multiple atoms cross us in the time between the mine being triggered and it actually deleting, to avoid a race condition with multiple detonations
We manually check to see if we've been triggered in case multiple atoms cross us in the time between the mine being triggered and it actually deleting, to avoid a race condition with multiple detonations
Used as the dye color source in the washing machine only (at the moment). Can be a hex color or a key corresponding to a registry entry, see washing_machine.dm
The amount of stamina it takes to swing an item in a normal melee attack do not lie to me and say it's for realism because it ain't. If null it will autocalculate from w_class.
Weight class for how much storage capacity it uses and how big it physically is meaning storages can't hold it if their maximum weight class isn't as high as it.
Creates a "Type-A" contextual screentip interaction.
+When a user hovers over something with this item in hand, this proc will be called in order
+to provide context for contextual screentips.
+You must call register_item_context() in order for this to be registered.
+A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
+that map to the action as text.
+If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
+source can, in all cases, be replaced with src, and only exists because this proc directly connects to a signal.
Called after attacking something if the melee attack chain isn't interrupted before.
+Also called when clicking on something with an item without being in melee range
For when you want to disable an item's embedding capabilities (like transforming weapons and such), this proc will detach any active embed elements from it.
Does the current embedding var meet the criteria for being harmless? Namely, does it explicitly define the pain multiplier and jostle pain mult to be 0? If so, return true.
This is the proc that handles the order of an item_attack.
+The order of procs called is:
+tool_act on the target. If it returns TRUE, the chain will be stopped.
+pre_attack() on src. If this returns TRUE, the chain will be stopped.
+attackby on the target. If it returns TRUE, the chain will be stopped.
+and lastly
+afterattack. The return value does not matter.
An interrupt for someone trying to accept an offered item, called mainly from /mob/living/carbon/proc/take, in case you want to run your own take behavior instead.
An interrupt for offering an item to other people, called mainly from /mob/living/carbon/proc/give, in case you want to run your own offer behavior instead.
Create a "Type-A" contextual screentip interaction, registering to add_item_context().
+This will run add_item_context() when the item hovers over another object for context.
+add_item_context() will not be called unless this is run.
+This is not necessary for Type-A interactions, as you can just apply the flag and register to the signal yourself.
tryEmbed() is for when you want to try embedding something without dealing with the damage + hit messages of calling hitby() on the item while targetting the target.
For when you want to add/update the embedding on an item. Uses the vars in [/obj/item/embedding], and defaults to config values for values that aren't set. Will automatically detach previous embed elements on this item.
Used as the dye color source in the washing machine only (at the moment). Can be a hex color or a key corresponding to a registry entry, see washing_machine.dm
The amount of stamina it takes to swing an item in a normal melee attack do not lie to me and say it's for realism because it ain't. If null it will autocalculate from w_class.
Weight class for how much storage capacity it uses and how big it physically is meaning storages can't hold it if their maximum weight class isn't as high as it.
Volume override for the item, otherwise automatically calculated from w_class.
Proc Details
ApplyAttackCooldown
+
+
Called after a successful attack to set a mob's clickdelay.
CheckAttackCooldown
+
+
Checks if a user's clickdelay is met for a standard attack, this is called before an attack happens.
GetEstimatedAttackSpeed
+
+
Get estimated time that a user has to not attack for to use us
UseStaminaBufferStandard
+
+
Uses the amount of stamina required for a standard hit
active_block_calculate_final_damage
+
+
Calculates FINAL ATTACK DAMAGE after mitigation
active_block_do_stamina_damage
+
+
Apply the stamina damage to our user, notice how damage argument is stamina_amount.
active_block_stamina_cost
+
+
Amount of stamina from damage blocked. Note that the damage argument is damage_blocked.
active_parry_reflex_counter
+
+
Called when an attack is parried and block_parra_data indicates to use a proc to handle counterattack.
add_item_context
+
+
Creates a "Type-A" contextual screentip interaction.
+When a user hovers over something with this item in hand, this proc will be called in order
+to provide context for contextual screentips.
+You must call register_item_context() in order for this to be registered.
+A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
+that map to the action as text.
+If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
+source can, in all cases, be replaced with src, and only exists because this proc directly connects to a signal.
afterattack
+
+
Called after attacking something if the melee attack chain isn't interrupted before.
+Also called when clicking on something with an item without being in melee range
+
WARNING: This does not automatically check clickdelay if not in a melee attack! Be sure to account for this!
+
@params
+
+
target - The thing we clicked
+
user - mob of person clicking
+
proximity_flag - are we in melee range/doing it in a melee attack
+
click_parameters - mouse control parameters, check BYOND ref.
+
attack
+
+
Called when someone uses us to attack a mob in melee combat.
+
This proc respects CheckAttackCooldown() default clickdelay handling.
damage_multiplier - what to multiply the damage by
+
blockable_directions
+
+
Gets the block direction bitflags of what we can block.
can_active_block
+
+
Returns if we can actively block.
can_active_parry
+
+
Determines if we can actively parry.
can_block_direction
+
+
Checks if we can block from a specific direction from our direction.
+
@params
+
+
our_dir - our direction.
+
their_dir - their direction. Must be a single direction, or NONE for an attack from the same tile. This is incoming direction.
+
can_block_directions_multiple
+
+
can_block_direction but for "compound" directions to check all of them and return the number of directions that were blocked.
+
@params
+
+
our_dir - our direction.
+
their_dirs - list of their directions as we cannot use bitfields here.
+
check_block
+
+
Returns block information using list/block_return. Used for check_block() on mobs.
cyborg_unequip
+
+
Parent proc - triggers when an item/module is unequipped from a cyborg.
digest_act
+
+
////// Auto-Emotes /////
+Prey Loop Refresh/hack
+////// Exit Early //////
+/// Absorbed Handling //
+///// Sound vars ///////
+////// Make any noise /////
disableEmbedding
+
+
For when you want to disable an item's embedding capabilities (like transforming weapons and such), this proc will detach any active embed elements from it.
do_stagger_action
+
+
totally not an untested, arbitrary equation.
dropped
+
+
Called when a mob drops an item.
equipped
+
+
Called after an item is placed in an equipment slot.
+
Note that hands count as slots.
+
Arguments:
+
+
user is mob that equipped it
+
slot uses the slot_X defines found in setup.dm for items that can be placed in multiple slots
+
Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it
+
failedEmbed
+
+
In case we want to do something special (like self delete) upon failing to embed in something, return true
get_block_parry_data
+
+
Gets this item's datum/block_parry_data
get_w_volume
+
+
Get an item's volume that it uses when being stored.
getweight
+
+
How much stamina this takes to swing this is not for realism purposes hecc off.
isEmbedHarmless
+
+
Does the current embedding var meet the criteria for being harmless? Namely, does it explicitly define the pain multiplier and jostle pain mult to be 0? If so, return true.
melee_attack_chain
+
+
This is the proc that handles the order of an item_attack.
+The order of procs called is:
+tool_act on the target. If it returns TRUE, the chain will be stopped.
+pre_attack() on src. If this returns TRUE, the chain will be stopped.
+attackby on the target. If it returns TRUE, the chain will be stopped.
+and lastly
+afterattack. The return value does not matter.
melee_stagger_duration
+
+
How long this staggers for. 0 and negatives supported.
on_active_parry
+
+
Called when an attack is parried using this, whether or not the parry was successful.
on_offer_taken
+
+
An interrupt for someone trying to accept an offered item, called mainly from /mob/living/carbon/proc/take, in case you want to run your own take behavior instead.
+
Return TRUE if you want to interrupt the taking.
+
Arguments:
+offerer - the person offering the item
+taker - the person trying to accept the offer
on_offered
+
+
An interrupt for offering an item to other people, called mainly from /mob/living/carbon/proc/give, in case you want to run your own offer behavior instead.
+
Return TRUE if you want to interrupt the offer.
+
Arguments:
+offerer - the person offering the item
on_outfit_equip
+
+
Special stuff you want to do when an outfit equips this item.
pick_painting_tool_color
+
+
Common proc used by painting tools like spraycans and palettes that can access the entire 24 bits color space.
ranged_attack_chain
+
+
Like melee_attack_chain but for ranged.
register_item_context
+
+
Create a "Type-A" contextual screentip interaction, registering to add_item_context().
+This will run add_item_context() when the item hovers over another object for context.
+add_item_context() will not be called unless this is run.
+This is not necessary for Type-A interactions, as you can just apply the flag and register to the signal yourself.
run_block
+
+
Runs block and returns flag for do_run_block to process.
set_slowdown
+
+
Sets our slowdown and updates equipment slowdown of any mob we're equipped on.
tryEmbed
+
+
tryEmbed() is for when you want to try embedding something without dealing with the damage + hit messages of calling hitby() on the item while targetting the target.
+
Really, this is used mostly with projectiles with shrapnel payloads, from /datum/element/embed/proc/checkEmbedProjectile, and called on said shrapnel. Mostly acts as an intermediate between different embed elements.
+
Arguments:
+
+
+
target- Either a body part, a carbon, or a closed turf. What are we hitting?
+
+
+
forced- Do we want this to go through 100%?
+
+
updateEmbedding
+
+
For when you want to add/update the embedding on an item. Uses the vars in [/obj/item/embedding], and defaults to config values for values that aren't set. Will automatically detach previous embed elements on this item.
update_action_buttons
+
+
Updates all action buttons associated with this item
+
Arguments:
+
+
status_only - Update only current availability status of the buttons to show if they are ready or not to use
+
force - Force buttons update even if the given button icon state has not changed
Associate list of all paint jobs the airlock painter can apply. The key is the name of the airlock the user will see. The value is the type path of the airlock
Associate list of all paint jobs the airlock painter can apply. The key is the name of the airlock the user will see. The value is the type path of the airlock
get_mangled_state() is relevant for flesh and bone bodyparts, and returns whether this bodypart has mangled skin, mangled bone, or both (or neither i guess)
update_wounds() is called whenever a wound is gained or lost on this bodypart, as well as if there's a change of some kind on a bone wound possibly changing disabled status
apply_gauze() is used to- well, apply gauze to a bodypart
+
As of the Wounds 2 PR, all bleeding is now bodypart based rather than the old bleedstacks system, and 90% of standard bleeding comes from flesh wounds (the exception is embedded weapons).
+The same way bleeding is totaled up by bodyparts, gauze now applies to all wounds on the same part. Thus, having a slash wound, a pierce wound, and a broken bone wound would have the gauze
+applying blood staunching to the first two wounds, while also acting as a sling for the third one. Once enough blood has been absorbed or all wounds with the ACCEPTS_GAUZE flag have been cleared,
+the gauze falls off.
+
Arguments:
+
+
gauze- Just the gauze stack we're taking a sheet from to apply here
+
check_wounding
+
+
check_wounding() is where we handle rolling for, selecting, and applying a wound if we meet the criteria
+
We generate a "score" for how woundable the attack was based on the damage and other factors discussed in [/obj/item/bodypart/proc/check_wounding_mods], then go down the list from most severe to least severe wounds in that category.
+We can promote a wound from a lesser to a higher severity this way, but we give up if we have a wound of the given type and fail to roll a higher severity, so no sidegrades/downgrades
+
Arguments:
+
+
woundtype- Either WOUND_BLUNT, WOUND_SLASH, WOUND_PIERCE, or WOUND_BURN based on the attack type.
+
damage- How much damage is tied to this attack, since wounding potential scales with damage in an attack (see: WOUND_DAMAGE_EXPONENT)
+
wound_bonus- The wound_bonus of an attack
+
bare_wound_bonus- The bare_wound_bonus of an attack
+
check_woundings_mods
+
+
check_wounding_mods() is where we handle the various modifiers of a wound roll
+
A short list of things we consider: any armor a human target may be wearing, and if they have no wound armor on the limb, if we have a bare_wound_bonus to apply, plus the plain wound_bonus
+We also flick through all of the wounds we currently have on this limb and add their threshold penalties, so that having lots of bad wounds makes you more liable to get hurt worse
+Lastly, we add the inherent wound_resistance variable the bodypart has (heads and chests are slightly harder to wound), and a small bonus if the limb is already disabled
+
Arguments:
+
+
It's the same ones on [receive_damage]
+
get_disable_threshold
+
+
Gets the damage at which point we're disabled.
get_mangled_state
+
+
get_mangled_state() is relevant for flesh and bone bodyparts, and returns whether this bodypart has mangled skin, mangled bone, or both (or neither i guess)
+
Dismemberment for flesh and bone requires the victim to have the skin on their bodypart destroyed (either a critical cut or piercing wound), and at least a hairline fracture
+(severe bone), at which point we can start rolling for dismembering. The attack must also deal at least 10 damage, and must be a brute attack of some kind (sorry for now, cakehat, maybe later)
+
Returns: BODYPART_MANGLED_NONE if we're fine, BODYPART_MANGLED_FLESH if our skin is broken, BODYPART_MANGLED_BONE if our bone is broken, or BODYPART_MANGLED_BOTH if both are broken and we're up for dismembering
get_organs
+
+
since organs aren't actually stored in the bodypart themselves while attached to a person, we have to query the owner for what we should have
get_wound_type
+
+
Get whatever wound of the given type is currently attached to this limb, if any
painless_wound_roll
+
+
Allows us to roll for and apply a wound without actually dealing damage. Used for aggregate wounding power with pellet clouds
seep_gauze
+
+
seep_gauze() is for when a gauze wrapping absorbs blood or pus from wounds, lowering its absorption capacity.
+
The passed amount of seepage is deducted from the bandage's absorption capacity, and if we reach a negative absorption capacity, the bandages fall off and we're left with nothing.
+
Arguments:
+
+
seep_amt - How much absorption capacity we're removing from our current bandages (think, how much blood or pus are we soaking up this tick?)
+
try_dismember
+
+
try_dismember() is used, once we've confirmed that a flesh and bone bodypart has both the skin and bone mangled, to actually roll for it
+
Mangling is described in the above proc, [/obj/item/bodypart/proc/get_mangled_state()]. This simply makes the roll for whether we actually dismember or not
+using how damaged the limb already is, and how much damage this blow was for. If we have a critical bone wound instead of just a severe, we add +10% to the roll.
+Lastly, we choose which kind of dismember we want based on the wounding type we hit with. Note we don't care about all the normal mods or armor for this
+
Arguments:
+
+
wounding_type: Either WOUND_BLUNT, WOUND_SLASH, or WOUND_PIERCE, basically only matters for the dismember message
+
wounding_dmg: The damage of the strike that prompted this roll, higher damage = higher chance
+
wound_bonus: Not actually used right now, but maybe someday
+
bare_wound_bonus: ditto above
+
update_wounds
+
+
update_wounds() is called whenever a wound is gained or lost on this bodypart, as well as if there's a change of some kind on a bone wound possibly changing disabled status
+
Covers tabulating the damage multipliers we have from wounds (burn specifically), as well as deleting our gauze wrapping if we don't have any wounds that can use bandaging
+
Arguments:
+
+
replaced- If true, this is being called from the remove_wound() of a wound that's being replaced, so the bandage that already existed is still relevant, but the new wound hasn't been added yet
Upon completion of a civilian bounty, one of these is created. It is sold to cargo to give the cargo budget bounty money, and the person who completed it cash.
This is used for the paper displayed on the clipboard's icon
+and it is the one attacked, when attacking the clipboard.
+(As you can't organise contents directly in BYOND)
Proc Details
on_top_paper_change
+
+
This is a simple proc to handle calling update_icon() upon receiving the top paper's COMSIG_ATOM_UPDATE_APPEARANCE.
These are armor values that protect the wearer, taken from the clothing's armor datum. List updates on examine because it's currently only used to print armor ratings to chat in Topic().
These are armor values that protect the clothing, taken from its armor datum. List updates on examine because it's currently only used to print armor ratings to chat in Topic().
take_damage_zone() is used for dealing damage to specific bodyparts on a worn piece of clothing, meant to be called from [/obj/item/bodypart/proc/check_woundings_mods()]
These are armor values that protect the wearer, taken from the clothing's armor datum. List updates on examine because it's currently only used to print armor ratings to chat in Topic().
These are armor values that protect the clothing, taken from its armor datum. List updates on examine because it's currently only used to print armor ratings to chat in Topic().
Proc Details
armor_to_protection_class
+
+
Rounds armor_value to nearest 10, divides it by 10 and then expresses it in roman numerals up to 10
+
Rounds armor_value to nearest 10, divides it by 10
+and then expresses it in roman numerals up to 10
+Arguments:
+
+
armor_value - Number we're converting
+
bristle
+
+
If we're a clothing with at least 1 shredded/disabled zone, give the wearer a periodic heads up letting them know their clothes are damaged
disable_zone
+
+
disable_zone() is used to disable a given bodypart's protection on our clothing item, mainly from [/obj/item/clothing/proc/take_damage_zone()]
+
This proc disables all protection on the specified bodypart for this piece of clothing: it'll be as if it doesn't cover it at all anymore (because it won't!)
+If every possible bodypart has been disabled on the clothing, we put it out of commission entirely and mark it as shredded, whereby it will have to be repaired in
+order to equip it again. Also note we only consider it damaged if there's more than one bodypart disabled.
+
Arguments:
+
+
def_zone: The bodypart zone we're disabling
+
damage_type: Only really relevant for the verb for describing the breaking, and maybe obj_destruction()
+
take_damage_zone
+
+
take_damage_zone() is used for dealing damage to specific bodyparts on a worn piece of clothing, meant to be called from [/obj/item/bodypart/proc/check_woundings_mods()]
+
This proc only matters when a bodypart that this clothing is covering is harmed by a direct attack (being on fire or in space need not apply), and only if this clothing covers
+
+
more than one bodypart to begin with. No point in tracking damage by zone for a hat, and I'm not cruel enough to let you fully break them in a few shots.
+Also if limb_integrity is 0, then this clothing doesn't have bodypart damage enabled so skip it.
+
Arguments:
+
+
def_zone: The bodypart zone in question
+
damage_amount: Incoming damage
+
damage_type: BRUTE or BURN
+
armour_penetration: If the attack had armour_penetration
Space ninja's gloves. Gives access to a number of special interactions.
+
Gloves only found from space ninjas. Allows the wearer to access special interactions with various objects.
+These interactions are detailed in ninjaDrainAct.dm in the suit file.
+These interactions are toggled by an action tied to the gloves. The interactions will not activate if the user is also not wearing a ninja suit.
if the thrown object's target zone isn't the head
+ignore any hats with downsides when worn
+if the hat happens to be capable of holding contents and has something in it. mostly to prevent super cheesy stuff like stuffing a mini-bomb in a hat and throwing it
+hats in the borg's blacklist bounce off
Proc Details
throw_impact
+
+
Special throw_impact for hats to frisbee hats at people to place them on their heads.
worn_overlays
+
+
if the thrown object's target zone isn't the head
+ignore any hats with downsides when worn
+if the hat happens to be capable of holding contents and has something in it. mostly to prevent super cheesy stuff like stuffing a mini-bomb in a hat and throwing it
+hats in the borg's blacklist bounce off
Proc that moves gas/breath masks out of the way, disabling them and allowing pill/food consumption
+The flavor_details variable is for masks that use this function only to toggle HIDEFACE for identity.
Proc Details
adjustmask
+
+
Proc that moves gas/breath masks out of the way, disabling them and allowing pill/food consumption
+The flavor_details variable is for masks that use this function only to toggle HIDEFACE for identity.
check_trip runs on each step to see if we fall over as a result of our lace status. Knotted laces are a guaranteed trip, while untied shoes are just a chance to stumble
our_guy here is the wearer, if one exists (and he must exist, or we don't care)
+checking to make sure we're still on the person we're supposed to be, for lacing do_after's
Are we currently tied? Can either be SHOES_UNTIED, SHOES_TIED, or SHOES_KNOTTED
Proc Details
adjust_laces
+
+
adjust_laces adjusts whether our shoes (assuming they can_be_tied) and tied, untied, or knotted
+
In addition to setting the state, it will deal with getting rid of alerts if they exist, as well as registering and unregistering the stepping signals
+
Arguments:
+
+
state: SHOES_UNTIED, SHOES_TIED, or SHOES_KNOTTED, depending on what you want them to become
+
user: used to check to see if we're the ones unknotting our own laces
+
check_trip
+
+
check_trip runs on each step to see if we fall over as a result of our lace status. Knotted laces are a guaranteed trip, while untied shoes are just a chance to stumble
handle_tying
+
+
handle_tying deals with all the actual tying/untying/knotting, inferring your intent from who you are in relation to the state of the laces
+
If you're the wearer, you want them to move towards tied-ness (knotted -> untied -> tied). If you're not, you're pranking them, so you're moving towards knotted-ness (tied -> untied -> knotted)
+
Arguments:
+
+
user: who is the person interacting with the shoes?
+
still_shoed
+
+
our_guy here is the wearer, if one exists (and he must exist, or we don't care)
+checking to make sure we're still on the person we're supposed to be, for lacing do_after's
Space ninja's suit. Provides him with most of his powers.
+
Space ninja's suit. Gives space ninja all his iconic powers, which are mostly kept in
+the folder ninja_equipment_actions. Has a lot of unique stuff going on, so make sure to check
+the variables. Check suit_attackby to see radium interaction, disk copying, and cell replacement.
Whether or not the suit is currently in stealth mode.
Proc Details
cancel_stealth
+
+
Proc called to cancel stealth.
+
Called to cancel the stealth effect if it is ongoing.
+Does nothing otherwise.
+Arguments:
+
+
Returns false if either the ninja no longer exists or is already visible, returns true if we successfully made the ninja visible.
+
deinitialize
+
+
Deinitializes the ninja suit
+
Deinitializes the ninja suit through eight phases, each of which calls this proc with an incremented phase
+Arguments:
+
+
delay - The delay between each phase of deinitialization
+
ninja - The human who is being affected by the suit
+
phase - The phase of deinitialization
+
lock_suit
+
+
Proc called to lock the important gear pieces onto space ninja's body.
+
Called during the suit startup to lock all gear pieces onto space ninja.
+Terminates if a gear piece is not being worn. Also gives the ninja the inability to use firearms.
+If the person in the suit isn't a ninja when this is called, this proc just gibs them instead.
+Arguments:
+
+
ninja - The person wearing the suit.
+
Returns false if the locking fails due to lack of all suit parts, and true if it succeeds.
+
ninitialize
+
+
Initializes the ninja suit
+
Initializes the ninja suit through seven phases, each of which calls this proc with an incremented phase
+Arguments:
+
+
delay - The delay between each phase of initialization
+
ninja - The human who is being affected by the suit
+
phase - The phase of initialization
+
ninja_sword_recall
+
+
Proc called to recall the ninja's sword.
+
Called to summon the ninja's katana back to them
+If the katana can see the ninja, it will throw itself towards them.
+If not, the katana will teleport itself to the ninja.
ninjaboost
+
+
Proc called to activate space ninja's adrenaline.
+
Proc called to use space ninja's adrenaline. Gets the ninja out of almost any stun.
+Also makes them shout MGS references when used. After a bit, it injects the user with
+radium by calling a different proc.
ninjaboost_after
+
+
Proc called to inject the ninja with radium.
+
Used after 7 seconds of using the ninja's adrenaline.
+Injects the user with how much radium the suit needs to refill an adrenaline boost.
ninjacost
+
+
Proc called to check if the ninja can afford an ability's cost.
+
Proc which determine whether or not a space ninja can afford to use a specific ability.
+It can also cancel stealth if the ability requested it.
+Arguments:
+
+
cost - the energy cost of the ability
+
specificCheck - Determines if the check is a normal one, an adrenaline one, or a stealth cancel check.
+
Returns TRUE or the current cooldown timer if we can't perform the ability, and FALSE if we can.
+
ninjanet
+
+
Proc called to ensnare a person in a energy net.
+
Used to ensnare a target in an energy net, preventing them from moving until the net is broken.
+Costs 40E, which is 40% of the default battery's max charge. Intended as a means of reliably locking down an opponent when ninja stars won't suffice.
ninjapulse
+
+
Proc called to allow the ninja to EMP the nearby area.
+
Proc called to allow the ninja to EMP the nearby area. By default, costs 500E, which is half of the default battery's max charge.
+Also affects the ninja as well.
ninjastar
+
+
Proc called to create a ninja star in the ninja's hands.
+
Called to create a ninja star in the wearer's hand. The ninja
+star doesn't do much up-front damage, but deals stamina damage
+as the target moves around, forcing a finish or flee scenario.
terminate
+
+
Proc used to delete all the attachments and itself.
+
Can be called to entire rid of the suit pieces and the suit itself.
toggle_on_off
+
+
Toggles the ninja suit on/off
+
Attempts to initialize or deinitialize the ninja suit
toggle_stealth
+
+
Proc called to toggle ninja stealth.
+
Proc called to toggle whether or not the ninja is in stealth mode.
+If cancelling, calls a separate proc in case something else needs to quickly cancel stealth.
unlock_suit
+
+
Proc called to unlock all the gear off space ninja's body.
+
Proc which is essentially the opposite of lock_suit. Lets you take off all the suit parts.
+Also gets rid of the objection to using firearms from the wearer.
+Arguments:
Implement this when your hardware contains an object that the user can eject.
Proc Details
try_eject
+
+
Implement this when your hardware contains an object that the user can eject.
+
Examples include ejecting cells from battery modules, ejecting an ID card from a card reader
+or ejecting an Intellicard from an AI card slot.
+Arguments:
+
+
user - The mob requesting the eject.
+
forced - Whether this action should be forced in some way.
The katana that only space ninja spawns with. Comes with 30 force and throwforce, along with a signature special jaunting system.
+Upon clicking on a tile with the dash on, the user will teleport to that tile, assuming their target was not dense.
+The katana has 3 dashes stored at maximum, and upon using the dash, it will return 20 seconds after it was used.
+It also has a special feature where if it is tossed at a space ninja who owns it (determined by the ninja suit), the ninja will catch the katana instead of being hit by it.
The typepath of the gang antagonist datum that the person who uses the package should have added to them -- remember that the distinction between e.g. Ballas and Grove Street is on the antag datum level, not the team datum level.
Checks if the user is trying to use the package of the family they are in, and if not, adds them to the family, with some differing processing depending on whether the user is already a family member.
The typepath of the gang antagonist datum that the person who uses the package should have added to them -- remember that the distinction between e.g. Ballas and Grove Street is on the antag datum level, not the team datum level.
The team datum that the person who uses this package should be added to.
Proc Details
add_to_gang
+
+
Adds the user to the family that this package corresponds to, dispenses the free_clothes of that family, and adds them to the handler if it exists.
attempt_join_gang
+
+
Checks if the user is trying to use the package of the family they are in, and if not, adds them to the family, with some differing processing depending on whether the user is already a family member.
The time between firing actions, this means between bursts if this is burst weapon. The reason this is 0 is because you are still, by default, limited by clickdelay.
The time between firing actions, this means between bursts if this is burst weapon. The reason this is 0 is because you are still, by default, limited by clickdelay.
SET THIS TO TRUE IF YOU OVERRIDE altafterattack() or ANY right click action! If this is FALSE, the gun will show in examine its default right click behavior, which is to switch modes.
SET THIS TO TRUE IF YOU OVERRIDE altafterattack() or ANY right click action! If this is FALSE, the gun will show in examine its default right click behavior, which is to switch modes.
Proc Details
get_charge_ratio
+
+
Used by update_icon_state() and update_overlays()
select_fire
+
+
This is the proc used in general for when a user switches firemodes. Just goes to next firemode by default.
Simple proc to extract the pAI from the MODsuit. It's the proc to call if you want to take it out,
+remove_pai() is there so atom_destruction() doesn't have any risk of sleeping.
Creates a radial menu from which the user chooses parts of the suit to deploy/retract. Repeats until all parts are extended or retracted.
conceal
+
+
Retract a part of the suit from the user
deploy
+
+
Deploys a part of the suit onto the user.
extract_pai
+
+
Simple proc to extract the pAI from the MODsuit. It's the proc to call if you want to take it out,
+remove_pai() is there so atom_destruction() doesn't have any risk of sleeping.
+
user - The person trying to take out the pAI from the MODsuit.
+forced - Whether or not we skip the checks and just eject the pAI. Defaults to FALSE.
+feedback - Whether to give feedback via balloon alerts or not. Defaults to TRUE.
finish_activation
+
+
Finishes the suit's activation, starts processing
insert_pai
+
+
Simple proc to insert the pAI into the MODsuit.
+
user - The person trying to put the pAI into the MODsuit.
+card - The pAI card we're slotting in the MODsuit.
quick_activation
+
+
Quickly deploys all the suit parts and if successful, seals them and turns on the suit. Intended mostly for outfits.
remove_pai
+
+
Simple proc that handles the safe removal of the pAI from a MOD control unit.
+
Arguments:
+
+
feedback - Whether or not we want to give balloon alert feedback to the ai. Defaults to FALSE.
+
seal_part
+
+
Seals or unseals the given part
toggle_activate
+
+
Starts the activation sequence, where parts of the suit activate one by one until the whole suit is on
Displays notification text alongside a soundbeep when requested to by a program.
+
After checking tha the requesting program is allowed to send an alert, creates
+a visible message of the requested text alongside a soundbeep. This proc adds
+text to indicate that the message is coming from this device and the program
+on it, so the supplied text should be the exact message and ending punctuation.
+
Arguments:
+The program calling this proc.
+The message that the program wishes to display.
play_ping
+
+
Plays a ping sound.
+
Timers runtime if you try to make them call playsound. Yep.
set_flashlight_color
+
+
Sets the computer's light color, if it has a light.
+
Called from ui_act(), this proc takes a color string and applies it.
+It is seperated from ui_act() to be overwritten as needed.
+Arguments:
+
+
color is the string that holds the color value that we should use. Proc auto-fails if this is null.
+
toggle_flashlight
+
+
Toggles the computer's flashlight, if it has one.
+
Called from ui_act(), does as the name implies.
+It is seperated from ui_act() to be overwritten as needed.
Ref to the RoboTact app. Important enough to borgs to deserve a ref.
Proc Details
get_robotact
+
+
Returns a ref to the RoboTact app, creating the app if need be.
+
The RoboTact app is important for borgs, and so should always be available.
+This proc will look for it in the tablet's robotact var, then check the
+hard drive if the robotact var is unset, and finally attempt to create a new
+copy if the hard drive does not contain the app. If the hard drive rejects
+the new copy (such as due to lack of space), the proc will crash with an error.
+RoboTact is supposed to be undeletable, so these will create runtime messages.
Damage decrements by a percent of its maxhealth
+Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's satiety
SETS an organ's damage to the amount "d", and in doing so clears or sets the failing flag, good for when you have an effect that should fix an organ if broken
When you take a bite you cant jam it in for surgery anymore.
Proc Details
applyOrganDamage
+
+
Adjusts an organ's damage by the amount "d", up to a maximum amount, which is by default max damage
check_damage_thresholds
+
+
+
check_damage_thresholds
+
+
input: M (a mob, the owner of the organ we call the proc on)
+
output: returns a message should get displayed.
+
description: By checking our current damage against our previous damage, we can decide whether we've passed an organ threshold.
+
+
If we have, send the corresponding threshold message to the owner, if such a message exists.
+
+
+
+
+
examine
+
+
Damage decrements by a percent of its maxhealth
+Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's satiety
setOrganDamage
+
+
SETS an organ's damage to the amount "d", and in doing so clears or sets the failing flag, good for when you have an effect that should fix an organ if broken
The brain's organ variables are significantly more different than the other organs, with half the decay rate for balance reasons, and twice the maxHealth
The brain's organ variables are significantly more different than the other organs, with half the decay rate for balance reasons, and twice the maxHealth
Paper is now using markdown (like in github pull notes) for ALL rendering
+so we do loose a bit of functionality but we gain in easy of use of
+paper and getting rid of that crashing bug
We already impacted these things, do not impact them again. Used to make sure we can pierce things we want to pierce. Lazylist, typecache style (object = TRUE) for performance.
The number of pixels we increment by. THIS IS NOT SPEED, DO NOT TOUCH THIS UNLESS YOU KNOW WHAT YOU ARE DOING. In general, lower values means more linetrace accuracy up to a point at cost of performance.
Bitflag for things the projectile should just phase through entirely - No hitting unless direct target and [phasing_ignore_direct_target] is FALSE. Uses pass_flags flags.
On ricochet, if ricochet_auto_aim_range is nonzero, we'll consider any mobs within this range of the normal angle of incidence to home in on, higher = more auto aim
On ricochet, if nonzero, we consider all mobs within this range of our projectile at the time of ricochet to home in on like Revolver Ocelot, as governed by ricochet_auto_aim_angle
Called when the projectile hits something
+This can either be from it bumping something,
+or it passing over a turf/being crossed and scanning that there is infact
+a valid target it needs to hit.
+This target isn't however necessarily WHAT it hits
+that is determined by process_hit and select_target.
Artificially modified to be called at around every world.icon_size pixels of movement.
+WARNING: Range() can only be called once per pixel_increment_amount pixels.
The proc to make the projectile go, using a simulated pixel movement line trace.
+Note: deciseconds_equivalent is currently only used for homing, times is the number of times to move pixel_increment_amount.
+Trajectory multiplier directly modifies the factor of pixel_increment_amount to go per time.
+It's complicated, so probably just don't mess with this unless you know what you're doing.
The primary workhorse proc of projectile impacts.
+This is a RECURSIVE call - process_hit is called on the first selected target, and then repeatedly called if the projectile still hasn't been deleted.
Scan if we should hit something and hit it if we need to
+The difference between this and handling in Impact is
+In this we strictly check if we need to Impact() something in specific
+If we do, we do
+We don't even check if it got hit already - Impact() does that
+In impact there's more code for selecting WHAT to hit
+So this proc is more of checking if we should hit something at all BY having an atom cross us.
We already impacted these things, do not impact them again. Used to make sure we can pierce things we want to pierce. Lazylist, typecache style (object = TRUE) for performance.
PROJECTILE PIERCING
+* WARNING:
+* Projectile piercing MUST be done using these variables.
+* Ordinary passflags will result in can_hit_target being false unless directly clicked on - similar to projectile_phasing but without even going to process_hit.
+* The two flag variables below both use pass flags.
+* In the context of LETPASStHROW, it means the projectile will ignore things that are currently "in the air" from a throw.
+
* Also, projectiles sense hits using Bump(), and then pierce them if necessary.
+* They simply do not follow conventional movement rules.
+* NEVER flag a projectile as PHASING movement type.
+* If you so badly need to make one go through *everything*, override check_pierce() for your projectile to always return PROJECTILE_PIERCE_PHASE/HIT.
+
+
+
+
The "usual" flags of pass_flags is used in that can_hit_target ignores these unless they're specifically targeted/clicked on. This behavior entirely bypasses process_hit if triggered, rather than phasing which uses prehit_pierce() to check.
The number of pixels we increment by. THIS IS NOT SPEED, DO NOT TOUCH THIS UNLESS YOU KNOW WHAT YOU ARE DOING. In general, lower values means more linetrace accuracy up to a point at cost of performance.
Bitflag for things the projectile should just phase through entirely - No hitting unless direct target and [phasing_ignore_direct_target] is FALSE. Uses pass_flags flags.
On ricochet, if ricochet_auto_aim_range is nonzero, we'll consider any mobs within this range of the normal angle of incidence to home in on, higher = more auto aim
On ricochet, if nonzero, we consider all mobs within this range of our projectile at the time of ricochet to home in on like Revolver Ocelot, as governed by ricochet_auto_aim_angle
Projectile can pass through
+Used to not even attempt to Bump() or fail to Cross() anything we already hit.
Crossed
+
+
Projectile crossed: When something enters a projectile's tile, make sure the projectile hits it if it should be hitting it.
Impact
+
+
Called when the projectile hits something
+This can either be from it bumping something,
+or it passing over a turf/being crossed and scanning that there is infact
+a valid target it needs to hit.
+This target isn't however necessarily WHAT it hits
+that is determined by process_hit and select_target.
+
Furthermore, this proc shouldn't check can_hit_target - this should only be called if can hit target is already checked.
+Also, we select_target to find what to process_hit first.
Moved
+
+
Projectile moved:
+
If not fired yet, do not do anything. Else,
+
If temporary unstoppable movement used for piercing through things we already hit (impacted list) is set, unset it.
+Scan turf we're now in for anything we can/should hit. This is useful for hitting non dense objects the user
+directly clicks on, as well as for PHASING projectiles to be able to hit things at all as they don't ever Bump().
Range
+
+
Artificially modified to be called at around every world.icon_size pixels of movement.
+WARNING: Range() can only be called once per pixel_increment_amount pixels.
pixel_move
+
+
The proc to make the projectile go, using a simulated pixel movement line trace.
+Note: deciseconds_equivalent is currently only used for homing, times is the number of times to move pixel_increment_amount.
+Trajectory multiplier directly modifies the factor of pixel_increment_amount to go per time.
+It's complicated, so probably just don't mess with this unless you know what you're doing.
prehit_pierce
+
+
Checks if we should pierce something.
+
NOT meant to be a pure proc, since this replaces prehit() which was used to do things.
+Return PROJECTILE_DELETE_WITHOUT_HITTING to delete projectile without hitting at all!
process_hit
+
+
The primary workhorse proc of projectile impacts.
+This is a RECURSIVE call - process_hit is called on the first selected target, and then repeatedly called if the projectile still hasn't been deleted.
+
Order of operations:
+
+
Checks if we are deleted, or if we're somehow trying to hit a null, in which case, bail out
+
Adds the thing we're hitting to impacted so we can make sure we don't doublehit
+
Checks piercing - stores this.
+Afterwards:
+Hit and delete, hit without deleting and pass through, pass through without hitting, or delete without hitting depending on result
+If we're going through without hitting, find something else to hit if possible and recurse, set unstoppable movement to true
+If we're deleting without hitting, delete and return
+Otherwise, send signal of COMSIG_PROJECTILE_PREHIT to target
+Then, hit, deleting ourselves if necessary.
+@params
+T - Turf we're on/supposedly hitting
+target - target we're hitting
+bumped - target we originally bumped. it's here to ensure that if something blocks our projectile by means of Cross() failure, we hit it
+even if it is not dense.
+hit_something - only should be set by recursive calling by this proc - tracks if we hit something already
+
+
Returns if we hit something.
+
+
Silly-Cons
+
return_predicted_turf_after_moves
+
+
one move is a tile.
scan_crossed_hit
+
+
Scan if we should hit something and hit it if we need to
+The difference between this and handling in Impact is
+In this we strictly check if we need to Impact() something in specific
+If we do, we do
+We don't even check if it got hit already - Impact() does that
+In impact there's more code for selecting WHAT to hit
+So this proc is more of checking if we should hit something at all BY having an atom cross us.
scan_moved_turf
+
+
Scans if we should hit something on the turf we just moved to if we haven't already
+
This proc is a little high in overhead but allows us to not snowflake CanPass in living and other things.
select_target
+
+
Selects a target to hit from a turf
+
@params
+T - The turf
+target - The "preferred" atom to hit, usually what we Bumped() first.
+bumped - used to track if something is the reason we impacted in the first place.
+If set, this atom is always treated as dense by can_hit_target.
+
Priority:
+0. Anything that is already in impacted is ignored no matter what. Furthermore, in any bracket, if the target atom parameter is in it, that's hit first.
+Furthermore, can_hit_target is always checked. This (entire proc) is PERFORMANCE OVERHEAD!! But, it shouldn't be ""too"" bad and I frankly don't have a better generic non snowflakey way that I can think of right now at 3 AM.
+FURTHERMORE, mobs/objs have a density check from can_hit_target - to hit non dense objects over a turf, you must click on them, same for mobs that usually wouldn't get hit.
+
+
The thing originally aimed at/clicked on
+
Mobs - picks lowest buckled mob to prevent scarp piggybacking memes
The current precursor to anomaly cores, these are manufactured into 'finished' anomaly cores for use in research, items, and more.
+
The current amounts created is stored in SSresearch.created_anomaly_types[ANOMALY_CORE_TYPE_DEFINE] = amount
+The hard limits are in code/__DEFINES/anomalies.dm
Note: When adding food items with dummy parents, make sure to add
+the parent to the exclusion list in code/__HELPERS/unsorted.dm's
+get_random_food proc.
Items in the "Snacks" subcategory are food items that people actually eat. The key points are that they are created
+already filled with reagents and are destroyed when empty. Additionally, they make a "munching" noise when eaten.
+
Notes by Darem: Food in the "snacks" subtype can hold a maximum of 50 units. Generally speaking, you don't want to go over 40
+total for the item because you want to leave space for extra condiments. If you want effect besides healing, add a reagent for
+it. Try to stick to existing reagents when possible (so if you want a stronger healing effect, just use omnizine). On use
+effect (such as the old officer eating a donut code) requires a unique reagent (unless you can figure out a better way).
+
The nutriment reagent and bitesize variable replace the old heal_amt and amount variables. Each unit of nutriment is equal to
+2 of the old heal_amt variable. Bitesize is the rate at which the reagents are consumed. So if you have 6 nutriment and a
+bitesize of 2, then it'll take 3 bites to eat. Unlike the old system, the contained reagents are evenly spread among all
+the bites. No more contained reagents = no more bites.
+
Food formatting and crafting examples.
+
/obj/item/reagent_containers/food/snacks/saltedcornchips //Identification path for the object.
+ name = "salted corn chips" //Name that displays when hovered over.
+ desc = "Manufactured in a far away factory." //Description on examine.
+ icon_state = "saltychip" //Refers to an icon, usually in food.dmi
+ bitesize = 3 //How many reagents are consumed in each bite.
+ list_reagents = list(/datum/reagent/consumable/nutriment = 6, //What's inside the snack, but only if spawned. For example, from a chemical reaction, vendor, or slime core spawn.
+ /datum/reagent/consumable/nutriment/vitamin = 2)
+ bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, //What's -added- to the food, in addition to the reagents contained inside the foods used to craft it. Basically, a reward for cooking.
+ /datum/reagent/consumable/nutriment/vitamin = 1) ^^For example. Egg+Egg = 2Egg + Bonus Reagents.
+ filling_color = "#F4A460" //What color it will use if put in a custom food.
+ tastes = list("salt" = 1, "oil" = 1) //Descriptive flavoring displayed when eaten. IE: "You taste a bit of salt and a bit of oil."
+ foodtype = GRAIN | JUNKFOOD //Tag for racial or custom food preferences. IE: Most Lizards cannot have GRAIN.
+
+Crafting Recipe (See files in code/modules/food_and_drinks/recipes/tablecraft/)
+
+/datum/crafting_recipe/food/nachos
+ name ="Salted Corn Chips" //Name that displays in the Crafting UI
+ reqs = list( //The list of ingredients to make the food.
+ /obj/item/reagent_containers/food/snacks/tortilla = 1,
+ /datum/reagent/consumable/sodiumchloride = 1 //As a note, reagents and non-food items don't get added to the food. If you
+ ) ^^want the reagents, make sure the food item has it listed under bonus_reagents.
+ result = /obj/item/reagent_containers/food/snacks/saltedcornchips //Resulting object.
+ subcategory = CAT_MISCFOOD //Subcategory the food falls under in the Food Tab of the crafting menu.
+
+
All foods are distributed among various categories. Use common sense.
note: this timer overlay increments one frame every second (to simulate a clock ticking). If you want to instead have it do a full cycle in a minute, set the 'delay' of each frame of the icon overlay to 75 rather than 10, and the worn overlay to twice that.
Proc Details
arm
+
+
note: this timer overlay increments one frame every second (to simulate a clock ticking). If you want to instead have it do a full cycle in a minute, set the 'delay' of each frame of the icon overlay to 75 rather than 10, and the worn overlay to twice that.
Details the percentage the scanned account recieves off the final sale.
+The person who tagged this will receive the sale value multiplied by this number.
Details the percentage the scanned account recieves off the final sale.
+The person who tagged this will receive the sale value multiplied by this number.
Reference to the tray/soil the seeds are planted in.
+Count used for creating the correct amount of results to the harvest.
+List of plants all harvested from the same batch.
+Tile of the harvester to deposit the growables.
+Name of the grown products.
+The Number of products produced by the plant, typically the yield.
Reference to the tray/soil the seeds are planted in.
+Count used for creating the correct amount of results to the harvest.
+List of plants all harvested from the same batch.
+Tile of the harvester to deposit the growables.
+Name of the grown products.
+The Number of products produced by the plant, typically the yield.
The typepath of the gang antagonist datum that the person who uses the package should have added to them -- remember that the distinction between e.g. Ballas and Grove Street is on the antag datum level, not the team datum level.
Checks if the user is trying to use the package of the family they are in, and if not, adds them to the family, with some differing processing depending on whether the user is already a family member.
The typepath of the gang antagonist datum that the person who uses the package should have added to them -- remember that the distinction between e.g. Ballas and Grove Street is on the antag datum level, not the team datum level.
The team datum that the person who uses this package should be added to.
Proc Details
add_to_gang
+
+
Adds the user to the family that this package corresponds to, dispenses the free_clothes of that family, and adds them to the handler if it exists.
attempt_join_gang
+
+
Checks if the user is trying to use the package of the family they are in, and if not, adds them to the family, with some differing processing depending on whether the user is already a family member.
How much blood flow this stack can absorb if used as a bandage on a cut wound, note that absorption is how much we lower the flow rate, not the raw amount of blood we suck up
How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in ticks is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first
If set and this used as a splint for a broken bone wound, this is used as a multiplier for applicable slowdowns (lower = better) (also for speeding up burn recoveries)
How much blood flow this stack can absorb if used as a bandage on a cut wound, note that absorption is how much we lower the flow rate, not the raw amount of blood we suck up
How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in ticks is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first
If set and this used as a splint for a broken bone wound, this is used as a multiplier for applicable slowdowns (lower = better) (also for speeding up burn recoveries)
Proc Details
add
+
+
+
+
Adds some number of units to this stack.
+
+
+
Arguments:
+
+
+
+
_amount: The number of units to add to this stack.
+
+
+
build_recipe
+
+
Returns a list of properties of a given recipe
+
Arguments:
+
+
R - The stack recipe we are using to get a list of properties
+
can_merge
+
+
+
+
Checks whether this stack can merge itself into another stack.
Called on the glass sheet upon solar construction (duh):
+Different glass sheets can modify different stas/vars, such as obj_integrity or efficiency
+and possibly extra effects if you wish to code them.
+Keep in mind the solars' max_integrity is set equal to the obj_integrity later,
+so you won't have to do so here.
Called on the glass sheet upon solar construction (duh):
+Different glass sheets can modify different stas/vars, such as obj_integrity or efficiency
+and possibly extra effects if you wish to code them.
+Keep in mind the solars' max_integrity is set equal to the obj_integrity later,
+so you won't have to do so here.
The amount of reagent that is to be dispensed currently
Proc Details
ComponentInitialize
+
+
List in which all currently dispensable reagents go
replace_beaker
+
+
Replaces the beaker of the portable chemical mixer with another beaker, or simply adds the new beaker if none is in currently
+
Checks if a valid user and a valid new beaker exist and attempts to replace the current beaker in the portable chemical mixer with the one in hand. Simply places the new beaker in if no beaker is currently loaded
+Arguments:
+
+
mob/living/user - The user who is trying to exchange beakers
+
+
obj/item/reagent_containers/new_beaker - The new beaker that the user wants to put into the device
+
+
+
update_contents
+
+
Updates the contents of the portable chemical mixer
+
A list of dispensable reagents is created by iterating through each source beaker in the portable chemical beaker and reading its contents
a throwing star which specifically makes sure you know it came from a real ninja.
+
The most important item in the entire codebase, as without it we would all cease to exist.
+Inherits everything that makes it interesting the stamina throwing star, but the most
+important change made is that its name specifically has the prefix, 'ninja' in it.
+This provides the detective role with information to play off of by ensuring that his
+assumption that a space ninja is aboard the ship to be true when he find 20 of these in
+the captain's back. Along with this, its throwforce is 10 instead of the 5 of the stamina
+throwing star, meaning it'll do a little more damage than the stamina throwing star does as well.
+Changes to this item need to be approved by all maintainers, so if you do change it, make sure
+you go through the proper channels, lest you get permabanned. Do I make myself clear?
Called when we want to change the value of the stat variable. Holds bitflags.
Proc Details
AI_notify_hack
+
+
Alerts the AI that a hack is in progress.
+
Sends all AIs a message that a hack is occurring. Specifically used for space ninja tampering as this proc was originally in the ninja files.
+However, the proc may also be used elsewhere.
set_machine_stat
+
+
Called when we want to change the value of the stat variable. Holds bitflags.
Cryo will continue to treat people with 0 damage but existing wounds, but will sound off when damage healing is done in case doctors want to directly treat the wounds instead
Cryo will continue to treat people with 0 damage but existing wounds, but will sound off when damage healing is done in case doctors want to directly treat the wounds instead
Are we NOT a silicon, AND we're logged in as the captain?
authenticated_as_silicon_or_captain
+
+
Are we a silicon, OR we're logged in as the captain?
can_buy_shuttles
+
+
Returns TRUE if the user can buy shuttles.
+If they cannot, returns FALSE or a string detailing why.
emergency_meeting
+
+
Call an emergency meeting
+
Comm Console wrapper for the Communications subsystem wrapper for the call_emergency_meeting world proc.
+Checks to make sure the proc can be called, and handles relevant feedback, logging and timing.
+See the SScommunications proc definition for more detail, in short, teleports the entire crew to
+the bridge for a meetup. Should only really happen during april fools.
+Arguments:
+
+
user - Mob who called the meeting
+
has_communication
+
+
Returns whether or not the communications console can communicate with the station
override_cooldown
+
+
Override the cooldown for special actions
+Used in places such as CentCom messaging back so that the crew can answer right away
track ducts we're connected to. Mainly for ducts we connect to that we normally wouldn't, like different layers and colors, for when we regenerate the ducts
track ducts we're connected to. Mainly for ducts we connect to that we normally wouldn't, like different layers and colors, for when we regenerate the ducts
Proc Details
add_connects
+
+
add a connect direction
add_neighbour
+
+
add a duct as neighbour. this means we're connected and will connect again if we ever regenerate
attempt_connect
+
+
start looking around us for stuff to connect to
can_anchor
+
+
collection of all the sanity checks to prevent us from stacking ducts that shouldn't be stacked
connect_duct
+
+
connect to a duct
connect_network
+
+
see if whatever we found can be connected to
connect_plumber
+
+
connect to a plumbing object
create_duct
+
+
create a new duct datum
disconnect_duct
+
+
we disconnect ourself from our neighbours. we also destroy our ductnet and tell our neighbours to make a new one
generate_connects
+
+
Special proc to draw a new connect frame based on neighbours. not the norm so we can support multiple duct kinds
get_adjacent_ducts
+
+
get a list of the ducts we can connect to if we are dumb
handle_layer
+
+
update the layer we are on
lose_neighbours
+
+
remove all our neighbours, and remove us from our neighbours aswell
reconnect
+
+
''''''''''''''''optimized''''''''''''''''' proc for quickly reconnecting after a duct net was destroyed
This is NOW the gradual affects that each chemical applies on every process() proc. Nutrients now use a more robust reagent holder in order to apply less insane
+stat changes as opposed to 271 lines of individual statline effects. Shoutout to the original comments on chems, I just cleaned a few up.
Plant Death Proc.
+Cleans up various stats for the plant upon death, including pests, harvestability, and plant health.
Proc Details
adjustWater
+
+
Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds.
apply_chemicals
+
+
This is NOW the gradual affects that each chemical applies on every process() proc. Nutrients now use a more robust reagent holder in order to apply less insane
+stat changes as opposed to 271 lines of individual statline effects. Shoutout to the original comments on chems, I just cleaned a few up.
mutation_roll
+
+
Contains the reagents within the tray.
plantdies
+
+
Plant Death Proc.
+Cleans up various stats for the plant upon death, including pests, harvestability, and plant health.
Coefficient for the speed of item building. Based on the installed parts.
Proc Details
add_part_set_to_queue
+
+
Adds a list of datum designs to the build queue.
+
Will only add designs that are in this machine's stored techweb.
+Does final checks for datum IDs and makes sure this machine can build the designs.
+
+
part_list - List of datum design ids for designs to add to the queue.
+
add_to_queue
+
+
Adds a datum design to the build queue.
+
Returns TRUE if successful and FALSE if the design was not added to the queue.
+
+
D - Datum design to add to the queue.
+
build_next_in_queue
+
+
Attempts to build the next item in the build queue.
+
Returns FALSE if either there are no more parts to build or the next part is not buildable.
+Returns TRUE if the next part has started building.
+
+
verbose - Whether the machine should use say() procs. Set to FALSE to disable the machine saying reasons for failure to build.
+
build_part
+
+
Starts the build process for a given design datum.
+
Returns FALSE if the procedure fails. Returns TRUE when being_built is set.
+Uses materials.
+
+
D - Design datum to attempt to print.
+
verbose - Whether the machine should use say() procs. Set to FALSE to disable the machine saying reasons for failure to build.
+
check_resources
+
+
Checks if the Exofab has enough resources to print a given item.
+
Returns FALSE if the design has no reagents used in its construction (?) or if there are insufficient resources.
+Returns TRUE if there are sufficient resources to print the item.
+
+
D - Design datum to calculate the modified resource cost of.
+
dispense_built_part
+
+
Dispenses a part to the tile infront of the Exosuit Fab.
+
Returns FALSE is the machine cannot dispense the part on the appropriate turf.
+Return TRUE if the part was successfully dispensed.
+
+
D - Design datum to attempt to dispense.
+
eject_sheets
+
+
Eject material sheets.
+
Returns the number of sheets successfully ejected.
+eject_sheet - Byond REF of the material to eject.
+eject_amt - Number of sheets to attempt to eject.
get_construction_time_w_coeff
+
+
Calculates the coefficient-modified build time of a design.
+
Returns coefficient-modified build time of a given design.
+
+
D - Design datum to calculate the modified build time of.
+
roundto - Rounding value for round() proc
+
get_resource_cost_w_coeff
+
+
Calculates the coefficient-modified resource cost of a single material component of a design's recipe.
+
Returns coefficient-modified resource cost for the given material component.
+
+
D - Design datum to pull the resource cost from.
+
resource - Material datum reference to the resource to calculate the cost of.
+
roundto - Rounding value for round() proc
+
get_resources_w_coeff
+
+
Calculates resource/material costs for printing an item based on the machine's resource coefficient.
+
Returns a list of k,v resources with their amounts.
+
+
D - Design datum to calculate the modified resource cost of.
+
list_queue
+
+
Generates a list of parts formatted for tgui based on the current build queue.
+
Returns a formatted list of lists containing formatted part information for every part in the build queue.
on_finish_printing
+
+
Intended to be called when the exofab has stopped working and is no longer printing items.
+
Removes the overlay to show the fab working and sets idle power usage settings. Additionally resets the description and turns off queue processing.
on_start_printing
+
+
Intended to be called when an item starts printing.
+
Adds the overlay to show the fab working and sets active power usage settings.
output_available_resources
+
+
Generates a list of resources / materials available to this Exosuit Fab
+
Returns null if there is no material container available.
+List format is list(material_name = list(amount = ..., ref = ..., etc.))
output_part_info
+
+
Generates an info list for a given part.
+
Returns a list of part information.
+
+
D - Design datum to get information on.
+
categories - Boolean, whether or not to parse snowflake categories into the part information list.
+
remove_from_queue
+
+
Removes datum design from the build queue based on index.
+
Returns TRUE if successful and FALSE if a design was not removed from the queue.
+
+
index - Index in the build queue of the element to remove.
+
sync
+
+
Syncs machine with R&D servers.
+
Requires an R&D Console visible within 7 tiles. Copies techweb research. Updates tgui's state data.
Gets the turf in the input_dir direction adjacent to the machine, and registers signals for ATOM_ENTERED and ATOM_CREATED. Calls the pickup_item() proc when it receives these signals.
The current direction, in relation to the machine, that items will be output to.
Proc Details
pickup_item
+
+
Base proc for all /mineral subtype machines to use. Place your item pickup behavior in this proc when you override it for your specific machine.
+
Called when the COMSIG_ATOM_ENTERED and COMSIG_ATOM_CREATED signals are sent.
+
Arguments:
+
+
source - the turf that is listening for the signals.
+
target - the atom that just moved onto the source turf.
+
oldLoc - the old location that target was at before moving onto source.
+
register_input_turf
+
+
Gets the turf in the input_dir direction adjacent to the machine, and registers signals for ATOM_ENTERED and ATOM_CREATED. Calls the pickup_item() proc when it receives these signals.
unload_mineral
+
+
Generic unloading proc. Takes an atom as an argument and forceMove's it to the turf adjacent to this machine in the output_dir direction.
unregister_input_turf
+
+
Unregisters signals that are registered the machine's input turf, if it has one.
A reference to the toner cartridge that's inserted into the copier. Null if there is no cartridge.
Proc Details
check_ass
+
+
Checks the living mob ass exists and its location is the same as the photocopier.
+
Returns FALSE if ass doesn't exist or is not at the copier's location. Returns TRUE otherwise.
copier_blocked
+
+
Checks if the copier is deleted, or has something dense at its location. Called in MouseDrop_T()
copier_empty
+
+
Checks if there is an item inserted into the copier or a mob sitting on top of it.
+
Return FALSE is the copier has something inside of it. Returns TRUE if it doesn't.
do_copy_loop
+
+
Will invoke the passed in copy_cb callback in 1 second intervals, and charge the user 5 credits for each copy made.
+
Arguments:
+
+
copy_cb - a callback for which proc to call. Should only be one of the make_x_copy() procs, such as make_paper_copy().
+
user - the mob who clicked copy.
+
do_insertion
+
+
Inserts the item into the copier. Called in attackby() after a human mob clicked on the copier with a paper, photo, or document.
+
Arugments:
+
+
object - the object that got inserted.
+
user - the mob that inserted the object.
+
give_pixel_offset
+
+
Gives items a random x and y pixel offset, between -10 and 10 for each.
+
This is done that when someone prints multiple papers, we dont have them all appear to be stacked in the same exact location.
+
Arguments:
+
+
copied_item - The paper, document, or photo that was just spawned on top of the printer.
+
has_enough_toner
+
+
Determines if the photocopier has enough toner to create num_copies amount of copies of the currently inserted item.
make_ass_copy
+
+
Handles the copying of an ass photo.
+
Calls check_ass() first to make sure that ass exists, among other conditions. Since this proc is called from a timer, it's possible that it was removed.
+Additionally checks that the mob has their clothes off.
make_devil_paper_copy
+
+
Handles the copying of devil contract paper. Transfers all the text, stamps and so on from the old paper, to the copy.
+
Checks first if paper_copy exists. Since this proc is called from a timer, it's possible that it was removed.
+Does not check if it has enough toner because devil contracts cost no toner to print.
make_document_copy
+
+
Handles the copying of documents.
+
Checks first if document_copy exists. Since this proc is called from a timer, it's possible that it was removed.
make_paper_copy
+
+
Handles the copying of paper. Transfers all the text, stamps and so on from the old paper, to the copy.
+
Checks first if paper_copy exists. Since this proc is called from a timer, it's possible that it was removed.
make_photo_copy
+
+
Handles the copying of photos, which can be printed in either color or greyscale.
+
Checks first if photo_copy exists. Since this proc is called from a timer, it's possible that it was removed.
remove_photocopy
+
+
Called when someone hits the "remove item" button on the copier UI.
+
If the user is a silicon, it drops the object at the location of the copier. If the user is not a silicon, it tries to put the object in their hands first.
+Sets busy to FALSE because if the inserted item is removed, the copier should halt copying.
+
Arguments:
+
+
object - the item we're trying to remove.
+
user - the user removing the item.
+
reset_busy
+
+
Sets busy to FALSE. Created as a proc so it can be used in callbacks.
Basic plumbing object.
+It doesn't really hold anything special, YET.
+Objects that are plumbing but not a subtype are as of writing liquid pumps and the reagent_dispenser tank
+Also please note that the plumbing component is toggled on and off by the component using a signal from default_unfasten_wrench, so dont worry about it
*We can't take anything in, at least till we're emptied. Down side of the round robin chem transfer, otherwise while emptying 5u of an unreacted chem gets added,
+and you get nasty leftovers
*We can't take anything in, at least till we're emptied. Down side of the round robin chem transfer, otherwise while emptying 5u of an unreacted chem gets added,
+and you get nasty leftovers
see if machine has enough to fill
+pick a reagent_container that could be used
+see if it would overflow else inject
+glass was full so we move it away
+slime extracts need inject
+no need to move slimecross industrial things
set to true if the loop couldnt find a geyser in process, so it remembers and stops checking every loop until moved. more accurate name would be absolutely_no_geyser_under_me_so_dont_try
set to true if the loop couldnt find a geyser in process, so it remembers and stops checking every loop until moved. more accurate name would be absolutely_no_geyser_under_me_so_dont_try
*list of set reagents that the reaction_chamber allows in, and must all be present before mixing is enabled.
+* example: list(/datum/reagent/water = 20, /datum/reagent/fuel/oil = 50)
*list of set reagents that the reaction_chamber allows in, and must all be present before mixing is enabled.
+* example: list(/datum/reagent/water = 20, /datum/reagent/fuel/oil = 50)
it splits the reagents however you want. So you can "every 60 units, 45 goes left and 15 goes straight". The side direction is EAST, you can change this in the component
straight up copied from chem dispenser. Being a subtype would be extremely tedious and making it global would restrict potential subtypes using different dispensable_reagents
straight up copied from chem dispenser. Being a subtype would be extremely tedious and making it global would restrict potential subtypes using different dispensable_reagents
Max amount of heat allowed inside of the canister before it starts to melt (different tiers have different limits)
+Max amount of pressure allowed inside of the canister before it starts to break (different tiers have different limits)
function used to check the limit of the canisters and also set the amount of damage that the canister can receive, if the heat and pressure are way higher than the limit the more damage will be done
Max amount of heat allowed inside of the canister before it starts to melt (different tiers have different limits)
+Max amount of pressure allowed inside of the canister before it starts to break (different tiers have different limits)
Proc Details
ui_state
+
+
function used to check the limit of the canisters and also set the amount of damage that the canister can receive, if the heat and pressure are way higher than the limit the more damage will be done
Used by external forces to set the APCs channel status's.
Proc Details
autoset
+
+
Returns the new status value for an APC channel.
+
// val 0=off, 1=off(auto) 2=on 3=on(auto)
+// on 0=off, 1=on, 2=autooff
+TODO: Make this use bitflags instead. It should take at most three lines, but it's out of scope for now.
+
Arguments:
+
+
val: The current status of the power channel.
+
+
APC_CHANNEL_OFF: The APCs channel has been manually set to off. This channel will not automatically change.
APC_CHANNEL_ON: The APCs channel has been manually set to on. This will be automatically changed only if the APC runs completely out of power or is disabled.
EXPERIMENTAL, HUGBOXY AS HELL CITADEL CHANGES: Even in a vaccum, update gas composition and modifiers.
+This means that the SM will usually have a very small explosion if it ends up being breached to space,
+and CO2 tesla delaminations basically require multiple grounding rods to stabilize it long enough to not have it vent.
EXPERIMENTAL, HUGBOXY AS HELL CITADEL CHANGES: Even in a vaccum, update gas composition and modifiers.
+This means that the SM will usually have a very small explosion if it ends up being breached to space,
+and CO2 tesla delaminations basically require multiple grounding rods to stabilize it long enough to not have it vent.
The explosive compressor machine used in anomaly core production.
+
Uses the standard toxins/tank explosion scaling to compress raw anomaly cores into completed ones. The required explosion radius increases as more cores of that type are created.
Associated list of seeds, they are all weak refs. We check the len to see how many refs we have for each
Proc Details
add_seed
+
+
+
+
Add Seeds Proc.
+
+
Adds the seeds to the contents and to an associated list that pregenerates the data
+
needed to go to the ui handler
+
+
+
generate_seed_string
+
+
Generate seed string
+
Creates a string based of the traits of a seed. We use this string as a bucket for all
+seeds that match as well as the key the ui uses to get the seed. We also use the key
+for the data shown in the ui. Javascript parses this string to display
What path boards used to construct it should build into when dropped. Needed so we don't accidentally have them build variants with items preloaded in them.
What path boards used to construct it should build into when dropped. Needed so we don't accidentally have them build variants with items preloaded in them.
Proc Details
attackby
+
+
Item Adding
dispense
+
+
Really simple proc, just moves the object "O" into the hands of mob "M" if able, done so I could modify the proc a little for the organ fridge
If the SSU's doors are locked closed. Can be toggled manually via the UI, but is also locked automatically when the UV decontamination sequence is running.
If the safety wire is cut/pulsed, the SSU can run the decontamination sequence while occupied by a mob. The mob will be burned during every cycle of cook().
If the SSU's doors are locked closed. Can be toggled manually via the UI, but is also locked automatically when the UV decontamination sequence is running.
If the safety wire is cut/pulsed, the SSU can run the decontamination sequence while occupied by a mob. The mob will be burned during every cycle of cook().
If the hack wire is cut/pulsed.
+Modifies effects of cook()
+
+
If FALSE, decontamination sequence will clear radiation for all atoms (and their contents) contained inside the unit, and burn any mobs inside.
+
If TRUE, decontamination sequence will delete all items contained within, and if occupied by a mob, intensifies burn damage delt. All wires will be cut at the end.
+
Proc Details
cook
+
+
UV decontamination sequence.
+Duration is determined by the uv_cycles var.
+Effects determined by the uv_super var.
+
+
If FALSE, all atoms (and their contents) contained are cleared of radiation. If a mob is inside, they are burned every cycle.
+
If TRUE, all items contained are destroyed, and burn damage applied to the mob is increased. All wires will be cut at the end.
+All atoms still inside at the end of all cycles are ejected from the unit.
Builds the vending machine inventory, sets up slogans and other such misc work
+
This also sets the onstation var to:
+
+
FALSE - if the machine was maploaded on a zlevel that doesn't pass the is_station_level check
+
TRUE - all other cases
+
build_inventory
+
+
Build the inventory of the vending machine from it's product and record lists
+
This builds up a full set of /datum/data/vending_products from the product list of the vending machine type
+Arguments:
+
+
productlist - the list of products that need to be converted
+
recordlist - the list containing /datum/data/vending_product datums
+
startempty - should we set vending_product record amount from the product list (so it's prefilled at roundstart)
+
canLoadItem
+
+
Are we able to load the item passed in
+
Arguments:
+
+
I - the item being loaded
+
user - the user doing the loading
+
compartmentLoadAccessCheck
+
+
Is the passed in user allowed to load this vending machines compartments
+
Arguments:
+
+
user - mob that is doing the loading of the vending machine
+
pre_throw
+
+
A callback called before an item is tossed out
+
Override this if you need to do any special case handling
+
Arguments:
+
+
I - obj/item being thrown
+
refill_inventory
+
+
Refill our inventory from the passed in product list into the record list
+
Arguments:
+
+
productlist - list of types -> amount
+
recordlist - existing record datums
+
restock
+
+
Prices of vending machines are all increased uniformly.
+Refill a vending machine from a refill canister
+
This takes the products from the refill canister and then fills the products,contraband and premium product categories
+
Arguments:
+
+
canister - the vending canister we are refilling from
+
shock
+
+
Shock the passed in user
+
This checks we have power and that the passed in prob is passed, then generates some sparks
+and calls electrocute_mob on the user
+
Arguments:
+
+
user - the user to shock
+
prb - probability the shock happens
+
speak
+
+
Speak the given message verbally
+
Checks if the machine is powered and the message exists
+
Arguments:
+
+
message - the message to speak
+
throw_impact
+
+
Crush the mob that the vending machine got thrown at
throw_item
+
+
Throw an item from our internal inventory out in front of us
+
This is called when we are hacked, it selects a random product from the records that has an amount > 0
+This item is then created and tossed out in front of us with a visible message
tilt
+
+
Tilts ontop of the atom supplied, if crit is true some extra shit can happen. Returns TRUE if it dealt damage to something.
unbuild_inventory
+
+
Given a record list, go through and and return a list of type -> amount
update_canister
+
+
Set up a refill canister that matches this machines products
+
This is used when the machine is deconstructed, so the items aren't "lost"
A flower created by flowering kudzu which spawns a venus human trap after a certain amount of time has passed.
+
A flower created by kudzu with the flowering mutation. Spawns a venus human trap after 2 minutes under normal circumstances.
+Also spawns 4 vines going out in diagonal directions from the bud. Any living creature not aligned with plants is damaged by these vines.
+Once it grows a venus human trap, the bud itself will destroy itself.
The portals Space Dragon summons to bring carp onto the station.
+
The portals Space Dragon summons to bring carp onto the station. His main objective is to summon 3 of them and protect them from being destroyed.
+The portals can summon sentient space carp in limited amounts. The portal also changes color based on whether or not a carp spawn is available.
+Once it is fully charged, it becomes indestructible, and intermitently spawns non-sentient carp. It is still destroyed if Space Dragon dies.
Used to create carp controlled by ghosts when the option is available.
+
Creates a carp for the ghost to control if we have a carp spawn available.
+Gives them prompt to control a carp, and if our circumstances still allow if when they hit yes, spawn them in as a carp.
+Also add them to the list of carps in Space Dragon's antgonist datum, so they'll be displayed as having assisted him on round end.
+Arguments:
+
+
mob/user - The ghost which will take control of the carp.
+
update_check
+
+
Does a series of checks based on the portal's status.
+
Performs a number of checks based on the current charge of the portal, and triggers various effects accordingly.
+If the current charge is a multiple of carp_interval, add an extra carp spawn.
+If we're halfway charged, announce to the crew our location in a CENTCOM announcement.
+If we're fully charged, tell the crew we are, change our color to yellow, become invulnerable, and give Space Dragon the ability to make another rift, if he hasn't summoned 3 total.
Energy net which ensnares prey until it is destroyed. Used by space ninjas.
+
Energy net which keeps its target from moving until it is destroyed. Used to send
+players to a holding area in which they could never leave, but such feature has since
+been removed.
Mechs are now (finally) vehicles, this means you can make them multicrew
+They can also grant select ability buttons based on occupant bitflags
+
Movement is handled through vehicle_move() which is called by relaymove
+Clicking is done by way of signals registering to the entering mob
+NOTE: MMIS are NOT mobs but instead contain a brain that is, so you need special checks
+AI also has special checks becaus it gets in and out of the mech differently
+Always call remove_occupant(mob) when leaving the mech so the mob is removed properly
+
For multi-crew, you need to set how the occupants recieve ability bitflags corresponding to their status on the vehicle(i.e: driver, gunner etc)
+Abilities can then be set to only apply for certain bitflags and are assigned as such automatically
+
Clicks are wither translated into mech_melee_attack (see mech_melee_attack.dm)
+Or are used to call action() on equipped gear
+Cooldown for gear is on the mech because exploits
*Checks if defense mode is enabled, and if the attacker is standing in an area covered by the shield.
+Expects a turf. Returns true if the attack should be blocked, false if not.
Relays the signal from the action button to the shield, and creates a new shield if the old one is MIA.
Proc Details
defense_check
+
+
*Checks if defense mode is enabled, and if the attacker is standing in an area covered by the shield.
+Expects a turf. Returns true if the attack should be blocked, false if not.
relay
+
+
Relays the signal from the action button to the shield, and creates a new shield if the old one is MIA.
Makes the mecha go faster and halves the mecha drill cooldown if in Lavaland pressure.
+
Checks for Lavaland pressure, if that works out the mech's speed is equal to fast_pressure_step_in and the cooldown for the mecha drill is halved. If not it uses slow_pressure_step_in and drill cooldown is normal.
Despite having no DM-defined static type, proc paths have some variables,
+listed below. These are not modifiable, but for a given procpath P,
+new P(null, "Name", "Desc") can be used to create a new procpath with the
+same code but new name and desc values. The other variables cannot be
+changed in this way.
+
This type exists only to act as an annotation, providing reasonable static
+typing for procpaths. Previously, types like /atom/verb were used, with
+the name and desc vars of /atom thus being accessible. Proc and verb
+paths will fail istype and ispath checks against /procpath.
# To make your name something other than your github name type it in the format "<github name> <credited name>
+# e.g.
+# Cyberboss Jordan Brown
+# To suppress your name from appearing in the credits do "<github name> __REMOVE__
+# e.g.
+# Cyberboss __REMOVE__
+
+tgstation-server Thanks for playing!
+
+optimumtact oranges
+qustinnus Floyd / Qustinnus
+catalystfd __REMOVE__
+TheVekter Vekter
+ChangelingRain Joan
+NewSta1 NewSta
+theOperand Miauw
+PraiseRatvar Frozenguy5
+FuryMcFlurry Fury McFlurry
+vuonojenmustaturska Naksu
+praisenarsie Frozenguy5
+MrDoomBringer Mr. DoomBringer
+Fikou Dr. Fikou
+TiviPlus Tivi Plus
+tralezab Trale Zab
+Iamgoofball goofball
+Tharcoonvagh Tharcoon
+Rectification itseasytosee
+ATHATH ATH1909
+trollbreeder troll breeder
+BuffEngineering Buff Engineering```
+
Usage: tools/bootstrap/python -m HitboxExpander <path_to_file.dmi or png>
+
+This tool expands the hitbox of the given image by 1 pixel.
+Works by changing some of the fully-transparent pixels to alpha=1 black pixels.
+Naked human eye usually cannot notice the difference.
+
+No space carps or corgis have been used or injured in the production of this tool.
+
The goal is a one stop solution for hosting /tg/station on linux via Docker. Will not work with Docker on Windows.
+
This requires Docker with the docker-compose command to be installed on your system. See ubuntu instructions here. If you fail to find the docker-ce package refer to this StackOverflow answer.
+
Some basic configuration options in docker-compose.yml before starting:
+
+
Change TGS_ADMIN_CKEY to your ckey so you may have initial control over the server.
+
Change TGS_SCHEMA_MAJOR_VERSION to your repo's latest schema major version.
+
Change TGS_SCHEMA_MINOR_VERSION to your repo's latest schema minor version.
+
If you want to change the MariaDB password, there are three locations in the file it must be changed from its default value of ChangeThisInBothMariaDBAndTgsConnectionString.
+
Change TGS_BYOND to set the initial BYOND version.
+
Ports are mapped in the form <external>:<internal> NEVER change the internal port. If you want to prevent a service from being exposed, delete/comment out the entire line.
+
+
The first (3306) is the exposed mariadb port. Do not expose this over the internet without changing the password. In general it's a bad idea.
+
The second (1337) is the exposed DreamDaemon port
+
The third (5000) is the exposed TGS API port. Do not expose this over the internet. Setup an HTTPS reverse proxy instead.
+
+
+
Change TGS_REPO to set the repository used. Note, this must be a /tg/ derivative from at least 2019 that implements the latest TGS DreamMaker API. Repositories that follow tgstation/tgstation will have this automatically. It also must contain a prefixed SQL schema setup file.
+
+
To launch, change to this directory and run docker-compose up. The initial setup will take a long time. If that fails, Ctrl+C out, run docker-compose down, remove ./TGS_Instances and ./Database, and try again. Once setup is complete, you can either leave the terminal running, or Ctrl+C out (this will stop DreamDaemon) and run docker-compose -d to run it in the background.
+
What it does:
+
+
Starts mariadb with the data files in ./Database on port 3306
+
Installs and starts Tgs4 (using latest stable docker tag, no HTTPS) on port 5000. Configuration in ./TGS_Config, logs in ./TGS_Logs.
+
Configures a TGS instance for tgstation in ./TGS_Instances (SetupProgram)
+
+
The instance is configured to autostart
+
Repo is cloned from the origin specified in the docker-compose.yml
+
BYOND version is set to the latest one specified in the docker-compose.yml
+
A script will be run to setup dependencies. This does the following every time the game is built:
+
+
Reads dependency information from dependencies.sh in the root of the repository
+
Installs the following necessary packages into the TGS image
+
+
Rust/cargo
+
git
+
cmake
+
grep
+
g++-6
+
g++-6-multilib
+
mysql-client
+
libmariadb-dev:i386
+
libssl-dev:i386
+
+
+
Builds rust-g in ./TGS_Instances/main/Configuration/EventScripts/rust-g and copies the artifact to the game directory.
+
Builds BSQL in ./TGS_Instances/main/Configuration/EventScripts/BSQL and copies the artifact to the game directory.
+
Sets up ./TGS_Instances/main/Configuration/GameStaticFiles/config with the initial repository config.
+
Sets up ./TGS_Instances/main/Configuration/GameStaticFiles/data.
+
If it doesn't exist, create the ss13_db database on the mariadb server and populate it with the repository's.
+
+
+
Start DreamDaemon and configure it to autostart and keep it running via TGS.
+
Updates will be pulled from the default repository branch and deployed every hour
+
+
+
+
What it DOESN'T do:
+
+
Configure sane MariaDB security
+
TGS Test merging
+
TGS Chat bots
+
Handle updating BYOND versions
+
Handle updating the database schema
+
Manage TGS users, permissions, or change the default admin password
+
Provide HTTPS for TGS
+
Expose the DB to the internet UNLESS you have port 3306 forwarded for some ungodly reason
+
Port forward or setup firewall rules for DreamDaemon or TGS
+
Notify you of TGS errors past initial setup
+
Keep MariaDB logs
+
Backup ANYTHING
+
Pretend like it's a long term solution
+
+
This is enough to host a production level server !!!IN THEORY!!! This script guarantees nothing and comes with no warranty
+
You can change the TGS_BYOND and TGS_REPO variables when setting up the first time. But further configuration must be done with TGS itself.
+
You can connect to TGS with Tgstation.Server.ControlPanel (Binaries provided for windows, must be compiled manually on Linux).
+
+
Connect to http://localhost:5000. Be sure to Use Plain HTTP and Default Credentials
+
+
You should learn how to manually setup TGS if you truly want control over what your server does.
[SERVERS]
+## Simply enter a list of servers to poll. Be sure to specify a server name in parentheses.
+
+(Sibyl #1) byond://game.nanotrasen.com:1337
+
+(Sibyl #2) byond://game.nanotrasen.com:2337
+
+
+[ADMINS]
+## Specify some standard Windows filepaths (you may use relative paths) for admin txt lists to poll.
+
+C:\SS13\config\admins.txt
+
the compiled exe file for the Unstandardness text for DM program is in:
+UnstandardnessTestForDM\bin\Debug\UnstandardnessTestForDM.exe
+
+You have to move it to the root folder (where the dme file is) and run it from there for it to work.
+
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\bin\Debug\UnstandardnessTestForDM.exe
+c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\bin\Debug\UnstandardnessTestForDM.pdb
+c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\ResolveAssemblyReference.cache
+c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.Form1.resources
+c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.Properties.Resources.resources
+c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\GenerateResource.read.1.tlog
+c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\GenerateResource.write.1.tlog
+c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.exe
+c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.pdb
+C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\bin\Debug\UnstandardnessTestForDM.exe
+C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\bin\Debug\UnstandardnessTestForDM.pdb
+C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\ResolveAssemblyReference.cache
+C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.Form1.resources
+C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.Properties.Resources.resources
+C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\GenerateResource.read.1.tlog
+C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\GenerateResource.write.1.tlog
+C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.exe
+C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.pdb
+
This build script is the recommended way to compile the game, including not only the DM code but also the JavaScript and any other dependencies.
+
+
VSCode:
+a) Press Ctrl+Shift+B to build.
+b) Press F5 to build and run with debugger attached.
+
Windows:
+a) Double-click BUILD.bat in the repository root to build (will wait for a key press before it closes).
+b) Double-click tools/build/build.bat to build (will exit as soon as it finishes building).
+
Linux:
+a) Run tools/build/build from the repository root.
+
+
The script will skip build steps whose inputs have not changed since the last run.
+
Getting list of available targets
+
You can get a list of all targets that you can build by running the following command:
+
tools/build/build --help
+
+
Dependencies
+
+
On Windows, BUILD.bat will automatically install a private (vendored) copy of Node.
On Linux , unless using tgs4 or later you will need to compile rust-g on the server and obtain a .so file, for instructions see https://github.com/tgstation/rust-g
+
+
Why?
+
We used to include compiled versions of the tgui JavaScript code in the Git repository so that the project could be compiled using BYOND only. These pre-compiled files tended to have merge conflicts for no good reason. Using a build script lets us avoid this problem, while keeping builds convenient for people who are not modifying tgui.
+
This build script is based on Juke Build - please follow the link and read the documentation for the project to understand how it works and how to contribute to this build script.
This folder contains installable scripts for Git hooks and merge drivers.
+Use of these hooks and drivers is optional and they must be installed
+explicitly before they take effect.
+
To install the current set of hooks, or update if new hooks are added, run
+Install.bat (Windows) or tools/hooks/install.sh (Unix-like) as appropriate.
+
If your Git GUI does not support a given hook, there is usually a .bat file
+or other script you can run instead - see the links below for details.
+
Hooks
+
+
Pre-commit: Runs mapmerge2 to reduce the diff on any changed maps.
DMM merger: Attempts to fix map conflicts when performing a Git merge.
+
+
Adding New Hooks
+
New Git hooks may be added by creating a file named <hook-name>.hook in
+this directory. Git determines what hooks are available and what their names
+are.
+
New Git merge drivers may be added by adding a shell script named <ext>.merge
+and updating .gitattributes in the root of the repository to include the line
+*.<ext> merge=<ext>.
+
Adding or removing hooks or merge drivers requires running the install script
+again, but modifying them does not. See existing .hook and .merge files for examples.
The Map Merger is a collection of scripts that keep this repository's maps
+in a format which is easier to track in Git and less likely to cause merge
+conflicts. When merge conflicts do occur, it can sometimes resolve them.
+
For detailed troubleshooting instructions and other tips, visit the
+Map Merger wiki article.
+
Installation
+
To install the Git hooks, open the tools/hooks/ folder and double-click
+Install.bat. Linux users run tools/hooks/install.sh.
+
Manual Use
+
If using a Git GUI which is not compatible with the hooks:
+
+
Before committing, double-click Run Before Committing.bat
+
When a merge has map conflicts, double-click Resolve Map Conflicts.bat
+
+
The console will show whether the operation succeeded.
+
For more details, see the Map Merger wiki article.
+
What Map Merging Is
+
The "map merge" operation describes the process of rewriting a map file written
+by the DreamMaker map editor to A) use a format more amenable to Git's conflict
+resolution and B) differ in the least amount textually from the previous
+version of the map while maintaining all the actual changes. It requires an old
+version of the map to use as a reference and a new version of the map which
+contains the desired changes.
+
Map Merge 2 adds multi-Z support, automatic handling of key overflow, better
+merge conflict prevention, and a real merge conflict resolver.
+
Code Structure
+
Frontend scripts are meant to be run directly. They obey the environment
+variables TGM to set whether files are saved in TGM (1) or DMM (0) format,
+and MAPROOT to determine where maps are kept. By default, TGM is used and
+the map root is autodetected. Each script may either prompt for the desired map
+or be run with command-line parameters indicating which maps to act on. The
+scripts include:
+
+
convert.py for converting maps to and from the TGM format. Used by
+tgm2dmm.bat and dmm2tgm.bat.
+
mapmerge.py for running the map merge on map backups saved by
+Prepare Maps.bat. Used by mapmerge.bat
+
+
Implementation modules:
+
+
dmm.py includes the map reader and writer.
+
mapmerge.py includes the implementation of the map merge operation.
+
frontend.py includes the common code for the frontend scripts.
+
+
precommit.py is run by the Git hooks if installed, and merges the new
+version of any map saved in the index (git added) with the old version stored
+in Git when run.
This is a remake of 2013 midi2piano tool.
+
+Requirements:
+ Python 3
+
+Simply run midi2piano.py and choose midi file you want to convert.
+The "sheet music" will be copied to the clipboard.
+
+There are some constants defined at the top of midi2piano.py.
+
+TICK_LAG - CHANGE THIS VALUE TO TICK LAG OF YOUR SERVER!
+
+Change their value if needed.
+
+LINE_LENGTH_LIM - max length of line allowed in the sheet music
+LINES_LIMIT - max amount of lines allowed in the sheet music. Extra lines will be cropped.
+
+OVERALL_IMPORT_LIM - max amount of characters allowed in the sheet music.
+
+
+You can also transpose music if you need to
+OCTAVE_TRANSPOSE - amount of octaves you melody will be shifted by
+FLOAT_PRECISION - read comment
+
+Additional notes:
+1. Unlike previous midi2piano, this tool optimizes sheet music to fit more in less lines.
+2. If two notes are less than 50 ms apart, they are chorded. BYOND works in 1/10th of a second so 50 ms is time quanta.
+4. MIDI event set_tempo is NOT supported. If your MIDI file uses set_tempo to change BPM significantly, consider using some other midi file.
+
+This tool is considered final.
+
+Made by EditorRUS/Delta Epsilon from Animus Station, ss13.ru
+Contact me in Discord if you find any major issues: DeltaEpsilon#7787```
+
The author or authors of this code dedicate any and all copyright interest in
+this code to the public domain. We make this dedication for the benefit of the
+public at large and to the detriment of our heirs and successors. We intend
+this dedication to be an overt act of relinquishment in perpetuity of all
+present and future rights to this code under copyright law.
+
returns if the turf has something dense inside it. if exclude_mobs is true, skips dense mobs like fat yoshi. if exclude_object is true, it will exclude the excluded_object you sent through
For seeing if we can actually move between 2 given turfs while accounting for our access and the caller's pass_flags
+
Arguments:
+
+
caller: The movable, if one exists, being used for mobility checks to see what tiles it can reach
+
ID: An ID card that decides if we can gain access to doors that would otherwise block a turf
+
simulated_only: Do we only worry about turfs with simulated atmos, most notably things that aren't space?
+
consider_pressure_difference
+
+
SPACEWIND
fromShuttleMove
+
+
Base procs
is_blocked_turf
+
+
returns if the turf has something dense inside it. if exclude_mobs is true, skips dense mobs like fat yoshi. if exclude_object is true, it will exclude the excluded_object you sent through
process_cell
+
+
SIMULATION
reachableAdjacentTurfs
+
+
Returns adjacent turfs to this turf that are reachable, in all cardinal directions
+
Arguments:
+
+
caller: The movable, if one exists, being used for mobility checks to see what tiles it can reach
+
ID: An ID card that decides if we can gain access to doors that would otherwise block a turf
+
simulated_only: Do we only worry about turfs with simulated atmos, most notably things that aren't space?
When a hulk manages to break a wall using their hulk smash, this deals back damage to the arm used.
+This is in its own proc just to be easily overridden by other wall types. Default allows for three
+smashed walls per arm. Also, we use CANT_WOUND here because wounds are random. Wounds are applied
+by hulk code based on arm damage and checked when we call break_an_arm().
+Arguments:
+*arg1 is the arm to deal damage to.
+*arg2 is the hulk
They show what's underneath their catwalk flooring (pipes and the like)
+you can crowbar it to interact with the underneath stuff without destroying the tile...
+unless you want to!
If mob is chosen, turns the person into a random animal type
+Once the spring is used, it cannot be used by the same mind ever again
+After usage, teleports the user back to a random safe turf (so mobs are not killed by ice moon atmosphere)