atom
Vars | |
alternate_appearances | The alternate appearances we own. Lazylist |
---|---|
base_icon_state | Used for changing icon states for different base sprites. |
bottom_left_corner | Smoothing variable |
bottom_right_corner | Smoothing variable |
bubble_icon | What icon the mob uses for speechbubbles |
canSmoothWith | List of smoothing groups this atom can smooth with. If this is null and atom is smooth, it smooths only with itself. |
can_pathfind_pass | How this atom should react to having its astar blocking checked |
chat_color | Last color calculated for the the chatmessage overlays. Used for caching. |
chat_color_name | Last name used to calculate a color for the chatmessage overlays. Used for caching. |
drag_start | Contains the world.time of when we start dragging something with our mouse. Used to prevent weird situations where you fail to click on something |
explosion_block | Value used to increment ex_act() if reactionary_explosions is on |
filter_data | For handling persistent filters |
flags_ricochet | how the atom should handle ricochet behavior |
germ_level | The higher the germ level, the more germ on the atom. |
hud_list | This atom's HUD (med/sec, etc) images. Associative list. |
hud_possible | HUD images that this atom can provide. |
light_power | Intensity of the light. Can be negative to remove light |
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. |
map_json_data | This var isn't actually used for anything, but is present so that DM's map reader doesn't forfeit on reading a JSON-serialized map. AKA DO NOT FUCK WITH |
new_attack_chain | Whether this atom is using the new attack chain. |
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 |
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 |
ru_names | List consists of ("name", "именительный", "родительный", "дательный", "винительный", "творительный", "предложный", "gender") |
should_spread_blood | Will the atom spread blood when touched? |
simulated | Filter for actions - used by lighting overlays |
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. |
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. |
suit_fibers | List of fibers that this atom has |
top_left_corner | Smoothing variable |
top_right_corner | Smoothing variable |
viewing_alternate_appearances | The alternate appearances we're viewing, stored here to reestablish them after Logout()s. Lazylist |
Procs | |
AltClickNoInteract | Use this instead of [/mob/proc/AltClickOn] where you only want turf content listing without additional atom alt-click interaction |
CanPathfindPass | This proc is used for telling whether something can pass by this atom in a given direction, for use by the pathfinding system. |
Topic | Passes Stat Browser Panel clicks to the game and calls client click on an atom |
acid_act | Respond to acid being used on our atom |
after_slip | Base proc, intended to be overriden. |
attack_by | Called when mob user is hitting us with an item attacking .
Part of the /obj/item/proc/melee_attack_chain. |
attackby__legacy__attackchain | Called when user attacks us with item W . |
attacked_by | Called after we have been attacked with the item attacker by user . |
attacked_by__legacy__attackchain | Called after user has attacked us with item W . |
base_item_interaction | |
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. |
calculate_adjacencies | Scans all adjacent turfs to find targets to smooth with. |
clean_radiation | Removes some radiation from an atom |
contents_ui_distance | public |
defile | Begin defile and malfunction on-atom definitions |
emag_act | This is when an atom is emagged. Should return false if it fails, or it has no emag_act defined. |
emp_act | Proc which will make the atom act accordingly to an EMP. This proc can sleep depending on the implementation. So assume it sleeps! |
examine_more | Extended description of an object. Allows you to double examine objects and have them give you a second description of an item. Useful for writing flavourful stuff. |
find_type_in_direction | Scans direction to find targets to smooth with. |
get_orbiters | Simple helper proc to get a list of everything directly orbiting the current atom, without checking contents, or null if nothing is. |
get_orbiters_recursive | Recursive getter method to return a list of all ghosts transitively orbiting this atom. This will find orbiters either directly orbiting the followed atom, or any orbiters orbiting them (and so on). |
get_orbiters_up_hierarchy | Check every object in the hierarchy above ourselves for orbiters, and return the full list of them. If an object is being held in a backpack, returns orbiters of the backpack, the person If recursive == TRUE, this will also check recursively through any ghosts seen to make sure we find everything upstream |
get_runechat_color | Proc to allow atoms to set their own runechat colour |
hit_by_thrown_mob | This proc applies special effects of a carbon mob hitting something, be it a wall, structure, or window. You can set mob_hurt to false to avoid double dipping through subtypes if returning ..() |
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 |
item_interaction | Called when this atom has an item used on it. IE, a mob is clicking on this atom with an item. |
mech_melee_attack | Handle melee attack by a mech |
persistent_load | Atom Persistent Loader |
persistent_save | Atom Persistent Saver |
rad_act | Respond to a radioactive wave hitting this atom |
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. |
ray_filter_helper | Used to create rays on an item. Make sure to removefilter("rays") when done with it |
relaydrive | A special case of relaymove() in which the person relaying the move may be "driving" this atom |
remove_orbiter | Remove an orbiter from the atom it's orbiting. |
rename_interactive | |
return_analyzable_air | Return the air if we can analyze it |
ru_names_rename | Необходимо использовать ПЕРЕД изменением var/name, и использовать только этот прок для изменения в рантайме склонений |
set_smoothed_icon_state | Changes the icon state based on the new junction bitmask. Returns the old junction value. |
shuttleRotate | Base proc |
storage_depth | Returns the storage depth of an atom up to the area level. |
storage_depth_turf | Like /atom/proc/storage_depth, but returns the depth to the nearest turf. |
tool_act | |
update_appearance | Updates the appearence of the icon |
update_desc | Updates the description of the atom |
update_icon | Updates the icon of the atom |
update_icon_state | Updates the icon state of the atom |
update_name | Updates the name of the atom |
update_overlays | Updates the overlays of the atom. It has to return a list of overlays if it can't call the parent to create one. The list can contain anything that would be valid for the add_overlay proc: Images, mutable appearances, icon states... |
zap_act | Respond to an electric bolt action on our item |
Var Details
alternate_appearances
The alternate appearances we own. Lazylist
base_icon_state
Used for changing icon states for different base sprites.
bottom_left_corner
Smoothing variable
bottom_right_corner
Smoothing variable
bubble_icon
What icon the mob uses for speechbubbles
canSmoothWith
List of smoothing groups this atom can smooth with. If this is null and atom is smooth, it smooths only with itself.
can_pathfind_pass
How this atom should react to having its astar blocking checked
chat_color
Last color calculated for the the chatmessage overlays. Used for caching.
chat_color_name
Last name used to calculate a color for the chatmessage overlays. Used for caching.
drag_start
Contains the world.time of when we start dragging something with our mouse. Used to prevent weird situations where you fail to click on something
explosion_block
Value used to increment ex_act() if reactionary_explosions is on
filter_data
For handling persistent filters
flags_ricochet
how the atom should handle ricochet behavior
germ_level
The higher the germ level, the more germ on the atom.
hud_list
This atom's HUD (med/sec, etc) images. Associative list.
hud_possible
HUD images that this atom can provide.
light_power
Intensity of the light. Can be negative to remove light
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.
map_json_data
This var isn't actually used for anything, but is present so that DM's map reader doesn't forfeit on reading a JSON-serialized map. AKA DO NOT FUCK WITH
new_attack_chain
Whether this atom is using the new attack chain.
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
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
ru_names
List consists of ("name", "именительный", "родительный", "дательный", "винительный", "творительный", "предложный", "gender")
should_spread_blood
Will the atom spread blood when touched?
simulated
Filter for actions - used by lighting overlays
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.
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.
suit_fibers
List of fibers that this atom has
top_left_corner
Smoothing variable
top_right_corner
Smoothing variable
viewing_alternate_appearances
The alternate appearances we're viewing, stored here to reestablish them after Logout()s. Lazylist
Proc Details
AltClickNoInteract
Use this instead of [/mob/proc/AltClickOn] where you only want turf content listing without additional atom alt-click interaction
CanPathfindPass
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 CanPathfindPass will always return true if density is FALSE If this is NOT you, ensure you edit your can_pathfind_pass variable. Check __DEFINES/path.dm
Topic
Passes Stat Browser Panel clicks to the game and calls client click on an atom
acid_act
Respond to acid being used on our atom
Default behaviour is to send COMSIG_ATOM_ACID_ACT and return
after_slip
Base proc, intended to be overriden.
This should only be called from one place: inside the slippery component. Called after a human mob slips on this atom.
If you want the person who slipped to have something special done to them, put it here.
attack_by
Called when mob user
is hitting us with an item attacking
.
Part of the /obj/item/proc/melee_attack_chain.
Handles calling [/atom/proc/attack] or /obj/item/proc/attack_obj as necessary.
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
Handles COMSIG_ATTACK_BY returning COMPONENT_SKIP_AFTERATTACK. Returns FINISH_ATTACK if the attack chain should stop here.
attackby__legacy__attackchain
Called when user
attacks us with item W
.
Handles COMSIG_ATTACK_BY returning COMPONENT_SKIP_AFTERATTACK. Returns TRUE if afterattack should not be called, FALSE otherwise.
New uses of this proc are prohibited! Use [/atom/proc/attackby] or /atom/proc/base_item_interaction instead! If you are modifiying an existing implementation of this proc, it is expected that you replace it with the proper alternative!
attacked_by
Called after we have been attacked with the item attacker
by user
.
Return value is ignored for purposes of the attack chain.
attacked_by__legacy__attackchain
Called after user
has attacked us with item W
.
New uses of this proc are prohibited! Used /atom/proc/attacked_by. If you are modifiying an existing implementation of this proc, it is expected that you replace it with the proper alternative!
base_item_interaction
Item interaction
Handles non-combat iteractions 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_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.
Objects override this to prevent unanchored objects from smoothing, see /obj/bitmask_smooth()
calculate_adjacencies
Scans all adjacent turfs to find targets to smooth with.
clean_radiation
Removes some radiation from an atom
Removes a configurable amount of radiation from an atom and stops green glow if radiation gets low enough through it. Arguments:
- clean_factor - How much radiation to remove, as a multiple of RAD_BACKGROUND_RADIATION (currently 9)
contents_ui_distance
public
Check the distance for a living mob. Really only used for checks outside the context of a mob. Otherwise, use shared_living_ui_distance().
required src_object The object which owns the UI. required user mob The mob who opened/is using the UI.
return UI_state The state of the UI.
defile
Begin defile and malfunction on-atom definitions
emag_act
This is when an atom is emagged. Should return false if it fails, or it has no emag_act defined.
emp_act
Proc which will make the atom act accordingly to an EMP. This proc can sleep depending on the implementation. So assume it sleeps!
severity - The severity of the EMP. Either EMP_HEAVY, EMP_LIGHT, or EMP_WEAKENED
examine_more
Extended description of an object. Allows you to double examine objects and have them give you a second description of an item. Useful for writing flavourful stuff.
find_type_in_direction
Scans direction to find targets to smooth with.
get_orbiters
Simple helper proc to get a list of everything directly orbiting the current atom, without checking contents, or null if nothing is.
get_orbiters_recursive
Recursive getter method to return a list of all ghosts transitively orbiting this atom. This will find orbiters either directly orbiting the followed atom, or any orbiters orbiting them (and so on).
This shouldn't be passed arugments.
get_orbiters_up_hierarchy
Check every object in the hierarchy above ourselves for orbiters, and return the full list of them. If an object is being held in a backpack, returns orbiters of the backpack, the person If recursive == TRUE, this will also check recursively through any ghosts seen to make sure we find everything upstream
get_runechat_color
Proc to allow atoms to set their own runechat colour
This is a proc designed to be overridden in places if you want a specific atom to use a specific runechat colour Exampls include consoles using a colour based on their screen colour, and mobs using a colour based off of a customisation property
hit_by_thrown_mob
This proc applies special effects of a carbon mob hitting something, be it a wall, structure, or window. You can set mob_hurt to false to avoid double dipping through subtypes if returning ..()
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
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.
mech_melee_attack
Handle melee attack by a mech
persistent_load
Atom Persistent Loader
Overridden on every atom which needs to load persistent data
persistent_save
Atom Persistent Saver
Overridden on every atom which needs to save persistent data
rad_act
Respond to a radioactive wave hitting this atom
Default behaviour is to send COMSIG_ATOM_RAD_ACT and return
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.
ray_filter_helper
Used to create rays on an item. Make sure to removefilter("rays") when done with it
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
remove_orbiter
Remove an orbiter from the atom it's orbiting.
rename_interactive
-
Call this when you want to present a renaming prompt to the user.
It's a simple proc, but handles annoying edge cases such as forgetting to add a "cancel" button, or being able to rename stuff remotely.
Arguments:
- user - the renamer.
- implement - the tool doing the renaming (usually, a pen).
- use_prefix - whether the new name should follow the format of "thing - user-given label" or if we allow to change the name completely arbitrarily.
- actually_rename - whether we want to really change the
src.name
, or if we want to do everything except that. - prompt - a custom "what do you want rename this thing to be?" prompt shown in the inpit box.
Returns: Either null if the renaming was aborted, or the user-provided sanitized string.
return_analyzable_air
Return the air if we can analyze it
ru_names_rename
Необходимо использовать ПЕРЕД изменением var/name, и использовать только этот прок для изменения в рантайме склонений
set_smoothed_icon_state
Changes the icon state based on the new junction bitmask. Returns the old junction value.
shuttleRotate
Base proc
storage_depth
Returns the storage depth of an atom up to the area level.
The storage depth is the number of storage items the atom is contained in.
Returns -1
if the atom was not found in a container.
storage_depth_turf
Like /atom/proc/storage_depth, but returns the depth to the nearest turf.
Returns -1
if there's no top level turf. (A loc was null somewhere, or a non-turf atom's loc was an area somehow.)
tool_act
Tool Act
Handles using specific tools on this atom directly.
Handles the tool_acts in particular, such as wrenches and screwdrivers.
This can be overriden to handle unique "tool interactions" IE using an item like a tool (when it's not actually one) 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].
update_appearance
Updates the appearence of the icon
Mostly delegates to update_name, update_desc, and update_icon
Arguments:
- updates: A set of bitflags dictating what should be updated. Defaults to [ALL]
update_desc
Updates the description of the atom
update_icon
Updates the icon of the atom
update_icon_state
Updates the icon state of the atom
update_name
Updates the name of the atom
update_overlays
Updates the overlays of the atom. It has to return a list of overlays if it can't call the parent to create one. The list can contain anything that would be valid for the add_overlay proc: Images, mutable appearances, icon states...
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