Skip to content

Commit

Permalink
Bodies Can No Longer Be Easily Superheated (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
RimiNosha authored Nov 26, 2023
1 parent 4c1a0ee commit bc295a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/atmospherics/atmos_mob_interaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
/// The temperature the blue icon is displayed.
#define BODYTEMP_COLD_WARNING_3 (BODYTEMP_COLD_DAMAGE_LIMIT - 150) //120k

/// Beyond this temperature, being on fire will increase body temperature by less and less
#define BODYTEMP_FIRE_TEMP_SOFTCAP 1200

/// The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
#define PRESSURE_DAMAGE_COEFFICIENT 2
#define MAX_HIGH_PRESSURE_DAMAGE 2
Expand Down
17 changes: 11 additions & 6 deletions code/datums/status_effects/debuffs/fire_stacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,19 @@
var/mob/living/carbon/human/victim = owner
var/thermal_protection = victim.get_thermal_protection()

if(thermal_protection >= FIRE_IMMUNITY_MAX_TEMP_PROTECT && !no_protection)
return
if(!no_protection)
if(thermal_protection >= FIRE_IMMUNITY_MAX_TEMP_PROTECT)
return
if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT)
victim.adjust_bodytemperature(5.5 * delta_time)
return

if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT && !no_protection)
victim.adjust_bodytemperature(5.5 * delta_time)
return
var/amount_to_heat = (BODYTEMP_HEATING_MAX + (stacks * 12)) * 0.5 * delta_time
if(owner.bodytemperature > BODYTEMP_FIRE_TEMP_SOFTCAP)
// Apply dimishing returns upon temp beyond the soft cap
amount_to_heat = amount_to_heat ** (BODYTEMP_FIRE_TEMP_SOFTCAP / owner.bodytemperature)

victim.adjust_bodytemperature((BODYTEMP_HEATING_MAX + (stacks * 12)) * 0.5 * delta_time)
victim.adjust_bodytemperature(amount_to_heat)
victim.add_mood_event("on_fire", /datum/mood_event/on_fire)
victim.mind?.add_memory(MEMORY_FIRE, list(DETAIL_PROTAGONIST = victim), story_value = STORY_VALUE_OKAY)

Expand Down

0 comments on commit bc295a3

Please sign in to comment.