Make use hammers and item positions slightly more logical

This commit is contained in:
2022-07-07 08:27:56 +01:00
parent c2e7fcc897
commit 3759434d92
16 changed files with 48 additions and 48 deletions
+3 -3
View File
@@ -28,10 +28,10 @@ getItem itid w = do
case itpos of
OnFloor flitid -> w ^? floorItems . ix flitid . flIt
InInv cid invid -> w ^? creatures . ix cid . crInv . ix invid
VoidItm -> Nothing
pointToItem :: Applicative f =>
ItemPos -> (Item -> f Item) -> World -> f World
ItemPos -> (Item -> f Item) -> World -> f World
pointToItem (InInv cid invid) = creatures . ix cid . crInv . ix invid
pointToItem (OnFloor flid) = floorItems . ix flid . flIt
--itToPointer :: Item ->
pointToItem _ = const pure