Water handling improvement

This commit is contained in:
Mark van Alphen
2019-06-03 00:06:29 +02:00
parent 697bb8eee5
commit fd8a9e4909
13 changed files with 73 additions and 70 deletions
@@ -19,60 +19,17 @@
drink_name = "Glass of Water"
drink_desc = "The father of all refreshments."
taste_message = null
var/water_temperature = 283.15 // As reagents don't have a temperature value, we'll just use 10 celsius.
/datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
// Put out fire
M.adjust_fire_stacks(-(volume * 0.2))
if(isgrey(M)) // You gosh darn snowflakes
var/mob/living/carbon/human/G = M
if(method == TOUCH)
if(volume > 25)
if(G.wear_mask)
to_chat(G, "<span class='danger'>Your [G.wear_mask] protects you from the acid!</span>")
return
if(G.head)
to_chat(G, "<span class='danger'>Your [G.wear_mask] protects you from the acid!</span>")
return
if(prob(75))
G.take_organ_damage(5, 10)
G.emote("scream")
var/obj/item/organ/external/affecting = G.get_organ("head")
if(affecting)
affecting.disfigure()
else
G.take_organ_damage(5, 10)
else
G.take_organ_damage(5, 10)
else
to_chat(G, "<span class='warning'>The water stings[volume < 10 ? " you, but isn't concentrated enough to harm you" : null]!</span>")
if(volume >= 10)
G.adjustFireLoss(min(max(4, (volume - 10) * 2), 20))
G.emote("scream")
/datum/reagent/water/reaction_mob(mob/living/M, method = TOUCH, volume)
M.water_act(volume, water_temperature, src, method)
/datum/reagent/water/reaction_turf(turf/simulated/T, volume)
if(!istype(T))
return
if(volume >= 3)
T.MakeSlippery()
for(var/mob/living/carbon/slime/M in T)
M.apply_water()
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air( T.air.total_moles())
lowertemp.temperature = max(min(lowertemp.temperature-2000,lowertemp.temperature / 2), 0)
lowertemp.react()
T.assume_air(lowertemp)
qdel(hotspot)
T.water_act(volume, water_temperature, src)
/datum/reagent/water/reaction_obj(obj/O, volume)
O.extinguish()
O.water_act(volume, 283.15, src) // As reagents don't have a temperature value, we'll just use 10 celsius
O.water_act(volume, water_temperature, src)
/datum/reagent/lube
name = "Space Lube"