Add newtype for item id int
This commit is contained in:
@@ -47,7 +47,7 @@ destroyInvItem ::
|
||||
destroyInvItem cid invid w = rmInvItem cid invid w & removeitloc
|
||||
where
|
||||
removeitloc = fromMaybe id $ do
|
||||
itid <- w ^? cWorld . lWorld . creatures . ix cid . crInv . ix invid . itID
|
||||
itid <- w ^? cWorld . lWorld . creatures . ix cid . crInv . ix invid . itID . unNInt
|
||||
return $ cWorld . lWorld . itemLocations . at itid .~ Nothing
|
||||
|
||||
-- | after this the item at the inventory position will no longer exist
|
||||
|
||||
Reference in New Issue
Block a user