movable
Vars | |
anchored | Boolean. Whether or not the atom is considered anchored. |
---|---|
atmos_canpass | Integer (One of CANPASS_* ). Whether air can pass through this atom, and on what conditions. See code\__defines\ZAS.dm . |
blocks_emissive | Integer (One of EMISSIVE_BLOCK_* ). Whether this atom blocks emissive overlays, and what method is used for blocking. See code\__defines\emissives.dm . |
bound_overlay | The mimic (if any) that's directly copying us. |
does_spin | Boolean. Does the atom spin when thrown (of course it does :P) |
em_block | Instance. Internal holder for emissive blocker object, DO NOT USE DIRECTLY. Use blocks_emissive |
icon_height | Integer. The icon height this movable expects to have by default. |
icon_width | Integer. The icon width this movable expects to have by default. |
inertia_dir | Bitflag (Directional). Direction the atom is currently travelling for space drift. Set by space_drift() and Bump() . Used by momentum_do() and the spacedrift subsystem. |
inertia_ignore | Instance. Atom that should be ignored by /mob/get_spacemove_backup() . Updated and used by various movement related procs. |
inertia_last_loc | Instance. The atoms loc value during the last space movement. Set by space_drift() and the spacedrift subsystem. |
inertia_move_delay | Integer. Number of ticks to add to the current world.time when updating inertia_next_move . Used by Move() and the spacedrift subsystem. |
inertia_moving | Boolean. Whether or not the atom is currently being moved by space drift inertia. Set by the spacedrift subsystem and checked during Move() . |
inertia_next_move | Integer. world.time that the next space drift movement should occur. Set by Move() and the spacedrift subsystem. Used by the spacedrift subsystem. |
item_state | String (Icon state). Used to specify the item state for the on-mob overlays. Primarily only used in /obj/item/get_icon_state() . Generally, you should only be updating this in on_update_icon() . |
l_move_time | Integer. The world.time of the last movement. Set during Move() . |
last_move | Bitflag (Directionals). Direction of the last movement. Generally passed to step() as the dir parameter. Set during Move() . |
movable_flags | Bitflag (Any of MOVABLE_FLAG_* ). Bitflags for movable atoms. See code\__defines\flags.dm . |
move_speed | Integer. The atom's current movement speed, calculated as the difference between world.time and l_move_time . Set during Move() . |
moved_recently | Boolean. Whether or not this atom has recently (Within the past 50 ticks) been force moved by /obj/item/device/radio/electropack/receive_signal() . |
movement_handlers | List (Instances of /datum/movement ) - List of movement handlers attached to this atom. |
pulledby | Instance. The mob currently pulling the atom. |
stored_chat_text | LAZYLIST of /image . Floating text message images being processed by this atom. |
throw_range | Integer. Maximum range, in tiles, this atom can be thrown. |
throw_speed | Integer. The speed at which the atom moves when thrown. Used when calling throw_at() , and in momentum_power() and momentum_do() . |
throwing | Instance. Current thrown thing datum linked to this atom. Set during throw_at() . |
virtual_mob | Virtual Mob Creation |
waterproof | Boolean. Whether or not the atom is affected by being submerged in water. If set to FALSE , water_act() is called when in contact with fluids. |
z_flags | If TRUE, this atom is ignored by Z-Mimic. |
Procs | |
AddMovementHandler | Creates a new movement handler instance and attaches it to this atom's movement_handlers list. |
CheckDexterity | Whether or not user is capable of using this atom based on dexterity. Usually this equates to "Are you a human or silicon mob?" |
HasMovementHandler | Checks if the provided movement handler path exists in this atom's movement_handlers list. Ignores subtypes, must be an exact match. |
Process_Spacemove | Whether or not the atom is able to start drifting. Includes various relevant checks such as gravity, anchored, whether the atom's movement is already being controlled by something else, etc. |
airlock_can_crush | Whether or not the atom can be crushed and damaged by a closing airlock. |
airlock_crush | Handles being crushed by a closing airlock. Has no return value. |
get_bullet_impact_effect_type | Determines the type of bullet impact effect this atom should use when hit. |
get_mass | The effective mass of this atom. |
momentum_do | Handled momentum logic when impacted by another atom. Typically this means sending this atom flying. |
momentum_power | Calculates the amount of momentum force this atom receives when impacted by another atom. |
shuttle_land_on | Handler for shuttles landing on atoms. Called by shuttle_moved() . |
space_drift | Initializes space drifting for the atom and adds it to the spacedrift subsystem. |
throw_at | Throws the atom at a given target. |
throw_impact | Handles impacting an atom. |
touch_map_edge | Handler for when this atom touches the edge of a map or z-level. |
update_emissive_blocker | Updates the atom's emissive blocker image and assigns it to em_block . If no image is generated, em_block is left as it was. |
update_nearby_tiles | Convenience function for atoms to update turfs they occupy |
Var Details
anchored
Boolean. Whether or not the atom is considered anchored.
atmos_canpass
Integer (One of CANPASS_*
). Whether air can pass through this atom, and on what conditions. See code\__defines\ZAS.dm
.
blocks_emissive
Integer (One of EMISSIVE_BLOCK_*
). Whether this atom blocks emissive overlays, and what method is used for blocking. See code\__defines\emissives.dm
.
bound_overlay
The mimic (if any) that's directly copying us.
does_spin
Boolean. Does the atom spin when thrown (of course it does :P)
em_block
Instance. Internal holder for emissive blocker object, DO NOT USE DIRECTLY. Use blocks_emissive
icon_height
Integer. The icon height this movable expects to have by default.
icon_width
Integer. The icon width this movable expects to have by default.
inertia_dir
Bitflag (Directional). Direction the atom is currently travelling for space drift. Set by space_drift()
and Bump()
. Used by momentum_do()
and the spacedrift
subsystem.
inertia_ignore
Instance. Atom that should be ignored by /mob/get_spacemove_backup()
. Updated and used by various movement related procs.
inertia_last_loc
Instance. The atoms loc
value during the last space movement. Set by space_drift()
and the spacedrift
subsystem.
inertia_move_delay
Integer. Number of ticks to add to the current world.time
when updating inertia_next_move
. Used by Move()
and the spacedrift
subsystem.
inertia_moving
Boolean. Whether or not the atom is currently being moved by space drift inertia. Set by the spacedrift
subsystem and checked during Move()
.
inertia_next_move
Integer. world.time
that the next space drift movement should occur. Set by Move()
and the spacedrift
subsystem. Used by the spacedrift
subsystem.
item_state
String (Icon state). Used to specify the item state for the on-mob overlays. Primarily only used in /obj/item/get_icon_state()
. Generally, you should only be updating this in on_update_icon()
.
l_move_time
Integer. The world.time
of the last movement. Set during Move()
.
last_move
Bitflag (Directionals). Direction of the last movement. Generally passed to step()
as the dir
parameter. Set during Move()
.
movable_flags
Bitflag (Any of MOVABLE_FLAG_*
). Bitflags for movable atoms. See code\__defines\flags.dm
.
move_speed
Integer. The atom's current movement speed, calculated as the difference between world.time
and l_move_time
. Set during Move()
.
moved_recently
Boolean. Whether or not this atom has recently (Within the past 50 ticks) been force moved by /obj/item/device/radio/electropack/receive_signal()
.
movement_handlers
List (Instances of /datum/movement
) - List of movement handlers attached to this atom.
Do not modify or reference directly. See the various procs defined in code\datums\movement\movement.dm
.
pulledby
Instance. The mob currently pulling the atom.
stored_chat_text
LAZYLIST of /image
. Floating text message images being processed by this atom.
throw_range
Integer. Maximum range, in tiles, this atom can be thrown.
throw_speed
Integer. The speed at which the atom moves when thrown. Used when calling throw_at()
, and in momentum_power()
and momentum_do()
.
throwing
Instance. Current thrown thing datum linked to this atom. Set during throw_at()
.
virtual_mob
Virtual Mob Creation
waterproof
Boolean. Whether or not the atom is affected by being submerged in water. If set to FALSE
, water_act()
is called when in contact with fluids.
z_flags
If TRUE, this atom is ignored by Z-Mimic.
Proc Details
AddMovementHandler
Creates a new movement handler instance and attaches it to this atom's movement_handlers
list.
Parameters:
handler_path
(Path, type of/datum/movement_handler
) - The movement handler to create.handler_path_to_add_before
(Path, type of/datum/movement_handler
) - If defined, and this path already exists in the atom's movement handlers, the new handler will be added before this. Otherwise, the new handler is added to the beginning of the list.
Returns instance of /datum/movement_handler
- The created movement handler.
CheckDexterity
Whether or not user is capable of using this atom based on dexterity. Usually this equates to "Are you a human or silicon mob?"
Parameters:
user
- The mob attempting to use the atom.
Returns boolean.
HasMovementHandler
Checks if the provided movement handler path exists in this atom's movement_handlers
list. Ignores subtypes, must be an exact match.
Parameters:
handler_path
(Path, type of/datum/movement_handler
) - The movement handler path to search for.
Returns boolean.
Process_Spacemove
Whether or not the atom is able to start drifting. Includes various relevant checks such as gravity, anchored, whether the atom's movement is already being controlled by something else, etc.
Parameters:
allow_movement
(Boolean) - Whether or not this check should allow for manual mob movement.
Returns boolean. Whether or not space drifting should be blocked/stopped.
airlock_can_crush
Whether or not the atom can be crushed and damaged by a closing airlock.
airlock_crush
Handles being crushed by a closing airlock. Has no return value.
get_bullet_impact_effect_type
Determines the type of bullet impact effect this atom should use when hit.
Parameters:
def_zone
- The body zone the impact effect should be based on. Only used for/mob
overrides.
Returns string (One of BULLET_IMPACT_*
).
get_mass
The effective mass of this atom.
Called by /atom/movable/proc/momentum_power()
as part of the hitby()
chain.
Returns positive float.
momentum_do
Handled momentum logic when impacted by another atom. Typically this means sending this atom flying.
Called by process_momentum
as part of the hitby
chain.
Parameters:
power
(Positive float) - The amount of momentum force as calculated by/atom/movable/proc/momentum_power()
.TT
- The/datum/thrownthing
instance handling the atom that hitsrc
.
Has no return value.
momentum_power
Calculates the amount of momentum force this atom receives when impacted by another atom.
Called by process_momentum
as part of the hitby
chain.
Parameters:
AM
- The atom colliding withsrc
.TT
- The/datum/thrownthing
instance handlingAM
.
Returns float.
shuttle_land_on
Handler for shuttles landing on atoms. Called by shuttle_moved()
.
space_drift
Initializes space drifting for the atom and adds it to the spacedrift
subsystem.
Parameters:
direction
(Bitflag - Directional) - The direction to start drifting.
Returns boolean. If TRUE
, the atom is now drifting. If FALSE
, the atom was blocked from drifting.
throw_at
Throws the atom at a given target.
Initializes a /datum/thrownthing
handling this atom and adds it to SSthrowing
.
Parameters:
target
- The atom to throw this at.range
(Positive integer) - How far this atom is allowed to go before stopping, in tiles.speed
(Positive integer) - How fast the atom should move.thrower
- The mob throwing this atom, if any.spin
(Boolean, defaultTRUE
) - If set, the atom spins while flying through the air.callback
- A callback to be invoked once the atom has finished its flight. Not called if this proc returnsFALSE
.
Returns boolean.
throw_impact
Handles impacting an atom.
Called by /datum/thrownthing/proc/finalize()
.
Parameters:
hit_atom
- The atom being impacted.hitby()
is typically called on this by this proc.TT
- The/datum/thrownthing
instance calling this proc.
Has no return value.
touch_map_edge
Handler for when this atom touches the edge of a map or z-level.
Generally, this handles transitioning to a new z-level if there's a valid connection.
Has no return value.
update_emissive_blocker
Updates the atom's emissive blocker image and assigns it to em_block
. If no image is generated, em_block
is left as it was.
What this does exactly depends on the value of blocks_emissive
.
Returns /mutable_appearance
. The value of em_block
.
update_nearby_tiles
Convenience function for atoms to update turfs they occupy