Implement targeting launcher shells using separate item
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
module Dodge.Item.Location (
|
||||
pointerToItemID,
|
||||
pointerToItemLocation,
|
||||
getItem,
|
||||
pointerToItem,
|
||||
@@ -50,3 +51,13 @@ pointerToItem ::
|
||||
World ->
|
||||
f World
|
||||
pointerToItem = pointerToItemLocation . _itLocation
|
||||
|
||||
pointerToItemID ::
|
||||
Applicative f =>
|
||||
NewInt ItmInt ->
|
||||
(Item -> f Item) ->
|
||||
World ->
|
||||
f World
|
||||
pointerToItemID itid f w = fromMaybe (pure w) $ do
|
||||
itloc <- w ^? cWorld . lWorld . itemLocations . ix (_unNInt itid)
|
||||
return $ pointerToItemLocation itloc f w
|
||||
|
||||
Reference in New Issue
Block a user