Hlint pass

This commit is contained in:
2025-08-19 18:05:05 +01:00
parent 5ccbfa1f91
commit e1cfe7e163
10 changed files with 16 additions and 17 deletions
+2 -2
View File
@@ -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