Start refactoring held item use

This commit is contained in:
2022-07-20 16:03:35 +01:00
parent 2c6e5e818a
commit eeb98eb151
18 changed files with 164 additions and 109 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ explodeRemoteRocket' mitid thepj w = w
updateitem = fromMaybe (projectiles . at pjid .~ Nothing) $ do
itid <- mitid
itpos <- w ^? itemPositions . ix itid
return $ (pointToItem itpos . itUse . rUse .~ (\_ _ -> id))
return $ (pointToItem itpos . itUse . rUse .~ HeldDoNothing)
. (projectiles . ix pjid . prjUpdates .~ [PJRetireRemote itid 30 pjid])
pjid = _prjID thepj
@@ -118,7 +118,7 @@ retireRemoteProj'' :: Int -> Int -> World -> World
retireRemoteProj'' itid pjid w = w
& pointToItem (_itemPositions w IM.! itid) %~
( (itScope . scopePos .~ V2 0 0)
. (itUse . rUse .~ fireRemoteShell)
. (itUse . rUse .~ HeldFireRemoteShell)
)
& props %~ IM.delete pjid