From d51c3cf478c7b29d0f889f9ac76f72abc885ae96 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Mon, 22 Jul 2024 12:43:05 +0500 Subject: [PATCH] Fix inventory hands clickable areas & confusing overlay (#26212) * Remove confusing hand overlay Co-Authored-By: Serge K Lebedev * Fix clickable areas of equipped items Co-Authored-By: Serge K Lebedev --------- Co-authored-by: Serge K Lebedev --- code/_onclick/hud/screen_objects.dm | 5 ++++- code/game/objects/items.dm | 2 ++ code/game/objects/items/weapons/storage/storage_base.dm | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 1a47699ea2b..0f46301271f 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -400,7 +400,10 @@ /atom/movable/screen/inventory/proc/add_overlays() var/mob/user = hud?.mymob - if(!user || !slot_id || user != usr) + if(!user || user != usr) + return + + if(!hud?.mymob || !slot_id || slot_id == SLOT_HUD_LEFT_HAND || slot_id == SLOT_HUD_RIGHT_HAND) return var/obj/item/holding = user.get_active_hand() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1ce06dd5cea..af7faad28a0 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -476,6 +476,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons if((flags & NODROP) && !(initial(flags) & NODROP)) // Remove NODROP if dropped. Probably from delimbing. flags &= ~NODROP in_inventory = FALSE + mouse_opacity = initial(mouse_opacity) remove_outline() SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user) if(!silent) @@ -522,6 +523,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons // for items that can be placed in multiple slots // Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it /obj/item/proc/equipped(mob/user, slot, initial = FALSE) + mouse_opacity = MOUSE_OPACITY_OPAQUE SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot) for(var/X in actions) var/datum/action/A = X diff --git a/code/game/objects/items/weapons/storage/storage_base.dm b/code/game/objects/items/weapons/storage/storage_base.dm index ea3e086b3d6..174364442eb 100644 --- a/code/game/objects/items/weapons/storage/storage_base.dm +++ b/code/game/objects/items/weapons/storage/storage_base.dm @@ -534,7 +534,6 @@ I.maptext = "" I.on_exit_storage(src) update_icon() - I.mouse_opacity = initial(I.mouse_opacity) return TRUE /obj/item/storage/Exited(atom/A, loc)