This commit is contained in:
2025-01-01 21:16:47 +00:00
parent 5b978d9f1c
commit ff5c4db3ae
2 changed files with 7 additions and 2 deletions
+7 -1
View File
@@ -4,7 +4,6 @@ module Dodge.Creature.Impulse.UseItem (
useItem,
) where
import Dodge.ToggleExamine
import Control.Lens
import Data.Maybe
import Dodge.Data.ComposedItem
@@ -124,3 +123,10 @@ toggleEquipmentAt invid cr w = case getEquipmentAllocation invid w of
itm = itmat invid
onequip itm' = doItmCrWdWd ((_eeOnEquip . _uequipEffect . _itUse) itm') itm'
onremove itm' = doItmCrWdWd ((_eeOnRemove . _uequipEffect . _itUse) itm') itm'
toggleExamineInv :: World -> World
toggleExamineInv w = case w ^? hud . hudElement . subInventory of
Just ExamineInventory{} -> w & thepointer .~ NoSubInventory
_ -> w & thepointer .~ ExamineInventory
where
thepointer = hud . hudElement . subInventory