mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Suit coolers don't magically shut off in mild fires (#4820)
This commit is contained in:
@@ -46,9 +46,15 @@
|
|||||||
|
|
||||||
var/mob/living/carbon/human/H = loc
|
var/mob/living/carbon/human/H = loc
|
||||||
|
|
||||||
var/efficiency = 1 - H.get_pressure_weakness() //you need to have a good seal for effective cooling
|
var/efficiency = 1 - H.get_pressure_weakness() // You need to have a good seal for effective cooling
|
||||||
var/env_temp = get_environment_temperature() //wont save you from a fire
|
var/temp_adj = 0 // How much the unit cools you. Adjusted later on.
|
||||||
var/temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling)
|
var/env_temp = get_environment_temperature() // This won't save you from a fire
|
||||||
|
var/thermal_protection = H.get_heat_protection(env_temp) // ... unless you've got a good suit.
|
||||||
|
|
||||||
|
if(thermal_protection < 0.99) //For some reason, < 1 returns false if the value is 1.
|
||||||
|
temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling)
|
||||||
|
else
|
||||||
|
temp_adj = min(H.bodytemperature - thermostat, max_cooling)
|
||||||
|
|
||||||
if (temp_adj < 0.5) //only cools, doesn't heat, also we don't need extreme precision
|
if (temp_adj < 0.5) //only cools, doesn't heat, also we don't need extreme precision
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -616,11 +616,11 @@
|
|||||||
var/temp_adj = 0
|
var/temp_adj = 0
|
||||||
if(loc_temp < bodytemperature) //Place is colder than we are
|
if(loc_temp < bodytemperature) //Place is colder than we are
|
||||||
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||||
if(thermal_protection < 1)
|
if(thermal_protection < 0.99) //For some reason, < 1 returns false if the value is 1.
|
||||||
temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR) //this will be negative
|
temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR) //this will be negative
|
||||||
else if (loc_temp > bodytemperature) //Place is hotter than we are
|
else if (loc_temp > bodytemperature) //Place is hotter than we are
|
||||||
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||||
if(thermal_protection < 1)
|
if(thermal_protection < 0.99) //For some reason, < 1 returns false if the value is 1.
|
||||||
temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
||||||
|
|
||||||
//Use heat transfer as proportional to the gas density. However, we only care about the relative density vs standard 101 kPa/20 C air. Therefore we can use mole ratios
|
//Use heat transfer as proportional to the gas density. However, we only care about the relative density vs standard 101 kPa/20 C air. Therefore we can use mole ratios
|
||||||
|
|||||||
36
html/changelogs/Anewbe - Suit Coolers.yml
Normal file
36
html/changelogs/Anewbe - Suit Coolers.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
################################
|
||||||
|
# Example Changelog File
|
||||||
|
#
|
||||||
|
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||||
|
#
|
||||||
|
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||||
|
# When it is, any changes listed below will disappear.
|
||||||
|
#
|
||||||
|
# Valid Prefixes:
|
||||||
|
# bugfix
|
||||||
|
# wip (For works in progress)
|
||||||
|
# tweak
|
||||||
|
# soundadd
|
||||||
|
# sounddel
|
||||||
|
# rscadd (general adding of nice things)
|
||||||
|
# rscdel (general deleting of nice things)
|
||||||
|
# imageadd
|
||||||
|
# imagedel
|
||||||
|
# maptweak
|
||||||
|
# spellcheck (typo fixes)
|
||||||
|
# experiment
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Your name.
|
||||||
|
author: Anewbe
|
||||||
|
|
||||||
|
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
# Any changes you've made. See valid prefix list above.
|
||||||
|
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||||
|
# SCREW THIS UP AND IT WON'T WORK.
|
||||||
|
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||||
|
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||||
|
changes:
|
||||||
|
- bugfix: "Suit Coolers now properly cool FBPs in slightly burning rooms. If it gets too hot for your suit, you're still dead."
|
||||||
Reference in New Issue
Block a user