mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 20:11:56 +00:00
This tracks the seconds per tick of a subsystem, however note that it is not completely accurate, as subsystems can be delayed, however it's useful to have this number as a multiplier or ratio, so that if in future someone changes the subsystem wait time code correctly adjusts how fast it applies effects regexes used git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i 's/DT_PROB/SPT_PROB/g' git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i 's/delta_time/seconds_per_tick/g'
51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
/datum/disease/cold
|
|
name = "The Cold"
|
|
desc = "If left untreated the subject will contract the flu."
|
|
max_stages = 3
|
|
cure_text = "Rest & Spaceacillin"
|
|
cures = list(/datum/reagent/medicine/spaceacillin)
|
|
agent = "XY-rhinovirus"
|
|
viable_mobtypes = list(/mob/living/carbon/human)
|
|
spreading_modifier = 0.5
|
|
spread_text = "Airborne"
|
|
severity = DISEASE_SEVERITY_NONTHREAT
|
|
|
|
|
|
/datum/disease/cold/stage_act(seconds_per_tick, times_fired)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
|
|
switch(stage)
|
|
if(2)
|
|
if(SPT_PROB(0.5, seconds_per_tick))
|
|
affected_mob.emote("sneeze")
|
|
if(SPT_PROB(0.5, seconds_per_tick))
|
|
affected_mob.emote("cough")
|
|
if(SPT_PROB(0.5, seconds_per_tick))
|
|
to_chat(affected_mob, span_danger("Your throat feels sore."))
|
|
if(SPT_PROB(0.5, seconds_per_tick))
|
|
to_chat(affected_mob, span_danger("Mucous runs down the back of your throat."))
|
|
if((affected_mob.body_position == LYING_DOWN && SPT_PROB(23, seconds_per_tick)) || SPT_PROB(0.025, seconds_per_tick)) //changed FROM prob(10) until sleeping is fixed // Has sleeping been fixed yet?
|
|
to_chat(affected_mob, span_notice("You feel better."))
|
|
cure()
|
|
return FALSE
|
|
if(3)
|
|
if(SPT_PROB(0.5, seconds_per_tick))
|
|
affected_mob.emote("sneeze")
|
|
if(SPT_PROB(0.5, seconds_per_tick))
|
|
affected_mob.emote("cough")
|
|
if(SPT_PROB(0.5, seconds_per_tick))
|
|
to_chat(affected_mob, span_danger("Your throat feels sore."))
|
|
if(SPT_PROB(0.5, seconds_per_tick))
|
|
to_chat(affected_mob, span_danger("Mucous runs down the back of your throat."))
|
|
if(SPT_PROB(0.25, seconds_per_tick) && !LAZYFIND(affected_mob.disease_resistances, /datum/disease/flu))
|
|
var/datum/disease/Flu = new /datum/disease/flu()
|
|
affected_mob.ForceContractDisease(Flu, FALSE, TRUE)
|
|
cure()
|
|
return FALSE
|
|
if((affected_mob.body_position == LYING_DOWN && SPT_PROB(12.5, seconds_per_tick)) || SPT_PROB(0.005, seconds_per_tick)) //changed FROM prob(5) until sleeping is fixed
|
|
to_chat(affected_mob, span_notice("You feel better."))
|
|
cure()
|
|
return FALSE
|