atom
Vars | |
_reagent_update_started | (FLOAT) world.time of last on_reagent_update call, used to prevent recursion due to reagents updating reagents |
---|---|
atom_flags | (BITFLAG) See flags.dm |
blood_DNA | (DICTIONARY) A lazy map. The key is a MD5 player name and the value is the blood type. |
blood_color | (COLOR) The color of the blood shown on blood overlays. |
climb_speed_mult | (FLOAT) The climbing speed multiplier for this atom |
climbers | (LIST) A list of all mobs that are climbing or currently on this atom |
current_health | (FLOAT) Current remaining health value. |
explosion_resistance | (INTEGER) The amount an explosion's power is decreased when encountering this atom |
fluorescent | (FALSE|DEFINES) How this atom is interacting with UV light. See misc.dm |
germ_level | (INTEGER) The number of germs on this atom. |
icon_rotation | (FLOAT) The angle in degrees clockwise that should be applied. |
icon_scale_x | (FLOAT) The horizontal scaling that should be applied. |
icon_scale_y | (FLOAT) The vertical scaling that should be applied. |
is_spawnable_type | (BOOL) If it can be spawned normally |
last_bumped | (FLOAT) The world.time that this atom last bumped another. Used mostly by mobs. |
level | (DEFINE) Determines where this atom sits in terms of turf plating. See misc.dm |
light_dir | An override for cases where the light is not facing the same direction as the object. |
max_health | (FLOAT) Theoretical maximum health value. |
pass_flags | (BITFLAG) See flags.dm |
reagents | The chemical contents of this atom |
simulated | (BOOL) If an atom should be interacted with by a number of systems (Atmos, Liquids, Turbolifts, Etc.) |
storage | (DATUM) /datum/storage instance to use for this obj. Set to a type for instantiation on init. |
temperature | What is this atom's current temperature? |
temperature_sensitive | (BOOL) Does this atom respond to changes in local temperature via the temperature var? |
throwpass | (BOOL) If a thrown object can continue past this atom. Sometimes used for clicking as well? TODO: Rework this |
transform_animate_time | (FLOAT) If greater than zero, transform-based adjustments (scaling, rotating) will visually occur over this time. |
was_bloodied | (BOOL) If this atom was bloodied before. |
Procs | |
Bumped | Handle an atom bumping this atom |
CheckExit | Check if an atom can exit this atom's turf. |
Entered | Movement Handling |
Exited | Exited Handling |
HasProximity | Handle an atom entering this atom's proximity |
SetName | Name Set Handling |
add_blood | Attempt to add blood to this atom |
additional_see_invisible | Get the level of invisible sight this atom should provide to a user |
additional_sight_flags | Get sight flags that this atom should provide to a user |
assume_air | Attempt to merge a gas_mixture giver into this atom's gas_mixture |
audible_message | Show a message to all mobs and objects in earshot of this atom |
bullet_act | Handle a projectile P hitting this atom |
can_be_poured_from | This is whether it's physically possible to pour from this atom to the target atom, based on context like user intent and src being open, etc. This should not check things like whether there is actually anything in src to pour. It should also not check anything controlled by the target atom, because can_be_poured_into() already exists. |
can_climb | Check if a user can climb this atom. |
check_eye | Get the flags that should be added to the users sight var. |
checkpass | Check if this atom can be passed by another given the flags provided |
clean | Remove any blood from this atom |
do_climb | Handle user climbing onto this atom. |
dump_contents | Dump the contents of this atom onto its loc |
emag_act | Handle a user attempting to emag this atom |
emp_act | Handle an EMP affecting this atom |
explosion_act | Handle an explosion of severity affecting this atom |
fire_act | Handle this atom being exposed to fire |
get_alarm_z | Assisting procs |
get_alt_interactions | Get a list of alt interactions for a user from this atom. |
get_ambient_temperature | Returns the 'ambient temperature' used for temperature equalisation. |
get_ambient_temperature_coefficient | Returns the coefficient used for ambient temperature equalisation. Mainly used to prevent vacuum from cooling down objects. |
get_cell | Get any power cell associated with this atom. |
get_color | Get the current color of this atom. |
get_contained_external_atoms | Return a list of all simulated atoms inside this one. |
get_contained_matter | Returns the sum of this atoms's reagents plus the combined matter of all its contents. Obj adds matter contents. Other overrides may add extra handling for things like material storage. Most useful for calculating worth or deconstructing something along with its contents. |
get_heat | Get the temperature of this atom's heat source |
get_radio | Get any radio associated with this atom. |
get_recursive_loc_of_type | Get the first loc of the specified loc_type from walking up the loc tree of this atom. |
grab_attack | Handle this atom being hit by a grab. |
handle_melting | Handle this atom being destroyed through melting |
hitby | Handle this atom being hit by a thrown atom |
in_contents_of | Check if this atom is in the path or atom container |
isflamesource | Check if this atom is a source of fire |
lava_act | Handle this atom being exposed to lava. Calls qdel() by default |
merge_exhaled_volume | Merge an exhaled air volume into air contents.. |
modify_mapped_vars | Adjust variables prior to Initialize() based on the map |
object_shaken | Shake this atom and all its climbers. |
onDropInto | Handle dropping an atom onto this atom. |
on_update_icon | Update this atom's icon. |
physically_destroyed | Handle the destruction of this atom, spilling its contents by default |
relaymove | Relay movement to this atom. |
remove_air | Attempt to remove amount moles from this atom's gas_mixture |
return_air | Get the air of this atom or its location's air |
reveal_blood | Reveal any blood on the item and update its color to that of luminol |
search_contents_for | Recursively search this atom's contents for an atom of type path |
set_density | Set the density of this atom to new_density |
set_dir | Set the direction of this atom to new_dir |
set_icon | Set the icon to new_icon |
set_icon_state | Set the icon_state to new_icon_state |
set_invisibility | Invisibility Set Handling |
set_rotation | Set the rotation of this atom's transform |
set_scale | Set the scale of this atom's transform. |
try_detonate_reagents | Attempt to detonate the reagents contained in this atom |
try_on_reagent_change | Handle reagents being modified |
turf_is_crowded | Check if this atom's turf is blocked. |
update_icon | Update this atom's icon. |
update_transform | Update this atom's transform from stored values. |
visible_message | Show a message to all mobs and objects in sight of this atom. |
Var Details
_reagent_update_started
(FLOAT) world.time of last on_reagent_update call, used to prevent recursion due to reagents updating reagents
atom_flags
(BITFLAG) See flags.dm
blood_DNA
(DICTIONARY) A lazy map. The key
is a MD5 player name and the value
is the blood type.
blood_color
(COLOR) The color of the blood shown on blood overlays.
climb_speed_mult
(FLOAT) The climbing speed multiplier for this atom
climbers
(LIST) A list of all mobs that are climbing or currently on this atom
current_health
(FLOAT) Current remaining health value.
explosion_resistance
(INTEGER) The amount an explosion's power is decreased when encountering this atom
fluorescent
(FALSE|DEFINES) How this atom is interacting with UV light. See misc.dm
germ_level
(INTEGER) The number of germs on this atom.
icon_rotation
(FLOAT) The angle in degrees clockwise that should be applied.
icon_scale_x
(FLOAT) The horizontal scaling that should be applied.
icon_scale_y
(FLOAT) The vertical scaling that should be applied.
is_spawnable_type
(BOOL) If it can be spawned normally
last_bumped
(FLOAT) The world.time that this atom last bumped another. Used mostly by mobs.
level
(DEFINE) Determines where this atom sits in terms of turf plating. See misc.dm
light_dir
An override for cases where the light is not facing the same direction as the object.
max_health
(FLOAT) Theoretical maximum health value.
pass_flags
(BITFLAG) See flags.dm
reagents
The chemical contents of this atom
simulated
(BOOL) If an atom should be interacted with by a number of systems (Atmos, Liquids, Turbolifts, Etc.)
storage
(DATUM) /datum/storage instance to use for this obj. Set to a type for instantiation on init.
temperature
What is this atom's current temperature?
temperature_sensitive
(BOOL) Does this atom respond to changes in local temperature via the temperature
var?
throwpass
(BOOL) If a thrown object can continue past this atom. Sometimes used for clicking as well? TODO: Rework this
transform_animate_time
(FLOAT) If greater than zero, transform-based adjustments (scaling, rotating) will visually occur over this time.
was_bloodied
(BOOL) If this atom was bloodied before.
Proc Details
Bumped
Handle an atom bumping this atom
Called by AMs
Bump()
AM
: The atom that bumped us
CheckExit
Check if an atom can exit this atom's turf.
mover
: The atom trying to movetarget
: The turf the atom is trying to move to- Return:
TRUE
if it can exit, otherwiseFALSE
Entered
Movement Handling
Exited
Exited Handling
HasProximity
Handle an atom entering this atom's proximity
Called when an atom enters this atom's proximity. Both this and the other atom need to have the MOVABLE_FLAG_PROXMOVE flag (as it helps reduce lag).
AM
: The atom entering proximity- Return:
TRUE
if proximity should continue to be handled, otherwiseFALSE
- TODO: Rename this to
handle_proximity
SetName
Name Set Handling
add_blood
Attempt to add blood to this atom
If a mob is provided, their blood will be used
M?
: The mob whose blood will be used- Returns: TRUE if made bloody, otherwise FALSE
additional_see_invisible
Get the level of invisible sight this atom should provide to a user
additional_sight_flags
Get sight flags that this atom should provide to a user
- See: /mob/var/sight
assume_air
Attempt to merge a gas_mixture giver
into this atom's gas_mixture
- Return:
TRUE
if successful, otherwiseFALSE
audible_message
Show a message to all mobs and objects in earshot of this atom
Used for atoms performing audible actions
message
: The string to show to anyone who can hear this atomdead_message?
: The string deaf mobs will seehearing_distance?
: The number of tiles away the message can be heard. Defaults to world.viewcheck_ghosts?
: TRUE if ghosts should hear the message if their preferences allowradio_message?
: The string to send over radios
bullet_act
Handle a projectile P
hitting this atom
P
: The/obj/item/projectile
hitting this atomdef_zone
: The zoneP
is hitting- Return:
0 to 100+
, representing the % damage blocked. Can also be special PROJECTILE values (misc.dm)
can_be_poured_from
This is whether it's physically possible to pour from this atom to the target atom, based on context like user intent and src being open, etc. This should not check things like whether there is actually anything in src to pour. It should also not check anything controlled by the target atom, because can_be_poured_into() already exists.
can_climb
Check if a user can climb this atom.
user
: The mob to checkpost_climb_check?
: If we should check if the user can continue climbing- Return:
TRUE
if they can climb, otherwiseFALSE
check_eye
Get the flags that should be added to the users
sight var.
- Return: Sight flags, or
-1
if the view should be reset - TODO: Also sometimes handles resetting of view itself, probably should be more consistent.
checkpass
Check if this atom can be passed by another given the flags provided
pass_flag
: The flags to check. See: flags.dm- Return: The flags present that allow it to pass, otherwise
0
clean
Remove any blood from this atom
- Return:
TRUE
if blood with DNA was removed
do_climb
Handle user
climbing onto this atom.
user
: The mob climbing onto this atom.- Return:
TRUE
if the user successfully climbs onto this atom, otherwiseFALSE
.
dump_contents
Dump the contents of this atom onto its loc
emag_act
Handle a user
attempting to emag this atom
remaining_charges
: Used for nothing TODO: Fix thisuser
: The user attempting to emag this atomemag_source
: The source of the emag- Returns: 1 if successful, -1 if not, NO_EMAG_ACT if it cannot be emaged
emp_act
Handle an EMP affecting this atom
severity
: Strength of the explosion ranging from 1 to 3. Higher is weaker
explosion_act
Handle an explosion of severity
affecting this atom
severity
: Strength of the explosion ranging from 1 to 3. Higher is weaker- Return:
TRUE
if severity is within range and exploding should continue, otherwiseFALSE
fire_act
Handle this atom being exposed to fire
air
: The gas_mixture for this locexposed_temperature
: The temperature of the airexposed_volume
: The volume of the air
get_alarm_z
Assisting procs
get_alt_interactions
Get a list of alt interactions for a user from this atom.
user
: The mob that these alt interactions are for- Return: A list containing the alt interactions
get_ambient_temperature
Returns the 'ambient temperature' used for temperature equalisation.
get_ambient_temperature_coefficient
Returns the coefficient used for ambient temperature equalisation. Mainly used to prevent vacuum from cooling down objects.
get_cell
Get any power cell associated with this atom.
get_color
Get the current color of this atom.
get_contained_external_atoms
Return a list of all simulated atoms inside this one.
get_contained_matter
Returns the sum of this atoms's reagents plus the combined matter of all its contents. Obj adds matter contents. Other overrides may add extra handling for things like material storage. Most useful for calculating worth or deconstructing something along with its contents.
get_heat
Get the temperature of this atom's heat source
get_radio
Get any radio associated with this atom.
Used for handle_message_mode or other radio-based logic.
message_mode?
: Used to determine what subset of radio should be returned (ie. intercoms or ear radios)- Return: A radio appropriate for
message_mode
.
get_recursive_loc_of_type
Get the first loc of the specified loc_type
from walking up the loc tree of this atom.
grab_attack
Handle this atom being hit by a grab.
Called by resolve_attackby()
G
: The grab hitting this atom- Return:
TRUE
to skip attackby() and afterattack() orFALSE
handle_melting
Handle this atom being destroyed through melting
hitby
Handle this atom being hit by a thrown atom
AM
: The atom hitting this atomTT
: A datum wrapper for a thrown atom, containing important info- Returns: TRUE if successfully hit the atom.
in_contents_of
Check if this atom is in the path or atom container
container
: The path or atom to check- Return:
TRUE
ifcontainer
contains this atom, otherwiseFALSE
isflamesource
Check if this atom is a source of fire
lava_act
Handle this atom being exposed to lava. Calls qdel() by default
- Returns:
TRUE
if qdel() was called, otherwiseFALSE
merge_exhaled_volume
Merge an exhaled air volume into air contents..
modify_mapped_vars
Adjust variables prior to Initialize() based on the map
Called by the maploader to perform static modifications to vars set on the map. Intended use case: Adjust tag vars on duplicate templates (such as airlock tags).
map_hash
: A unique string for a map (usually using sequential_id)
object_shaken
Shake this atom and all its climbers.
onDropInto
Handle dropping an atom onto this atom.
If the item should move into this atom, return null. Otherwise, return the destination atom where the item should be moved.
AM
: The atom being dropped onto this atom- Return: A location for the atom AM to move to, or null to move it into this atom.
on_update_icon
Update this atom's icon.
Usually queue_icon_update() or update_icon() should be used instead.
physically_destroyed
Handle the destruction of this atom, spilling its contents by default
skip_qdel
: If calling qdel() on this atom should be skipped.- Return: Unknown, feel free to change this
relaymove
Relay movement to this atom.
Called by mobs, such as when the mob is inside the atom, their buckled var is set to this, or this atom is set as their machine.
- See: code/modules/mob/mob_movement.dm
remove_air
Attempt to remove amount
moles from this atom's gas_mixture
- Return: A
/datum/gas_mixture
containing the gas removed if successful, otherwisenull
return_air
Get the air of this atom or its location's air
- Return: The
/datum/gas_mixture
of this atom
reveal_blood
Reveal any blood on the item and update its color to that of luminol
search_contents_for
Recursively search this atom's contents for an atom of type path
path
: The path of the atom to search forfilter_path?
: A list of atom paths that only should be searched, ornull
to search all- Return: A list of atoms of type
path
found inside this atom
set_density
Set the density of this atom to new_density
- Events:
density_set
(only if density actually changed)
set_dir
Set the direction of this atom to new_dir
new_dir
: The new direction the atom should face.- Return:
TRUE
if the direction has been changed. - Events:
dir_set
set_icon
Set the icon to new_icon
set_icon_state
Set the icon_state to new_icon_state
set_invisibility
Invisibility Set Handling
set_rotation
Set the rotation of this atom's transform
new_rotation
: The angle in degrees the transform will be rotated clockwise
set_scale
Set the scale of this atom's transform.
new_scale_x
: The multiplier to apply to the X axisnew_scale_y
: The multiplier to apply to the Y axis
try_detonate_reagents
Attempt to detonate the reagents contained in this atom
severity
: Strength of the explosion ranging from 1 to 3. Higher is weaker
try_on_reagent_change
Handle reagents being modified
turf_is_crowded
Check if this atom's turf is blocked.
This doesn't handle border structures and should be preceded by an Adjacent() check.
ignore?
: An atom that should be ignored by the check.- Return: The first atom blocking this atom's turf.
update_icon
Update this atom's icon.
- Events:
updated_icon
update_transform
Update this atom's transform from stored values.
Applies icon_scale and icon_rotation. When transform_animate_time is set, the transform is animated over the specified duration. Otherwise, it is applied instantly.
- Return: The transform
/matrix
after updates are applied
visible_message
Show a message to all mobs and objects in sight of this atom.
Used for atoms performing visible actions
message
: The string output to any atom that can see this atomself_message?
: The string displayed to this atom if it's a mob. See: mobs.dmblind_message?
: The string blind mobs will see. Example: "You hear something!"range?
: The number of tiles away the message will be visible from. Default: world.viewcheck_ghosts?
: Set toTRUE
if ghosts should see the message if their preferences allow