/tg/ Station 13 - Modules - TypesVar Details - Proc Details

/atom/movable

Vars

blocks_emissiveEither FALSE, EMISSIVE_BLOCK_GENERIC, or EMISSIVE_BLOCK_UNIQUE
demo_last_locLast location of the atom for demo recording purposes
em_blockInternal holder for emissive blocker object, do not use directly use blocks_emissive
generic_canpassIf false makes CanPass call CanPassThrough on this type instead of using default behaviour

Procs

CanPassThroughReturns true or false to allow src to move through the blocker, mover has final say
CanReachA backwards depth-limited breadth-first-search to see if the target is logically "in" anything adjacent to us.
Process_SpacemoveCalled whenever an object moves and by mobs when they attempt to move themselves through space And when an object or action applies a force on src, see newtonian_move
add_blocked_languageAdds a language to the blocked language list. Use this over remove_language in cases where you will give languages back later.
attacked_byCalled from /obj/item/proc/attack_obj and /obj/item/proc/attack if the attack succeeds
can_speak_languageChecks if atom can speak the language.
copy_languagesCopies all languages into the supplied atom/language holder. Source should be overridden when you do not want the language overwritten by later atom updates or want to avoid blocked languages.
could_speak_languageReturns the result of tongue specific limitations on spoken languages.
get_language_holderGets or creates the relevant language holder. For mindless atoms, gets the local one. For atom with mind, gets the mind one.
get_random_spoken_languageGets a random spoken language, useful for forced speech and such.
get_random_understood_languageGets a random understood language, useful for hallucinations and such.
get_selected_languageReturns selected language, if it can be spoken, or finds, sets and returns a new selected language if possible.
grant_all_languagesGrants every language.
grant_languageGrants the supplied language and sets omnitongue true.
has_languageChecks if atom has the language. If spoken is true, only checks if atom can speak the language.
newtonian_moveOnly moves the object if it's under no gravity
on_enter_storagecalled when this atom is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
on_exit_storagecalled when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
relay_container_resistcalled when a mob resists while inside a container that is itself inside something.
remove_all_languagesRemoves every language and sets omnitongue false.
remove_blocked_languageRemoves a language from the blocked language list.
remove_languageRemoves a single language.
setGrabStateUpdates the grab state of the movable
throw_atIf this returns FALSE then callback will not be called.
update_atom_languagesEmpties out the atom specific languages and updates them according to the current atoms language holder. As a side effect, it also creates missing language holders in the process.

Var Details

blocks_emissive

Either FALSE, EMISSIVE_BLOCK_GENERIC, or EMISSIVE_BLOCK_UNIQUE

demo_last_loc

Last location of the atom for demo recording purposes

em_block

Internal holder for emissive blocker object, do not use directly use blocks_emissive

generic_canpass

If false makes CanPass call CanPassThrough on this type instead of using default behaviour

Proc Details

CanPassThrough

Returns true or false to allow src to move through the blocker, mover has final say

CanReach

A backwards depth-limited breadth-first-search to see if the target is logically "in" anything adjacent to us.

Process_Spacemove

Called whenever an object moves and by mobs when they attempt to move themselves through space And when an object or action applies a force on src, see newtonian_move

Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting

Mobs should return 1 if they should be able to move of their own volition, see /client/Move

Arguments:

add_blocked_language

Adds a language to the blocked language list. Use this over remove_language in cases where you will give languages back later.

attacked_by

Called from /obj/item/proc/attack_obj and /obj/item/proc/attack if the attack succeeds

can_speak_language

Checks if atom can speak the language.

copy_languages

Copies all languages into the supplied atom/language holder. Source should be overridden when you do not want the language overwritten by later atom updates or want to avoid blocked languages.

could_speak_language

Returns the result of tongue specific limitations on spoken languages.

get_language_holder

Gets or creates the relevant language holder. For mindless atoms, gets the local one. For atom with mind, gets the mind one.

get_random_spoken_language

Gets a random spoken language, useful for forced speech and such.

get_random_understood_language

Gets a random understood language, useful for hallucinations and such.

get_selected_language

Returns selected language, if it can be spoken, or finds, sets and returns a new selected language if possible.

grant_all_languages

Grants every language.

grant_language

Grants the supplied language and sets omnitongue true.

has_language

Checks if atom has the language. If spoken is true, only checks if atom can speak the language.

newtonian_move

Only moves the object if it's under no gravity

on_enter_storage

called when this atom is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.

on_exit_storage

called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.

relay_container_resist

called when a mob resists while inside a container that is itself inside something.

remove_all_languages

Removes every language and sets omnitongue false.

remove_blocked_language

Removes a language from the blocked language list.

remove_language

Removes a single language.

setGrabState

Updates the grab state of the movable

This exists to act as a hook for behaviour

throw_at

If this returns FALSE then callback will not be called.

update_atom_languages

Empties out the atom specific languages and updates them according to the current atoms language holder. As a side effect, it also creates missing language holders in the process.