Remove more LDTs
This commit is contained in:
@@ -153,7 +153,7 @@ invRootItemEffs cr =
|
||||
invItemLocUpdate :: Creature -> LocationLDT ItemLink OItem -> World -> World
|
||||
invItemLocUpdate cr loc w = doAnyEquipmentEffect loc cr $ case itm ^. itType of
|
||||
ATTACH BULLETSYNTH -> trySynthBullet loc w
|
||||
EQUIP WRIST_ECG | haspulse -> tryUseParent loc w
|
||||
EQUIP WRIST_ECG | haspulse -> tryUseParent (locLDTToLocDT loc) w
|
||||
COPIER _ -> copierItemUpdate itm cr w
|
||||
HELD FLATSHIELD -> rootNotrootEff createShieldWall removeShieldWall itm cr w
|
||||
HELD MINIGUNX{} -> coolMinigun itm w
|
||||
@@ -223,9 +223,9 @@ doAnyEquipmentEffect :: LocationLDT ItemLink OItem -> Creature -> World -> World
|
||||
doAnyEquipmentEffect loc cr = maybe id (equipBackgroundEffect loc cr)
|
||||
$ loc ^? locLDT . ldtValue . _1 . itLocation . ilEquipSite . _Just
|
||||
|
||||
tryUseParent :: LocationLDT ItemLink OItem -> World -> World
|
||||
tryUseParent :: LocationDT OItem -> World -> World
|
||||
tryUseParent loc w = fromMaybe w $ do
|
||||
t <- locUp loc
|
||||
t <- locUp' loc
|
||||
cr <- w ^? cWorld . lWorld . creatures . ix 0
|
||||
return $ gadgetEffect InitialPress t cr w
|
||||
|
||||
|
||||
Reference in New Issue
Block a user