Allow more general detection of item use focus

This commit is contained in:
2024-12-25 21:26:25 +00:00
parent aec56f4977
commit c788af47bd
12 changed files with 28 additions and 32 deletions
+1 -4
View File
@@ -7,6 +7,7 @@ import Data.Maybe
import Dodge.Data.World
import Dodge.Payload
-- this could just set the timer to 0?
selectUse :: Item -> Creature -> World -> World
selectUse itm _ w = fromMaybe w $ do
lbtime <- w ^? input . mouseButtons . ix SDL.ButtonLeft
@@ -26,7 +27,3 @@ selectUse itm _ w = fromMaybe w $ do
where
notdestroyed DestroyPU{} = False
notdestroyed _ = True
-- where
-- itPoint = pointerToItemLocation $ w ^?! cWorld . lWorld . itemLocations . ix itid-- _itemLocations (_cWorld w) IM.! itid