From 4dc8a1adbce0dd8d1a7c4b73bf4eb41499bbc8e7 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 29 Aug 2017 17:09:53 -0500 Subject: [PATCH] Workaround to prevent slippery components from flooding SSgarbage --- code/game/turfs/open.dm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index bc0af068c5..9c61c1453f 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -219,19 +219,30 @@ HandleWet() /turf/open/proc/UpdateSlip() + var/intensity + var/lube_flags switch(wet) 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) - AddComponent(/datum/component/slippery, 80, SLIDE | GALOSHES_DONT_HELP) + intensity = 80 + lube_flags = SLIDE | GALOSHES_DONT_HELP 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) - AddComponent(/datum/component/slippery, 120, SLIDE_ICE | GALOSHES_DONT_HELP) + intensity = 120 + lube_flags = SLIDE_ICE | GALOSHES_DONT_HELP if(TURF_WET_SLIDE) - AddComponent(/datum/component/slippery, 80, SLIDE | GALOSHES_DONT_HELP) + intensity = 80 + lube_flags = SLIDE | GALOSHES_DONT_HELP else 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) ..()