diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 180181d0b8..03823a1d76 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -195,7 +195,7 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache) #define IS_WET_OPEN_TURF(O) O.GetComponent(/datum/component/wet_floor) //Maximum amount of time, (in deciseconds) a tile can be wet for. -#define MAXIMUM_WET_TIME 3000 +#define MAXIMUM_WET_TIME 5 MINUTES //unmagic-strings for types of polls #define POLLTYPE_OPTION "OPTION" diff --git a/code/controllers/subsystem/processing/wet_floors.dm b/code/controllers/subsystem/processing/wet_floors.dm index e125b5849c..dfbc1ac8e4 100644 --- a/code/controllers/subsystem/processing/wet_floors.dm +++ b/code/controllers/subsystem/processing/wet_floors.dm @@ -1,5 +1,7 @@ PROCESSING_SUBSYSTEM_DEF(wet_floors) name = "Wet floors" priority = FIRE_PRIORITY_WET_FLOORS - wait = 15 + wait = 10 stat_tag = "WFP" //Used for logging + var/temperature_coeff = 2 + var/time_ratio = 1.5 SECONDS diff --git a/code/datums/components/wet_floor.dm b/code/datums/components/wet_floor.dm index 3a08df023d..7faeb2dfb2 100644 --- a/code/datums/components/wet_floor.dm +++ b/code/datums/components/wet_floor.dm @@ -9,6 +9,7 @@ var/static/mutable_appearance/generic_turf_overlay = mutable_appearance('icons/effects/water.dmi', "wet_static") var/current_overlay var/permanent = FALSE + var/last_process = 0 /datum/component/wet_floor/InheritComponent(datum/newcomp, orig, argslist) if(!newcomp) //We are getting passed the arguments of a would-be new component, but not a new component @@ -32,6 +33,7 @@ if(!permanent) START_PROCESSING(SSwet_floors, src) addtimer(CALLBACK(src, .proc/gc, TRUE), 1) //GC after initialization. + last_process = world.time /datum/component/wet_floor/Destroy() STOP_PROCESSING(SSwet_floors, src) @@ -103,15 +105,17 @@ /datum/component/wet_floor/process() var/turf/open/T = parent + var/diff = world.time - last_process var/decrease = 0 var/t = T.GetTemperature() switch(t) if(-INFINITY to T0C) add_wet(TURF_WET_ICE, max_time_left()) //Water freezes into ice! if(T0C to T0C + 100) - decrease = (T.air.temperature - T0C) //one ds per degree. + decrease = ((T.air.temperature - T0C) / SSwet_floors.temperature_coeff) * (diff / SSwet_floors.time_ratio) if(T0C + 100 to INFINITY) decrease = INFINITY + decrease = max(0, decrease) if((is_wet() & TURF_WET_ICE) && t > T0C) //Ice melts into water! for(var/obj/O in T.contents) if(O.flags_2 & FROZEN_2) @@ -120,6 +124,7 @@ dry(TURF_WET_ICE) dry(ALL, FALSE, decrease) check() + last_process = world.time /datum/component/wet_floor/proc/update_strength() highest_strength = 0 //Not bitflag. diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index fca2260e02..e704b11375 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -135,7 +135,7 @@ var/CT = cooling_temperature if(reac_volume >= 5) - T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = min(reac_volume*1.5 SECONDS, 60 SECONDS)) + T.MakeSlippery(TURF_WET_WATER, 10 SECONDS, min(reac_volume*1.5 SECONDS, 60 SECONDS)) for(var/mob/living/simple_animal/slime/M in T) M.apply_water()