08-22-2017, 08:19 AM
Ah, I thought this was about hot gas. Yeah, the hot liquid mechanic just checks if you have something in your hat or mask slot:
Code:
proc/chem_helmet_check(mob/living/carbon/human/H)
if(H.wear_mask)
boutput(H, "<span style=\"color:red\">Your mask protects you from the hot liquid!</span>")
return 0
else if(H.head)
boutput(H, "<span style=\"color:red\">Your helmet protects you from the hot liquid!</span>")
return 0
return 1
Code:
if(total_temperature > H.base_body_temp + (H.temp_tolerance * 4) && !H.is_heat_resistant())
if (chem_helmet_check(H))
boutput(H, "<span style=\"color:red\">You are scalded by the hot chemicals!</span>")
H.TakeDamage("head", 0, round(log(total_temperature / 50) * 10), 0, DAMAGE_BURN) // lol this caused brute damage
H.emote("scream")
H.bodytemperature += min(max((total_temperature - T0C) - 20, 5),500)
else if(total_temperature < H.base_body_temp - (H.temp_tolerance * 4) && !H.is_cold_resistant())
if (chem_helmet_check(H))
boutput(H, "<span style=\"color:red\">You are frostbitten by the freezing cold chemicals!</span>")
H.TakeDamage("head", 0, round(log(T0C - total_temperature / 50) * 10), 0, DAMAGE_BURN)
H.emote("scream")
H.bodytemperature -= min(max(T0C - total_temperature - 20, 5), 500)