Files
Yogstation/code/datums/components/waddling.dm
adamsong 5a43d8e4ba Port codebase to 515 (#18669)
* Set max version

* Updates most references to .proc (Leaves a couple to check check_grep)

* Actually add check

* Oops

* Hopefully exclude the one place we do want .proc

* AAAAAAA

* Trying this instead

* Hopefully checks go green

* Switch to NAMEOF_STATIC

* Makes 515 acutally build

* LIBCALL
2023-05-08 17:01:37 -05:00

17 lines
658 B
Plaintext

/datum/component/waddling
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
/datum/component/waddling/Initialize()
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignals(parent, list(COMSIG_MOVABLE_MOVED), PROC_REF(Waddle))
/datum/component/waddling/proc/Waddle()
var/mob/living/L = parent
if(L.incapacitated() || !(L.mobility_flags & MOBILITY_STAND))
return
var/cached_transform = L.transform
animate(L, pixel_z = 4, time = 0 SECONDS)
animate(pixel_z = 0, transform = turn(cached_transform, pick(-12, 0, 12)), time=0.2 SECONDS)
animate(pixel_z = 0, transform = cached_transform, time = 0 SECONDS)