diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index ed89a75cd5d..aca9dafa6a6 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -398,7 +398,7 @@ return -/atom/movable/proc/water_act(var/volume, var/temperature, var/source) //amount of water acting : temperature of water in kelvin : object that called it (for shennagins) +/atom/movable/proc/water_act(volume, temperature, source, method = TOUCH) //amount of water acting : temperature of water in kelvin : object that called it (for shennagins) return 1 /atom/movable/proc/handle_buckled_mob_movement(newloc,direct) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 743d59c7397..52cd5bdfee8 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -98,7 +98,7 @@ // Waiting on a device to respond. // Specifies an id_tag. NULL means we aren't waiting. - var/waiting_on_device=null + var/waiting_on_device = null var/mode = AALARM_MODE_SCRUBBING var/preset = AALARM_PRESET_HUMAN diff --git a/code/game/objects/items/dehy_carp.dm b/code/game/objects/items/dehy_carp.dm index a975a0b4d06..80db39fa5e8 100644 --- a/code/game/objects/items/dehy_carp.dm +++ b/code/game/objects/items/dehy_carp.dm @@ -22,6 +22,9 @@ owned = 0 return ..() +/obj/item/toy/carpplushie/dehy_carp/water_act(volume, temperature, source, method = TOUCH) + if(volume >= 1) + Swell() /obj/item/toy/carpplushie/dehy_carp/afterattack(obj/O, mob/user,proximity) if(!proximity) return diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index af9e0abc920..35d4b943504 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -205,7 +205,11 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \ else ..() -//Step two - washing..... it's actually in washing machine code. +//Step two - washing (also handled by water reagent code and washing machine code) +/obj/item/stack/sheet/hairlesshide/water_act(volume, temperature, source, method = TOUCH) + if(volume >= 10) + new /obj/item/stack/sheet/wetleather(get_turf(src), amount) + qdel(src) //Step three - drying /obj/item/stack/sheet/wetleather/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index b48774eb046..726d9a88a7f 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -600,7 +600,7 @@ wateract = (W.wash(user, src)) busy = 0 if(wateract) - W.water_act(20,310.15,src) + W.water_act(20, 310.15, src) if("Disconnect") user.visible_message("[user] starts disconnecting [src].", "You begin disconnecting [src]...") if(do_after(user, 40 * O.toolspeed, target = src)) @@ -633,7 +633,7 @@ wateract = (O.wash(user, src)) busy = 0 if(wateract) - O.water_act(20,310.15,src) + O.water_act(20, 310.15, src) /obj/structure/sink/update_icon() ..() diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index a80bab94055..816cde709ce 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -18,8 +18,25 @@ visibilityChanged() /turf/simulated/proc/break_tile() + return /turf/simulated/proc/burn_tile() + return + +/turf/simulated/proc/water_act(volume, temperature, source) + if(volume >= 3) + MakeSlippery() + + for(var/mob/living/carbon/slime/M in src) + M.apply_water() + + var/hotspot = (locate(/obj/effect/hotspot) in src) + if(hotspot) + var/datum/gas_mixture/lowertemp = remove_air(air.total_moles()) + lowertemp.temperature = max(min(lowertemp.temperature-2000,lowertemp.temperature / 2), 0) + lowertemp.react() + assume_air(lowertemp) + qdel(hotspot) /turf/simulated/proc/MakeSlippery(wet_setting = TURF_WET_WATER) // 1 = Water, 2 = Lube, 3 = Ice, 4 = Permafrost if(wet >= wet_setting) diff --git a/code/modules/food_and_drinks/food/foods/meat.dm b/code/modules/food_and_drinks/food/foods/meat.dm index 7d557561e49..c895d15b822 100644 --- a/code/modules/food_and_drinks/food/foods/meat.dm +++ b/code/modules/food_and_drinks/food/foods/meat.dm @@ -237,8 +237,8 @@ var/datum/species/monkey_type = /datum/species/monkey list_reagents = list("nutriment" = 2) -/obj/item/reagent_containers/food/snacks/monkeycube/water_act(volume, temperature) - if(volume >= 5) +/obj/item/reagent_containers/food/snacks/monkeycube/water_act(volume, temperature, source, method = TOUCH) + if(volume >= 1) return Expand() /obj/item/reagent_containers/food/snacks/monkeycube/wash(mob/user, atom/source) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index d4cafa847fd..de71672d138 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 873282ca1d4..18b3ed5a43d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -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)) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 7dc6c042e0c..85f491f71f0 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/grey.dm b/code/modules/mob/living/carbon/human/species/grey.dm index 29ab2a0ee8d..18d14a298f6 100644 --- a/code/modules/mob/living/carbon/human/species/grey.dm +++ b/code/modules/mob/living/carbon/human/species/grey.dm @@ -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, "Your [H.wear_mask] protects you from the acid!") + return + + if(H.head) + to_chat(H, "Your [H.wear_mask] protects you from the acid!") + 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, "The water stings[volume < 10 ? " you, but isn't concentrated enough to harm you" : null]!") + if(volume >= 10) + H.adjustFireLoss(min(max(4, (volume - 10) * 2), 20)) + H.emote("scream") + to_chat(H, "The water stings[volume < 10 ? " you, but isn't concentrated enough to harm you" : null]!") + 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 diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index e9df2f0edad..134a892c0df 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -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) diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 747494ee245..d481ac5b6b2 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -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, "Your [G.wear_mask] protects you from the acid!") - return - - if(G.head) - to_chat(G, "Your [G.wear_mask] protects you from the acid!") - 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, "The water stings[volume < 10 ? " you, but isn't concentrated enough to harm you" : null]!") - 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"