From 6156e12e63121375afd9cdcef6b9da2d5df99c30 Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Tue, 30 Jun 2026 18:43:33 -0500 Subject: [PATCH] Fix emote overlays (#96714) ## About The Pull Request I changed how `add_bodypart_overlay` works and then forgot to update its return value ## Changelog :cl: Melbert fix: Fix emote overlays sticking /:cl: --- code/modules/surgery/bodyparts/_bodyparts.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index 907cc43d174..5566e11bdfb 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -1439,21 +1439,24 @@ * If you pass a typepath, the proc will avoid creating duplicates. * * update: Whether to call update procs after adding the overlay. * Set this to FALSE if you are adding multiple overlays at once. + * + * Returns the overlay that was added, or null if it was not added. */ /obj/item/bodypart/proc/add_bodypart_overlay(datum/bodypart_overlay/overlay, update = TRUE) if(ispath(overlay, /datum/bodypart_overlay)) if(locate(overlay) in bodypart_overlays) - return + return null overlay = new overlay() LAZYADD(bodypart_overlays, overlay) overlay.added_to_limb(src) if(!update) - return + return overlay if(isnull(owner)) update_icon_dropped() else if(!(owner.living_flags & STOP_OVERLAY_UPDATE_BODY_PARTS)) owner.update_body_parts() + return overlay /** * Removes a bodypart overlay from the limb