13 lines
328 B
Haskell
13 lines
328 B
Haskell
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)
|