Files
Yogstation/code/datums/components/snail_crawl.dm
Time-Green cd787926c0 New snail sprite and fixes (#43132)
* snail sprite update and fixes

* fixes snail cure

* Fixes blood
2019-03-20 16:02:22 +01:00

19 lines
691 B
Plaintext

/datum/component/snailcrawl
var/mob/living/carbon/snail
/datum/component/snailcrawl/Initialize()
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/lubricate)
snail = parent
/datum/component/snailcrawl/proc/lubricate()
if(snail.resting && !snail.buckled) //s l i d e
var/turf/open/OT = get_turf(snail)
if(isopenturf(OT))
OT.MakeSlippery(TURF_WET_LUBE, 20)
snail.add_movespeed_modifier(MOVESPEED_ID_SNAIL_CRAWL, update=TRUE, priority=100, multiplicative_slowdown=-7, movetypes=GROUND)
else
snail.remove_movespeed_modifier(MOVESPEED_ID_SNAIL_CRAWL)
/datum/component/snailcrawl/_RemoveFromParent()
snail.remove_movespeed_modifier(MOVESPEED_ID_SNAIL_CRAWL)
return ..()