[READY] Refactors wet floors to a component (#36130)

* Wet Floor components

* No more turf wet slide.
This commit is contained in:
kevinz000
2018-03-16 15:26:09 -07:00
committed by CitadelStationBot
parent 13709a7d34
commit f78fea7333
23 changed files with 240 additions and 174 deletions
@@ -459,7 +459,7 @@
reac_volume = ..()
var/turf/open/T = get_turf(M)
if(istype(T) && prob(reac_volume))
T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10, wet_time_to_add = 5)
T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
M.adjust_fire_stacks(-(reac_volume / 10))
M.ExtinguishMob()
M.apply_damage(0.4*reac_volume, BRUTE)
@@ -481,7 +481,7 @@
/datum/reagent/blob/pressurized_slime/proc/extinguisharea(obj/structure/blob/B, probchance)
for(var/turf/open/T in range(1, B))
if(prob(probchance))
T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10, wet_time_to_add = 5)
T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
for(var/obj/O in T)
O.extinguish()
for(var/mob/living/L in T)
@@ -124,7 +124,7 @@
if(!istype(T))
return
if(reac_volume >= 5)
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10, wet_time_to_add = reac_volume * 1.5)
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10 SECONDS, wet_time_to_add = reac_volume * 1.5 SECONDS)
T.name = "deep-fried [initial(T.name)]"
T.add_atom_colour(color, TEMPORARY_COLOUR_PRIORITY)
@@ -249,7 +249,7 @@
if(reac_volume >= 1) // Make Freezy Foam and anti-fire grenades!
if(isopenturf(T))
var/turf/open/OT = T
OT.MakeSlippery(wet_setting=TURF_WET_ICE, min_wet_time=10, wet_time_to_add=reac_volume) // Is less effective in high pressure/high heat capacity environments. More effective in low pressure.
OT.MakeSlippery(wet_setting=TURF_WET_ICE, min_wet_time=100, wet_time_to_add=reac_volume SECONDS) // Is less effective in high pressure/high heat capacity environments. More effective in low pressure.
OT.air.temperature -= MOLES_CELLSTANDARD*100*reac_volume/OT.air.heat_capacity() // reduces environment temperature by 5K per unit.
/datum/reagent/consumable/condensedcapsaicin
@@ -433,7 +433,7 @@
/datum/reagent/consumable/cornoil/reaction_turf(turf/open/T, reac_volume)
if (!istype(T))
return
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10, wet_time_to_add = reac_volume*2)
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10 SECONDS, wet_time_to_add = reac_volume*2 SECONDS)
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles())
@@ -135,7 +135,7 @@
var/CT = cooling_temperature
if(reac_volume >= 5)
T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10, wet_time_to_add = min(reac_volume*1.5, 60))
T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = min(reac_volume*1.5 SECONDS, 60 SECONDS))
for(var/mob/living/simple_animal/slime/M in T)
M.apply_water()
@@ -329,7 +329,7 @@
if (!istype(T))
return
if(reac_volume >= 1)
T.MakeSlippery(TURF_WET_LUBE, 15, min(reac_volume * 2, 120))
T.MakeSlippery(TURF_WET_LUBE, 15 SECONDS, min(reac_volume * 2 SECONDS, 120))
/datum/reagent/spraytan
name = "Spray Tan"
@@ -1613,9 +1613,8 @@
taste_description = "dryness"
/datum/reagent/drying_agent/reaction_turf(turf/open/T, reac_volume)
if(istype(T) && T.wet)
T.wet_time = max(0, T.wet_time-reac_volume*5) // removes 5 seconds of wetness for every unit.
T.HandleWet()
if(istype(T))
T.MakeDry(ALL, TRUE, reac_volume * 5 SECONDS) //50 deciseconds per unit
/datum/reagent/drying_agent/reaction_obj(obj/O, reac_volume)
if(O.type == /obj/item/clothing/shoes/galoshes)