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.
This commit is contained in:
Timberpoes
2021-06-08 22:58:43 +01:00
committed by GitHub
parent 761858e905
commit e711907240
+1 -1
View File
@@ -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"