Remove equipment records

This commit is contained in:
2025-06-05 15:54:33 +01:00
parent 5f3b932338
commit 4b326433ab
15 changed files with 78 additions and 69 deletions
+11 -6
View File
@@ -33,14 +33,19 @@ doItmCrWdWd x itm cr = case x of
useE :: LocationLDT ItemLink ComposedItem -> Creature -> World -> World
useE loc cr = case eo of
Nothing -> id
Just EDoNothing -> id
Just (EMagShield mt) -> useMagShield mt itm cr
Just EWristShield -> setWristShieldPos itm cr
Just EHeadLamp -> createHeadLamp itm cr
-- Nothing -> id
-- Just EDoNothing -> id
--Just (EMagShield mt)
EQUIP (MAGSHIELD mt) -> useMagShield mt itm cr
--Just EWristShield
EQUIP WRISTARMOUR -> setWristShieldPos itm cr
--Just EHeadLamp
EQUIP HEADLAMP -> createHeadLamp itm cr
_ -> id
where
itm = loc ^. locLDT . ldtValue . _1
eo = itm ^? itUse . uequipEffect . eeUse
eo = itm ^. itType
--eo = itm ^? itUse . uequipEffect . eeUse
-- this should probably drain energy
useMagShield :: MagnetBuBu -> Item -> Creature -> World -> World