diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 4329dd333e3d..6800db70a8fa 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -190,15 +190,40 @@ Override makes it so the alert is not replaced until cleared by a clear_alert wi icon_state = "gross3" /atom/movable/screen/alert/hot - name = "Too Hot" - desc = "You're flaming hot! Get somewhere cooler and take off any insulating clothing like a fire suit." + name = "Hot" + desc = "It's quite warm. Get somewhere cooler and take off any insulating clothing like a fire suit." + icon_state = "hot" + +/atom/movable/screen/alert/warm + name = "Warm" + desc = "It's a bit warm, but not unbearably so." icon_state = "hot" /atom/movable/screen/alert/cold - name = "Too Cold" - desc = "You're freezing cold! Get somewhere warmer and take off any insulating clothing like a space suit." + name = "Cold" + desc = "It's quite cold. Get somewhere warmer and take off any insulating clothing like a space suit." + icon_state = "cold" + +/atom/movable/screen/alert/chilly + name = "Chilly" + desc = "It's a bit chilly, but not unbearably so." icon_state = "cold" +/atom/movable/screen/alert/sweat + name = "Sweating" + desc = "You're sweating and the heat is starting to hurt. Get somewhere cooler and take off any insulating clothing like a fire suit." + icon_state = "sweat" + +/atom/movable/screen/alert/shiver + name = "Shivering" + desc = "You're shivering and the cold is starting to hurt. Get somewhere warmer and take off any insulating clothing like a space suit." + icon_state = "shiver" + +/atom/movable/screen/alert/fans + name = "High Fan Speed" + desc = "Your fans are spinning quite fast, and your components are reaching a dangerous temperature! Get somewhere cooler and take off any insulating clothing like a fire suit." + icon_state = "fans" + /atom/movable/screen/alert/lowpressure name = "Low Pressure" desc = "The air around you is hazardously thin. A space suit would protect you." diff --git a/code/game/objects/effects/turf_fire.dm b/code/game/objects/effects/turf_fire.dm index 735d8226edfa..0bed49a3709c 100644 --- a/code/game/objects/effects/turf_fire.dm +++ b/code/game/objects/effects/turf_fire.dm @@ -5,7 +5,7 @@ #define TURF_FIRE_VOLUME 150 #define TURF_FIRE_MAX_POWER 50 -#define TURF_FIRE_ENERGY_PER_BURNED_OXY_MOL 12000 +#define TURF_FIRE_ENERGY_PER_BURNED_OXY_MOL 30000 #define TURF_FIRE_BURN_RATE_BASE 0.12 #define TURF_FIRE_BURN_RATE_PER_POWER 0.02 #define TURF_FIRE_BURN_CARBON_DIOXIDE_MULTIPLIER 0.75 diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 788baa32fbf5..a1560963b00b 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -146,6 +146,10 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/bodytemp_normal = HUMAN_BODYTEMP_NORMAL /// Minimum amount of kelvin moved toward normal body temperature per tick. var/bodytemp_autorecovery_min = HUMAN_BODYTEMP_AUTORECOVERY_MINIMUM + /// The maximum temperature the species is comfortable at. Going above this does not apply any effects, but warns players that the temperture is hot + var/max_temp_comfortable = (HUMAN_BODYTEMP_NORMAL + 7) + /// The minimum temperature the species is comfortable at. Going below this does not apply any effects, but warns players that the temperture is chilly + var/min_temp_comfortable = (HUMAN_BODYTEMP_NORMAL - 5) /// This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. var/bodytemp_autorecovery_divisor = HUMAN_BODYTEMP_AUTORECOVERY_DIVISOR ///Similar to the autorecovery_divsor, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to lose bodytemp faster. @@ -160,6 +164,10 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/bodytemp_cooling_rate_max = HUMAN_BODYTEMP_COOLING_MAX /// The maximum rate at which a species can cool down per tick var/bodytemp_heating_rate_max = HUMAN_BODYTEMP_HEATING_MAX + /// How much temp is our body stabilizing naturally? + var/bodytemp_natural_stabilization = 0 + /// How much temp is the environment is causing us to charge? + var/bodytemp_environment_change = 0 ///Does our species have colors for its' damage overlays? var/use_damage_color = TRUE @@ -1790,10 +1798,10 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/areatemp = H.get_temperature(environment) if(H.stat != DEAD) // If you are dead your body does not stabilize naturally - natural_bodytemperature_stabilization(environment, H) + bodytemp_natural_stabilization = natural_bodytemperature_stabilization(environment, H) if(!H.on_fire || areatemp > H.bodytemperature) // If we are not on fire or the area is hotter - H.adjust_bodytemperature((areatemp - H.bodytemperature), use_insulation=TRUE, use_steps=TRUE, hardsuit_fix=bodytemp_normal - H.bodytemperature) + bodytemp_environment_change = H.adjust_bodytemperature((areatemp - H.bodytemperature), use_insulation=TRUE, use_steps=TRUE, hardsuit_fix=bodytemp_normal - H.bodytemperature) if(H.check_for_seal()) return @@ -1853,8 +1861,50 @@ GLOBAL_LIST_EMPTY(roundstart_races) /// Handle the body temperature status effects for the species /// Traits for resitance to heat or cold are handled here. /datum/species/proc/handle_body_temperature(mob/living/carbon/human/H) + var/body_temp = H.bodytemperature + var/total_change = bodytemp_natural_stabilization + bodytemp_environment_change + + //tempature is no longer comfy, throw alert + if(body_temp > max_temp_comfortable && !HAS_TRAIT(H, TRAIT_RESISTHEAT)) + SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold") + if(body_temp > bodytemp_heat_damage_limit) + var/burn_damage = calculate_burn_damage(H) + if(burn_damage < 2) + H.throw_alert("tempfeel", /atom/movable/screen/alert/hot, 3) + else + H.throw_alert("tempfeel", /atom/movable/screen/alert/hot, 2) + else + if(body_temp < (bodytemp_heat_damage_limit - 10)) + // you are cooling down and exiting the danger zone + if(total_change < 0) + H.throw_alert("tempfeel", /atom/movable/screen/alert/warm) + else + H.throw_alert("tempfeel", /atom/movable/screen/alert/hot, 2) + else if(total_change > 1) + H.throw_alert("tempfeel", /atom/movable/screen/alert/warm) + else + H.clear_alert("tempfeel") + else if (body_temp < min_temp_comfortable && !HAS_TRAIT(H, TRAIT_RESISTCOLD)) + SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot") + if(body_temp < 200) + H.throw_alert("tempfeel", /atom/movable/screen/alert/cold, 3) + else if(body_temp < bodytemp_cold_damage_limit) + H.throw_alert("tempfeel", /atom/movable/screen/alert/cold, 2) + else if(body_temp < (bodytemp_cold_damage_limit + 10)) + // you are warming up and exiting the danger zone + if(total_change > 0) + H.throw_alert("tempfeel", /atom/movable/screen/alert/chilly) + else + H.throw_alert("tempfeel", /atom/movable/screen/alert/cold, 2) + else if(total_change < -1) + H.throw_alert("tempfeel", /atom/movable/screen/alert/chilly) + else + H.clear_alert("tempfeel") + else + H.clear_alert("tempfeel") + // Body temperature is too hot, and we do not have resist traits - if(H.bodytemperature > bodytemp_heat_damage_limit && !HAS_TRAIT(H, TRAIT_RESISTHEAT)) + if(body_temp > bodytemp_heat_damage_limit && !HAS_TRAIT(H, TRAIT_RESISTHEAT)) // Clear cold mood and apply hot mood SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold") SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "hot", /datum/mood_event/hot) @@ -1862,23 +1912,26 @@ GLOBAL_LIST_EMPTY(roundstart_races) //Remove any slowdown from the cold. H.remove_movespeed_modifier(/datum/movespeed_modifier/cold) - var/burn_damage = 0 - var/firemodifier = H.fire_stacks / 50 - if (!H.on_fire) // We are not on fire, reduce the modifier - firemodifier = min(firemodifier, 0) - - // this can go below 5 at log 2.5 - burn_damage = max(log(2 - firemodifier, (H.bodytemperature - H.get_body_temp_normal(apply_change=FALSE))) - 5,0) - - // Display alerts based on the amount of fire damage being taken - if (burn_damage) - switch(burn_damage) - if(1 to 2) - H.throw_alert("temp", /atom/movable/screen/alert/hot, 1) - if(2 to 4) - H.throw_alert("temp", /atom/movable/screen/alert/hot, 2) - else - H.throw_alert("temp", /atom/movable/screen/alert/hot, 3) + var/burn_damage = calculate_burn_damage(H) + + // sweats depending on burn damage, not actually a mechanic but a alternative to pinpoint when you are taking damage + if(burn_damage) + if(H.mob_biotypes & MOB_ROBOTIC) //robors have a alternative cooling fan graphic + switch(burn_damage) + if(0 to 2) + H.throw_alert("temp", /atom/movable/screen/alert/fans, 1) + if(2 to 4) + H.throw_alert("temp", /atom/movable/screen/alert/fans, 2) + else + H.throw_alert("temp", /atom/movable/screen/alert/fans, 3) + else + switch(burn_damage) + if(0 to 2) + H.throw_alert("temp", /atom/movable/screen/alert/sweat, 1) + if(2 to 4) + H.throw_alert("temp", /atom/movable/screen/alert/sweat, 2) + else + H.throw_alert("temp", /atom/movable/screen/alert/sweat, 3) // Apply species and physiology modifiers to heat damage burn_damage = burn_damage * heatmod * H.physiology.heat_mod @@ -1891,7 +1944,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) H.apply_damage(burn_damage, BURN, spread_damage = TRUE) // Body temperature is too cold, and we do not have resist traits - else if(H.bodytemperature < bodytemp_cold_damage_limit && !HAS_TRAIT(H, TRAIT_RESISTCOLD)) + else if(body_temp < bodytemp_cold_damage_limit && !HAS_TRAIT(H, TRAIT_RESISTCOLD)) // clear any hot moods and apply cold mood SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot") SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "cold", /datum/mood_event/cold) @@ -1900,17 +1953,16 @@ GLOBAL_LIST_EMPTY(roundstart_races) // Display alerts based on the amount of cold damage being taken // Apply more damage based on how cold you are - var/bodytemp = H.bodytemperature - if(bodytemp < 120) - H.throw_alert("temp", /atom/movable/screen/alert/cold, 3) + if(body_temp < 120) + H.throw_alert("temp", /atom/movable/screen/alert/shiver, 3) H.apply_damage(COLD_DAMAGE_LEVEL_3 * coldmod * H.physiology.cold_mod, BURN) - else if(bodytemp < 200) - H.throw_alert("temp", /atom/movable/screen/alert/cold, 2) + else if(body_temp < 200) + H.throw_alert("temp", /atom/movable/screen/alert/shiver, 2) H.apply_damage(COLD_DAMAGE_LEVEL_2 * coldmod * H.physiology.cold_mod, BURN) else - H.throw_alert("temp", /atom/movable/screen/alert/cold, 1) + H.throw_alert("temp", /atom/movable/screen/alert/shiver, 1) H.apply_damage(COLD_DAMAGE_LEVEL_1 * coldmod * H.physiology.cold_mod, BURN) // We are not to hot or cold, remove status and moods @@ -1920,6 +1972,16 @@ GLOBAL_LIST_EMPTY(roundstart_races) SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold") SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot") +/datum/species/proc/calculate_burn_damage(mob/living/carbon/human/current_human) + var/burn_damage = 0 + var/firemodifier = current_human.fire_stacks / 50 + if (!current_human.on_fire) // We are not on fire, reduce the modifier + firemodifier = min(firemodifier, 0) + + // this can go below 5 at log 2.5 + burn_damage = max(log(2 - firemodifier, (current_human.bodytemperature - current_human.get_body_temp_normal(apply_change=FALSE))) - 5,0) + return burn_damage + /// Handle the air pressure of the environment /datum/species/proc/handle_environment_pressure(datum/gas_mixture/environment, mob/living/carbon/human/H) var/pressure = environment.return_pressure() @@ -2017,6 +2079,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) // Apply the natural stabilization changes H.adjust_bodytemperature(natural_change) + return natural_change ////////// // FIRE // diff --git a/code/modules/mob/living/carbon/human/species_types/ethereal.dm b/code/modules/mob/living/carbon/human/species_types/ethereal.dm index 27362b348cab..b91559edb0ae 100644 --- a/code/modules/mob/living/carbon/human/species_types/ethereal.dm +++ b/code/modules/mob/living/carbon/human/species_types/ethereal.dm @@ -30,6 +30,9 @@ bodytemp_heat_damage_limit = FIRE_MINIMUM_TEMPERATURE_TO_SPREAD // about 150C // Cold temperatures hurt faster as it is harder to move with out the heat energy bodytemp_cold_damage_limit = (T20C - 10) // about 10c + + max_temp_comfortable = HUMAN_BODYTEMP_NORMAL + 100 + hair_color = "fixedmutcolor" hair_alpha = 140 mutant_bodyparts = list("elzu_horns", "tail_elzu") diff --git a/code/modules/mob/living/carbon/human/species_types/kepori.dm b/code/modules/mob/living/carbon/human/species_types/kepori.dm index 7e76fff79c1e..39e3cbc3d07a 100644 --- a/code/modules/mob/living/carbon/human/species_types/kepori.dm +++ b/code/modules/mob/living/carbon/human/species_types/kepori.dm @@ -24,6 +24,8 @@ bodytemp_normal = HUMAN_BODYTEMP_NORMAL + 30 bodytemp_heat_damage_limit = HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT + 30 bodytemp_cold_damage_limit = HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT + 30 + max_temp_comfortable = HUMAN_BODYTEMP_NORMAL + 40 + min_temp_comfortable = HUMAN_BODYTEMP_NORMAL - 3 mutanttongue = /obj/item/organ/tongue/kepori species_language_holder = /datum/language_holder/kepori var/datum/action/innate/keptackle/keptackle diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index c34a70b3afde..9d539007df4e 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -48,6 +48,9 @@ // Lizards are coldblooded and can stand a greater temperature range than humans bodytemp_heat_damage_limit = HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT + 20 // This puts lizards 10 above lavaland max heat for ash lizards. bodytemp_cold_damage_limit = HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT - 10 + + max_temp_comfortable = HUMAN_BODYTEMP_NORMAL + 25 + min_temp_comfortable = HUMAN_BODYTEMP_NORMAL - 3 loreblurb = "The Sarathi are a cold-blooded reptilian species originating from the planet Kalixcis, where they evolved alongside the Elzuosa. Kalixcian culture places no importance on blood-bonds, and those from it tend to consider their family anyone they are sufficiently close to, and choose their own names." ass_image = 'icons/ass/asslizard.png' @@ -91,7 +94,7 @@ /// Lizards are cold blooded and do not stabilize body temperature naturally /datum/species/lizard/natural_bodytemperature_stabilization(datum/gas_mixture/environment, mob/living/carbon/human/H) - return + return 0 /datum/species/lizard/random_name(gender,unique,lastname) if(unique) diff --git a/code/modules/mob/living/carbon/human/species_types/vox.dm b/code/modules/mob/living/carbon/human/species_types/vox.dm index b61b334e6ec2..1a73860ab29f 100644 --- a/code/modules/mob/living/carbon/human/species_types/vox.dm +++ b/code/modules/mob/living/carbon/human/species_types/vox.dm @@ -26,6 +26,9 @@ bodytemp_cold_divisor = VOX_BODYTEMP_COLD_DIVISOR bodytemp_autorecovery_min = VOX_BODYTEMP_AUTORECOVERY_MIN + max_temp_comfortable = HUMAN_BODYTEMP_NORMAL + 20 + min_temp_comfortable = HUMAN_BODYTEMP_NORMAL - 20 + bodytype = BODYTYPE_VOX species_chest = /obj/item/bodypart/chest/vox diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index c5145600bbf8..04a870684ccf 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -658,6 +658,7 @@ All effects don't start immediately, but rather get worse over time; the rate is if(bodytemperature >= min_temp && bodytemperature <= max_temp) bodytemperature = clamp(bodytemperature + amount,min_temp,max_temp) + return amount ///////// diff --git a/icons/hud/screen_alert.dmi b/icons/hud/screen_alert.dmi index 60ada01078d7..99de0dbf9441 100644 Binary files a/icons/hud/screen_alert.dmi and b/icons/hud/screen_alert.dmi differ diff --git a/shiptest.dme b/shiptest.dme index 3e1776300873..8288edd38bea 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -161,10 +161,10 @@ #include "code\__DEFINES\wires.dm" #include "code\__DEFINES\dcs\flags.dm" #include "code\__DEFINES\dcs\helpers.dm" +#include "code\__DEFINES\dcs\signals\signals.dm" #include "code\__DEFINES\dcs\signals\signals_mod.dm" #include "code\__DEFINES\dcs\signals\signals_storage.dm" #include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_carbon.dm" -#include "code\__DEFINES\dcs\signals\signals.dm" #include "code\__DEFINES\dcs\signals\signals_obj\signals_object.dm" #include "code\__DEFINES\dcs\signals\signals_obj\signals_item\signals_clothing.dm" #include "code\__DEFINES\dcs\signals\signals_obj\signals_item\signals_food.dm" @@ -2811,6 +2811,10 @@ #include "code\modules\mob\living\simple_animal\slime\slime.dm" #include "code\modules\mob\living\simple_animal\slime\slime_say.dm" #include "code\modules\mob\living\simple_animal\slime\subtypes.dm" +#include "code\modules\mob_spawner\burrow.dm" +#include "code\modules\mob_spawner\hivebot.dm" +#include "code\modules\mob_spawner\spawner.dm" +#include "code\modules\mob_spawner\spawner_componet.dm" #include "code\modules\mod\mod_actions.dm" #include "code\modules\mod\mod_activation.dm" #include "code\modules\mod\mod_ai.dm" @@ -2835,10 +2839,6 @@ #include "code\modules\mod\modules\modules_storage.dm" #include "code\modules\mod\modules\modules_supply.dm" #include "code\modules\mod\modules\modules_visor.dm" -#include "code\modules\mob_spawner\burrow.dm" -#include "code\modules\mob_spawner\hivebot.dm" -#include "code\modules\mob_spawner\spawner.dm" -#include "code\modules\mob_spawner\spawner_componet.dm" #include "code\modules\modular_computers\laptop_vendor.dm" #include "code\modules\modular_computers\computers\_modular_computer_shared.dm" #include "code\modules\modular_computers\computers\item\computer.dm"