From e7119072404c0b8baaca95175e0700a694fe1c0e Mon Sep 17 00:00:00 2001 From: Timberpoes Date: Tue, 8 Jun 2021 22:58:43 +0100 Subject: [PATCH] Fixes the game triggering a do_after when you mouse over an inventory slot with a non-instantly equippable item. (#59548) Mousing over an inventory slot with an item in-hand can trigger a call to equip_delay_self_check. If the item has an equip_delay_self and bypass_equip_delay_self is FALSE, then it acts like it's going to equip the item and starts a do_after. I think the only two items that do this are /obj/item/clothing/gloves/cargo_gauntlet and /obj/item/clothing/suit/straight_jacket I make sure the call to can_equip back in the /atom/movable/screen/inventory/add_overlays section of the call stack calls with bypass_equip_delay_self = TRUE to prevent this. --- code/_onclick/hud/screen_objects.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 8c0f5b9703d..9e5872f6371 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -178,7 +178,7 @@ var/image/item_overlay = image(holding) item_overlay.alpha = 92 - if(!user.can_equip(holding, slot_id, TRUE)) + if(!user.can_equip(holding, slot_id, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) item_overlay.color = "#FF0000" else item_overlay.color = "#00ff00"