Work on AttachUse -> UseAttach

This commit is contained in:
2024-10-01 14:21:40 +01:00
parent 36238669f5
commit f90bbc1cd0
15 changed files with 436 additions and 374 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ import Control.Lens
selectUse :: LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
selectUse ittree _ w = fromMaybe w $ do
itid <- ittree ^? ldtValue . itID
pjid <- ittree ^? ldtValue . itUse . atLinkedProjectile . _Just
pjid <- ittree ^? ldtValue . itUse . uaParams . apLinkedProjectile . _Just
thepj <- w ^? cWorld . lWorld . projectiles . ix pjid
return $ w
& cWorld . lWorld . projectiles . ix pjid . prjUpdates .~ [DestroyPU (Just itid) 30] -- 69 is placeholder, should be removed