Goonstation 13 - Modules - TypesVar Details - Proc Details

/atom

Vars

default_materialMaterial id of this object as a material id (lowercase string), set on New()
default_speech_output_channelThe default channel that this atom will attempt to send unprefixed say messages to.
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.")
impact_iconWhat icon to use if we want to create specific particles when hit by a projectile
impact_icon_stateWhat icon state to use if we want to create specific particles when hit by a projectile
last_voice_soundThe world time that this atom last played a voice sound effect.
levelAre we above or below the floor tile?
listen_treeThis atom's listen module tree. May be null if no input modules are registered.
maptext_managerThe maptext manager of this atom, responsible for displaying maptext over this atom to clients.
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_soundWhether objects inside of this atom should be able to hear messages that could be heard by this atom.
outermost_listener_trackerThis atom's outermost listener tracker.
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.
say_languageThe default output language for say messages to be sent in.
speech_bubbleThe shared speech bubble appearance.
speech_bubble_icon_askThe default speech bubble for spoken phrases ending in a question mark.
speech_bubble_icon_exclaimThe default speech bubble for spoken phrases ending in an exclaimation mark.
speech_bubble_icon_sayThe default speech bubble for standard spoken phrases. Also acts as a fallback icon if contextual icons are null.
speech_bubble_icon_singThe default speech bubble for sung phrases.
speech_bubble_icon_sing_badThe default speech bubble for sung phrases that were either sung loudly or poorly.
speech_treeThis atom's speech module tree. Lazy loaded on the first say() call.
speech_verb_askThe default say verb for spoken phrases ending in a question mark. Accepts both text and lists
speech_verb_exclaimThe default say verb for spoken phrases ending in an exclaimation mark. Accepts both text and lists
speech_verb_gaspThe default say verb for gasped phrases. Accepts both text and lists
speech_verb_sayThe default say verb for standard spoken phrases. Also acts as a fallback verb if contextual verbs are null. Accepts both text and lists
speech_verb_stammerThe default say verb for stammered phrases. Accepts both text and lists
statusEffectsList of status effects
storageStorage for items
texture_sizeOverride for the texture size used by setTexture.
use_speech_bubbleWhether this atom should display a speech bubble after speaking.
uses_default_material_appearanceDoes this object use appearance from the default material?
uses_default_material_nameDoes this object use the default material's name?
voice_pitchThe pitch of this atom's voice.
voice_sound_overrideIf set, will override voice_type and play the specified sound when this atom speaks.
voice_typeThe set of vocal sounds that this atom should use. See the sounds_speak global list.

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.
Bumpedcalled when this atom is bumped by the argument
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
Crossedcalled when atom AM crosses onto where this atom is
Enteredcalled when atom AM enters the contents of this atom
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).
Uncrossedcalled when atom AM uncrosses where this atom is
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.
does_impact_particlesShould this atom emit particles when hit by a projectile, when the projectile is of the given type
emoteA stub proc to facilitate say() passing on messages prefixed with "*".
ensure_listen_treeReturns this atom's listen module tree. If this atom does not possess a listen module tree, instantiates one.
ensure_outermost_listener_trackerReturns this atom's outermost listener tracker. If this atom does not possess an outermost listener tracker, instantiates one.
ensure_speech_treeReturns this atom's speech module tree. If this atom does not possess a speech module tree, instantiates one.
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_average_colorinclude_local_color: multiply the cached average icon color by the specific src.color var of this atom
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
sayThe primary entry point for all say code; messages sent will be mutated by the speech tree, passed to a say channel, disseminated to listeners, mutated by listen trees, then finally heard by recipients.
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
show_speech_bubbleDisplays an atom's speech bubble overlay, then removes it after a short delay.
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.
unglue_attached_toRemoves anything that is glued to this atom
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

default_material

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

default_speech_output_channel

The default channel that this atom will attempt to send unprefixed say messages to.

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.")

impact_icon

What icon to use if we want to create specific particles when hit by a projectile

impact_icon_state

What icon state to use if we want to create specific particles when hit by a projectile

last_voice_sound

The world time that this atom last played a voice sound effect.

level

Are we above or below the floor tile?

listen_tree

This atom's listen module tree. May be null if no input modules are registered.

maptext_manager

The maptext manager of this atom, responsible for displaying maptext over this atom to clients.

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

Whether objects inside of this atom should be able to hear messages that could be heard by this atom.

outermost_listener_tracker

This atom's outermost listener tracker.

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.

say_language

The default output language for say messages to be sent in.

speech_bubble

The shared speech bubble appearance.

speech_bubble_icon_ask

The default speech bubble for spoken phrases ending in a question mark.

speech_bubble_icon_exclaim

The default speech bubble for spoken phrases ending in an exclaimation mark.

speech_bubble_icon_say

The default speech bubble for standard spoken phrases. Also acts as a fallback icon if contextual icons are null.

speech_bubble_icon_sing

The default speech bubble for sung phrases.

speech_bubble_icon_sing_bad

The default speech bubble for sung phrases that were either sung loudly or poorly.

speech_tree

This atom's speech module tree. Lazy loaded on the first say() call.

speech_verb_ask

The default say verb for spoken phrases ending in a question mark. Accepts both text and lists

speech_verb_exclaim

The default say verb for spoken phrases ending in an exclaimation mark. Accepts both text and lists

speech_verb_gasp

The default say verb for gasped phrases. Accepts both text and lists

speech_verb_say

The default say verb for standard spoken phrases. Also acts as a fallback verb if contextual verbs are null. Accepts both text and lists

speech_verb_stammer

The default say verb for stammered phrases. Accepts both text and lists

statusEffects

List of status effects

storage

Storage for items

texture_size

Override for the texture size used by setTexture.

use_speech_bubble

Whether this atom should display a speech bubble after speaking.

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?

voice_pitch

The pitch of this atom's voice.

voice_sound_override

If set, will override voice_type and play the specified sound when this atom speaks.

voice_type

The set of vocal sounds that this atom should use. See the sounds_speak global list.

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.

Bumped

called when this atom is bumped by the argument

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

Crossed

called when atom AM crosses onto where this atom is

Entered

called when atom AM enters the contents of this atom

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).

Uncrossed

called when atom AM uncrosses where this atom is

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.

does_impact_particles

Should this atom emit particles when hit by a projectile, when the projectile is of the given type

emote

A stub proc to facilitate say() passing on messages prefixed with "*".

ensure_listen_tree

Returns this atom's listen module tree. If this atom does not possess a listen module tree, instantiates one.

ensure_outermost_listener_tracker

Returns this atom's outermost listener tracker. If this atom does not possess an outermost listener tracker, instantiates one.

ensure_speech_tree

Returns this atom's speech module tree. If this atom does not possess a speech module tree, instantiates one.

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_average_color

include_local_color: multiply the cached average icon color by the specific src.color var of this atom

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

say

The primary entry point for all say code; messages sent will be mutated by the speech tree, passed to a say channel, disseminated to listeners, mutated by listen trees, then finally heard by recipients.

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

show_speech_bubble

Displays an atom's speech bubble overlay, then removes it after a short delay.

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.

unglue_attached_to

Removes anything that is glued to this atom

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!