Suit coolers don't magically shut off in mild fires (#4820)

This commit is contained in:
Anewbe
2018-02-17 13:19:21 -06:00
committed by Atermonera
parent 61e689960f
commit 077b73a446
3 changed files with 47 additions and 5 deletions

View File

@@ -46,9 +46,15 @@
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/env_temp = get_environment_temperature() //wont save you from a fire
var/temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling)
var/efficiency = 1 - H.get_pressure_weakness() // You need to have a good seal for effective cooling
var/temp_adj = 0 // How much the unit cools you. Adjusted later on.
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
return

View File

@@ -616,11 +616,11 @@
var/temp_adj = 0
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.
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
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.
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)
//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

View 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."