code/datums/elements/movetype_handler.dm ![code/datums/elements/movetype_handler.dm0](git.png)
COMSIG_PAUSE_FLOATING_ANIM | Called when the floating anim has to be temporarily stopped and restarted later: (timer) |
---|---|
COMSIG_MOVETYPE_FLAG_ENABLED | From base of datum/element/movetype_handler/on_movement_type_trait_gain: (flag, old_movement_type) |
COMSIG_MOVETYPE_FLAG_DISABLED | From base of datum/element/movetype_handler/on_movement_type_trait_loss: (flag, old_movement_type) |
DO_FLOATING_ANIM | Causes the passed atom / image to appear floating, playing a simple animation where they move up and down by 2 pixels (looping) |
STOP_FLOATING_ANIM | Stops the passed atom / image from appearing floating (Living mobs also have a 'body_position_pixel_y_offset' variable that has to be taken into account here) |
/datum/element/movetype_handler | An element that enables and disables movetype bitflags whenever the relative traits are added or removed. It also handles the +2/-2 pixel y anim loop typical of mobs possessing the FLYING or FLOATING movetypes. This element is necessary for the TRAIT_MOVE_ traits to work correctly, so make sure to attach this element before adding them to non-living movables. |
Define Details
COMSIG_MOVETYPE_FLAG_DISABLED ![code/datums/elements/movetype_handler.dm 7](git.png)
From base of datum/element/movetype_handler/on_movement_type_trait_loss: (flag, old_movement_type)
COMSIG_MOVETYPE_FLAG_ENABLED ![code/datums/elements/movetype_handler.dm 5](git.png)
From base of datum/element/movetype_handler/on_movement_type_trait_gain: (flag, old_movement_type)
COMSIG_PAUSE_FLOATING_ANIM ![code/datums/elements/movetype_handler.dm 3](git.png)
Called when the floating anim has to be temporarily stopped and restarted later: (timer)
DO_FLOATING_ANIM ![code/datums/elements/movetype_handler.dm 16](git.png)
Causes the passed atom / image to appear floating, playing a simple animation where they move up and down by 2 pixels (looping)
In most cases you should NOT call this manually, instead use /datum/element/movetype_handler! This is just so you can apply the animation to things which can be animated but are not movables (like images)
STOP_FLOATING_ANIM ![code/datums/elements/movetype_handler.dm 27](git.png)
Stops the passed atom / image from appearing floating (Living mobs also have a 'body_position_pixel_y_offset' variable that has to be taken into account here)
In most cases you should NOT call this manually, instead use /datum/element/movetype_handler! This is just so you can apply the animation to things which can be animated but are not movables (like images)