movable
Vars | |
blocks_emissive | Either FALSE, [EMISSIVE_BLOCK_GENERIC], or EMISSIVE_BLOCK_UNIQUE |
---|---|
buckle_lying | Bed-like behaviour, forces the mob to lie down if buckle_lying != -1 |
buckle_offset | The Pixel_y to offset the buckled mob by |
buckle_prevents_pull | Can we pull the mob while they're buckled. Currently set to false on every movable |
buckle_requires_restraints | Require people to be handcuffed before being able to buckle. eg: pipes |
buckled_mobs | Lazylist of the mobs buckled to this object. |
can_be_unanchored | Used for icon smoothing. Won't smooth if it ain't anchored and can be unanchored. Only set to true on windows |
em_block | Internal holder for emissive blocker object, do not use directly use blocks_emissive |
face_while_pulling | Face towards the atom while pulling it |
max_buckled_mobs | The max amount of mobs that can be buckled to this object. Currently set to 1 on every movable |
orbiting_uid | UID for the atom which the current atom is orbiting |
thought_bubble_image | Icon state for thought bubbles. Normally set by mobs. |
Procs | |
abstract_move | meant for movement with zero side effects. only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts) if you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this most of the time you want forceMove() |
admin_Freeze | Created here as a base proc. Override as needed for any type of object or mob you want able to be frozen. |
can_reach | A backwards depth-limited breadth-first-search to see if the target is logically "in" anything adjacent to us. |
create_point_bubble | Create a bubble pointing at a particular icon and icon state. See args for create_point_bubble_from_atom. |
create_point_bubble_from_atom | Create a point bubble towards a given item. |
create_point_bubble_from_icons | Create a point bubble towards a given item, from an icon/icon state. |
create_point_bubble_from_path | See above, this uses an uninstantiated path. |
deadchat_plays | Adds the deadchat_plays component to this atom with simple movement commands. |
end_throw | called after an items throw is ended. |
fall_and_crush | Tip over this atom onto a turf, crushing things in its path. |
key_loop | Key loop to check for movement keys held and move in the desired direction. |
on_crush_thing | useful callback for things that want special behavior on crush |
orbit | Set an atom to orbit around another one. This atom will follow the base atom's movement and rotate around it. |
point_at | Point at an atom |
set_glide_size | This proc is recursive, and calls itself to constantly set the glide size of an atom/movable |
shove_impact | called when a mob gets shoved into an items turf. false means the mob will be shoved backwards normally, true means the mob will not be moved by the disarm proc. |
stop_deadchat_plays | Easy way to remove the component when the fun has been played out |
stop_orbit | Stop this atom from orbiting whatever it's orbiting. |
tilt_over | Tip over an atom without too much fuss. This won't cause damage to anything, and just rotates the thing and (optionally) adds the component. |
untilt | Untilt a tilted object. |
Var Details
blocks_emissive
Either FALSE, [EMISSIVE_BLOCK_GENERIC], or EMISSIVE_BLOCK_UNIQUE
buckle_lying
Bed-like behaviour, forces the mob to lie down if buckle_lying != -1
buckle_offset
The Pixel_y to offset the buckled mob by
buckle_prevents_pull
Can we pull the mob while they're buckled. Currently set to false on every movable
buckle_requires_restraints
Require people to be handcuffed before being able to buckle. eg: pipes
buckled_mobs
Lazylist of the mobs buckled to this object.
can_be_unanchored
Used for icon smoothing. Won't smooth if it ain't anchored and can be unanchored. Only set to true on windows
em_block
Internal holder for emissive blocker object, do not use directly use blocks_emissive
face_while_pulling
Face towards the atom while pulling it
max_buckled_mobs
The max amount of mobs that can be buckled to this object. Currently set to 1 on every movable
orbiting_uid
UID for the atom which the current atom is orbiting
thought_bubble_image
Icon state for thought bubbles. Normally set by mobs.
Proc Details
abstract_move
meant for movement with zero side effects. only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts) if you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this most of the time you want forceMove()
admin_Freeze
Created here as a base proc. Override as needed for any type of object or mob you want able to be frozen.
can_reach
A backwards depth-limited breadth-first-search to see if the target is logically "in" anything adjacent to us.
create_point_bubble
Create a bubble pointing at a particular icon and icon state. See args for create_point_bubble_from_atom.
create_point_bubble_from_atom
Create a point bubble towards a given item.
Arguments:
- pointed_atom - Atom to show in the bubble.
- include_arrow - If true, show an arrow pointing downwards.
create_point_bubble_from_icons
Create a point bubble towards a given item, from an icon/icon state.
Arguments:
- icon - Icon source for the bubble's icon.
- icon_state - Icon state for the bubble's icon.
- include_arrow - If true, show an arrow pointing downwards.
create_point_bubble_from_path
See above, this uses an uninstantiated path.
deadchat_plays
Adds the deadchat_plays component to this atom with simple movement commands.
Returns the component added. Arguments:
- mode - Either DEADCHAT_ANARCHY_MODE or DEADCHAT_DEMOCRACY_MODE passed to the deadchat_control component. See /datum/component/deadchat_control for more info.
- cooldown - The cooldown between command inputs passed to the deadchat_control component. See /datum/component/deadchat_control for more info.
end_throw
called after an items throw is ended.
fall_and_crush
Tip over this atom onto a turf, crushing things in its path.
Arguments:
- target_turf - The turf to fall onto.
- should_crit - If true, we'll try to crit things that we crush.
- crit_damage_factor - If a crit is rolled, crush_damage will be multiplied by this amount.
- forced_crit - If passed, this crit will be applied to everything it crushes.
- weaken_time - The amount of time that weaken will be applied to crushed mobs.
- knockdown_time - The amount of time that knockdown will be applied to crushed mobs.
- ignore_gravity - If false, we won't fall over in zero G.
- should_rotate - If false, we won't rotate when we fall.
- angle - The angle by which we'll rotate. If this is null/0, we'll randomly rotate 90 degrees clockwise or counterclockwise.
- rightable - If true, the tilted component will be applied, allowing people to alt-click to right it.
- block_interactions_until_righted - If true, interactions with the object will be blocked until it's righted.
- crush_dir - An override on the cardinal direction we're crushing.
key_loop
Key loop to check for movement keys held and move in the desired direction.
on_crush_thing
useful callback for things that want special behavior on crush
orbit
Set an atom to orbit around another one. This atom will follow the base atom's movement and rotate around it.
orbiter: atom which will be doing the orbiting radius: range to orbit at, radius of the circle formed by orbiting clockwise: whether you orbit clockwise or anti clockwise rotation_speed: how fast to rotate rotation_segments: the resolution of the orbit circle, less = a more block circle, this can be used to produce hexagons (6 segments) triangles (3 segments), and so on, 36 is the best default. pre_rotation: Chooses to rotate src 90 degress towards the orbit dir (clockwise/anticlockwise), useful for things to go "head first" like ghosts lock_in_orbit: Forces src to always be on A's turf, otherwise the orbit cancels when src gets too far away (eg: ghosts) force_move: If true, ghosts will be ForceMoved instead of having their .loc updated directly. orbit_layer: layer that the orbiter should be on. The original layer will be restored on orbit end.
point_at
Point at an atom
Intended to enable and standardise the pointing animation for all atoms
Not intended as a replacement for the mob verb
set_glide_size
This proc is recursive, and calls itself to constantly set the glide size of an atom/movable
shove_impact
called when a mob gets shoved into an items turf. false means the mob will be shoved backwards normally, true means the mob will not be moved by the disarm proc.
stop_deadchat_plays
Easy way to remove the component when the fun has been played out
stop_orbit
Stop this atom from orbiting whatever it's orbiting.
tilt_over
Tip over an atom without too much fuss. This won't cause damage to anything, and just rotates the thing and (optionally) adds the component.
Arguments:
- target - The turf to tilt over onto
- rotation_angle - The angle to rotate by. If not given, defaults to random rotating by 90 degrees clockwise or counterclockwise
- should_rotate - Whether or not we should rotate at all
- rightable - Whether or not this object should be rightable, attaching the tilted component to it
- block_interactions_until_righted - If true, this object will need to be righted before it can be interacted with
untilt
Untilt a tilted object.