Tweak equipment draw

This commit is contained in:
2021-11-19 14:24:31 +00:00
parent 4ef1811dd6
commit 6f518d720c
13 changed files with 33 additions and 41 deletions
+2 -10
View File
@@ -225,20 +225,12 @@ youDropItem w = case yourItem w ^? itCurseStatus of
where
cr = you w
{- | Copy an inventory item to the floor. -}
copyInvItemToFloor
:: Creature
-> Int -- ^ Inventory position
-> World
-> World
copyInvItemToFloor :: Creature -> Int -> World -> World
copyInvItemToFloor cr i w = case _crInv cr IM.! i of
NoItem -> w
it -> copyItemToFloor (_crPos cr) it w
{- | Copy an item to the floor. -}
copyItemToFloor
:: Point2
-> Item
-> World
-> World
copyItemToFloor :: Point2 -> Item -> World -> World
copyItemToFloor pos it w = w'
& floorItems %~ IM.insert flid theflit
& updateLocation