From f06738eff27d88becd5f5fedb43095de3caeba44 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Fri, 16 May 2025 20:24:16 +0200 Subject: [PATCH] Fixes MODsuit control units not updating their worn icons when activating with no parts deployed (#91068) ## About The Pull Request ``update_clothing`` by default doesn't update anything. Also fixed a missing return in ``allow_attack_hand_drop`` that always failed the proc. --- code/modules/mod/mod_activation.dm | 5 ++++- code/modules/mod/mod_control.dm | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code/modules/mod/mod_activation.dm b/code/modules/mod/mod_activation.dm index cfcc838ee09..62030d69e28 100644 --- a/code/modules/mod/mod_activation.dm +++ b/code/modules/mod/mod_activation.dm @@ -313,7 +313,10 @@ module.part_activated = FALSE update_charge_alert() update_appearance(UPDATE_ICON_STATE) - wearer.update_clothing() + var/updated_slots = slot_flags + for (var/slot_key in mod_parts) + updated_slots |= text2num(slot_key) + wearer.update_clothing(updated_slots) /// Quickly deploys all the suit parts and if successful, seals them and turns on the suit. Intended mostly for outfits. /obj/item/mod/control/proc/quick_activation() diff --git a/code/modules/mod/mod_control.dm b/code/modules/mod/mod_control.dm index bf6966499fa..d6974643acf 100644 --- a/code/modules/mod/mod_control.dm +++ b/code/modules/mod/mod_control.dm @@ -214,16 +214,20 @@ /obj/item/mod/control/allow_attack_hand_drop(mob/user) if(user != wearer) return ..() + if(active) balloon_alert(wearer, "unit active!") playsound(src, 'sound/machines/scanner/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE) return + for(var/obj/item/part as anything in get_parts()) if(part.loc != src) balloon_alert(user, "parts extended!") playsound(src, 'sound/machines/scanner/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE) return FALSE + return ..() + /obj/item/mod/control/mouse_drop_dragged(atom/over_object, mob/user) if(user != wearer || !istype(over_object, /atom/movable/screen/inventory/hand)) return