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
@@ -14,12 +14,11 @@
return TRUE
..()
/mob/living/carbon/water_act(volume, temperature, source)
/mob/living/carbon/water_act(volume, temperature, source, method = TOUCH)
if(volume > 10) //anything over 10 volume will make the mob wetter.
wetlevel = min(wetlevel + 1,5)
..()
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
if(lying && surgeries.len)
if(user != src && user.a_intent == INTENT_HELP)
@@ -506,9 +506,9 @@ emp_act
return 0
..()
/mob/living/carbon/human/water_act(volume, temperature, source)
/mob/living/carbon/human/water_act(volume, temperature, source, method = TOUCH)
..()
dna.species.water_act(src,volume,temperature,source)
dna.species.water_act(src, volume, temperature, source, method)
/mob/living/carbon/human/is_eyes_covered(check_glasses = TRUE, check_head = TRUE, check_mask = TRUE)
if(check_glasses && glasses && (glasses.flags_cover & GLASSESCOVERSEYES))
@@ -718,7 +718,7 @@ It'll return null if the organ doesn't correspond, so include null checks when u
H.sync_lighting_plane_alpha()
/datum/species/proc/water_act(mob/living/carbon/human/M, volume, temperature, source)
/datum/species/proc/water_act(mob/living/carbon/human/M, volume, temperature, source, method = TOUCH)
if(abs(temperature - M.bodytemperature) > 10) //If our water and mob temperature varies by more than 10K, cool or/ heat them appropriately
M.bodytemperature = (temperature + M.bodytemperature) * 0.5 //Approximation for gradual heating or cooling
@@ -36,10 +36,38 @@
genemutcheck(H, REMOTETALKBLOCK, null, MUTCHK_FORCED)
H.dna.default_blocks.Add(REMOTETALKBLOCK)
/datum/species/grey/water_act(mob/living/carbon/human/H, volume, temperature, source)
/datum/species/grey/water_act(mob/living/carbon/human/H, volume, temperature, source, method = TOUCH)
..()
H.take_organ_damage(5, min(volume, 20))
H.emote("scream")
if(method == TOUCH)
if(volume > 25)
if(H.wear_mask)
to_chat(H, "<span class='danger'>Your [H.wear_mask] protects you from the acid!</span>")
return
if(H.head)
to_chat(H, "<span class='danger'>Your [H.wear_mask] protects you from the acid!</span>")
return
if(prob(75))
H.take_organ_damage(5, 10)
H.emote("scream")
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.disfigure()
else
H.take_organ_damage(5, 10)
else
H.take_organ_damage(5, 10)
else
to_chat(H, "<span class='warning'>The water stings[volume < 10 ? " you, but isn't concentrated enough to harm you" : null]!</span>")
if(volume >= 10)
H.adjustFireLoss(min(max(4, (volume - 10) * 2), 20))
H.emote("scream")
to_chat(H, "<span class='warning'>The water stings[volume < 10 ? " you, but isn't concentrated enough to harm you" : null]!</span>")
if(volume >= 10)
H.adjustFireLoss(min(max(4, (volume - 10) * 2), 20))
H.emote("scream")
/datum/species/grey/after_equip_job(datum/job/J, mob/living/carbon/human/H)
var/translator_pref = H.client.prefs.speciesprefs
+2 -7
View File
@@ -216,13 +216,8 @@
fire_stacks += L.fire_stacks
IgniteMob()
//Mobs on Fire end
/mob/living/water_act(volume, temperature)
if(volume >= 20) fire_stacks -= 0.5
if(volume >= 50) fire_stacks -= 1
/mob/living/water_act(volume, temperature, source, method = TOUCH)
adjust_fire_stacks(-(volume * 0.2))
//This is called when the mob is thrown into a dense turf
/mob/living/proc/turf_collision(var/turf/T, var/speed)