mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 17:14:47 +01:00
Removes a signal and a list from the movetype handler element. (#86119)
## About The Pull Request We can already stop the floating anim by adding the no floating trait, COMSIG_PAUSE_FLOATING_ANIM and the relative paused_floating_anim_atoms list are redundant as we can just use the `TRAIT_CALLBACK_REMOVE` macro and timers. ## Why It's Good For The Game Less crap in the way of a one big bespoke element that manages the movetypes of every living mob in the game. ## Changelog N/A
This commit is contained in:
@@ -58,7 +58,8 @@
|
||||
if(!changed) //Nothing has been changed, nothing has to be done.
|
||||
return
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_PAUSE_FLOATING_ANIM, 0.3 SECONDS)
|
||||
ADD_TRAIT(src, TRAIT_NO_FLOATING_ANIM, UPDATE_TRANSFORM_TRAIT)
|
||||
addtimer(TRAIT_CALLBACK_REMOVE(src, TRAIT_NO_FLOATING_ANIM, UPDATE_TRANSFORM_TRAIT), 0.3 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE)
|
||||
//if true, we want to avoid any animation time, it'll tween and not rotate at all otherwise.
|
||||
var/is_opposite_angle = SIMPLIFY_DEGREES(lying_angle+180) == lying_prev
|
||||
animate(src, transform = ntransform, time = is_opposite_angle ? 0 : UPDATE_TRANSFORM_ANIMATION_TIME, pixel_y = final_pixel_y, dir = final_dir, easing = (EASE_IN|EASE_OUT))
|
||||
|
||||
Reference in New Issue
Block a user