Remove _crCamouflage/wrist invisibility on equip/unequip

Invisibility no longer works
This commit is contained in:
2024-12-19 12:12:54 +00:00
parent a669632226
commit 7e0184a54d
14 changed files with 185 additions and 168 deletions
+11 -9
View File
@@ -22,21 +22,23 @@ import LensHelp
doItmCrWdWd :: ItmCrWdWd -> Item -> Creature -> World -> World
doItmCrWdWd x itm cr = case x of
(ECamouflage vis) -> overCID (crCamouflage .~ vis) itm cr
-- (ECamouflage vis) -> overCID (crCamouflage .~ vis) itm cr
EonWristShield -> onEquipWristShield itm cr
EoffWristShield -> onRemoveWristShield itm cr
_ -> id
useE :: Euse -> LocationLDT ItemLink ComposedItem -> Creature -> World -> World
useE eo loc cr = case eo of
EDoNothing -> id
EMagShield -> useMagShield itm cr
EWristShield -> setWristShieldPos itm cr
EHeadLamp -> createHeadLamp itm cr
EBatterySource{} -> tryChargeBattery itm cr
EAmmoSource{} -> tryAttachBulletBelt itm cr
useE :: LocationLDT ItemLink ComposedItem -> Creature -> World -> World
useE loc cr = case eo of
Nothing -> id
Just EDoNothing -> id
Just EMagShield -> useMagShield itm cr
Just EWristShield -> setWristShieldPos itm cr
Just EHeadLamp -> createHeadLamp itm cr
-- Just EBatterySource{} -> tryChargeBattery itm cr
-- Just EAmmoSource{} -> tryAttachBulletBelt itm cr
where
itm = loc ^. locLDT . ldtValue . _1
eo = itm ^? itUse . uequipEffect . eeUse
tryAttachBulletBelt :: Item -> Creature -> World -> World
tryAttachBulletBelt _ _ w = w