Move towards using item structural function when using items

This commit is contained in:
2024-10-05 20:53:50 +01:00
parent 7c324a03f6
commit 3b54f00cc7
16 changed files with 142 additions and 111 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ import Picture
-- it would be nice to get rid of some redundant checks here
drawTargeting :: Item -> World -> Picture
drawTargeting itm w = fromMaybe mempty $ do
p <- itm ^? itUse . tgPos . _Just
let thepic = case itm ^? itUse . tgActive of
p <- itm ^? itTargeting . itTgPos . _Just
let thepic = case itm ^? itTargeting . itTgActive of
Just True -> activeTargetCursorPic
_ -> targetCursorPic
return