diff --git a/src/Dodge/Item/SlotsTaken.hs b/src/Dodge/Item/SlotsTaken.hs new file mode 100644 index 000000000..d4d9afa0c --- /dev/null +++ b/src/Dodge/Item/SlotsTaken.hs @@ -0,0 +1,12 @@ +module Dodge.Item.SlotsTaken ( + itSlotsTaken, +) where + +import Control.Lens +import Dodge.Data.Item +import Dodge.Module + +itSlotsTaken :: Item -> Int +itSlotsTaken it = case it ^? itUse . useAmount of + Nothing -> moduleSizes it + ceiling (_itInvSize it) + Just i -> moduleSizes it + ceiling (_itInvSize it * fromIntegral i)