mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
[MIRROR] The shivering symptom now actually chills you like it says it does instead of heating you up (#5342)
* The shivering symptom now actually chills you like it says it does instead of heating you up (#58181) * ice ice baby * broader species compatibility * are you HAPPY NOW? * should make the code compile * Apply suggestions from code review Co-authored-by: Aki Ito <11748095+ExcessiveUseOfCobblestone@ users.noreply.github.com> * The shivering symptom now actually chills you like it says it does instead of heating you up Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com> Co-authored-by: Aki Ito <11748095+ExcessiveUseOfCobblestone@ users.noreply.github.com>
This commit is contained in:
co-authored by
Aki Ito
ATH1909
parent
66f5b3cbd8
commit
1ad10582db
+20
-19
@@ -1,9 +1,9 @@
|
||||
#define SHIVERING_CHANGE "shivering"
|
||||
#define CHILLS_CHANGE "chills"
|
||||
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Shivering
|
||||
Chills
|
||||
|
||||
No change to hidden.
|
||||
Increases resistance.
|
||||
@@ -17,8 +17,8 @@ Bonus
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/shivering
|
||||
name = "Shivering"
|
||||
/datum/symptom/chills
|
||||
name = "Chills"
|
||||
desc = "The virus inhibits the body's thermoregulation, cooling the body down."
|
||||
stealth = 0
|
||||
resistance = 2
|
||||
@@ -30,11 +30,11 @@ Bonus
|
||||
symptom_delay_max = 30
|
||||
var/unsafe = FALSE //over the cold threshold
|
||||
threshold_descs = list(
|
||||
"Stage Speed 5" = "Increases cooling speed,; the host can fall below safe temperature levels.",
|
||||
"Stage Speed 10" = "Further increases cooling speed."
|
||||
"Stage Speed 5" = "Increases the intensity of the cooling; the host can fall below safe temperature levels.",
|
||||
"Stage Speed 10" = "Increases the intensity of the cooling even further."
|
||||
)
|
||||
|
||||
/datum/symptom/shivering/Start(datum/disease/advance/A)
|
||||
/datum/symptom/chills/Start(datum/disease/advance/A)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
@@ -44,7 +44,7 @@ Bonus
|
||||
if(A.totalStageSpeed() >= 10)
|
||||
power = 2.5
|
||||
|
||||
/datum/symptom/shivering/Activate(datum/disease/advance/A)
|
||||
/datum/symptom/chills/Activate(datum/disease/advance/A)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
@@ -52,7 +52,7 @@ Bonus
|
||||
if(!unsafe || A.stage < 4)
|
||||
to_chat(M, "<span class='warning'>[pick("You feel cold.", "You shiver.")]</span>")
|
||||
else
|
||||
to_chat(M, "<span class='userdanger'>[pick("You feel your blood run cold.", "You feel ice in your veins.", "You feel like you can't heat up.", "You shiver violently." )]</span>")
|
||||
to_chat(M, "<span class='userdanger'>[pick("You feel your blood run cold.", "You feel ice in your veins.", "You feel like you can't heat up.", "You shiver violently.")]</span>")
|
||||
set_body_temp(A.affected_mob, A)
|
||||
|
||||
/**
|
||||
@@ -63,23 +63,24 @@ Bonus
|
||||
* * mob/living/M The mob to apply changes to
|
||||
* * datum/disease/advance/A The disease applying the symptom
|
||||
*/
|
||||
/datum/symptom/shivering/proc/set_body_temp(mob/living/M, datum/disease/advance/A)
|
||||
// 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))
|
||||
/datum/symptom/chills/proc/set_body_temp(mob/living/M, datum/disease/advance/A)
|
||||
if(unsafe) // when unsafe the shivers can cause cold damage
|
||||
M.add_body_temperature_change(CHILLS_CHANGE, -6 * power * A.stage)
|
||||
else
|
||||
// Get the max amount of change allowed before going under cold damage limit, then cap the maximum allowed temperature change from safe chills to 5 over the cold damage limit
|
||||
var/change_limit = min(M.get_body_temp_cold_damage_limit() + 5 - M.get_body_temp_normal(apply_change=FALSE), 0)
|
||||
M.add_body_temperature_change(CHILLS_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)
|
||||
/datum/symptom/chills/on_stage_change(datum/disease/advance/A)
|
||||
. = ..()
|
||||
if(.)
|
||||
set_body_temp(A.affected_mob, A)
|
||||
|
||||
/// remove the body temp change when removing symptom
|
||||
/datum/symptom/shivering/End(datum/disease/advance/A)
|
||||
/datum/symptom/chills/End(datum/disease/advance/A)
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
if(M)
|
||||
M.remove_body_temperature_change(SHIVERING_CHANGE)
|
||||
M.remove_body_temperature_change(CHILLS_CHANGE)
|
||||
|
||||
#undef SHIVERING_CHANGE
|
||||
#undef CHILLS_CHANGE
|
||||
@@ -65,11 +65,12 @@ Bonus
|
||||
* * datum/disease/advance/A The disease applying the symptom
|
||||
*/
|
||||
/datum/symptom/fever/proc/set_body_temp(mob/living/M, datum/disease/advance/A)
|
||||
// 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))
|
||||
if(unsafe) // when unsafe the fever can cause heat damage
|
||||
M.add_body_temperature_change(FEVER_CHANGE, 6 * power * A.stage)
|
||||
else
|
||||
// Get the max amount of change allowed before going over heat damage limit, then cap the maximum allowed temperature change from a safe fever to 5 under the heat damage limit
|
||||
var/change_limit = max(M.get_body_temp_heat_damage_limit() - 5 - M.get_body_temp_normal(apply_change=FALSE), 0)
|
||||
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)
|
||||
|
||||
@@ -21,7 +21,7 @@ new /datum/disease_ability/symptom/medium/visionloss,
|
||||
new /datum/disease_ability/symptom/medium/deafness,
|
||||
new /datum/disease_ability/symptom/powerful/narcolepsy,
|
||||
new /datum/disease_ability/symptom/medium/fever,
|
||||
new /datum/disease_ability/symptom/medium/shivering,
|
||||
new /datum/disease_ability/symptom/medium/chills,
|
||||
new /datum/disease_ability/symptom/medium/headache,
|
||||
new /datum/disease_ability/symptom/medium/nano_boost,
|
||||
new /datum/disease_ability/symptom/medium/nano_destroy,
|
||||
@@ -356,8 +356,8 @@ new /datum/disease_ability/symptom/powerful/youth
|
||||
/datum/disease_ability/symptom/medium/fever
|
||||
symptoms = list(/datum/symptom/fever)
|
||||
|
||||
/datum/disease_ability/symptom/medium/shivering
|
||||
symptoms = list(/datum/symptom/shivering)
|
||||
/datum/disease_ability/symptom/medium/chills
|
||||
symptoms = list(/datum/symptom/chills)
|
||||
|
||||
/datum/disease_ability/symptom/medium/headache
|
||||
symptoms = list(/datum/symptom/headache)
|
||||
|
||||
@@ -148,6 +148,12 @@
|
||||
return dna.species.bodytemp_normal
|
||||
return dna.species.bodytemp_normal + get_body_temp_normal_change()
|
||||
|
||||
/mob/living/carbon/human/get_body_temp_heat_damage_limit()
|
||||
return dna.species.bodytemp_heat_damage_limit
|
||||
|
||||
/mob/living/carbon/human/get_body_temp_cold_damage_limit()
|
||||
return dna.species.bodytemp_cold_damage_limit
|
||||
|
||||
///FIRE CODE
|
||||
/mob/living/carbon/human/handle_fire(delta_time, times_fired)
|
||||
. = ..()
|
||||
|
||||
@@ -1629,6 +1629,14 @@
|
||||
return BODYTEMP_NORMAL
|
||||
return BODYTEMP_NORMAL + get_body_temp_normal_change()
|
||||
|
||||
///Returns the body temperature at which this mob will start taking heat damage.
|
||||
/mob/living/proc/get_body_temp_heat_damage_limit()
|
||||
return BODYTEMP_HEAT_DAMAGE_LIMIT
|
||||
|
||||
///Returns the body temperature at which this mob will start taking cold damage.
|
||||
/mob/living/proc/get_body_temp_cold_damage_limit()
|
||||
return BODYTEMP_COLD_DAMAGE_LIMIT
|
||||
|
||||
///Checks if the user is incapacitated or on cooldown.
|
||||
/mob/living/proc/can_look_up()
|
||||
return !(incapacitated(ignore_restraints = TRUE))
|
||||
|
||||
+1
-1
@@ -658,6 +658,7 @@
|
||||
#include "code\datums\diseases\advance\advance.dm"
|
||||
#include "code\datums\diseases\advance\presets.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\beard.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\chills.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\choking.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\confusion.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\cough.dm"
|
||||
@@ -677,7 +678,6 @@
|
||||
#include "code\datums\diseases\advance\symptoms\oxygen.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\sensory.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\shedding.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\shivering.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\skin.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\sneeze.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\species.dm"
|
||||
|
||||
Reference in New Issue
Block a user