atom 
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 |
alternate_appearances | The alternate appearances we own |
base_icon_state | Used for changing icon states for different base sprites. |
base_pixel_x | Default pixel x shifting for the atom's icon. |
base_pixel_y | Default pixel y shifting for the atom's icon. |
bubble_emote_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. Must be sorted. |
can_astar_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_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. Used for caching. |
container_type | Chemistry. |
demo_last_appearance | Last appearance of the atom for demo saving purposes |
dont_save | what icon the mob uses for emotebubbles |
drag_start | Whenever we start dragging atom, this variable will contain world.time() of the moment we started dragging atom. It is required to check how long dragNdrop was to prevent abusing the feature of laggy dragNdrop click, otherwile will be 0. |
gravity_sources | Sources that changes gravity of object. Treated as lazy list. |
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. |
ignored_gravity_sources | Sources that 100% won't changes gravity of object. Treated as lazy list. |
interaction_flags_click | Flags to check for in can_perform_action. Used in alt-click checks |
light | Our light source. Don't fuck with this directly unless you have a good reason! |
light_color | Hexadecimal RGB string representing the colour of the light. White by default. |
light_flags | Bitflags to determine lighting-related atom properties. |
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. |
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 |
pass_flags | Things we can pass through while moving. If any of this matches the thing we're trying to pass's [pass_flags_self], then we can pass through. |
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. |
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 |
ru_names | Список склонений названия атома. Пример заполнения в любом наследнике атома ru_names = list(NOMINATIVE = "челюсти жизни", GENITIVE = "челюстей жизни", DATIVE = "челюстям жизни", ACCUSATIVE = "челюсти жизни", INSTRUMENTAL = "челюстями жизни", PREPOSITIONAL = "челюстях жизни") |
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. |
suit_fibers | List of fibers that this atom has |
update_on_z | Lazylist of all images (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 |
viewing_alternate_appearances | The alternate appearances we're viewing, stored here to reestablish them after Logout()s |
Procs | |
Adjacent | Adjacency proc for determining touch range |
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. |
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. |
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 |
InitializeAIController | |
MouseEntered | Update the screentip to reflect what we're hovering over |
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_debris_element | Adds the debris element for projectile impacts. |
add_persistent_overlay | Adds a special overlay to any atom. This overlay will always persist even when an atom is updating its overlays. |
apply_message_emphasis | Scans the input sentence for message emphasis modifiers, notably |italics|, +bold+, and underline -mothblocks |
attackby | Called on an object being hit by an item |
balloon_alert | Creates text that will float from the atom upwards to the viewer. When you add new balloons, make sure to use less text, as possible, starting with small letter |
balloon_alert_to_viewers | Create balloon alerts (text that floats up) to everything within range. Will only display to people who can see. |
blob_act | React to a hit by a blob object |
can_see | Step-towards method of determining whether one atom can see another. Similar to viewers() note: this is a line of sight algorithm, view() does not do any sort of raycasting and cannot be emulated by it accurately |
click_alt | |
collect_all_atoms_of_type | Proc that collects all atoms of passed path in our atom contents
and returns it in a list() |
contains | Returns true if the src countain the atom target |
contents_ui_distance | public |
drop_ungibbable_items | Forces atom to drop all the important items while dereferencing them from their containers both ways. To be used to preserve important items before mob gib/self-gib. Returns a list with all saved items. |
fart_act | Special treatment of /datum/emote/living/carbon/human/fart.
Returning TRUE will stop emote execution. |
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 |
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 |
get_all_adjacent_turfs | Proc which gets all adjacent turfs to src , including the turf that src is on. |
get_all_contents | Returns the src and all recursive contents as a list. |
get_all_contents_type | Same as get_all_contents(), but returns a list of atoms of the passed type |
get_emissive_block | Updates atom's emissive block if present. |
get_explosion_block | returns how much the object blocks an explosion. Used by subtypes. |
get_gravity | Returns TRUE if this atom has gravity for the passed in turf |
get_oversized_icon_offsets | Returns an x and y value require to reverse the transformations made to center an oversized icon |
get_runechat_color | Proc to allow atoms to set their own runechat colour |
grab_attack | Called when living mob clicks on this atom with pulled movable. Adjacency and correct pull hand is already checked. |
handle_fall | Used for making a sound when a mob involuntarily falls into the ground. |
handle_slip | Handle the atom being slipped over |
has_prints | Proc thats checks if mobs can leave fingerprints and fibers on the atom |
hit_by_thrown_carbon | 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 |
mech_melee_attack | Handle melee attack by a mech |
ninjadrain_act | Atom level proc for space ninja's glove interactions. |
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. |
persistent_load | Atom Persistent Loader |
persistent_save | Atom Persistent Saver |
ray_filter_helper | Used to create rays on an item. Make sure to "remove_filter("rays")" when done with it |
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 |
relaydrive | A special case of relaymove() in which the person relaying the move may be "driving" this atom |
remove_persistent_overlay | Removes a persistent overlay from an atom if it exists. |
rename_interactive | |
return_analyzable_air | Return the air if we can analyze it |
setDir | Hook for running code when a dir change occurs |
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_density | Setter for the density variable to append behavior related to its changing. |
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_color | Setter for the light color of this atom. |
set_light_flags | Setter for the light flags of this atom. |
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. |
shuttleRotate | Base proc |
spasm_animation | Similar to shake but more spasm-y and jerk-y |
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... WARNING: if you provide external list to this proc, IT MUST BE A COPY, since ref to this list is saved in var/managed_overlays. |
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
alternate_appearances 
The alternate appearances we own
base_icon_state 
Used for changing icon states for different base sprites.
base_pixel_x 
Default pixel x shifting for the atom's icon.
base_pixel_y 
Default pixel y shifting for the atom's icon.
bubble_emote_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. Must be sorted.
can_astar_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_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. Used for caching.
container_type 
Chemistry.
demo_last_appearance 
Last appearance of the atom for demo saving purposes
dont_save 
what icon the mob uses for emotebubbles
drag_start 
Whenever we start dragging atom, this variable will contain world.time() of the moment we started dragging atom. It is required to check how long dragNdrop was to prevent abusing the feature of laggy dragNdrop click, otherwile will be 0.
gravity_sources 
Sources that changes gravity of object. Treated as lazy list.
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.
ignored_gravity_sources 
Sources that 100% won't changes gravity of object. Treated as lazy list.
interaction_flags_click 
Flags to check for in can_perform_action. Used in alt-click checks
light 
Our light source. Don't fuck with this directly unless you have a good reason!
light_color 
Hexadecimal RGB string representing the colour of the light. White by default.
light_flags 
Bitflags to determine lighting-related atom properties.
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.
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
pass_flags 
Things we can pass through while moving. If any of this matches the thing we're trying to pass's [pass_flags_self], then we can pass through.
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.
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
ru_names 
Список склонений названия атома. Пример заполнения в любом наследнике атома ru_names = list(NOMINATIVE = "челюсти жизни", GENITIVE = "челюстей жизни", DATIVE = "челюстям жизни", ACCUSATIVE = "челюсти жизни", INSTRUMENTAL = "челюстями жизни", PREPOSITIONAL = "челюстях жизни")
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.
suit_fibers 
List of fibers that this atom has
update_on_z 
Lazylist of all images (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
viewing_alternate_appearances 
The alternate appearances we're viewing, stored here to reestablish them after Logout()s
Proc Details
Adjacent
Adjacency proc for determining touch range
This is mostly to determine if a user can enter a square for the purposes of touching something. Examples include reaching a square diagonally or reaching something on the other side of a glass window.
This is calculated by looking for border items, or in the case of clicking diagonally from yourself, dense items. This proc will NOT notice if you are trying to attack a window on the other side of a dense object in its turf. There is a window helper for that.
Note that in all cases the neighbor is handled simply; this is usually the user's mob, in which case it is up to you to check that the mob is not inside of something
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.
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.
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
InitializeAIController
-
Instantiates the AI controller of this atom. Override this if you want to assign variables first.
-
This will work fine without manually passing arguments.
MouseEntered
Update the screentip to reflect what we're hovering over
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_debris_element
Adds the debris element for projectile impacts.
add_persistent_overlay
Adds a special overlay to any atom. This overlay will always persist even when an atom is updating its overlays.
Arguments:
- overlay_to_add - should be an image, mutable_appearance or icon
- id - string ID of our overlay, should be unique, otherwise it will remove all overlays with the same ID
- timer (optional) - if set overlay will be removed after passed time
apply_message_emphasis
Scans the input sentence for message emphasis modifiers, notably |italics|, +bold+, and underline -mothblocks
attackby
Called on an object being hit by an item
Arguments:
- obj/item/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
balloon_alert
Creates text that will float from the atom upwards to the viewer. When you add new balloons, make sure to use less text, as possible, starting with small letter
Russian is preferable in all new balloons, but.. In order not to make bad translation like classical "вы slip на banana peel" avoid using balloons, where any [variables] are used
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.
blob_act
React to a hit by a blob object
default behaviour is to send the COMSIG_ATOM_BLOB_ACT signal
can_see
Step-towards method of determining whether one atom can see another. Similar to viewers() note: this is a line of sight algorithm, view() does not do any sort of raycasting and cannot be emulated by it accurately
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.
collect_all_atoms_of_type
Proc that collects all atoms of passed path
in our atom contents
and returns it in a list()
contains
Returns true if the src countain the atom target
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.
drop_ungibbable_items
Forces atom to drop all the important items while dereferencing them from their containers both ways. To be used to preserve important items before mob gib/self-gib. Returns a list with all saved items.
fart_act
Special treatment of /datum/emote/living/carbon/human/fart.
Returning TRUE
will stop emote execution.
Arguments:
- user - mob who used the emote.
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
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
get_all_adjacent_turfs
Proc which gets all adjacent turfs to src
, including the turf that src
is on.
This is similar to doing for(var/turf/T in range(1, src))
. However it is slightly more performant.
Additionally, the above proc becomes more costly the more atoms there are nearby. This proc does not care about that.
get_all_contents
Returns the src and all recursive contents as a list.
get_all_contents_type
Same as get_all_contents(), but returns a list of atoms of the passed type
get_emissive_block
Updates atom's emissive block if present.
get_explosion_block
returns how much the object blocks an explosion. Used by subtypes.
get_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:
- Gravity if global admin override
- Gravity if the z-level has trait ZTRAIT_GRAVITY
- 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
- otherwise no gravity
get_oversized_icon_offsets
Returns an x and y value require to reverse the transformations made to center an oversized icon
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
grab_attack
Called when living mob clicks on this atom with pulled movable. Adjacency and correct pull hand is already checked.
Arguments:
- grabber - Mob performing grab attack.
- grabbed_thing - Movable pulled by grabber, equals to grabber.pulling.
Return TRUE
to skip further actions in unarmed attack chain.
handle_fall
Used for making a sound when a mob involuntarily falls into the ground.
handle_slip
Handle the atom being slipped over
has_prints
Proc thats checks if mobs can leave fingerprints and fibers on the atom
hit_by_thrown_carbon
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
mech_melee_attack
Handle melee attack by a mech
ninjadrain_act
Atom level proc for space ninja's glove interactions.
Proc which only occurs when space ninja uses his gloves on an atom. Does nothing by default, but effects will vary. Arguments:
- ninja_suit - The offending space ninja's suit.
- ninja - The human mob wearing the suit.
- ninja_gloves - The offending space ninja's gloves.
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.
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
ray_filter_helper
Used to create rays on an item. Make sure to "remove_filter("rays")" when done with it
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
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_persistent_overlay
Removes a persistent overlay from an atom if it exists.
Arguments:
- id - string ID of the overlay we should remove
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
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)
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_density
Setter for the density
variable to append behavior related to its changing.
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_color
Setter for the light color of this atom.
set_light_flags
Setter for the light flags of this atom.
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).
shuttleRotate
Base proc
spasm_animation
Similar to shake but more spasm-y and jerk-y
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... WARNING: if you provide external list to this proc, IT MUST BE A COPY, since ref to this list is saved in var/managed_overlays.