Files
SyncIt21andGitHub 7c5ef1cfb8 Removes unused parameter times_fired from mob procs (#94590)
## 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
/🆑
2025-12-26 09:51:33 -05:00

59 lines
2.4 KiB
Plaintext

/datum/disease/brainrot
name = "Brainrot"
max_stages = 4
spread_text = "On contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Mannitol"
cures = list(/datum/reagent/medicine/mannitol)
agent = "Cryptococcus Cosmosis"
viable_mobtypes = list(/mob/living/carbon/human)
cure_chance = 7.5 //higher chance to cure, since two reagents are required
desc = "This disease destroys the brain cells, causing brain fever, brain necrosis and general intoxication."
required_organ = ORGAN_SLOT_BRAIN
severity = DISEASE_SEVERITY_HARMFUL
bypasses_immunity = TRUE
/datum/disease/brainrot/stage_act(seconds_per_tick) //Removed toxloss because damaging diseases are pretty horrible. Last round it killed the entire station because the cure didn't work -- Urist -ACTUALLY Removed rather than commented out, I don't see it returning - RR
. = ..()
if(!.)
return
switch(stage)
if(2)
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("blink")
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("yawn")
if(SPT_PROB(1, seconds_per_tick))
to_chat(affected_mob, span_danger("You don't feel like yourself."))
if(SPT_PROB(2.5, seconds_per_tick))
affected_mob.adjust_organ_loss(ORGAN_SLOT_BRAIN, 1, 170)
if(3)
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("stare")
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("drool")
if(SPT_PROB(5, seconds_per_tick))
affected_mob.adjust_organ_loss(ORGAN_SLOT_BRAIN, 2, 170)
if(prob(2))
to_chat(affected_mob, span_danger("Your try to remember something important...but can't."))
if(4)
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("stare")
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("drool")
if(SPT_PROB(7.5, seconds_per_tick))
affected_mob.adjust_organ_loss(ORGAN_SLOT_BRAIN, 3, 170)
if(prob(2))
to_chat(affected_mob, span_danger("Strange buzzing fills your head, removing all thoughts."))
if(SPT_PROB(1.5, seconds_per_tick))
to_chat(affected_mob, span_danger("You lose consciousness..."))
affected_mob.visible_message(span_warning("[affected_mob] suddenly collapses!"), \
span_userdanger("You suddenly collapse!"))
affected_mob.Unconscious(rand(100, 200))
if(prob(1))
affected_mob.emote("snore")
if(SPT_PROB(7.5, seconds_per_tick))
affected_mob.adjust_stutter(6 SECONDS)