mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 09:03:37 +00:00
Merge pull request #17822 from optimumtact/keepphilfromkillinme
MakeSlippery proc made more readable with named arguments
This commit is contained in:
@@ -174,7 +174,7 @@
|
||||
var/turf/T = get_turf(loc)
|
||||
if(istype(T, /turf/open))
|
||||
var/turf/open/theturf = T
|
||||
theturf.MakeSlippery(min = 10, max = 5)
|
||||
theturf.MakeSlippery(min_wet_time = 10, wet_time_to_add = 5)
|
||||
|
||||
user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "<span class='info'>You quietly empty out \the [src] using its release valve.</span>")
|
||||
return
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
else
|
||||
if(istype(loc, /turf/open))
|
||||
var/turf/open/tile = loc
|
||||
tile.MakeSlippery(min = 5, max = 1)
|
||||
tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)
|
||||
|
||||
|
||||
/obj/machinery/shower/attackby(obj/item/I, mob/user, params)
|
||||
@@ -492,4 +492,4 @@
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O, mob/user, params)
|
||||
icon_state = "puddle-splash"
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
icon_state = "puddle"
|
||||
|
||||
@@ -95,10 +95,8 @@
|
||||
C.spin(1,1)
|
||||
return 1
|
||||
|
||||
/turf/open/proc/MakeSlippery(wet_setting = TURF_WET_WATER, min = 0, max = 0) // 1 = Water, 2 = Lube, 3 = Ice
|
||||
wet_time += max
|
||||
if(wet_time < min)
|
||||
wet_time = min
|
||||
/turf/open/proc/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0) // 1 = Water, 2 = Lube, 3 = Ice
|
||||
wet_time = max(wet_time+wet_time_to_add, min_wet_time)
|
||||
if(wet >= wet_setting)
|
||||
return
|
||||
wet = wet_setting
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
if(prob(10)) //Wets floors randomly
|
||||
var/turf/open/OT = get_turf(loc)
|
||||
OT.MakeSlippery(min = 5, max = 1)
|
||||
OT.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)
|
||||
|
||||
if(prob(5)) //Spawns foam!
|
||||
visible_message("<span class='danger'>[src] whirs and bubbles violently, before releasing a plume of froth!</span>")
|
||||
|
||||
@@ -565,7 +565,7 @@
|
||||
reac_volume = ..()
|
||||
var/turf/open/T = get_turf(M)
|
||||
if(istype(T) && prob(reac_volume))
|
||||
T.MakeSlippery(min = 5, max = 1)
|
||||
T.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)
|
||||
M.adjust_fire_stacks(-(reac_volume / 10))
|
||||
M.ExtinguishMob()
|
||||
M.apply_damage(0.1*reac_volume, BRUTE)
|
||||
@@ -586,7 +586,7 @@
|
||||
/datum/reagent/blob/pressurized_slime/proc/extinguisharea(obj/effect/blob/B, probchance)
|
||||
for(var/turf/open/T in range(1, B))
|
||||
if(prob(probchance))
|
||||
T.MakeSlippery(min = 5, max = 1)
|
||||
T.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)
|
||||
for(var/obj/O in T)
|
||||
O.extinguish()
|
||||
for(var/mob/living/L in T)
|
||||
@@ -663,4 +663,4 @@
|
||||
if(message_living && !issilicon(M))
|
||||
totalmessage += message_living
|
||||
totalmessage += "!"
|
||||
M << "<span class='userdanger'>[totalmessage]</span>"
|
||||
M << "<span class='userdanger'>[totalmessage]</span>"
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
if(reac_volume >= 1) // Make Freezy Foam and anti-fire grenades!
|
||||
if(istype(T, /turf/open))
|
||||
var/turf/open/OT = T
|
||||
OT.MakeSlippery(TURF_WET_ICE, 5, reac_volume*0.5) // 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=5, wet_time_to_add=reac_volume*0.5) // 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
|
||||
@@ -324,7 +324,7 @@
|
||||
/datum/reagent/consumable/cornoil/reaction_turf(turf/open/T, reac_volume)
|
||||
if (!istype(T))
|
||||
return
|
||||
T.MakeSlippery(min = 5, max = reac_volume*2)
|
||||
T.MakeSlippery(min_wet_time = 5, wet_time_to_add = reac_volume*2)
|
||||
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() )
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
var/CT = cooling_temperature
|
||||
|
||||
if(reac_volume >= 5)
|
||||
T.MakeSlippery(min = 5, max = reac_volume*0.2)
|
||||
T.MakeSlippery(min_wet_time = 5, wet_time_to_add = reac_volume*0.2)
|
||||
|
||||
for(var/mob/living/simple_animal/slime/M in T)
|
||||
M.apply_water()
|
||||
@@ -258,7 +258,7 @@
|
||||
/datum/reagent/lube/reaction_turf(turf/open/T, reac_volume)
|
||||
if (!istype(T)) return
|
||||
if(reac_volume >= 1)
|
||||
T.MakeSlippery(TURF_WET_LUBE, 5, reac_volume)
|
||||
T.MakeSlippery(wet_setting=TURF_WET_LUBE, min_wet_time=5, wet_time_to_add=reac_volume)
|
||||
|
||||
/datum/reagent/spraytan
|
||||
name = "Spray Tan"
|
||||
|
||||
Reference in New Issue
Block a user