diff --git a/code/datums/diseases/advance/symptoms/fever.dm b/code/datums/diseases/advance/symptoms/fever.dm index cf3c66f96b9..8fc428c55ec 100644 --- a/code/datums/diseases/advance/symptoms/fever.dm +++ b/code/datums/diseases/advance/symptoms/fever.dm @@ -1,3 +1,5 @@ +#define FEVER_CHANGE "fever" + /* ////////////////////////////////////// @@ -61,10 +63,11 @@ Bonus * * datum/disease/advance/A The disease applying the symptom */ /datum/symptom/fever/proc/set_body_temp(mob/living/M, datum/disease/advance/A) - if(!unsafe) - M.add_body_temperature_change("fever", max((6 * power) * A.stage, (BODYTEMP_HEAT_DAMAGE_LIMIT - 1))) - else - M.add_body_temperature_change("fever", max((6 * power) * A.stage, (BODYTEMP_HEAT_DAMAGE_LIMIT + 20))) + // Get the max amount of change allowed before going over heat damage limit, 5 under the heat damage limit + var/change_limit = (BODYTEMP_HEAT_DAMAGE_LIMIT - 5) - M.get_body_temp_normal(apply_change=FALSE) + if(unsafe) // when unsafe the fever can cause burn damage (not wounds) + change_limit += 20 + M.add_body_temperature_change(FEVER_CHANGE, min((6 * power) * A.stage, change_limit)) /// Update the body temp change based on the new stage /datum/symptom/fever/on_stage_change(datum/disease/advance/A) @@ -76,4 +79,6 @@ Bonus /datum/symptom/fever/End(datum/disease/advance/A) var/mob/living/carbon/M = A.affected_mob if(M) - M.remove_body_temperature_change("fever") + M.remove_body_temperature_change(FEVER_CHANGE) + +#undef FEVER_CHANGE diff --git a/code/datums/diseases/advance/symptoms/shivering.dm b/code/datums/diseases/advance/symptoms/shivering.dm index da8e213a57d..9249eb6fcd9 100644 --- a/code/datums/diseases/advance/symptoms/shivering.dm +++ b/code/datums/diseases/advance/symptoms/shivering.dm @@ -1,3 +1,5 @@ +#define SHIVERING_CHANGE "shivering" + /* ////////////////////////////////////// @@ -60,10 +62,11 @@ Bonus * * datum/disease/advance/A The disease applying the symptom */ /datum/symptom/shivering/proc/set_body_temp(mob/living/M, datum/disease/advance/A) - if(!unsafe) - M.add_body_temperature_change("shivering", max(-((6 * power) * A.stage), (BODYTEMP_COLD_DAMAGE_LIMIT + 1))) - else - M.add_body_temperature_change("shivering", max(-((6 * power) * A.stage), (BODYTEMP_COLD_DAMAGE_LIMIT - 20))) + // Get the max amount of change allowed before going under cold damage limit, 5 over the cold damage limit + var/change_limit = (BODYTEMP_HEAT_DAMAGE_LIMIT - 5) - M.get_body_temp_normal(apply_change=FALSE) + if(unsafe) // when unsafe the shivers can cause (cold?)burn damage (not wounds) + change_limit -= 20 + M.add_body_temperature_change(SHIVERING_CHANGE, max(-((6 * power) * A.stage), change_limit)) /// Update the body temp change based on the new stage /datum/symptom/shivering/on_stage_change(datum/disease/advance/A) @@ -75,4 +78,6 @@ Bonus /datum/symptom/shivering/End(datum/disease/advance/A) var/mob/living/carbon/M = A.affected_mob if(M) - M.remove_body_temperature_change("shivering") + M.remove_body_temperature_change(SHIVERING_CHANGE) + +#undef SHIVERING_CHANGE