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

65 lines
2.1 KiB
Plaintext

/datum/disease/decloning
form = "Virus"
name = "Cellular Degeneration"
max_stages = 5
stage_prob = 0.5
cure_text = "Rezadone, Mutadone for prolonging, or death."
agent = "Severe Genetic Damage"
viable_mobtypes = list(/mob/living/carbon/human)
desc = @"If left untreated the subject will [REDACTED]!"
severity = "Dangerous!"
cures = list(/datum/reagent/medicine/rezadone)
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
spread_text = "Organic meltdown"
process_dead = TRUE
bypasses_immunity = TRUE
/datum/disease/decloning/cure(add_resistance = TRUE)
affected_mob.remove_status_effect(/datum/status_effect/decloning)
return ..()
/datum/disease/decloning/stage_act(seconds_per_tick)
. = ..()
if(!.)
return
if(affected_mob.stat == DEAD)
cure()
return FALSE
switch(stage)
if(2)
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("itch")
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("yawn")
if(3)
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("itch")
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("drool")
if(SPT_PROB(1.5, seconds_per_tick))
affected_mob.apply_status_effect(/datum/status_effect/decloning)
if(SPT_PROB(1, seconds_per_tick))
to_chat(affected_mob, span_danger("Your skin feels strange."))
if(4)
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("itch")
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("drool")
if(SPT_PROB(2.5, seconds_per_tick))
affected_mob.apply_status_effect(/datum/status_effect/decloning)
affected_mob.adjust_organ_loss(ORGAN_SLOT_BRAIN, 1, 170)
if(SPT_PROB(7.5, seconds_per_tick))
affected_mob.adjust_stutter(6 SECONDS)
if(5)
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("itch")
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("drool")
if(SPT_PROB(2.5, seconds_per_tick))
to_chat(affected_mob, span_danger("Your skin starts degrading!"))
if(SPT_PROB(5, seconds_per_tick))
affected_mob.apply_status_effect(/datum/status_effect/decloning)
affected_mob.adjust_organ_loss(ORGAN_SLOT_BRAIN, 2, 170)