Make equipment effects use item locations

Move towards removing on/off equipment effects
This commit is contained in:
2024-12-19 11:15:21 +00:00
parent 3ffe61e6db
commit a669632226
9 changed files with 110 additions and 103 deletions
+2 -2
View File
@@ -91,8 +91,8 @@ toggleEquipmentAt invid cr w = case getEquipmentAllocation w of
itmat i = _crInv cr IM.! i
itm = itmat itRef
itRef = cr ^?! crManipulation . manObject . imSelectedItem -- unsafe!! TODO change?
onequip itm' = useE ((_eeOnEquip . _uequipEffect . _itUse) itm') itm'
onremove itm' = useE ((_eeOnRemove . _uequipEffect . _itUse) itm') itm'
onequip itm' = doItmCrWdWd ((_eeOnEquip . _uequipEffect . _itUse) itm') itm'
onremove itm' = doItmCrWdWd ((_eeOnRemove . _uequipEffect . _itUse) itm') itm'
-- need to make sure that the root item is not erroneously selected in the
-- following