Make use hammers and item positions slightly more logical
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user