Changes human name updates to be request-based instead of being automatically done every single tick (#92393)

## About The Pull Request

Changes human name to update whenever anything that could result in
their visible name changing occurs, such as changing IDs, equipping
gasmasks, picking potted plants, etc. Currently name updates occur every
``Life()`` tick and in a few "special" cases, which causes a lot of name
changes from sources such as equipment to not apply until the mob ticks,
and makes us waste a tiiiny bit of CPU time on name updates.
I've also slighly cleaned up human /Life() and made species'
``spec_life()`` not run when the mob is dead, as it was causing certain
unintended interactions, such as slimepeople regenerating blood while
dead.

## Why It's Good For The Game

Microoptimization, ensures that correct names are always used (in case
something could update their name but the mob hasn't ticked yet), plus
its just a cleaner implementation
This commit is contained in:
SmArtKar
2025-08-08 20:01:12 +02:00
committed by GitHub
parent 3c8260a108
commit 87e1ef6f64
29 changed files with 138 additions and 83 deletions
@@ -296,7 +296,7 @@
if(ishuman(loc))
var/mob/living/carbon/human/human_wearer = loc
if(human_wearer.wear_id == src)
human_wearer.sec_hud_set_ID()
human_wearer.update_ID_card()
update_appearance()
update_slot_icon()
@@ -331,7 +331,7 @@
if(ishuman(loc))
var/mob/living/carbon/human/human_wearer = loc
if(human_wearer.wear_id == src)
human_wearer.sec_hud_set_ID()
human_wearer.update_ID_card()
update_slot_icon()
update_appearance()
@@ -462,7 +462,7 @@
update_slot_icon()
if(ishuman(loc))
var/mob/living/carbon/human/human_wearer = loc
human_wearer.sec_hud_set_ID()
human_wearer.update_ID_card()
if(inserted_pai == gone)
update_appearance(UPDATE_ICON)
if(inserted_disk == gone)