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.
This commit is contained in:
SmArtKar
2025-05-16 20:24:16 +02:00
committed by Roxy
parent 89d1c6341a
commit 995d0b5103
2 changed files with 8 additions and 1 deletions

View File

@@ -315,7 +315,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()

View File

@@ -215,16 +215,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