Implement remote screen for launcher projectiles
This commit is contained in:
@@ -10,14 +10,15 @@ 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
|
||||
thepj <- w ^? cWorld . lWorld . projectiles . ix pjid
|
||||
return $ w
|
||||
& cWorld . lWorld . projectiles . ix pjid . prjUpdates .~ [PJRetireRemote 69 30 pjid] -- 69 is placeholder, should be removed
|
||||
& cWorld . lWorld . projectiles . ix pjid . prjUpdates .~ [PJRetireRemote itid 30 pjid] -- 69 is placeholder, should be removed
|
||||
& cWorld . lWorld . projectiles . ix pjid . prjDraw .~ DrawBlankProjectile
|
||||
-- & itPoint . itUse . heldUse .~ HeldDoNothing
|
||||
-- & itPoint . itUse . heldMods .~ DoNothingMod
|
||||
& usePayload (_prjPayload thepj) (_prjPos thepj)
|
||||
where
|
||||
-- where
|
||||
-- itPoint = pointerToItemLocation $ w ^?! cWorld . lWorld . itemLocations . ix itid-- _itemLocations (_cWorld w) IM.! itid
|
||||
|
||||
|
||||
Reference in New Issue
Block a user