Remove more LDTs

This commit is contained in:
2025-07-11 00:49:36 +01:00
parent 05ff4651bd
commit 8ff607675b
3 changed files with 18 additions and 19 deletions
+3 -3
View File
@@ -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