diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 965a2c81ab2..84764bfddaa 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -513,3 +513,12 @@ emp_act return TRUE if(check_mask && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH)) return TRUE + +/mob/living/carbon/human/proc/reagent_safety_check(hot = TRUE) + if(wear_mask) + to_chat(src, "Your [wear_mask.name] protects you from the [hot ? "hot" : "cold"] liquid!") + return FALSE + if(head) + to_chat(src, "Your [head.name] protects you from the [hot ? "hot" : "cold"] liquid!") + return FALSE + return TRUE \ No newline at end of file diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 9586dec9bc9..95dece3ad75 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -554,6 +554,35 @@ var/const/INGEST = 2 react_type = "OBJ" else return + + if(react_type == "LIVING" && ishuman(A)) + var/mob/living/carbon/human/H = A + if(method == TOUCH) + var/obj/item/organ/external/head/affecting = H.get_organ("head") + if(affecting) + if(chem_temp > H.dna.species.heat_level_1) + if(H.reagent_safety_check()) + to_chat(H, "You are scalded by the hot chemicals!") + affecting.receive_damage(0, round(log(chem_temp / 50) * 10)) + H.emote("scream") + H.adjust_bodytemperature(min(max((chem_temp - T0C) - 20, 5), 500)) + else if(chem_temp < H.dna.species.cold_level_1) + if(H.reagent_safety_check(FALSE)) + to_chat(H, "You are frostbitten by the freezing cold chemicals!") + affecting.receive_damage(0, round(log(T0C - chem_temp / 50) * 10)) + H.emote("scream") + H.adjust_bodytemperature(- min(max(T0C - chem_temp - 20, 5), 500)) + + if(method == INGEST) + if(chem_temp > H.dna.species.heat_level_1) + to_chat(H, "You scald yourself trying to consume the boiling hot substance!") + H.adjustFireLoss(7) + H.adjust_bodytemperature(min(max((chem_temp - T0C) - 20, 5), 700)) + else if(chem_temp < H.dna.species.cold_level_1) + to_chat(H, "You frostburn yourself trying to consume the freezing cold substance!") + H.adjustFireLoss(7) + H.adjust_bodytemperature(- min(max((T0C - chem_temp) - 20, 5), 700)) + for(var/datum/reagent/R in reagent_list) switch(react_type) if("LIVING") diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index ba329f30c0e..2db474b39c4 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -94,11 +94,11 @@ /obj/machinery/chem_heater/Topic(href, href_list) if(..()) - return 0 + return FALSE if(href_list["toggle_on"]) if(!beaker.reagents.total_volume) - return + return FALSE on = !on . = 1 @@ -110,7 +110,7 @@ var/target = input("Please input the target temperature", name) as num desired_temp = Clamp(target, 0, 1000) else - return 0 + return FALSE . = 1 if(href_list["eject_beaker"])