mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Part 1 * Refactor signals into different files * Remove redundant file * Add missing movable signals * Add signals log * Split signal registering with list into new proc * Add comments to component.dm and remove signal_enabled * Fix yogs code * Not this one * Hopefully make linter happy * Remove duplicate file * More duplicates signals
17 lines
654 B
Plaintext
17 lines
654 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/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)
|