mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user