mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-20 12:44:04 +01:00
[MIRROR] Belly temperature (#11529)
Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0c6b4cd278
commit
393e117ffe
@@ -746,66 +746,67 @@
|
||||
|
||||
|
||||
// Hot air hurts :(
|
||||
if((breath.temperature <= species.cold_discomfort_level || breath.temperature >= species.heat_discomfort_level) && !(COLD_RESISTANCE in mutations))
|
||||
if(!isbelly(loc)) //None of this happens anyway whilst inside of a belly, belly temperatures are all handled as body temperature
|
||||
if((breath.temperature <= species.cold_discomfort_level || breath.temperature >= species.heat_discomfort_level) && !(COLD_RESISTANCE in mutations))
|
||||
|
||||
if(breath.temperature <= species.breath_cold_level_1)
|
||||
if(prob(20))
|
||||
to_chat(src, span_danger("You feel your face freezing and icicles forming in your lungs!"))
|
||||
else if(breath.temperature >= species.breath_heat_level_1)
|
||||
if(prob(20))
|
||||
to_chat(src, span_danger("You feel your face burning and a searing heat in your lungs!"))
|
||||
|
||||
if(breath.temperature >= species.heat_discomfort_level)
|
||||
|
||||
if(breath.temperature >= species.breath_heat_level_3)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
|
||||
else if(breath.temperature >= species.breath_heat_level_2)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
|
||||
if(breath.temperature <= species.breath_cold_level_1)
|
||||
if(prob(20))
|
||||
to_chat(src, span_danger("You feel your face freezing and icicles forming in your lungs!"))
|
||||
else if(breath.temperature >= species.breath_heat_level_1)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
|
||||
else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_HOT))
|
||||
throw_alert("temp", /obj/screen/alert/warm, HOT_ALERT_SEVERITY_LOW)
|
||||
if(prob(20))
|
||||
to_chat(src, span_danger("You feel your face burning and a searing heat in your lungs!"))
|
||||
|
||||
if(breath.temperature >= species.heat_discomfort_level)
|
||||
|
||||
if(breath.temperature >= species.breath_heat_level_3)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
|
||||
else if(breath.temperature >= species.breath_heat_level_2)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
|
||||
else if(breath.temperature >= species.breath_heat_level_1)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
|
||||
else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_HOT))
|
||||
throw_alert("temp", /obj/screen/alert/warm, HOT_ALERT_SEVERITY_LOW)
|
||||
else
|
||||
clear_alert("temp")
|
||||
|
||||
else if(breath.temperature <= species.cold_discomfort_level)
|
||||
|
||||
if(breath.temperature <= species.breath_cold_level_3)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
|
||||
else if(breath.temperature <= species.breath_cold_level_2)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MODERATE)
|
||||
else if(breath.temperature <= species.breath_cold_level_1)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_LOW)
|
||||
else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_COLD))
|
||||
throw_alert("temp", /obj/screen/alert/chilly, COLD_ALERT_SEVERITY_LOW)
|
||||
else
|
||||
clear_alert("temp")
|
||||
|
||||
//breathing in hot/cold air also heats/cools you a bit
|
||||
var/temp_adj = breath.temperature - bodytemperature
|
||||
if (temp_adj < 0)
|
||||
temp_adj /= (BODYTEMP_COLD_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
|
||||
else
|
||||
clear_alert("temp")
|
||||
temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
|
||||
|
||||
else if(breath.temperature <= species.cold_discomfort_level)
|
||||
var/relative_density = breath.total_moles / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
|
||||
temp_adj *= relative_density
|
||||
|
||||
if(breath.temperature <= species.breath_cold_level_3)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
|
||||
else if(breath.temperature <= species.breath_cold_level_2)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MODERATE)
|
||||
else if(breath.temperature <= species.breath_cold_level_1)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD)
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_LOW)
|
||||
else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_COLD))
|
||||
throw_alert("temp", /obj/screen/alert/chilly, COLD_ALERT_SEVERITY_LOW)
|
||||
else
|
||||
clear_alert("temp")
|
||||
if(temp_adj > BODYTEMP_HEATING_MAX)
|
||||
temp_adj = BODYTEMP_HEATING_MAX
|
||||
if(temp_adj < BODYTEMP_COOLING_MAX)
|
||||
temp_adj = BODYTEMP_COOLING_MAX
|
||||
|
||||
bodytemperature += temp_adj
|
||||
|
||||
//breathing in hot/cold air also heats/cools you a bit
|
||||
var/temp_adj = breath.temperature - bodytemperature
|
||||
if (temp_adj < 0)
|
||||
temp_adj /= (BODYTEMP_COLD_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
|
||||
else
|
||||
temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
|
||||
|
||||
var/relative_density = breath.total_moles / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
|
||||
temp_adj *= relative_density
|
||||
|
||||
if(temp_adj > BODYTEMP_HEATING_MAX)
|
||||
temp_adj = BODYTEMP_HEATING_MAX
|
||||
if(temp_adj < BODYTEMP_COOLING_MAX)
|
||||
temp_adj = BODYTEMP_COOLING_MAX
|
||||
|
||||
bodytemperature += temp_adj
|
||||
|
||||
else
|
||||
clear_alert("temp")
|
||||
clear_alert("temp")
|
||||
|
||||
breath.update_values()
|
||||
return 1
|
||||
@@ -867,10 +868,13 @@
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
var/obj/machinery/atmospherics/unary/cryo_cell/cc = loc
|
||||
loc_temp = cc.air_contents.temperature
|
||||
else if(isbelly(loc))
|
||||
var/obj/belly/b = loc
|
||||
loc_temp = b.bellytemperature
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
if(adjusted_pressure < species.warning_high_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - bodytemperature) < 20 && bodytemperature < species.heat_level_1 && bodytemperature > species.cold_level_1)
|
||||
if(adjusted_pressure < species.warning_high_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - bodytemperature) < 20 && bodytemperature < species.heat_level_1 && bodytemperature > species.cold_level_1 && (!isbelly(loc) || !allowtemp))
|
||||
clear_alert("pressure")
|
||||
return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
|
||||
|
||||
@@ -889,8 +893,46 @@
|
||||
var/relative_density = environment.total_moles / MOLES_CELLSTANDARD
|
||||
bodytemperature += between(BODYTEMP_COOLING_MAX, temp_adj*relative_density, BODYTEMP_HEATING_MAX)
|
||||
|
||||
if(isbelly(loc) && allowtemp)
|
||||
var/obj/belly/b = loc
|
||||
if(b.bellytemperature >= species.heat_discomfort_level) //A bit more easily triggered than normal, intentionally
|
||||
var/burn_dam = 0
|
||||
if(b.bellytemperature >= species.heat_level_1)
|
||||
if(b.bellytemperature >= species.heat_level_2)
|
||||
if(b.bellytemperature >= species.heat_level_3)
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_3
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
|
||||
else
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_2
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
|
||||
else
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_1
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
|
||||
else
|
||||
throw_alert("temp", /obj/screen/alert/warm, HOT_ALERT_SEVERITY_LOW)
|
||||
if(digestable && b.temperature_damage)
|
||||
take_overall_damage(burn=burn_dam, used_weapon = "High Body Temperature")
|
||||
else if(b.bellytemperature <= species.cold_discomfort_level)
|
||||
var/cold_dam = 0
|
||||
if(b.bellytemperature <= species.cold_level_1)
|
||||
if(b.bellytemperature <= species.cold_level_2)
|
||||
if(b.bellytemperature <= species.cold_level_3)
|
||||
cold_dam = COLD_DAMAGE_LEVEL_3
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
|
||||
else
|
||||
cold_dam = COLD_DAMAGE_LEVEL_2
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MODERATE)
|
||||
else
|
||||
cold_dam = COLD_DAMAGE_LEVEL_1
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_LOW)
|
||||
else
|
||||
throw_alert("temp", /obj/screen/alert/chilly, COLD_ALERT_SEVERITY_LOW)
|
||||
if(digestable && b.temperature_damage)
|
||||
take_overall_damage(burn=cold_dam, used_weapon = "Low Body Temperature")
|
||||
else clear_alert("temp")
|
||||
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
if(bodytemperature >= species.heat_level_1)
|
||||
else if(bodytemperature >= species.heat_discomfort_level)
|
||||
//Body temperature is too hot.
|
||||
if(SEND_SIGNAL(src, COMSIG_CHECK_FOR_GODMODE) & COMSIG_GODMODE_CANCEL)
|
||||
return 1 // Cancelled by a component
|
||||
@@ -912,7 +954,7 @@
|
||||
|
||||
take_overall_damage(burn=burn_dam, used_weapon = "High Body Temperature")
|
||||
|
||||
else if(bodytemperature <= species.cold_level_1)
|
||||
else if(bodytemperature <= species.cold_discomfort_level)
|
||||
//Body temperature is too cold.
|
||||
|
||||
if(SEND_SIGNAL(src, COMSIG_CHECK_FOR_GODMODE) & COMSIG_GODMODE_CANCEL)
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
selective_preference = client.prefs_vr.selective_preference
|
||||
eating_privacy_global = client.prefs_vr.eating_privacy_global
|
||||
allow_mimicry = client.prefs_vr.allow_mimicry
|
||||
allowtemp = client.prefs_vr.allowtemp
|
||||
|
||||
drop_vore = client.prefs_vr.drop_vore
|
||||
stumble_vore = client.prefs_vr.stumble_vore
|
||||
|
||||
Reference in New Issue
Block a user