Move equip effect on remove out of record

This commit is contained in:
2025-06-05 15:35:11 +01:00
parent 924f236b94
commit 6300a90257
7 changed files with 218 additions and 217 deletions
+3 -1
View File
@@ -4,6 +4,7 @@ module Dodge.Creature.Impulse.UseItem (
useItem,
) where
import Dodge.Equipment
import Control.Lens
import Data.Maybe
import Dodge.Data.ComposedItem
@@ -127,7 +128,8 @@ toggleEquipmentAt invid cr w = case getEquipmentAllocation invid w of
itmat i = _crInv cr IM.! i
itm = itmat invid
onequip itm' = doItmCrWdWd ((_eeOnEquip . _uequipEffect . _itUse) itm') itm'
onremove itm' = doItmCrWdWd ((_eeOnRemove . _uequipEffect . _itUse) itm') itm'
--onremove itm' = doItmCrWdWd ((_eeOnRemove . _uequipEffect . _itUse) itm') itm'
onremove itm' = effectOnRemove itm'
toggleExamineInv :: World -> World
toggleExamineInv w = case w ^? hud . hudElement . subInventory of