Workaround to prevent slippery components from flooding SSgarbage
This commit is contained in:
+16
-5
@@ -219,19 +219,30 @@
|
|||||||
HandleWet()
|
HandleWet()
|
||||||
|
|
||||||
/turf/open/proc/UpdateSlip()
|
/turf/open/proc/UpdateSlip()
|
||||||
|
var/intensity
|
||||||
|
var/lube_flags
|
||||||
switch(wet)
|
switch(wet)
|
||||||
if(TURF_WET_WATER)
|
if(TURF_WET_WATER)
|
||||||
AddComponent(/datum/component/slippery, 60, NO_SLIP_WHEN_WALKING)
|
intensity = 60
|
||||||
|
lube_flags = NO_SLIP_WHEN_WALKING
|
||||||
if(TURF_WET_LUBE)
|
if(TURF_WET_LUBE)
|
||||||
AddComponent(/datum/component/slippery, 80, SLIDE | GALOSHES_DONT_HELP)
|
intensity = 80
|
||||||
|
lube_flags = SLIDE | GALOSHES_DONT_HELP
|
||||||
if(TURF_WET_ICE)
|
if(TURF_WET_ICE)
|
||||||
AddComponent(/datum/component/slippery, 120, SLIDE | GALOSHES_DONT_HELP)
|
intensity = 120
|
||||||
|
lube_flags = SLIDE | GALOSHES_DONT_HELP
|
||||||
if(TURF_WET_PERMAFROST)
|
if(TURF_WET_PERMAFROST)
|
||||||
AddComponent(/datum/component/slippery, 120, SLIDE_ICE | GALOSHES_DONT_HELP)
|
intensity = 120
|
||||||
|
lube_flags = SLIDE_ICE | GALOSHES_DONT_HELP
|
||||||
if(TURF_WET_SLIDE)
|
if(TURF_WET_SLIDE)
|
||||||
AddComponent(/datum/component/slippery, 80, SLIDE | GALOSHES_DONT_HELP)
|
intensity = 80
|
||||||
|
lube_flags = SLIDE | GALOSHES_DONT_HELP
|
||||||
else
|
else
|
||||||
qdel(GetComponent(/datum/component/slippery))
|
qdel(GetComponent(/datum/component/slippery))
|
||||||
|
return
|
||||||
|
var/datum/component/slippery/S = LoadComponent(/datum/component/slippery)
|
||||||
|
S.intensity = intensity
|
||||||
|
S.lube_flags = lube_flags
|
||||||
|
|
||||||
/turf/open/ComponentActivated(datum/component/C)
|
/turf/open/ComponentActivated(datum/component/C)
|
||||||
..()
|
..()
|
||||||
|
|||||||
Reference in New Issue
Block a user