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
+4 -1
View File
@@ -510,7 +510,8 @@
update_damages()
if(owner)
owner.updatehealth() //droplimb will call updatehealth() again if it does end up being called
update_icon()
if (update_icon())
SEND_SIGNAL(src, COMSIG_UPDATE_LIMB_IMAGE)
return created_wound
@@ -1357,6 +1358,7 @@ Note that amputating the affected organ does in fact remove the infection from t
burn_mod = R.burn_mod
robotize_type = company
augment_limit += 1 //robotic limbs get one extra augment capacity
SEND_SIGNAL(src, COMSIG_UPDATE_LIMB_IMAGE)
dislocated = -1 //TODO, make robotic limbs a separate type, remove snowflake
limb_flags &= ~ORGAN_CAN_BREAK
@@ -1707,6 +1709,7 @@ Note that amputating the affected organ does in fact remove the infection from t
return
var/last_pain = pain
pain = max(0, min(species.total_health * 2, pain - amount))
SEND_SIGNAL(src, COMSIG_UPDATE_LIMB_IMAGE)
return -(pain-last_pain)
/obj/item/organ/external/proc/add_pain(var/amount)