mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
update_body_parts() is now called when adding or removing bodypart overlays. (#87215)
## About The Pull Request I'm making sure that `update_body_parts()` is properly called when changing bodypart overlays, so that they actually show up the very moment they were changed. However, to avoid redundant `update_body_parts()` calls on init or while changing species, I've added a living flag that stops `update_body_parts()` from being called in these situations. I also scoured the codebase for other redundant `update_body_parts()` to remove and things to clean up a little. ## Why It's Good For The Game This automates the process of calling `update_body_parts()` a bit. ## Changelog Mainly backend.
This commit is contained in:
+3
-4
@@ -83,11 +83,10 @@ Unlike normal organs, we're actually inside a persons limbs at all times
|
||||
|
||||
bodypart_overlay.set_appearance(typed_accessory)
|
||||
|
||||
if(owner) //are we in a person?
|
||||
owner.update_body_parts()
|
||||
else if(bodypart_owner) //are we in a limb?
|
||||
if(bodypart_owner) //are we in a limb?
|
||||
bodypart_owner.update_icon_dropped()
|
||||
//else if(use_mob_sprite_as_obj_sprite) //are we out in the world, unprotected by flesh?
|
||||
else if(owner && !(owner.living_flags & STOP_OVERLAY_UPDATE_BODY_PARTS)) //are we a person?
|
||||
owner.update_body_parts()
|
||||
|
||||
/obj/item/organ/update_overlays()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user