mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* 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
17 lines
658 B
Plaintext
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)
|