atom
The base type for nearly all physical objects in SS13
Lots and lots of functionality lives here, although in general we are striving to move as much as possible to the components/elements system
Vars | |
active_hud_list | all of this atom's HUD images which can actually be seen by players with that hud |
---|---|
ai_controller | AI controller that controls this atom. type on init, then turned into an instance during runtime |
article | If non-null, overrides a/an/some in all cases |
atom_colours | used to store the different colors on an atom |
atom_storage | the datum handler for our contents - see create_storage() for creation method |
base_icon_state | Used for changing icon states for different base sprites. |
base_pixel_w | Default pixel w shifting for the atom's icon. |
base_pixel_x | Default pixel x shifting for the atom's icon. |
base_pixel_y | Default pixel y shifting for the atom's icon. |
base_pixel_z | Default pixel z shifting for the atom's icon. |
bottom_left_corner | Smoothing variable |
bottom_right_corner | Smoothing variable |
buckle_message_cooldown | Cooldown tick timer for buckle messages |
canSmoothWith | List of smoothing groups this atom can smooth with. If this is null and atom is smooth, it smooths only with itself. Must be sorted. |
can_astar_pass | How this atom should react to having its astar blocking checked |
can_atmos_pass | Check if atmos can pass in this atom (ATMOS_PASS_YES, ATMOS_PASS_NO, ATMOS_PASS_DENSITY, ATMOS_PASS_PROC) |
chat_color | Last color calculated for the the chatmessage overlays |
chat_color_darkened | A luminescence-shifted value of the last color calculated for chatmessage overlays |
chat_color_name | Last name used to calculate a color for the chatmessage overlays |
custom_acid_overlay | The icon state intended to be used for the acid component. Used to override the default acid overlay icon state. |
custom_materials | 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. |
damage_deflection | Damage under this value will be completely ignored |
examine_thats | Text that appears preceding the name in /atom/proc/examine_title |
explosive_resistance | How much this atom resists explosions by, in the end |
fingerprintslast | Last fingerprints to touch this atom |
flags_1 | First atom flags var |
forensics | forensics datum, contains fingerprints, fibres, blood_dna and hiddenprints on this atom |
ghost_screentips | whether ghosts can see screentips on it |
greyscale_colors | A string of hex format colors to be used by greyscale sprites, ex: "#0054aa#badcff" |
greyscale_config | The config type to use for greyscaled sprites. Both this and greyscale_colors must be assigned to work. |
hud_list | all of this atom's HUD (med/sec, etc) images. Associative list of the form: list(hud category = hud image or images for that category). most of the time hud category is associated with a single image, sometimes its associated with a list of images. not every hud in this list is actually used. for ones available for others to see, look at active_hud_list. |
hud_possible | HUD images that this atom can provide. |
interaction_flags_atom | Intearaction flags |
interaction_flags_click | Flags to check for in can_perform_action. Used in alt-click & ctrl-click checks |
interaction_flags_mouse_drop | Flags to check for in can_perform_action for mouse drag & drop checks. To bypass checks see interaction_flags_atom mouse drop flags |
light | Our light source. Don't fuck with this directly unless you have a good reason! |
light_angle | Angle of light to show in light_dir 360 is a circle, 90 is a cone, etc. |
light_color | Hexadecimal RGB string representing the colour of the light. White by default. |
light_dir | What angle to project light in |
light_flags | Bitflags to determine lighting-related atom properties. |
light_height | How many tiles "up" this light is. 1 is typical, should only really change this if it's a floor light |
light_on | Boolean variable for toggleable lights. Has no effect without the proper light_system, light_range and light_power values. |
light_power | Intensity of the light. The stronger, the less shadows you will see on the lit area. |
light_range | Range of the light in tiles. Zero means no light. |
light_sources | Any light sources that are "inside" of us, for example, if src here was a mob that's carrying a flashlight, that flashlight's light source would be part of this list. |
light_system | Light systems, both shouldn't be active at the same time. |
managed_overlays | overlays managed by update_overlays to prevent removing overlays that weren't added by the same proc. Single items are stored on their own, not in a list. |
managed_vis_overlays | vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays. |
material_flags | Bitfield for how the atom handles materials. |
material_modifier | Modifier that raises/lowers the effect of the amount of a material, prevents small and easy to get items from being death machines. |
mergers | Holds merger groups currently active on the atom. Do not access directly, use GetMergeGroup() instead. |
orbit_target | Reference to atom being orbited |
orbiters | The orbiter component, if there's anything orbiting this atom |
pass_flags_self | pass_flags that we are. If any of this matches a pass_flag on a moving thing, by default, we let them through. |
rad_insulation | Radiation insulation types |
reagents | Reagents holder |
realized_overlays | List of overlay "keys" (info about the appearance) -> mutable versions of static appearances Drawn from the overlays list |
realized_underlays | List of underlay "keys" (info about the appearance) -> mutable versions of static appearances Drawn from the underlays list |
receive_ricochet_chance_mod | When a projectile tries to ricochet off this atom, the projectile ricochet chance is multiplied by this |
receive_ricochet_damage_coeff | When a projectile ricochets off this atom, it deals the normal damage * this modifier to this atom |
smoothing_flags | Icon-smoothing behavior. |
smoothing_groups | What smoothing groups does this atom belongs to, to match canSmoothWith. If null, nobody can smooth with it. Must be sorted. |
smoothing_junction | What directions this is currently smoothing with. IMPORTANT: This uses the smoothing direction flags as defined in icon_smoothing.dm, instead of the BYOND flags. |
top_left_corner | Smoothing variable |
top_right_corner | Smoothing variable |
update_on_z | Lazylist of all images (or atoms, I'm sorry) (hopefully attached to us) to update when we change z levels You will need to manage adding/removing from this yourself, but I'll do the updating for you |
update_overlays_on_z | Lazylist of all overlays attached to us to update when we change z levels You will need to manage adding/removing from this yourself, but I'll do the updating for you Oh and note, if order of addition is important this WILL break that. so mind yourself |
uses_integrity | any atom that uses integrity and can be damaged must set this to true, otherwise the integrity procs will throw an error |
Procs | |
AllowDrop | Are you allowed to drop this atom |
Beam | This is what you use to start a beam. Example: origin.Beam(target, args). Store the return of this proc if you don't set maxdist or time, you need it to delete the beam. |
CanAStarPass | This proc is used for telling whether something can pass by this atom in a given direction, for use by the pathfinding system. |
CanAllowThrough | Returns true or false to allow the mover to move through src |
CanPass | Whether the mover object can avoid being blocked by this atom, while arriving from (or leaving through) the border_dir. |
CanReach | A backwards depth-limited breadth-first-search to see if the target is logically "in" anything adjacent to us. |
CheckParts | Ensure a list of atoms/reagents exists inside this atom |
Click | Before anything else, defer these calls to a per-mobtype handler. This allows us to remove istype() spaghetti code, but requires the addition of other handler procs to simplify it. |
Destroy | Top level of the destroy chain for most atoms |
Entered | An atom has entered this atom's contents |
Exit | An atom is attempting to exit this atom's contents |
Exited | An atom has exited this atom's contents |
GetMergeGroup | Gets a merger datum representing the connected blob of objects in the allowed_types argument |
HasProximity | Is this atom within 1 tile of another atom |
Initialize | The primary method that objects are setup in SS13 with |
IsObscured | Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it |
LateInitialize | Late Initialization, for code that should run after all atoms have run Initialization |
New | Called when an atom is created in byond (built in engine proc) |
RemoveInvisibility | Removes the specified invisibility source from the tracker |
SetInvisibility | Sets invisibility according to priority. If you want to be able to undo the value you set back to what it would be otherwise, you should provide an id here and remove it using RemoveInvisibility(id) |
Shake | Perform a shake on an atom, resets its position afterwards |
ShowProcessingGui | Creates the radial and processes the selected option |
SpinAnimation | Proc called when you want the atom to spin around the center of its icon (or where it would be if its transform var is translated) By default, it makes the atom spin forever and ever at a speed of 60 rpm. |
Topic | Passes Stat Browser Panel clicks to the game and calls client click on an atom |
_Click | stupid workaround for byond not recognizing the /atom/Click typepath for the queued click callbacks |
acid_act | Respond to acid being used on our atom |
add_atom_colour | Adds an instance of colour_type to the atom's atom_colours list |
add_blood_DNA | Adds blood dna to the atom |
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. |
add_fiber_list | Add a list of fibers to the atom |
add_fibers | Adds a single fiber to the atom |
add_fingerprint | Adds a single fingerprint to the atom |
add_fingerprint_list | Adds a list of fingerprints to the atom |
add_hiddenprint | Adds a single hiddenprint to the atom |
add_hiddenprint_list | Adds a list of hiddenprints to the atom |
add_mob_blood | to add blood from a mob onto something, and transfer their dna info |
analyzer_act | Called on an object when a tool with analyzer capabilities is used to left click an object |
analyzer_act_secondary | Called on an object when a tool with analyzer capabilities is used to right click an object |
animate_atom_living | proc to animate the target into a living creature |
apply_main_material_effects | A proc for material effects that only the main material (which the atom's primarly composed of) should apply. |
apply_material_effects | proc responsible for applying material effects when setting materials. |
apply_single_mat_effect | Apply material effects of a single material. |
assume_air | Take air from the passed in gas mixture datum |
atmos_conditions_changed | Run when you update the conditions in which an /atom might want to start reacting to its turf's air |
atmos_end | What to do when our requirements are no longer met |
atmos_expose | This is your process() proc |
atom_break | Called after the atom takes damage and integrity is below integrity_failure level |
atom_destruction | what happens when the atom's integrity reaches zero. |
atom_fix | Called when integrity is repaired above the breaking point having been broken before |
attack_ai_secondary | What happens when the AI holds right-click on an item. Returns a SECONDARY_ATTACK_* value. |
attack_alien_secondary | Called when an alien right clicks an atom. Returns a SECONDARY_ATTACK_* value. |
attack_animal | Called when a simple animal is unarmed attacking / clicking on this atom. |
attack_animal_secondary | Called when a simple animal or basic mob right clicks an atom. Returns a SECONDARY_ATTACK_* value. |
attack_basic_mob | When a basic mob attacks something, either by AI or user. |
attack_drone | Defaults to attack_hand. Override it when you don't want drones to do same stuff as humans. |
attack_drone_secondary | Called when a maintenance drone right clicks an atom. Defaults to attack_hand_secondary. When overriding it, remember that it ought to return a SECONDARY_ATTACK_* value. |
attack_hand | Return TRUE to cancel other attack hand effects that respect it. Modifiers is the assoc list for click info such as if it was a right click. |
attack_hand_secondary | When the user uses their hand on an item while holding right-click Returns a SECONDARY_ATTACK_* value. |
attack_hulk | This atom has been hit by a hulkified mob in hulk mode (user) |
attack_larva_secondary | Called when an alien larva right clicks an atom. Returns a SECONDARY_ATTACK_* value. |
attack_pai_secondary | Called when a pAI right clicks an atom. Returns a SECONDARY_ATTACK_* value. |
attack_paw | Attacked by monkey. It doesn't need its own *_secondary proc as it just uses attack_hand_secondary instead. |
attack_robot | What happens when the cyborg holds left-click on an item. |
attack_robot_secondary | What happens when the cyborg without active module holds right-click on an item. Returns a SECONDARY_ATTACK_* value. |
attack_self_tk | Telekinesis item attack_self act. |
attack_tk | Telekinesis attack act, happens when the TK user clicks on a non-adjacent target in range. |
attackby | Called on an object being hit by an item |
attackby_secondary | Called on an object being right-clicked on by an item |
attacked_by | Called from /obj/item/proc/attack_atom and /obj/item/proc/attack if the attack succeeds |
attempt_charge | Used to attempt to charge an object with a payment component. |
audible_message | Show a message to all mobs in earshot of this atom |
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. |
base_item_interaction | |
base_mouse_drop_handler | Called when all sanity checks for mouse dropping have passed. Handles adjacency & other sanity checks before delegating the event down to lower level handlers. Do not override unless you are trying to create hud & screen elements which do not require proximity or other checks |
base_ranged_item_interaction | |
bitmask_smooth | Basic smoothing proc. The atom checks for adjacent directions to smooth with and changes the icon_state based on that. |
blob_act | React to a hit by a blob objecd |
bullet_act | React to a hit by a projectile object |
calculate_adjacencies | Scans all adjacent turfs to find targets to smooth with. |
change_material_modifier | Remove the old effects, change the material_modifier variable, and then reapply all the effects. |
check_projectile_armor | A cut-out proc for /atom/proc/bullet_act so living mobs can have their own armor behavior checks without causing issues with needing their own on_hit call |
click_alt | |
click_alt_secondary | |
click_ctrl | |
click_ctrl_shift | |
clone_storage | A quick and easy way to /clone/ a storage datum for an atom (does not copy over contents, only the datum details) |
connect_to_shuttle | Connect this atom to a shuttle |
container_resist_act | Called when something resists while this atom is its loc |
contains | Returns true if the src countain the atom target |
contents_explosion | Handle what happens when your contents are exploded by a bomb |
create_digital_aura | Creates a digital effect around the target |
create_reagents | Convenience proc to create a reagents holder for an atom |
create_storage | A quick and easy way to create a storage datum for an atom |
crowbar_act | Called on an object when a tool with crowbar capabilities is used to left click an object |
crowbar_act_secondary | Called on an object when a tool with crowbar capabilities is used to right click an object |
debug | Sets up this light source to be debugged, setting up in world buttons to control and move it Also freezes it, so it can't change in future |
do_alert_animation | Does the MGS ! animation |
do_spin_animation | Animates source spinning around itself. For docmentation on the args, check atom/proc/SpinAnimation() |
drop_location | Where atoms should drop if taken from this atom |
emag_act | Respond to an emag being used on our atom |
emp_act | React to an EMP of the given severity |
ex_act | React to being hit by an explosion |
examine | Called when a mob examines this atom: /mob/verb/examinate |
examine_descriptor | What this atom should be called in examine tags |
examine_more | Called when a mob examines (shift click or verb) this atom twice (or more) within EXAMINE_MORE_WINDOW (default 1 second) |
examine_post_descriptor | Returns a list of strings to be displayed after the descriptor |
examine_tags | A list of "tags" displayed after atom's description in examine. This should return an assoc list of tags -> tooltips for them. If item is null, then no tooltip is assigned. |
examine_title | Formats the atom's name into a string for use in examine (as the "title" of the atom) |
expose_reagents | |
extinguish | Sends COMSIG_ATOM_EXTINGUISH signal, which properly removes burning component if it is present. |
finalize_material_effects | Called by apply_material_effects(). It ACTUALLY handles applying effects common to all atoms (depending on material flags) |
finalize_remove_material_effects | Called by remove_material_effects(). It ACTUALLY handles removing effects common to all atoms (depending on material flags) |
find_all_cells_containing | debug proc for checking if a movable is in multiple cells when it shouldnt be (ie always unless multitile entering is implemented) |
find_grid_statistics_for_z_level | debug proc for finding how full the cells of src's z level are |
find_type_in_direction | Scans direction to find targets to smooth with. |
fire_act | Respond to fire being used on our atom |
fire_projectile | Fire a projectile from this atom at another atom |
flick_overlay | Flicks a certain overlay onto an atom, handling icon_state strings |
flick_overlay_static | Flickers an overlay on an atom |
flick_overlay_view | Takes the passed in MA/icon_state, mirrors it onto ourselves, and displays that in world for duration seconds Returns the displayed object, you can animate it and all, but you don't own it, we'll delete it after the duration |
gather_material_color | A proc used by both finalize_material_effects() and finalize_remove_material_effects() to get the colors that will later be applied to or removed from the atom |
get_all_contents | Returns the src and all recursive contents as a list. |
get_all_contents_ignoring | Like get_all_contents_type, but uses a typecache list as argument |
get_all_contents_skipping_traits | Returns the src and all recursive contents, but skipping going any deeper if an atom has a specific trait. |
get_all_contents_type | identical to get_all_contents but returns a list of atoms of the type passed in the argument. |
get_all_orbiters | Recursive getter method to return a list of all ghosts orbitting this atom |
get_armor | Get the atom's armor reference |
get_armor_rating | Helper to get a specific rating for the atom's armor |
get_custom_material_amount | Gets the total amount of materials in this atom. |
get_digital_overlays | Returns a list of overlays to be used for the digital effect |
get_dumping_location | If someone's trying to dump items onto our atom, where should they be dumped to? |
get_examine_icon | Icon displayed in examine |
get_examine_name | Get the name of this object for examine |
get_id_examine_strings | Returns an extended list of examine strings for any contained ID cards. |
get_integrity | This mostly exists to keep atom_integrity private. Might be useful in the future. |
get_integrity_percentage | Similar to get_integrity, but returns the percentage as [0-1] instead. |
get_master_material | Gets the most common material in the object. |
get_material_composition | Returns the material composition of the atom. |
get_material_english_list | Returns a string like "plasma, paper and glass" from a list of materials |
get_material_greyscale_config | Searches for a subtype of config_type that is to be used in its place for specific materials (like shimmering gold for cleric maces) |
get_material_multiplier | A proc that can be used to selectively control the stat changes and effects from a material without affecting the others. |
get_material_prefixes | Returns the prefixes to attach to the atom when setting materials, from a list argument. |
get_name_chaser | Used to insert text after the name but before the description in examine() |
get_oversized_icon_offsets | Returns an x and y value require to reverse the transformations made to center an oversized icon |
get_remote_view_fullscreens | the vision impairment to give to the mob whose perspective is set to that atom |
get_save_vars | |
get_visible_name | Used by mobs to determine the name for someone wearing a mask, or with a disfigured or missing face. By default just returns the atom's name. add_id_name will control whether or not we append "(as [id_name])". force_real_name will always return real_name and add (as face_name/id_name) if it doesn't match their appearance |
handle_basic_attack | This exists so stuff can override the default call of attack_animal for attack_basic_mob Remove this when simple animals are removed and everything can be handled on attack basic mob. |
handle_fall | Used for making a sound when a mob involuntarily falls into the ground. |
handle_slip | Handle the atom being slipped over |
has_gravity | Returns true if this atom has gravity for the passed in turf |
has_material_category | Fetches a list of all of the materials this object has with the desired material category. |
has_material_type | Fetches a list of all of the materials this object has of the desired type. Returns null if there is no valid materials of the type |
hitby | React to being hit by a thrown object |
hitby_react | We have have actually hit the passed in atom |
hulk_damage | Called to get the damage that hulks will deal to the atom. |
in_contents_of | Return true if we're inside the passed in atom |
initialize_materials | The second part of set_custom_materials(), which handles applying the new materials It is a separate proc because Initialize calls may make use of this since they should've no prior materials to remove. |
is_atom_colour | Checks if this atom has the passed color Can optionally be supplied with a range of priorities, IE only checking "washable" or above |
is_drainable | Is this atom drainable of reagents |
is_drawable | Can we draw from this atom with an injectable atom |
is_injectable | Is this atom injectable into other atoms |
is_open_container | Convenience proc to see if a container is open for chemistry handling |
is_refillable | Can this atoms reagents be refilled |
isinspace | Is this atom in space |
item_interaction | Called when this atom has an item used on it. IE, a mob is clicking on this atom with an item. |
item_interaction_secondary | Called when this atom has an item used on it WITH RIGHT CLICK, IE, a mob is right clicking on this atom with an item. Default behavior has it run the same code as left click. |
log_message | Generic logging helper |
log_talk | Helper for logging chat messages or other logs with arbitrary inputs (e.g. announcements) |
makeHologram | Makes this atom look like a "hologram" So transparent, blue, with a scanline and an emissive glow This is acomplished using a combination of filters and render steps/overlays The degree of the opacity is optional, based off the opacity arg (0 -> 1) |
manual_emote | Allows the intrepid coder to send a basic emote Takes text as input, sends it out to those who need to know after some light parsing If you need something more complex, make it into a datum emote Arguments: |
mech_melee_attack | |
mix_material_colors | Manages mixing, adding or removing the material colors from the atom in absence of the MATERIAL_GREYSCALE flag. |
modify_max_integrity | changes max_integrity while retaining current health percentage, returns TRUE if the atom got broken. |
mouse_drop_dragged | The proc that should be overridden by subtypes to handle mouse drop. Called on the atom being dragged |
mouse_drop_receive | The proc that should be overridden by subtypes to handle mouse drop. Called on the atom receiving a dragged object |
multitool_act | Called on an object when a tool with multitool capabilities is used to left click an object |
multitool_act_secondary | Called on an object when a tool with multitool capabilities is used to right click an object |
narsie_act | Respond to narsie eating our atom |
ninjadrain_act | Atom level proc for space ninja's glove interactions. |
onAwayMission | Is the atom in an away mission |
onCentCom | Is this atom currently located on centcom (or riding off into the sunset on a shuttle) |
onSyndieBase | Is the atom in any of the syndicate areas |
on_escaped_shuttle | Checks that we're on a shuttle that's escaped |
on_log | Called when the atom log's in or out |
on_mouse_enter | Fired whenever this atom is the most recent to be hovered over in the tick.
Preferred over MouseEntered if you do not need information such as the position of the mouse.
Especially because this is deferred over a tick, do not trust that client is not null. |
on_saboteur | Override on subtype to add behaviour. Whatever happens when we are sabotaged |
on_update_integrity | Handle updates to your atom's integrity |
play_attack_sound | the sound played when the atom is damaged. |
prepare_huds | Prepare the huds for this atom |
propagate_radiation_pulse | A common proc used to send COMSIG_ATOM_PROPAGATE_RAD_PULSE to adjacent atoms Only used for uranium (false/tram)walls to spread their radiation pulses |
ranged_item_interaction | Called when this atom has an item used on it from a distance. IE, a mob is clicking on this atom with an item and is not adjacent. |
ranged_item_interaction_secondary | Called when this atom has an item used on it from a distance WITH RIGHT CLICK, IE, a mob is right clicking on this atom with an item and is not adjacent. |
rcd_act | Respond to an RCD acting on our item |
rcd_vals | Return the values you get when an RCD eats you? |
realize_overlays | Takes the atoms's existing overlays and underlays, and makes them mutable so they can be properly vv'd in the realized_overlays/underlays list |
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. |
relaydrive | A special case of relaymove() in which the person relaying the move may be "driving" this atom |
relaymove | An atom we are buckled or is contained within us has tried to move |
remove_air | Remove air from this atom |
remove_atom_colour | Removes an instance of colour_type from the atom's atom_colours list |
remove_digital_aura | Removes the digital effect around the target |
remove_main_material_effects | A proc to remove the material effects previously applied by the (ex-)main material |
remove_material_effects | Proc responsible for removing material effects when setting materials. |
remove_single_mat_effect | Remove material effects of a single material. |
repair_damage | Proc for recovering atom_integrity. Returns the amount repaired by |
replace_smooth_overlays | Internal: Takes icon states as text to replace smoothing corner overlays |
return_air | Return the current air environment in this atom |
return_analyzable_air | Return the air if we can analyze it |
return_temperature | Return atom temperature |
run_atom_armor | returns the damage value of the attack after processing the atom's various armor protections |
runechat_prefs_check | Returns the client runechat visible messages preference according to the message type. |
rust_heretic_act | Causes effects when the atom gets hit by a rust effect from heretics |
screwdriver_act | Called on an object when a tool with screwdriver capabilities is used to left click an object |
screwdriver_act_secondary | Called on an object when a tool with screwdriver capabilities is used to right click an object |
setClosed | Used to set something as 'closed' if it's being used as a supplypod |
setDir | Hook for running code when a dir change occurs |
setOpened | Used to set something as 'open' if it's being used as a supplypod |
set_armor | Sets the armor of this atom to the specified armor |
set_armor_rating | Helper to update the atom's armor to a new armor with the specified rating |
set_base_pixel_x | Setter for the base_pixel_x variable to append behavior related to its changing. |
set_base_pixel_y | Setter for the base_pixel_y variable to append behavior related to its changing. |
set_custom_materials | Sets the custom materials for an atom. This is what you want to call, since most of the ones below are mainly internal. |
set_density | Setter for the density variable to append behavior related to its changing. |
set_greyscale | Handles updates to greyscale value updates. The colors argument can be either a list or the full color string. Child procs should call parent last so the update happens after all changes. |
set_hud_image_active | set every hud image in the given category active so other people with the given hud can see it. Arguments: |
set_hud_image_inactive | sets every hud image in the given category inactive so no one can see it |
set_light_angle | Setter for the light angle of this atom |
set_light_color | Setter for the light color of this atom. |
set_light_dir | Setter for the light direction of this atom |
set_light_flags | Setter for the light flags of this atom. |
set_light_height | Setter for the height of our light |
set_light_on | Setter for whether or not this atom's light is on. |
set_light_power | Setter for the light power of this atom. |
set_light_range | Setter for the light range of this atom. |
set_opacity | Updates the atom's opacity value. |
set_smoothed_icon_state | Changes the icon state based on the new junction bitmask |
set_wires | Sets the wire datum of an atom |
should_atmos_process | We use this proc to check if we should start processing an item, or continue processing it. Returns true/false as expected |
shuttleRotate | Base proc |
singularity_act | Respond to the singularity eating this atom |
singularity_pull | Respond to the singularity pulling on us |
smooth_icon | do not use, use QUEUE_SMOOTH(atom) |
spasm_animation | Similar to shake but more spasm-y and jerk-y |
take_damage | The essential proc to call when an atom must receive damage of any kind. |
tamed | Called after the atom is 'tamed' for type-specific operations, Usually called by the tameable component but also other things. |
toggle_material_flags | For enabling and disabling material effects from an item (mainly VV) |
tool_act | |
transfer_mob_blood_dna | to add a mob's dna info into an object's blood_dna list. |
undebug | Disables light debugging, so you can let a scene fall to what it visually should be, or just fix admin fuckups |
update_appearance | Updates the appearence of the icon |
update_atom_colour | Resets the atom's color to null, and then sets it to the highest priority colour available |
update_desc | Updates the description of the atom |
update_greyscale | Checks if this atom uses the GAGS system and if so updates the icon |
update_icon | Updates the icon of the atom |
update_icon_state | Updates the icon state of the atom |
update_inhand_icon | Checks the atom's loc and calls update_held_items on it if it is a mob. |
update_integrity | Handles the integrity of an atom changing. This must be called instead of changing integrity directly. |
update_light | Will update the light (duh). Creates or destroys it if needed, makes it update values, makes sure it's got the correct source turf... |
update_name | Updates the name of the atom |
update_overlays | Updates the overlays of the atom |
update_remote_sight | the sight changes to give to the mob whose perspective is set to that atom |
visible_message | Generate a visible message from this atom |
vv_edit_var | call back when a var is edited on this atom |
vv_get_dropdown | Return the markup to for the dropdown list for the VV panel for this atom |
wash | Wash this atom |
welder_act | Called on an object when a tool with welder capabilities is used to left click an object |
welder_act_secondary | Called on an object when a tool with welder capabilities is used to right click an object |
wirecutter_act | Called on an object when a tool with wirecutter capabilities is used to left click an object |
wirecutter_act_secondary | Called on an object when a tool with wirecutter capabilities is used to right click an object |
wrench_act | Called on an object when a tool with wrench capabilities is used to left click an object |
wrench_act_secondary | Called on an object when a tool with wrench capabilities is used to right click an object |
zap_act | Respond to an electric bolt action on our item |
Var Details
active_hud_list
all of this atom's HUD images which can actually be seen by players with that hud
ai_controller
AI controller that controls this atom. type on init, then turned into an instance during runtime
article
If non-null, overrides a/an/some in all cases
atom_colours
used to store the different colors on an atom
its inherent color, the colored paint applied on it, special color effect etc...
atom_storage
the datum handler for our contents - see create_storage() for creation method
base_icon_state
Used for changing icon states for different base sprites.
base_pixel_w
Default pixel w shifting for the atom's icon.
base_pixel_x
Default pixel x shifting for the atom's icon.
base_pixel_y
Default pixel y shifting for the atom's icon.
base_pixel_z
Default pixel z shifting for the atom's icon.
bottom_left_corner
Smoothing variable
bottom_right_corner
Smoothing variable
buckle_message_cooldown
Cooldown tick timer for buckle messages
canSmoothWith
List of smoothing groups this atom can smooth with. If this is null and atom is smooth, it smooths only with itself. Must be sorted.
can_astar_pass
How this atom should react to having its astar blocking checked
can_atmos_pass
Check if atmos can pass in this atom (ATMOS_PASS_YES, ATMOS_PASS_NO, ATMOS_PASS_DENSITY, ATMOS_PASS_PROC)
chat_color
Last color calculated for the the chatmessage overlays
chat_color_darkened
A luminescence-shifted value of the last color calculated for chatmessage overlays
chat_color_name
Last name used to calculate a color for the chatmessage overlays
custom_acid_overlay
The icon state intended to be used for the acid component. Used to override the default acid overlay icon state.
custom_materials
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.
damage_deflection
Damage under this value will be completely ignored
examine_thats
Text that appears preceding the name in /atom/proc/examine_title
explosive_resistance
How much this atom resists explosions by, in the end
fingerprintslast
Last fingerprints to touch this atom
flags_1
First atom flags var
forensics
forensics datum, contains fingerprints, fibres, blood_dna and hiddenprints on this atom
ghost_screentips
whether ghosts can see screentips on it
greyscale_colors
A string of hex format colors to be used by greyscale sprites, ex: "#0054aa#badcff"
greyscale_config
The config type to use for greyscaled sprites. Both this and greyscale_colors must be assigned to work.
hud_list
all of this atom's HUD (med/sec, etc) images. Associative list of the form: list(hud category = hud image or images for that category). most of the time hud category is associated with a single image, sometimes its associated with a list of images. not every hud in this list is actually used. for ones available for others to see, look at active_hud_list.
hud_possible
HUD images that this atom can provide.
interaction_flags_atom
Intearaction flags
interaction_flags_click
Flags to check for in can_perform_action. Used in alt-click & ctrl-click checks
interaction_flags_mouse_drop
Flags to check for in can_perform_action for mouse drag & drop checks. To bypass checks see interaction_flags_atom mouse drop flags
light
Our light source. Don't fuck with this directly unless you have a good reason!
light_angle
Angle of light to show in light_dir 360 is a circle, 90 is a cone, etc.
light_color
Hexadecimal RGB string representing the colour of the light. White by default.
light_dir
What angle to project light in
light_flags
Bitflags to determine lighting-related atom properties.
light_height
How many tiles "up" this light is. 1 is typical, should only really change this if it's a floor light
light_on
Boolean variable for toggleable lights. Has no effect without the proper light_system, light_range and light_power values.
light_power
Intensity of the light. The stronger, the less shadows you will see on the lit area.
light_range
Range of the light in tiles. Zero means no light.
light_sources
Any light sources that are "inside" of us, for example, if src here was a mob that's carrying a flashlight, that flashlight's light source would be part of this list.
light_system
Light systems, both shouldn't be active at the same time.
managed_overlays
overlays managed by update_overlays to prevent removing overlays that weren't added by the same proc. Single items are stored on their own, not in a list.
managed_vis_overlays
vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays.
material_flags
Bitfield for how the atom handles materials.
material_modifier
Modifier that raises/lowers the effect of the amount of a material, prevents small and easy to get items from being death machines.
mergers
Holds merger groups currently active on the atom. Do not access directly, use GetMergeGroup() instead.
orbit_target
Reference to atom being orbited
orbiters
The orbiter component, if there's anything orbiting this atom
pass_flags_self
pass_flags that we are. If any of this matches a pass_flag on a moving thing, by default, we let them through.
rad_insulation
Radiation insulation types
reagents
Reagents holder
realized_overlays
List of overlay "keys" (info about the appearance) -> mutable versions of static appearances Drawn from the overlays list
realized_underlays
List of underlay "keys" (info about the appearance) -> mutable versions of static appearances Drawn from the underlays list
receive_ricochet_chance_mod
When a projectile tries to ricochet off this atom, the projectile ricochet chance is multiplied by this
receive_ricochet_damage_coeff
When a projectile ricochets off this atom, it deals the normal damage * this modifier to this atom
smoothing_flags
Icon-smoothing behavior.
smoothing_groups
What smoothing groups does this atom belongs to, to match canSmoothWith. If null, nobody can smooth with it. Must be sorted.
smoothing_junction
What directions this is currently smoothing with. IMPORTANT: This uses the smoothing direction flags as defined in icon_smoothing.dm, instead of the BYOND flags.
top_left_corner
Smoothing variable
top_right_corner
Smoothing variable
update_on_z
Lazylist of all images (or atoms, I'm sorry) (hopefully attached to us) to update when we change z levels You will need to manage adding/removing from this yourself, but I'll do the updating for you
update_overlays_on_z
Lazylist of all overlays attached to us to update when we change z levels You will need to manage adding/removing from this yourself, but I'll do the updating for you Oh and note, if order of addition is important this WILL break that. so mind yourself
uses_integrity
any atom that uses integrity and can be damaged must set this to true, otherwise the integrity procs will throw an error
Proc Details
AllowDrop
Are you allowed to drop this atom
Beam
This is what you use to start a beam. Example: origin.Beam(target, args). Store the return of this proc if you don't set maxdist or time, you need it to delete the beam.
Unless you're making a custom beam effect (see the beam_type argument), you won't actually have to mess with any other procs. Make sure you store the return of this Proc, you'll need it to kill the beam. Arguments: BeamTarget: Where you're beaming from. Where do you get origin? You didn't read the docs, fuck you. icon_state: What the beam's icon_state is. The datum effect isn't the ebeam object, it doesn't hold any icon and isn't type dependent. icon: What the beam's icon file is. Don't change this, man. All beam icons should be in beam.dmi anyways. maxdistance: how far the beam will go before stopping itself. Used mainly for two things: preventing lag if the beam may go in that direction and setting a range to abilities that use beams. beam_type: The type of your custom beam. This is for adding other wacky stuff for your beam only. Most likely, you won't (and shouldn't) change it.
CanAStarPass
This proc is used for telling whether something can pass by this atom 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.
For turfs this will only be used if pathing_pass_method is TURF_PATHING_PASS_PROC
Arguments:
- to_dir - What direction we're trying to move in, relevant for things like directional windows that only block movement in certain directions
- pass_info - Datum that stores info about the thing that's trying to pass us
IMPORTANT NOTE: /turf/proc/LinkBlockedWithAccess assumes that overrides of CanAStarPass will always return true if density is FALSE If this is NOT you, ensure you edit your can_astar_pass variable. Check __DEFINES/path.dm
CanAllowThrough
Returns true or false to allow the mover to move through src
CanPass
Whether the mover object can avoid being blocked by this atom, while arriving from (or leaving through) the border_dir.
CanReach
A backwards depth-limited breadth-first-search to see if the target is logically "in" anything adjacent to us.
CheckParts
Ensure a list of atoms/reagents exists inside this atom
Goes throught he list of passed in parts, if they're reagents, adds them to our reagent holder creating the reagent holder if it exists.
If the part is a moveable atom and the previous location of the item was a mob/living, it calls the inventory handler transferItemToLoc for that mob/living and transfers the part to this atom
Otherwise it simply forceMoves the atom into this atom
Click
Before anything else, defer these calls to a per-mobtype handler. This allows us to remove istype() spaghetti code, but requires the addition of other handler procs to simplify it.
Alternately, you could hardcode every mob's variation in a flat /mob/proc/ClickOn proc; however, that's a lot of code duplication and is hard to maintain.
Note that this proc can be overridden, and is in the case of screen objects.
Destroy
Top level of the destroy chain for most atoms
Cleans up the following:
- 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
Entered
An atom has entered this atom's contents
Default behaviour is to send the COMSIG_ATOM_ENTERED
Exit
An atom is attempting to exit this atom's contents
Default behaviour is to send the COMSIG_ATOM_EXIT
Exited
An atom has exited this atom's contents
Default behaviour is to send the COMSIG_ATOM_EXITED
GetMergeGroup
Gets a merger datum representing the connected blob of objects in the allowed_types argument
HasProximity
Is this atom within 1 tile of another atom
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 initialization in the base atom/New(), After the map has loaded, then Initialize is called on all atoms one by one. NB: this is also true for loading map templates as well, so they don't Initialize 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 initialized during the Atom subsystem initialization, 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 initialized then it's false.
The mapload argument occupies the same position as loc when Initialize() is called by New(). loc will no longer be needed after it passed New(), and thus it is being overwritten with mapload at the end of atom/New() before this proc (atom/Initialize()) is called.
You must always call the parent of this proc, otherwise failures will occur as the item will not be seen as initialized (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
Must return an initialization hint or a runtime will occur.
Note: the following functions don't call the base for optimization and must copypasta handling:
IsObscured
Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it
LateInitialize
Late Initialization, for code that should run after all atoms have run Initialization
To have your LateIntialize proc be called, your atoms Initialization proc must return the hint INITIALIZE_HINT_LATELOAD otherwise it 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 Initialization 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 Initialization proc, mostly we run the preloader if the preloader is being used and then call InitAtom of which the ultimate result is that the Initialize proc is called.
RemoveInvisibility
Removes the specified invisibility source from the tracker
SetInvisibility
Sets invisibility according to priority. If you want to be able to undo the value you set back to what it would be otherwise, you should provide an id here and remove it using RemoveInvisibility(id)
Shake
Perform a shake on an atom, resets its position afterwards
ShowProcessingGui
Creates the radial and processes the selected option
SpinAnimation
Proc called when you want the atom to spin around the center of its icon (or where it would be if its transform var is translated) By default, it makes the atom spin forever and ever at a speed of 60 rpm.
Arguments:
- speed: how much it takes for the atom to complete one 360° rotation
- loops: how many times do we want the atom to rotate
- clockwise: whether the atom ought to spin clockwise or counter-clockwise
- segments: in how many animate calls the rotation is split. Probably unnecessary, but you shouldn't set it lower than 3 anyway.
- parallel: whether the animation calls have the ANIMATION_PARALLEL flag, necessary for it to run alongside concurrent animations.
Topic
Passes Stat Browser Panel clicks to the game and calls client click on an atom
_Click
stupid workaround for byond not recognizing the /atom/Click typepath for the queued click callbacks
acid_act
Respond to acid being used on our atom
Default behaviour is to send COMSIG_ATOM_ACID_ACT and return
add_atom_colour
Adds an instance of colour_type to the atom's atom_colours list
add_blood_DNA
Adds blood dna to the atom
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.
add_fiber_list
Add a list of fibers to the atom
add_fibers
Adds a single fiber to the atom
add_fingerprint
Adds a single fingerprint to the atom
add_fingerprint_list
Adds a list of fingerprints to the atom
add_hiddenprint
Adds a single hiddenprint to the atom
add_hiddenprint_list
Adds a list of hiddenprints to the atom
add_mob_blood
to add blood from a mob onto something, and transfer their dna info
analyzer_act
Called on an object when a tool with analyzer capabilities is used to left click an object
analyzer_act_secondary
Called on an object when a tool with analyzer capabilities is used to right click an object
animate_atom_living
proc to animate the target into a living creature
apply_main_material_effects
A proc for material effects that only the main material (which the atom's primarly composed of) should apply.
apply_material_effects
proc responsible for applying material effects when setting materials.
apply_single_mat_effect
Apply material effects of a single material.
assume_air
Take air from the passed in gas mixture datum
atmos_conditions_changed
Run when you update the conditions in which an /atom might want to start reacting to its turf's air
atmos_end
What to do when our requirements are no longer met
atmos_expose
This is your process() proc
atom_break
Called after the atom takes damage and integrity is below integrity_failure level
atom_destruction
what happens when the atom's integrity reaches zero.
atom_fix
Called when integrity is repaired above the breaking point having been broken before
attack_ai_secondary
What happens when the AI holds right-click on an item. Returns a SECONDARY_ATTACK_* value.
Arguments:
- user The mob holding the right click
- modifiers The list of the custom click modifiers
attack_alien_secondary
Called when an alien right clicks an atom. Returns a SECONDARY_ATTACK_* value.
attack_animal
Called when a simple animal is unarmed attacking / clicking on this atom.
attack_animal_secondary
Called when a simple animal or basic mob right clicks an atom. Returns a SECONDARY_ATTACK_* value.
attack_basic_mob
When a basic mob attacks something, either by AI or user.
attack_drone
Defaults to attack_hand. Override it when you don't want drones to do same stuff as humans.
attack_drone_secondary
Called when a maintenance drone right clicks an atom. Defaults to attack_hand_secondary. When overriding it, remember that it ought to return a SECONDARY_ATTACK_* value.
attack_hand
Return TRUE to cancel other attack hand effects that respect it. Modifiers is the assoc list for click info such as if it was a right click.
attack_hand_secondary
When the user uses their hand on an item while holding right-click Returns a SECONDARY_ATTACK_* value.
attack_hulk
This atom has been hit by a hulkified mob in hulk mode (user)
attack_larva_secondary
Called when an alien larva right clicks an atom. Returns a SECONDARY_ATTACK_* value.
attack_pai_secondary
Called when a pAI right clicks an atom. Returns a SECONDARY_ATTACK_* value.
attack_paw
Attacked by monkey. It doesn't need its own *_secondary proc as it just uses attack_hand_secondary instead.
attack_robot
What happens when the cyborg holds left-click on an item.
Arguments:
- user The mob holding the right click
- modifiers The list of the custom click modifiers
attack_robot_secondary
What happens when the cyborg without active module holds right-click on an item. Returns a SECONDARY_ATTACK_* value.
Arguments:
- user The mob holding the right click
- modifiers The list of the custom click modifiers
attack_self_tk
Telekinesis item attack_self act.
- This is similar to item attack_self, but applies to anything that you can grab with a telekinetic grab.
- It is used for manipulating things at range, for example, opening and closing closets..
- Defined at the
/atom
level but only used at the/obj/item
one. - Returns
COMPONENT_CANCEL_ATTACK_CHAIN
when it performs any action, to further acts on the attack chain.
attack_tk
Telekinesis attack act, happens when the TK user clicks on a non-adjacent target in range.
- By default, emulates the user's unarmed attack.
- Called indirectly by the
COMSIG_MOB_ATTACK_RANGED
signal. - Returns
COMPONENT_CANCEL_ATTACK_CHAIN
when it performs any action, to further acts on the attack chain.
attackby
Called on an object being hit by an item
Arguments:
- obj/item/attacking_item - The item hitting this atom
- mob/user - The wielder of this item
- params - click params such as alt/shift etc
See: /obj/item/proc/melee_attack_chain
attackby_secondary
Called on an object being right-clicked on by an item
Arguments:
- obj/item/weapon - The item hitting this atom
- mob/user - The wielder of this item
- params - click params such as alt/shift etc
See: /obj/item/proc/melee_attack_chain
attacked_by
Called from /obj/item/proc/attack_atom and /obj/item/proc/attack if the attack succeeds
attempt_charge
Used to attempt to charge an object with a payment component.
Use this if an atom needs to attempt to charge another atom.
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.
- self_message (optional) is what the src mob hears.
- audible_message_flags (optional) is the type of message being sent.
balloon_alert
Creates text that will float from the atom upwards to the viewer.
Args:
- mob/viewer: The mob the text will be shown to. Nullable (But only in the form of it won't runtime).
- text: The text to be shown to viewer. Must not be null.
balloon_alert_to_viewers
Create balloon alerts (text that floats up) to everything within range. Will only display to people who can see.
base_item_interaction
Item interaction
Handles non-combat interactions of a tool on this atom, such as using a tool on a wall to deconstruct it, or scanning someone with a health analyzer
base_mouse_drop_handler
Called when all sanity checks for mouse dropping have passed. Handles adjacency & other sanity checks before delegating the event down to lower level handlers. Do not override unless you are trying to create hud & screen elements which do not require proximity or other checks
base_ranged_item_interaction
Ranged item interaction
Handles non-combat ranged interactions of a tool on this atom, such as shooting a gun in the direction of someone*, having a scanner you can point at someone to scan them at any distance, or pointing a laser pointer at something.
*While this intuitively sounds combat related, it is not, because a "combat use" of a gun is gun-butting.
bitmask_smooth
Basic smoothing proc. The atom checks for adjacent directions to smooth with and changes the icon_state based on that.
Returns the previous smoothing_junction state so the previous state can be compared with the new one after the proc ends, and see the changes, if any.
blob_act
React to a hit by a blob objecd
default behaviour is to send the COMSIG_ATOM_BLOB_ACT signal
bullet_act
React to a hit by a projectile object
@params
- hitting_projectile - projectile
- def_zone - zone hit
- piercing_hit - is this hit piercing or normal?
calculate_adjacencies
Scans all adjacent turfs to find targets to smooth with.
change_material_modifier
Remove the old effects, change the material_modifier variable, and then reapply all the effects.
check_projectile_armor
A cut-out proc for /atom/proc/bullet_act so living mobs can have their own armor behavior checks without causing issues with needing their own on_hit call
click_alt
Custom alt click interaction
Override this to change default alt click behavior. Return CLICK_ACTION_SUCCESS
, CLICK_ACTION_BLOCKING
or NONE
.
Guard clauses
Consider adding interaction_flags_click
before adding unique guard clauses.
Return flags
Forgetting your return will cause the default alt click behavior to occur thereafter.
The difference between NONE and BLOCKING can get hazy, but I like to keep NONE limited to guard clauses and "never" cases.
A good usage for BLOCKING over NONE is when it's situational for the item and there's some feedback indicating this.
Examples:
User is a ghost, alt clicks on item with special disk eject: NONE
Machine broken, no feedback: NONE
Alt click a pipe to max output but its already max: BLOCKING
Alt click a gun that normally works, but is out of ammo: BLOCKING
User unauthorized, machine beeps: BLOCKING
@param {mob} user - The person doing the alt clicking.
click_alt_secondary
Custom alt click secondary interaction
Override this to change default alt right click behavior.
Guard clauses
Consider adding interaction_flags_click
before adding unique guard clauses.
click_ctrl
Custom ctrl click interaction
Override this to change default ctrl click behavior. Return CLICK_ACTION_SUCCESS
, CLICK_ACTION_BLOCKING
or NONE
.
Guard clauses
Consider adding interaction_flags_click
before adding unique guard clauses.
Return flags
Forgetting your return will cause the default ctrl click behavior to occur thereafter.
Returning any value besides NONE will stop the attack chain and thus stop the object from getting pulled/grabbed
click_ctrl_shift
Custom ctrl shift click interaction
Guard clauses
Consider adding interaction_flags_click
before adding unique guard clauses.
clone_storage
A quick and easy way to /clone/ a storage datum for an atom (does not copy over contents, only the datum details)
Imperfect, does not copy over ALL variables, only important ones (max storage size, etc)
connect_to_shuttle
Connect this atom to a shuttle
container_resist_act
Called when something resists while this atom is its loc
contains
Returns true if the src countain the atom target
contents_explosion
Handle what happens when your contents are exploded by a bomb
create_digital_aura
Creates a digital effect around the target
create_reagents
Convenience proc to create a reagents holder for an atom
Arguments:
- max_vol - maximum volume of holder
- flags - flags to pass to the holder
create_storage
A quick and easy way to create a storage datum for an atom
crowbar_act
Called on an object when a tool with crowbar capabilities is used to left click an object
crowbar_act_secondary
Called on an object when a tool with crowbar capabilities is used to right click an object
debug
Sets up this light source to be debugged, setting up in world buttons to control and move it Also freezes it, so it can't change in future
do_alert_animation
Does the MGS ! animation
do_spin_animation
Animates source spinning around itself. For docmentation on the args, check atom/proc/SpinAnimation()
drop_location
Where atoms should drop if taken from this atom
emag_act
Respond to an emag being used on our atom
Args:
- mob/user: The mob that used the emag. Nullable.
- obj/item/card/emag/emag_card: The emag that was used. Nullable.
Returns: TRUE if the emag had any effect, falsey otherwise.
emp_act
React to an EMP of the given severity
Default behaviour is to send the COMSIG_ATOM_PRE_EMP_ACT and COMSIG_ATOM_EMP_ACT signal
If the pre-signal does not return protection, and there are attached wires then we call emp_pulse on the wires
We then return the protection value
ex_act
React to being hit by an explosion
Should be called through the EX_ACT wrapper macro. The wrapper takes care of the COMSIG_ATOM_EX_ACT signal. as well as calling /atom/proc/contents_explosion.
Returns TRUE by default, and behavior should be implemented on children procs on a per-atom basis. Should only return FALSE if we resist the explosion for any reason. We assume that the default is TRUE because all atoms should be considered destructible in some manner unless they explicitly opt out (in our current framework). However, the return value itself doesn't have any external consumers, it's only so children procs can listen to the value from their parent procs (due to the nature of the EX_ACT macro). Thus, the return value only matters on overrides of this proc, and the only thing that truly matters is the code that is executed (applying damage, calling damage procs, etc.)
examine
Called when a mob examines this atom: /mob/verb/examinate
Default behaviour is to get the name and icon of the object and its reagents where the [TRANSPARENT] flag is set on the reagents holder
Produces a signal COMSIG_ATOM_EXAMINE, for modifying the list returned from this proc
examine_descriptor
What this atom should be called in examine tags
examine_more
Called when a mob examines (shift click or verb) this atom twice (or more) within EXAMINE_MORE_WINDOW (default 1 second)
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
Produces a signal COMSIG_ATOM_EXAMINE_MORE
examine_post_descriptor
Returns a list of strings to be displayed after the descriptor
examine_tags
A list of "tags" displayed after atom's description in examine. This should return an assoc list of tags -> tooltips for them. If item is null, then no tooltip is assigned.
- TGUI tooltips (not the main text) in chat cannot use HTML stuff at all, so
trying something like
<b><big>ffff</big></b>
will not work for tooltips.
For example:
. = list()
.["small"] = "It is a small item."
.["fireproof"] = "It is made of fire-retardant materials."
.["and conductive"] = "It's made of conductive materials and whatnot. Blah blah blah." // having "and " in the end tag's main text/key works too!
will result in
It is a small, fireproof and conductive item.
where "item" is pulled from /atom/proc/examine_descriptor
examine_title
Formats the atom's name into a string for use in examine (as the "title" of the atom)
- user - the mob examining the atom
- thats - whether to include "That's", or similar (mobs use "This is") before the name
expose_reagents
-
Handles exposing this atom to a list of reagents.
-
Sends COMSIG_ATOM_EXPOSE_REAGENTS
-
Calls expose_atom() for every reagent in the reagent list.
-
Arguments:
-
- reagents: The list of reagents the atom is being exposed to.
-
- source: The reagent holder the reagents are being sourced from.
-
- methods: How the atom is being exposed to the reagents. Bitflags.
-
- volume_modifier: Volume multiplier.
-
- show_message: Whether to display anything to mobs when they are exposed.
extinguish
Sends COMSIG_ATOM_EXTINGUISH signal, which properly removes burning component if it is present.
Default behaviour is to send COMSIG_ATOM_ACID_ACT and return
finalize_material_effects
Called by apply_material_effects(). It ACTUALLY handles applying effects common to all atoms (depending on material flags)
finalize_remove_material_effects
Called by remove_material_effects(). It ACTUALLY handles removing effects common to all atoms (depending on material flags)
find_all_cells_containing
debug proc for checking if a movable is in multiple cells when it shouldnt be (ie always unless multitile entering is implemented)
find_grid_statistics_for_z_level
debug proc for finding how full the cells of src's z level are
find_type_in_direction
Scans direction to find targets to smooth with.
fire_act
Respond to fire being used on our atom
Default behaviour is to send COMSIG_ATOM_FIRE_ACT and return
fire_projectile
Fire a projectile from this atom at another atom
flick_overlay
Flicks a certain overlay onto an atom, handling icon_state strings
flick_overlay_static
Flickers an overlay on an atom
flick_overlay_view
Takes the passed in MA/icon_state, mirrors it onto ourselves, and displays that in world for duration seconds Returns the displayed object, you can animate it and all, but you don't own it, we'll delete it after the duration
gather_material_color
A proc used by both finalize_material_effects() and finalize_remove_material_effects() to get the colors that will later be applied to or removed from the atom
get_all_contents
Returns the src and all recursive contents as a list.
get_all_contents_ignoring
Like get_all_contents_type, but uses a typecache list as argument
get_all_contents_skipping_traits
Returns the src and all recursive contents, but skipping going any deeper if an atom has a specific trait.
get_all_contents_type
identical to get_all_contents but returns a list of atoms of the type passed in the argument.
get_all_orbiters
Recursive getter method to return a list of all ghosts orbitting this atom
This will work fine without manually passing arguments.
- processed - The list of atoms we've already convered
- source - Is this the atom for who we're counting up all the orbiters?
- ignored_stealthed_admins - If TRUE, don't count admins who are stealthmoded and orbiting this
get_armor
Get the atom's armor reference
get_armor_rating
Helper to get a specific rating for the atom's armor
get_custom_material_amount
Gets the total amount of materials in this atom.
get_digital_overlays
Returns a list of overlays to be used for the digital effect
get_dumping_location
If someone's trying to dump items onto our atom, where should they be dumped to?
Return a loc to place objects, or null to stop dumping.
get_examine_icon
Icon displayed in examine
get_examine_name
Get the name of this object for examine
You can override what is returned from this proc by registering to listen for the COMSIG_ATOM_GET_EXAMINE_NAME signal
get_id_examine_strings
Returns an extended list of examine strings for any contained ID cards.
Arguments:
- user - The user who is doing the examining.
get_integrity
This mostly exists to keep atom_integrity private. Might be useful in the future.
get_integrity_percentage
Similar to get_integrity, but returns the percentage as [0-1] instead.
get_master_material
Gets the most common material in the object.
get_material_composition
Returns the material composition of the atom.
Used when recycling items, specifically to turn alloys back into their component mats.
Exists because I'd need to add a way to un-alloy alloys or otherwise deal with people converting the entire stations material supply into alloys.
Arguments:
- flags: A set of flags determining how exactly the materials are broken down.
get_material_english_list
Returns a string like "plasma, paper and glass" from a list of materials
get_material_greyscale_config
Searches for a subtype of config_type that is to be used in its place for specific materials (like shimmering gold for cleric maces)
get_material_multiplier
A proc that can be used to selectively control the stat changes and effects from a material without affecting the others.
For example, we can have items made of two different materials, with the primary contributing a good 1.2 multiplier and the second a meager 0.3.
The GET_MATERIAL_MODIFIER macro will handles some modifications where the minimum should be 1 if above 1 and the maximum be 1 if below 1. Just don't return negative values.
get_material_prefixes
Returns the prefixes to attach to the atom when setting materials, from a list argument.
get_name_chaser
Used to insert text after the name but before the description in examine()
get_oversized_icon_offsets
Returns an x and y value require to reverse the transformations made to center an oversized icon
get_remote_view_fullscreens
the vision impairment to give to the mob whose perspective is set to that atom
(e.g. an unfocused camera giving you an impaired vision when looking through it)
get_save_vars
Map exporter Inputting a list of turfs into convert_map_to_tgm() will output a string with the turfs and their objects / areas on said turf into the TGM mapping format for .dmm files. This file can then be opened in the map editor or imported back into the game.
This has been made semi-modular so you should be able to use these functions elsewhere in code if you ever need to get a file in the .dmm format
get_visible_name
Used by mobs to determine the name for someone wearing a mask, or with a disfigured or missing face. By default just returns the atom's name. add_id_name will control whether or not we append "(as [id_name])". force_real_name will always return real_name and add (as face_name/id_name) if it doesn't match their appearance
handle_basic_attack
This exists so stuff can override the default call of attack_animal for attack_basic_mob Remove this when simple animals are removed and everything can be handled on attack basic mob.
handle_fall
Used for making a sound when a mob involuntarily falls into the ground.
handle_slip
Handle the atom being slipped over
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.
micro-optimized to hell because this proc is very hot, being called several times per movement every movement.
HEY JACKASS, LISTEN IF YOU ADD SOMETHING TO THIS PROC, MAKE SURE /mob/living ACCOUNTS FOR IT Living mobs treat gravity in an event based manner. We've decomposed this proc into different checks for them to use. If you add more to it, make sure you do that, or things will behave strangely
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
has_material_category
Fetches a list of all of the materials this object has with the desired material category.
Arguments:
- category: The category to check for
- any_flags: Any bitflags that must be present for the category
- all_flags: All bitflags that must be present for the category
- no_flags: Any bitflags that must not be present for the category
- mat_amount: The minimum amount of materials that must be present
has_material_type
Fetches a list of all of the materials this object has of the desired type. Returns null if there is no valid materials of the type
Arguments:
- required_material: The type of material we are checking for
- mat_amount: The minimum required amount of material
hitby
React to being hit by a thrown object
Default behaviour is to call hitby_react on ourselves after 2 seconds if we are dense and under normal gravity.
Im not sure why this the case, maybe to prevent lots of hitby's if the thrown object is deleted shortly after hitting something (during explosions or other massive events that throw lots of items around - singularity being a notable example)
Worth of note: If hitby returns TRUE, it means the object has been blocked or catched by src. So far, this is only possible for living mobs and carbons, who can hold shields and catch thrown items.
hitby_react
We have have actually hit the passed in atom
Default behaviour is to move back from the item that hit us
hulk_damage
Called to get the damage that hulks will deal to the atom.
in_contents_of
Return true if we're inside the passed in atom
initialize_materials
The second part of set_custom_materials(), which handles applying the new materials It is a separate proc because Initialize calls may make use of this since they should've no prior materials to remove.
is_atom_colour
Checks if this atom has the passed color Can optionally be supplied with a range of priorities, IE only checking "washable" or above
is_drainable
Is this atom drainable of reagents
is_drawable
Can we draw from this atom with an injectable atom
is_injectable
Is this atom injectable into other atoms
is_open_container
Convenience proc to see if a container is open for chemistry handling
is_refillable
Can this atoms reagents be refilled
isinspace
Is this atom in space
item_interaction
Called when this atom has an item used on it. IE, a mob is clicking on this atom with an item.
Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code. Return NONE to allow default interaction / tool handling.
item_interaction_secondary
Called when this atom has an item used on it WITH RIGHT CLICK, IE, a mob is right clicking on this atom with an item. Default behavior has it run the same code as left click.
Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code. Return NONE to allow default interaction / tool handling.
log_message
Generic logging helper
reads the type of the log and writes it to the respective log file unless log_globally is FALSE Arguments:
- message - The message being logged
- message_type - the type of log the message is(ATTACK, SAY, etc)
- color - color of the log text
- log_globally - boolean checking whether or not we write this log to the log file
log_talk
Helper for logging chat messages or other logs with arbitrary inputs (e.g. announcements)
This proc compiles a log string by prefixing the tag to the message and suffixing what it was forced_by if anything if the message lacks a tag and suffix then it is logged on its own Arguments:
- message - The message being logged
- message_type - the type of log the message is(ATTACK, SAY, etc)
- tag - tag that indicates the type of text(announcement, telepathy, etc)
- log_globally - boolean checking whether or not we write this log to the log file
- forced_by - source that forced the dialogue if any
makeHologram
Makes this atom look like a "hologram" So transparent, blue, with a scanline and an emissive glow This is acomplished using a combination of filters and render steps/overlays The degree of the opacity is optional, based off the opacity arg (0 -> 1)
manual_emote
Allows the intrepid coder to send a basic emote Takes text as input, sends it out to those who need to know after some light parsing If you need something more complex, make it into a datum emote Arguments:
- text - The text to send out
Returns TRUE if it was able to run the emote, FALSE otherwise.
mech_melee_attack
Mech melee attack
Called when a mech melees a target with fists Handles damaging the target & associated effects return value is number of damage dealt. returning a value puts our mech onto attack cooldown. Arguments:
- mecha_attacker: Mech attacking this target
- user: mob that initiated the attack from inside the mech as a controller
mix_material_colors
Manages mixing, adding or removing the material colors from the atom in absence of the MATERIAL_GREYSCALE flag.
modify_max_integrity
changes max_integrity while retaining current health percentage, returns TRUE if the atom got broken.
mouse_drop_dragged
The proc that should be overridden by subtypes to handle mouse drop. Called on the atom being dragged
mouse_drop_receive
The proc that should be overridden by subtypes to handle mouse drop. Called on the atom receiving a dragged object
multitool_act
Called on an object when a tool with multitool capabilities is used to left click an object
multitool_act_secondary
Called on an object when a tool with multitool capabilities is used to right click an object
narsie_act
Respond to narsie eating our atom
Default behaviour is to send COMSIG_ATOM_NARSIE_ACT and return
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.
- hacking_module - 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 (or riding off into the sunset on a shuttle)
Specifically, is it on the z level and within the centcom areas. You can also be in a shuttle 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
Returns TRUE if this atom is on centcom or an escape shuttle, or FALSE if not
onSyndieBase
Is the atom in any of the syndicate areas
Either in the syndie base, or any of their shuttles
Also used in gamemode code for win conditions
Returns TRUE if this atom is on the syndicate recon base, any of its shuttles, or an escape shuttle, or FALSE if not
on_escaped_shuttle
Checks that we're on a shuttle that's escaped
- check_for_launch_status - What launch status do we check for? Generally the two you want to check for are ENDGAME_LAUNCHED or ENDGAME_TRANSIT
Returns TRUE if this atom is on a shuttle which is escaping or has escaped, or FALSE otherwise
on_log
Called when the atom log's in or out
Default behaviour is to call on_log on the location this atom is in
on_mouse_enter
Fired whenever this atom is the most recent to be hovered over in the tick.
Preferred over MouseEntered if you do not need information such as the position of the mouse.
Especially because this is deferred over a tick, do not trust that client
is not null.
on_saboteur
Override on subtype to add behaviour. Whatever happens when we are sabotaged
on_update_integrity
Handle updates to your atom's integrity
play_attack_sound
the sound played when the atom is damaged.
prepare_huds
Prepare the huds for this atom
Goes through hud_possible list and adds the images to the hud_list variable (if not already cached)
propagate_radiation_pulse
A common proc used to send COMSIG_ATOM_PROPAGATE_RAD_PULSE to adjacent atoms Only used for uranium (false/tram)walls to spread their radiation pulses
ranged_item_interaction
Called when this atom has an item used on it from a distance. IE, a mob is clicking on this atom with an item and is not adjacent.
Does NOT include Telekinesis users, they are considered adjacent generally.
Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code.
ranged_item_interaction_secondary
Called when this atom has an item used on it from a distance WITH RIGHT CLICK, IE, a mob is right clicking on this atom with an item and is not adjacent.
Default behavior has it run the same code as left click.
Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code.
rcd_act
Respond to an RCD acting on our item
Default behaviour is to send COMSIG_ATOM_RCD_ACT and return FALSE
rcd_vals
Return the values you get when an RCD eats you?
realize_overlays
Takes the atoms's existing overlays and underlays, and makes them mutable so they can be properly vv'd in the realized_overlays/underlays list
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.
relaydrive
A special case of relaymove() in which the person relaying the move may be "driving" this atom
This is a special case for vehicles and ridden animals where the relayed movement may be handled by the riding component attached to this atom. Returns TRUE as long as there's nothing blocking the movement, or FALSE if the signal gets a reply that specifically blocks the movement
relaymove
An atom we are buckled or is contained within us has tried to move
Default behaviour is to send a warning that the user can't move while buckled as long as the buckle_message_cooldown has expired (50 ticks)
remove_air
Remove air from this atom
remove_atom_colour
Removes an instance of colour_type from the atom's atom_colours list
remove_digital_aura
Removes the digital effect around the target
remove_main_material_effects
A proc to remove the material effects previously applied by the (ex-)main material
remove_material_effects
Proc responsible for removing material effects when setting materials.
remove_single_mat_effect
Remove material effects of a single material.
repair_damage
Proc for recovering atom_integrity. Returns the amount repaired by
replace_smooth_overlays
Internal: Takes icon states as text to replace smoothing corner overlays
return_air
Return the current air environment in this atom
return_analyzable_air
Return the air if we can analyze it
return_temperature
Return atom temperature
run_atom_armor
returns the damage value of the attack after processing the atom's various armor protections
runechat_prefs_check
Returns the client runechat visible messages preference according to the message type.
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 /turf/rust_turf should be used instead for overriding rust on turfs
screwdriver_act
Called on an object when a tool with screwdriver capabilities is used to left click an object
screwdriver_act_secondary
Called on an object when a tool with screwdriver capabilities is used to right click an object
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.
setDir
Hook for running code when a dir change occurs
Not recommended to use, listen for the COMSIG_ATOM_DIR_CHANGE signal instead (sent by this proc)
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_armor
Sets the armor of this atom to the specified armor
set_armor_rating
Helper to update the atom's armor to a new armor with the specified rating
set_base_pixel_x
Setter for the base_pixel_x
variable to append behavior related to its changing.
set_base_pixel_y
Setter for the base_pixel_y
variable to append behavior related to its changing.
set_custom_materials
Sets the custom materials for an atom. This is what you want to call, since most of the ones below are mainly internal.
set_density
Setter for the density
variable to append behavior related to its changing.
set_greyscale
Handles updates to greyscale value updates. The colors argument can be either a list or the full color string. Child procs should call parent last so the update happens after all changes.
set_hud_image_active
set every hud image in the given category active so other people with the given hud can see it. Arguments:
- hud_category - the index in our active_hud_list corresponding to an image now being shown.
- update_huds - if FALSE we will just put the hud_category into active_hud_list without actually updating the atom_hud datums subscribed to it
- exclusive_hud - if given a reference to an atom_hud, will just update that hud instead of all global ones attached to that category. This is because some atom_hud subtypes arent supposed to work via global categories, updating normally would affect all of these which we dont want.
set_hud_image_inactive
sets every hud image in the given category inactive so no one can see it
set_light_angle
Setter for the light angle of this atom
set_light_color
Setter for the light color of this atom.
set_light_dir
Setter for the light direction of this atom
set_light_flags
Setter for the light flags of this atom.
set_light_height
Setter for the height of our light
set_light_on
Setter for whether or not this atom's light is on.
set_light_power
Setter for the light power of this atom.
set_light_range
Setter for the light range of this atom.
set_opacity
Updates the atom's opacity value.
This exists to act as a hook for associated behavior. It notifies (potentially) affected light sources so they can update (if needed).
set_smoothed_icon_state
Changes the icon state based on the new junction bitmask
set_wires
Sets the wire datum of an atom
should_atmos_process
We use this proc to check if we should start processing an item, or continue processing it. Returns true/false as expected
shuttleRotate
Base proc
singularity_act
Respond to the singularity eating this atom
singularity_pull
Respond to the singularity pulling on us
Default behaviour is to send COMSIG_ATOM_SING_PULL and return
smooth_icon
do not use, use QUEUE_SMOOTH(atom)
spasm_animation
Similar to shake but more spasm-y and jerk-y
take_damage
The essential proc to call when an atom must receive damage of any kind.
tamed
Called after the atom is 'tamed' for type-specific operations, Usually called by the tameable component but also other things.
toggle_material_flags
For enabling and disabling material effects from an item (mainly VV)
tool_act
Tool Act
Handles using specific tools on this atom directly. Only called when combat mode is off.
Handles the tool_acts in particular, such as wrenches and screwdrivers.
This can be overridden to handle unique "tool interactions" IE using an item like a tool (when it's not actually one) This is particularly useful for things that shouldn't be inserted into storage (because tool acting runs before storage checks) but otherwise does nothing that [item_interaction] doesn't already do.
In other words, use sparingly. It's harder to use (correctly) than [item_interaction].
transfer_mob_blood_dna
to add a mob's dna info into an object's blood_dna list.
undebug
Disables light debugging, so you can let a scene fall to what it visually should be, or just fix admin fuckups
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_atom_colour
Resets the atom's color to null, and then sets it to the highest priority colour available
update_desc
Updates the description of the atom
update_greyscale
Checks if this atom uses the GAGS system and if so updates the icon
update_icon
Updates the icon of the atom
update_icon_state
Updates the icon state of the atom
update_inhand_icon
Checks the atom's loc and calls update_held_items on it if it is a mob.
This should only be used in situations when you are unable to use /datum/element/update_icon_updates_onmob for whatever reason. Check code/datums/elements/update_icon_updates_onmob.dm before using this. Adding that to the atom and calling update_appearance will work for most cases.
Arguments:
- mob/target - The mob to update the icons of. Optional argument, use if the atom's loc is not the mob you want to update.
update_integrity
Handles the integrity of an atom changing. This must be called instead of changing integrity directly.
update_light
Will update the light (duh). Creates or destroys it if needed, makes it update values, makes sure it's got the correct source turf...
update_name
Updates the name of the atom
update_overlays
Updates the overlays of the atom
update_remote_sight
the sight changes to give to the mob whose perspective is set to that atom
(e.g. A mob with nightvision loses its nightvision while looking through a normal camera)
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:
- message is the message output to anyone who can see.
- 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 mob in this list.
- visible_message_flags (optional) is the type of message being sent.
vv_edit_var
call back when a var is edited on this atom
Can be used to implement special handling of vars
At the atom level, if you edit a var named "color" it will add the atom colour with admin level priority to the atom colours list
Also, if GLOB.Debug2 is FALSE, it sets the ADMIN_SPAWNED_1 flag on flags_1, which signifies the object has been admin edited
vv_get_dropdown
Return the markup to for the dropdown list for the VV panel for this atom
Override in subtypes to add custom VV handling in the VV panel
wash
Wash this atom
This will clean it off any temporary stuff like blood. Override this in your item to add custom cleaning behavior. Returns true if any washing was necessary and thus performed Arguments:
- clean_types: any of the CLEAN_ constants
welder_act
Called on an object when a tool with welder capabilities is used to left click an object
welder_act_secondary
Called on an object when a tool with welder capabilities is used to right click an object
wirecutter_act
Called on an object when a tool with wirecutter capabilities is used to left click an object
wirecutter_act_secondary
Called on an object when a tool with wirecutter capabilities is used to right click an object
wrench_act
Called on an object when a tool with wrench capabilities is used to left click an object
wrench_act_secondary
Called on an object when a tool with wrench capabilities is used to right click an object
zap_act
Respond to an electric bolt action on our item
Default behaviour is to return, we define here to allow for cleaner code later on