Remove creature records

This commit is contained in:
2025-06-06 14:52:52 +01:00
parent 05f250f928
commit 467f241d7a
15 changed files with 37 additions and 28 deletions
+6 -1
View File
@@ -1,6 +1,7 @@
module Dodge.Inventory.CheckSlots (
checkInvSlotsYou,
crNumFreeSlots,
maxInvSlots,
) where
import Control.Monad
@@ -20,7 +21,11 @@ checkInvSlotsYou it w = do
Just . IM.newKey $ _crInv ycr
crNumFreeSlots :: Creature -> Int
crNumFreeSlots cr = _crInvCapacity cr - invSize (_crInv cr)
--crNumFreeSlots cr = _crInvCapacity cr - invSize (_crInv cr)
crNumFreeSlots cr = maxInvSlots - invSize (_crInv cr)
maxInvSlots :: Int
maxInvSlots = 25
invSize :: IM.IntMap Item -> Int
invSize = alaf Sum foldMap itInvHeight