Implement targeting launcher shells using separate item

This commit is contained in:
2024-09-29 16:24:26 +01:00
parent 7d72fa3c5d
commit 88c3e02459
36 changed files with 747 additions and 610 deletions
+11
View File
@@ -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