Cleanup
This commit is contained in:
@@ -12,7 +12,6 @@ module Dodge.Inventory (
|
||||
swapInvItems,
|
||||
scrollAugNextInSection,
|
||||
swapItemWith,
|
||||
destroyItem,
|
||||
destroyAllInvItems,
|
||||
multiSelScroll,
|
||||
changeSwapSelSet,
|
||||
@@ -68,17 +67,6 @@ destroyAllInvItems cr w =
|
||||
. _unNIntMap
|
||||
$ cr ^. crInv
|
||||
|
||||
destroyItem :: Int -> World -> World
|
||||
destroyItem itid w = case w ^? cWorld . lWorld . items . ix itid . itLocation of
|
||||
Nothing -> error $ "Tried to destroy item that does not exist; item id: " ++ show itid
|
||||
Just InInv{_ilCrID = cid, _ilInvID = invid} -> destroyInvItem cid invid w
|
||||
Just OnTurret{} -> error "need to write code for destroying items on turrets"
|
||||
Just OnFloor{} ->
|
||||
w
|
||||
& cWorld . lWorld . items . at itid .~ Nothing
|
||||
& cWorld . lWorld . floorItems . at itid .~ Nothing
|
||||
Just InVoid -> w & cWorld . lWorld . items . at itid .~ Nothing
|
||||
|
||||
-- note rmInvItem does not fully destroy the item, other updates to the item
|
||||
-- location are required
|
||||
-- note if this gets called ssInvPosFromSS might be necessary elsewhere
|
||||
|
||||
Reference in New Issue
Block a user