Goonstation 13 - Modules - TypesVar Details - Proc Details

/atom

Vars

chat_textAnything can speak... if it can speak
default_materialMaterial id of this object as a material id (lowercase string), set on New()
filter_data@file @copyright 2020 @author actioninja (https://github.com/actioninja ) @license MIT
gas_impermeableIf atmos should be blocked by this - special behaviours handled in gas_cross() overrides
help_messageThe message displayed when the atom is alt+doubleclicked, should contain a description of the atom's functionality. You can also override get_help_message() to return a message dynamically (based on atom state or the user etc.) Try to highlight the tools used to do stuff with tags. DO NOT override this directly, use HELP_MESSAGE_OVERRIDE instead. Example: HELP_MESSAGE_OVERRIDE("Use a screwdriver to unscrew the cover.")
levelAre we above or below the floor tile?
mat_changeappearanceChange the appearance of this atom when a material is applied?
mat_changedescChange the desc of this atom when a material is applied?
mat_changenameChange the name of this atom when a material is applied?
material_applied_appearanceWhether the last material applied updated appearance. Used for re-applying material appearance on icon update
open_to_soundIf hear_talk is triggered on this object, make my contents hear_talk as well
pass_unstableWhether pathfinding is forbidden from caching the passability of this atom. See /turf/passability_cache
pixel_pointShould points thrown at this take into account the click pixel value
reagentsChemistry.
rest_multA multiplier that changes how an atom stands up from resting. Yes.
statusEffectsList of status effects
storageStorage for items
texture_sizeOverride for the texture size used by setTexture.
typeinfo_typeThe base type for nearly all physical objects in SS13
uses_default_material_appearanceDoes this object use appearance from the default material?
uses_default_material_nameDoes this object use the default material's name?

Procs

Attackbywrapper proc for /atom/proc/attackby so that signals are always sent. Call this, but do not override it.
Attackhandwrapper proc for /atom/proc/attack_hand so that signals are always sent. Call this, but do not override it.
CheckExitWrapper around Uncross for when you want to call it manually with a target turf
CrossThis is the proc to check if a movable can cross this atom. DO NOT put side effects in this proc, it is called for pathfinding Seriously I mean it, you think it'll be fine and then it causes the teleporting gene booth bug
MouseDropOverride mouse_drop instead of this. Call this instead of mouse_drop, but you probably shouldn't!
UncrossOverride and return FALSE to prevent O from moving out of the tile where src is. In order to override this properly be sure to have the do_bump = TRUE default argument AND to call UNCROSS_BUMP_CHECK(O) in all branches where the return value can be FALSE (assign this return value to . instead of doing an explicit return).
UpdateIconCall this proc inplace of update_icon(...)
_MouseDrop_TOverride MouseDrop_T instead of this. Call this instead of MouseDrop_T, but you probably shouldn't!
add_fingerprintAdd a mob's fingerprint to something. If hidden_only is TRUE, only add to admin-visible prints.
add_fingerprint_directAdd a fingerprint to an atom directly. Doesn't interact with hidden prints at all
admin_visible_nameA proc to give this item a special name when viewed in an admin context (just the tilde-rightclick menu for now but probably other places later)
attack_handinternal proc for when an atom is attacked by a user's hand. Override this, but do not call it,
attackbyinternal proc for when an atom is attacked by an item. Override this, but do not call it,
blob_actBLOB RELATED PROCS
changeStatusIf atom has status with {statusId}, change by {duration}.
containsReturns true if the given atom is within src's contents (deeply/recursively)
contents_ui_distancepublic
create_reagentsConvenience proc to create a reagents holder for an atom Max vol is maximum volume of holder
create_storageadd storage to an atom
damage_bluntDoes x blunt damage to the atom
damage_coldDoes x cold damage to the atom
damage_corrosiveDoes x corrosive damage to the atom
damage_electricityDoes x electricity damage to the atom
damage_heatdoes x heat damage to the atom
damage_piercingDoes x piercing damage to the atom
damage_radiationDoes x radiation damage to the atom
damage_slashingDoes x slashing damage to the atom
delStatusDeletes the given status from the atom.
gas_crossChecks whether or not gases can pass through. Called by /turf/gas_cross for all atoms within the turf. Returns: TRUE for allowed pass and FALSE for denied pass.
getStatusDurationReturns duration of status with given {statusId}, or null if not found.
getStatusListReturns a list of all the datum/statusEffect on source atom.
getStatusPrototypeReturns prototype of status effect from the globalStatusPrototypes list with given {statusId}, or null if not found
get_connected_directions_bitflagReturn a bitflag that represents all potential connected icon_states
get_help_messageOverride this if you want the alt+doubleclick help message to be dynamic (for example based on the state of deconstruction). For consistency you should always also override help_message at least to a placeholder never-to-be-seen string, this is important for the context menu functionality. Use the HELP_MESSAGE_OVERRIDE macro to do that.
hasStatusReturns first status with given {statusId} or null if not found.
help_verb_dynamicSame as help_verb but this one except visible, added dynamically when requested by signals
is_open_containerConvenience proc to see if a container is open for chemistry handling Takes an argument of whether this openness is for the purpose of pouring something in or not (this should maybe just be a separate flag but we ran out of bits okay) returns true if open, false if closed
material_on_attack_useCalled when an atom is used for an attack a atom for mat effects
material_trigger_on_blob_attackedCalled when an atom or someone wearing the material is attacked for mat effects
material_trigger_on_bulletCalled when an atom is hit by a bullet for mat effects
material_trigger_on_chemsCalled when an atom is hit by a bullet for mat effects
material_trigger_on_explosionCalled when an atom is caught in an explosion
material_trigger_on_mob_attackedCalled when a mob holding this atom is attacked for mat effects
material_trigger_on_tempCalled when an atom is affected by a heat change
material_trigger_when_attackedCalled when the item is attacked with another atom for mat effects. If someone is smashed against the item or with hands, the mob itself is expected to be passed as attackatom
normal_xReturns the x component of the surface normal of the atom relative to an incident direction
normal_yReturns the y component of the surface normal of the atom relative to an incident direction
onMaterialChangedCalled AFTER the material of the object was changed.
parent_storage_loc_changedoverride as necessary, used to affect an atom stored in any nested level of storage when any higher parent storage changes location
removeMaterialSimply removes a material from an object.
remove_storageremove atom's storage
return_airif direct then only return gas ACTUALLY inside the thing rather than surrounding air
setMaterialSets the material of an object. PLEASE USE THIS TO SET MATERIALS UNLESS YOU KNOW WHAT YOU'RE DOING.
setMaterialAppearancesets the appearance of a material, but does not trigger any tiggerOnAdd or onMaterialChanged behaviour Order of precedence is as follows: if the material is in the list of appearences to ignore, do nothing If an iconstate exists in the icon for iconstate$$materialID, that is chosen If the material has mat_changeappaerance set, then first texture is applied, then color (including alpha)
setMaterialAppearanceForImageApplies material icon_state override to an /image based on this atom's material (or the material provided)
setStatusIf atom has status with {statusId}, set it to {duration}.
set_icon_stateChanges the icon state and returns TRUE if the icon state changed.
set_open_containerSet a container to be open or closed and handle chemistry reactions that might happen as a result
should_auto_connectCheck a turf and its contents to see if they're a valid auto-connection target
special_desc
temperature_exposeExposes our reagents and material to some temperature, letting them figure out how to react to it.
tri_messageUsed in messages with three separate parties that should receive different messages second_target - the second individual involved in the interaction, with the source atom being the first individual viewer_message - the message shown to observers that aren't specified targets first_message - the message shown to the atom this proc is called from second_message - the message shown to second_target blind_message (optional) is what blind people will hear, e.g. "You hear something!" Observers in range of either target will see the message, so the proc can be called on either target
try_set_icon_stateChecks if the icon state in question exists. If it does it sets it and returns true. Otherwise returns false and doesn't change the icon state. You can supply the new_icon argument to also override src.icon. This will again only be overriden if the icon state + icon combination exists. Not intended for normal use. Current intended use is stuff like src.try_set_icon_state(src.icon_state + "-autumn") for seasonal modifiers etc.
updateStatusUiStub. Override for objects that need to update their ui with status effect information.
update_iconDO NOT CALL THIS PROC - Call UpdateIcon(...) Instead!

Var Details

chat_text

Anything can speak... if it can speak

default_material

Material id of this object as a material id (lowercase string), set on New()

filter_data

@file @copyright 2020 @author actioninja (https://github.com/actioninja ) @license MIT

gas_impermeable

If atmos should be blocked by this - special behaviours handled in gas_cross() overrides

help_message

The message displayed when the atom is alt+doubleclicked, should contain a description of the atom's functionality. You can also override get_help_message() to return a message dynamically (based on atom state or the user etc.) Try to highlight the tools used to do stuff with tags. DO NOT override this directly, use HELP_MESSAGE_OVERRIDE instead. Example: HELP_MESSAGE_OVERRIDE("Use a screwdriver to unscrew the cover.")

level

Are we above or below the floor tile?

mat_changeappearance

Change the appearance of this atom when a material is applied?

mat_changedesc

Change the desc of this atom when a material is applied?

mat_changename

Change the name of this atom when a material is applied?

material_applied_appearance

Whether the last material applied updated appearance. Used for re-applying material appearance on icon update

open_to_sound

If hear_talk is triggered on this object, make my contents hear_talk as well

pass_unstable

Whether pathfinding is forbidden from caching the passability of this atom. See /turf/passability_cache

pixel_point

Should points thrown at this take into account the click pixel value

reagents

Chemistry.

rest_mult

A multiplier that changes how an atom stands up from resting. Yes.

statusEffects

List of status effects

storage

Storage for items

texture_size

Override for the texture size used by setTexture.

typeinfo_type

The base type for nearly all physical objects in SS13

Lots of functionality resides in this type.

uses_default_material_appearance

Does this object use appearance from the default material?

uses_default_material_name

Does this object use the default material's name?

Proc Details

Attackby

wrapper proc for /atom/proc/attackby so that signals are always sent. Call this, but do not override it.

Attackhand

wrapper proc for /atom/proc/attack_hand so that signals are always sent. Call this, but do not override it.

CheckExit

Wrapper around Uncross for when you want to call it manually with a target turf

Cross

This is the proc to check if a movable can cross this atom. DO NOT put side effects in this proc, it is called for pathfinding Seriously I mean it, you think it'll be fine and then it causes the teleporting gene booth bug

MouseDrop

Override mouse_drop instead of this. Call this instead of mouse_drop, but you probably shouldn't!

Uncross

Override and return FALSE to prevent O from moving out of the tile where src is. In order to override this properly be sure to have the do_bump = TRUE default argument AND to call UNCROSS_BUMP_CHECK(O) in all branches where the return value can be FALSE (assign this return value to . instead of doing an explicit return).

UpdateIcon

Call this proc inplace of update_icon(...)

_MouseDrop_T

Override MouseDrop_T instead of this. Call this instead of MouseDrop_T, but you probably shouldn't!

add_fingerprint

Add a mob's fingerprint to something. If hidden_only is TRUE, only add to admin-visible prints.

add_fingerprint_direct

Add a fingerprint to an atom directly. Doesn't interact with hidden prints at all

admin_visible_name

A proc to give this item a special name when viewed in an admin context (just the tilde-rightclick menu for now but probably other places later)

attack_hand

internal proc for when an atom is attacked by a user's hand. Override this, but do not call it,

attackby

internal proc for when an atom is attacked by an item. Override this, but do not call it,

blob_act

BLOB RELATED PROCS

changeStatus

If atom has status with {statusId}, change by {duration}.

(The change is relative to the current value, think +=) If atom does not have status, add it with given {duration}. In both cases {optional} will be passed into either .onAdd or .onChange on the status effect. Useful for custom behaviour.

contains

Returns true if the given atom is within src's contents (deeply/recursively)

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.

create_reagents

Convenience proc to create a reagents holder for an atom Max vol is maximum volume of holder

create_storage

add storage to an atom

damage_blunt

Does x blunt damage to the atom

damage_cold

Does x cold damage to the atom

damage_corrosive

Does x corrosive damage to the atom

damage_electricity

Does x electricity damage to the atom

damage_heat

does x heat damage to the atom

damage_piercing

Does x piercing damage to the atom

damage_radiation

Does x radiation damage to the atom

damage_slashing

Does x slashing damage to the atom

delStatus

Deletes the given status from the atom.

{status} can either be a reference to a status effect or a status effect ID.

gas_cross

Checks whether or not gases can pass through. Called by /turf/gas_cross for all atoms within the turf. Returns: TRUE for allowed pass and FALSE for denied pass.

getStatusDuration

Returns duration of status with given {statusId}, or null if not found.

getStatusList

Returns a list of all the datum/statusEffect on source atom.

{statusId} optional status ID to match, otherwise matches any status type {optionalArgs} can be passed in for additional checks that are handled in the effects .onCheck proc. Useful if you want to check some custom conditions on status effects.

getStatusPrototype

Returns prototype of status effect from the globalStatusPrototypes list with given {statusId}, or null if not found

get_connected_directions_bitflag

Return a bitflag that represents all potential connected icon_states

connecting with diagonal tiles require additional bitflags i.e. there is a difference between N & E, and N & E & NE

N, S, E, W, NE, SE, SW, NW

1, 2, 4, 8, 16, 32, 64, 128

connect_diagonals 0 = no diagonal sprites, 1 = diagonal only if both adjacent cardinals are present, 2 = always allow diagonals

get_help_message

Override this if you want the alt+doubleclick help message to be dynamic (for example based on the state of deconstruction). For consistency you should always also override help_message at least to a placeholder never-to-be-seen string, this is important for the context menu functionality. Use the HELP_MESSAGE_OVERRIDE macro to do that.

hasStatus

Returns first status with given {statusId} or null if not found.

{optionalArgs} can be passed in for additional checks that are handled in the effects .onCheck proc. Useful if you want to check some custom conditions on status effects.

help_verb_dynamic

Same as help_verb but this one except visible, added dynamically when requested by signals

is_open_container

Convenience proc to see if a container is open for chemistry handling Takes an argument of whether this openness is for the purpose of pouring something in or not (this should maybe just be a separate flag but we ran out of bits okay) returns true if open, false if closed

material_on_attack_use

Called when an atom is used for an attack a atom for mat effects

material_trigger_on_blob_attacked

Called when an atom or someone wearing the material is attacked for mat effects

material_trigger_on_bullet

Called when an atom is hit by a bullet for mat effects

material_trigger_on_chems

Called when an atom is hit by a bullet for mat effects

material_trigger_on_explosion

Called when an atom is caught in an explosion

material_trigger_on_mob_attacked

Called when a mob holding this atom is attacked for mat effects

material_trigger_on_temp

Called when an atom is affected by a heat change

material_trigger_when_attacked

Called when the item is attacked with another atom for mat effects. If someone is smashed against the item or with hands, the mob itself is expected to be passed as attackatom

normal_x

Returns the x component of the surface normal of the atom relative to an incident direction

normal_y

Returns the y component of the surface normal of the atom relative to an incident direction

onMaterialChanged

Called AFTER the material of the object was changed.

parent_storage_loc_changed

override as necessary, used to affect an atom stored in any nested level of storage when any higher parent storage changes location

removeMaterial

Simply removes a material from an object.

remove_storage

remove atom's storage

return_air

if direct then only return gas ACTUALLY inside the thing rather than surrounding air

setMaterial

Sets the material of an object. PLEASE USE THIS TO SET MATERIALS UNLESS YOU KNOW WHAT YOU'RE DOING.

setMaterialAppearance

sets the appearance of a material, but does not trigger any tiggerOnAdd or onMaterialChanged behaviour Order of precedence is as follows: if the material is in the list of appearences to ignore, do nothing If an iconstate exists in the icon for iconstate$$materialID, that is chosen If the material has mat_changeappaerance set, then first texture is applied, then color (including alpha)

setMaterialAppearanceForImage

Applies material icon_state override to an /image based on this atom's material (or the material provided)

setStatus

If atom has status with {statusId}, set it to {duration}.

(The change is absolute, think =)

If atom does not have status, add it with given {duration}.

In both cases {optional} will be passed into either .onAdd or .onChange on the status effect. Useful for custom behaviour.

set_icon_state

Changes the icon state and returns TRUE if the icon state changed.

set_open_container

Set a container to be open or closed and handle chemistry reactions that might happen as a result

should_auto_connect

Check a turf and its contents to see if they're a valid auto-connection target

special_desc

temperature_expose

Exposes our reagents and material to some temperature, letting them figure out how to react to it.

tri_message

Used in messages with three separate parties that should receive different messages second_target - the second individual involved in the interaction, with the source atom being the first individual viewer_message - the message shown to observers that aren't specified targets first_message - the message shown to the atom this proc is called from second_message - the message shown to second_target blind_message (optional) is what blind people will hear, e.g. "You hear something!" Observers in range of either target will see the message, so the proc can be called on either target

try_set_icon_state

Checks if the icon state in question exists. If it does it sets it and returns true. Otherwise returns false and doesn't change the icon state. You can supply the new_icon argument to also override src.icon. This will again only be overriden if the icon state + icon combination exists. Not intended for normal use. Current intended use is stuff like src.try_set_icon_state(src.icon_state + "-autumn") for seasonal modifiers etc.

updateStatusUi

Stub. Override for objects that need to update their ui with status effect information.

update_icon

DO NOT CALL THIS PROC - Call UpdateIcon(...) Instead!

Only override this proc!