Files
GS13NG/code/datums/components/slippery.dm
kevinz000 c638386507 Syncs maps, and a bunch of other things that no one will care about/notice/give fucks about until they break. Welcome to conflict hell. (#2460)
* fuck pubby

* fuck you too ceres

* ree

* this is going to be a disaster isn't it

* disaster

* dme

* -_-

* tg

* woops

* proper sync

* Welcome to conflict hell.

* lets hope this fixes more things than it breaks

* gdi

* goddamnit
2017-08-24 21:07:58 -07:00

22 lines
637 B
Plaintext

/datum/component/slippery
var/intensity
var/lube_flags
var/mob/slip_victim
/datum/component/slippery/Initialize(_intensity, _lube_flags = NONE)
intensity = max(_intensity, 0)
lube_flags = _lube_flags
if(ismovableatom(parent))
RegisterSignal(COMSIG_MOVABLE_CROSSED, .proc/Slip)
else
RegisterSignal(COMSIG_ATOM_ENTERED, .proc/Slip)
/datum/component/slippery/proc/Slip(atom/movable/AM)
var/mob/victim = AM
if(istype(victim) && !victim.is_flying() && victim.slip(intensity, parent, lube_flags))
slip_victim = victim
return TRUE
/datum/component/slippery/AfterComponentActivated()
slip_victim = null