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
/🆑
This commit is contained in:
SyncIt21
2025-12-26 09:51:33 -05:00
committed by GitHub
parent 8b5cb8f2dd
commit 7c5ef1cfb8
168 changed files with 742 additions and 744 deletions
+1 -1
View File
@@ -163,7 +163,7 @@
return
AddElement(/datum/element/attack_zone_randomiser)
/mob/living/basic/Life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/Life(seconds_per_tick = SSMOBS_DT)
. = ..()
if(staminaloss > 0)
adjust_stamina_loss(-stamina_recovery * seconds_per_tick, forced = TRUE)
@@ -117,7 +117,7 @@
/// Is our factory dead?
var/orphaned = FALSE
/mob/living/basic/blob_minion/blobbernaut/minion/Life(seconds_per_tick, times_fired)
/mob/living/basic/blob_minion/blobbernaut/minion/Life(seconds_per_tick)
. = ..()
if (!.)
return FALSE
@@ -206,7 +206,7 @@
// These aren't friends they're assholes
// Don't let them be near you!
/mob/living/basic/construct/harvester/heretic/Life(seconds_per_tick, times_fired)
/mob/living/basic/construct/harvester/heretic/Life(seconds_per_tick)
. = ..()
if(!.) //dead or deleted
return
@@ -48,7 +48,7 @@
source.set_fire_stacks(0, remove_wet_stacks = FALSE)
/// Maintain our summoner at a stable body temperature
/mob/living/basic/guardian/gaseous/proc/on_summoner_life(mob/living/source, seconds_per_tick, times_fired)
/mob/living/basic/guardian/gaseous/proc/on_summoner_life(mob/living/source, seconds_per_tick)
SIGNAL_HANDLER
source.adjust_bodytemperature(get_temp_change_amount((summoner.get_body_temp_normal() - summoner.bodytemperature), temp_stabilization_rate * seconds_per_tick))
@@ -152,7 +152,7 @@
UnregisterSignal(owner, COMSIG_LIVING_LIFE)
/// Release gas every life tick while active
/datum/action/cooldown/mob_cooldown/expel_gas/proc/on_life(datum/source, seconds_per_tick, times_fired)
/datum/action/cooldown/mob_cooldown/expel_gas/proc/on_life(datum/source, seconds_per_tick)
SIGNAL_HANDLER
if (isnull(active_gas))
return // We shouldn't even be registered at this point but just in case
@@ -21,6 +21,6 @@
)
grant_actions_by_list(actions_to_add)
/mob/living/basic/heretic_summon/ash_spirit/Life(seconds_per_tick, times_fired)
/mob/living/basic/heretic_summon/ash_spirit/Life(seconds_per_tick)
. = ..()
adjust_brute_loss(-3) // 3 health passively healing
@@ -39,7 +39,7 @@
icon_state = "[base_icon_state]_s"
icon_living = icon_state
/mob/living/basic/heretic_summon/rust_walker/Life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/heretic_summon/rust_walker/Life(seconds_per_tick = SSMOBS_DT)
. = ..()
if(!.) //dead or deleted
return
@@ -62,7 +62,7 @@
taste_description = "french cuisine"
taste_mult = 1.3
/datum/reagent/toxin/leaper_venom/on_mob_life(mob/living/carbon/poisoned_mob, seconds_per_tick, times_fired)
/datum/reagent/toxin/leaper_venom/on_mob_life(mob/living/carbon/poisoned_mob, seconds_per_tick)
. = ..()
if(volume <= 5)
return
@@ -185,7 +185,7 @@
return
tangle_ability.Trigger(target = victim)
/mob/living/basic/venus_human_trap/Life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/venus_human_trap/Life(seconds_per_tick = SSMOBS_DT)
. = ..()
if(!.)
return FALSE
@@ -209,7 +209,7 @@
/// List of places we might spawn a tentacle, if we're alive
var/list/tentacle_target_turfs
/mob/living/basic/mining/goliath/ancient/immortal/Life(seconds_per_tick, times_fired)
/mob/living/basic/mining/goliath/ancient/immortal/Life(seconds_per_tick)
. = ..()
if (!. || !isturf(loc))
return
@@ -86,7 +86,7 @@
skull.melee_attack(target)
return TRUE
/obj/item/organ/legion_tumour/on_life(seconds_per_tick, times_fired)
/obj/item/organ/legion_tumour/on_life(seconds_per_tick)
. = ..()
if (QDELETED(src) || QDELETED(owner))
return
@@ -176,7 +176,7 @@ GLOBAL_LIST_EMPTY(raptor_population)
if (0.8 to 0.999)
. += span_notice("[p_They()] [p_have()] a few minor bruises and scratches.")
/mob/living/basic/raptor/Life(seconds_per_tick, times_fired)
/mob/living/basic/raptor/Life(seconds_per_tick)
. = ..()
if (growth_stage != RAPTOR_BABY || HAS_TRAIT(src, TRAIT_STASIS) || stat == DEAD)
return
@@ -117,7 +117,7 @@
name = new_name
real_name = new_name
/mob/living/basic/pet/dog/breaddog/Life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/pet/dog/breaddog/Life(seconds_per_tick = SSMOBS_DT)
. = ..()
if(!.) //dead or deleted
return
@@ -59,7 +59,7 @@
if(!QDELETED(bodypart))
qdel(bodypart)
/mob/living/basic/living_limb_flesh/Life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/living_limb_flesh/Life(seconds_per_tick = SSMOBS_DT)
. = ..()
if(stat == DEAD)
return
@@ -283,7 +283,7 @@ GLOBAL_LIST_INIT(animatable_blacklist, typecacheof(list(
copied_ref = null
return ..()
/mob/living/basic/mimic/copy/Life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/mimic/copy/Life(seconds_per_tick = SSMOBS_DT)
. = ..()
if(!.) //dead or deleted
return
+2 -2
View File
@@ -1,5 +1,5 @@
/mob/living/basic/slime/Life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/slime/Life(seconds_per_tick = SSMOBS_DT)
. = ..()
if(!.) //dead or deleted
return
@@ -9,7 +9,7 @@
handle_slime_stasis()
/mob/living/basic/slime/handle_environment(datum/gas_mixture/environment, seconds_per_tick, times_fired)
/mob/living/basic/slime/handle_environment(datum/gas_mixture/environment, seconds_per_tick)
..()
if(bodytemperature <= (T0C - 40)) // stun temperature
apply_status_effect(/datum/status_effect/freon, SLIME_COLD)
@@ -60,7 +60,7 @@
return
make_migo_sound()
/mob/living/basic/migo/Life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/migo/Life(seconds_per_tick = SSMOBS_DT)
. = ..()
if(!.) //dead or deleted
return
@@ -131,7 +131,7 @@
return TRUE
/// Signal Handler Injection to handle Life() stuff for revenants
/mob/living/basic/revenant/proc/on_life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/revenant/proc/on_life(seconds_per_tick = SSMOBS_DT)
SIGNAL_HANDLER
if(dormant)
@@ -46,7 +46,7 @@
removed_from.remove_traits(applied_traits + TRAIT_WING_BUFFET_TIRED, REF(src))
/// Decay our accumulated additional tiredness
/datum/action/cooldown/mob_cooldown/wing_buffet/proc/on_life(mob/living/liver, seconds_per_tick, times_fired)
/datum/action/cooldown/mob_cooldown/wing_buffet/proc/on_life(mob/living/liver, seconds_per_tick)
SIGNAL_HANDLER
if (liver.stat == DEAD)
return // not so life now buddy
+1 -1
View File
@@ -59,7 +59,7 @@
AddElement(/datum/element/death_drops, /obj/item/stack/sheet/mineral/wood)
AddComponent(/datum/component/aggro_emote, emote_list = string_list(list("growls")), emote_chance = 20)
/mob/living/basic/tree/Life(seconds_per_tick = SSMOBS_DT, times_fired)
/mob/living/basic/tree/Life(seconds_per_tick = SSMOBS_DT)
. = ..()
if(!.) //dead or deleted
return