mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
## About The Pull Request What it says on the tin. `times_fired` is the most unused parameter in all mob procs. I say most because there were just 2 cases where it was used - handling breathing - handling heartbeat Besides these 2 cases this parameter did nothing in every proc. Removing it does 2 things - Makes those procs more readable as it now has 1 less parameter that was documented poorly and did nothing - Makes those procs slightly faster as we are passing 1 less variable to its parameter call stack It can easily be substituted with `SSmobs.times_fired` which was its original value anyways ## Changelog 🆑 code: removes an unused parameter `times_fired` from mob life procs. Making them function slightly faster /🆑
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
/datum/disease/cold9
|
|
name = "The Cold"
|
|
max_stages = 3
|
|
spread_text = "On contact"
|
|
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
|
|
cure_text = "Common Cold Anti-bodies & Spaceacillin"
|
|
cures = list(/datum/reagent/medicine/spaceacillin)
|
|
agent = "ICE9-rhinovirus"
|
|
viable_mobtypes = list(/mob/living/carbon/human)
|
|
desc = "If left untreated the subject will slow, as if partly frozen."
|
|
severity = DISEASE_SEVERITY_HARMFUL
|
|
required_organ = ORGAN_SLOT_LUNGS
|
|
|
|
/datum/disease/cold9/stage_act(seconds_per_tick)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
|
|
switch(stage)
|
|
if(2)
|
|
affected_mob.adjust_bodytemperature(-5 * seconds_per_tick)
|
|
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(2.5, seconds_per_tick))
|
|
to_chat(affected_mob, span_danger("You feel stiff."))
|
|
if(SPT_PROB(0.05, seconds_per_tick))
|
|
to_chat(affected_mob, span_notice("You feel better."))
|
|
cure()
|
|
return FALSE
|
|
if(3)
|
|
affected_mob.adjust_bodytemperature(-10 * seconds_per_tick)
|
|
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(5, seconds_per_tick))
|
|
to_chat(affected_mob, span_danger("You feel stiff."))
|