Improve item location code

This commit is contained in:
2024-09-22 14:29:02 +01:00
parent 236f7c7750
commit 4f6431968c
25 changed files with 218 additions and 186 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ useShrinkGun it cr w = case it ^? itParams . shrinkGunStatus of
Just Shrunk -> tryResize 1 $ f FullSize Uncursed . setMinInvSize defaultInvSize cr
Nothing -> error "useShrinkGun applied to item with incorrect ItParam"
where
invid = _ipInvID $ _itLocation it
invid = _ilInvID $ _itLocation it
tryResize x g = maybe w g $ sizeSelf x cr w
f isInUse cstatus =
cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix invid