Remove creature records
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user