Work on AttachUse -> UseAttach
This commit is contained in:
@@ -47,8 +47,8 @@ createShell homing payload muz cr w = w
|
||||
thrustdelay = 20
|
||||
updatescreen = fromMaybe id $ do
|
||||
screenid <- homing ^? phRemoteID
|
||||
return $ pointerToItemID screenid . itUse
|
||||
. atLinkedProjectile
|
||||
return $ pointerToItemID screenid . itUse . uaParams
|
||||
. apLinkedProjectile
|
||||
?~ i
|
||||
i = IM.newKey $ w ^. cWorld . lWorld . projectiles
|
||||
dir = _crDir cr + _mzRot muz
|
||||
|
||||
@@ -66,9 +66,9 @@ destroyProjectile mitid pjid w = w & cWorld . lWorld . projectiles %~ IM.delete
|
||||
removelink = fromMaybe id $ do
|
||||
itid <- fmap _unNInt mitid
|
||||
loc <- w ^? cWorld . lWorld . itemLocations . ix itid
|
||||
itm <- w ^? pointerToItemLocation loc . itUse . atLinkedProjectile . _Just
|
||||
itm <- w ^? pointerToItemLocation loc . itUse . uaParams . apLinkedProjectile . _Just
|
||||
guard $ itm == pjid
|
||||
return $ pointerToItemLocation loc . itUse . atLinkedProjectile .~ Nothing
|
||||
return $ pointerToItemLocation loc . itUse . uaParams . apLinkedProjectile .~ Nothing
|
||||
|
||||
doThrust :: Projectile -> World -> World
|
||||
doThrust pj w =
|
||||
|
||||
Reference in New Issue
Block a user