Fixes the healthdoll not showing robot limbs, or updating when pain goes away. (#22190)

Adds some signals to update the HUD when necessary.

The only one which will fire every tick is in remove_pain, which will
now only fire if there is pain to remove.

The extra update in robotize is necessary because robotize is called
after Initialize, so robot limbs were being set to the wrong colour.

Fixes: #22186
This commit is contained in:
FenodyreeAv
2026-04-11 12:03:52 +00:00
committed by GitHub
parent 488f43c2d3
commit d3fdea4b99
3 changed files with 67 additions and 2 deletions
@@ -269,6 +269,8 @@
adjustToxLoss(getToxLoss()-amount)
/mob/living/carbon/human/adjustHalLoss(var/amount)
if (!amount)
return
var/heal = (amount < 0)
amount = abs(amount)
var/list/pick_organs = organs.Copy()
@@ -279,7 +281,8 @@
continue
if(heal)
amount -= E.remove_pain(amount)
if(pain > 0)
amount -= E.remove_pain(amount)
else
amount -= E.add_pain(amount)
BITSET(hud_updateflag, HEALTH_HUD)