Hlint pass
This commit is contained in:
@@ -64,8 +64,8 @@ destroyAllInvItems cr w = foldl' (flip $ destroyInvItem (cr ^. crID)) w
|
||||
destroyItem :: Int -> World -> World
|
||||
destroyItem itid w = case w ^? cWorld . lWorld . itemLocations . ix itid 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 InInv {_ilCrID = cid, _ilInvID = invid} -> destroyInvItem cid invid w
|
||||
Just OnTurret{} -> error "need to write code for destroying items on turrets"
|
||||
Just (OnFloor (NInt i)) -> w & cWorld . lWorld . itemLocations . at itid .~ Nothing
|
||||
& cWorld . lWorld . floorItems . unNIntMap . at i .~ Nothing
|
||||
Just InVoid -> w & cWorld . lWorld . itemLocations . at itid .~ Nothing
|
||||
|
||||
Reference in New Issue
Block a user