Only display combinations for first items in list
This commit is contained in:
@@ -5,4 +5,4 @@ import Data.Maybe
|
||||
import Dodge.Data.Item
|
||||
|
||||
itStackAmount :: Item -> ItAmount
|
||||
itStackAmount it = fromMaybe 1 $ it ^? itUse . useAmount
|
||||
itStackAmount it = 1 -- fromMaybe 1 $ it ^? itUse . useAmount
|
||||
|
||||
@@ -4,16 +4,16 @@ import Dodge.Default.Item
|
||||
import Control.Lens
|
||||
import Dodge.Data.Item
|
||||
|
||||
makeTypeCraftNum :: Int -> CraftType -> Item
|
||||
makeTypeCraftNum i ct =
|
||||
makeTypeCraftNum :: Int -> CraftType -> [Item]
|
||||
makeTypeCraftNum i ct = replicate i $
|
||||
defaultCraftItem
|
||||
& itInvSize .~ 0.5
|
||||
& itCurseStatus .~ Uncursed
|
||||
& itUse . useAmount .~ fromIntegral i
|
||||
-- & itUse . useAmount .~ fromIntegral i
|
||||
& itType . iyBase .~ CRAFT ct
|
||||
|
||||
makeTypeCraft :: CraftType -> Item
|
||||
makeTypeCraft = makeTypeCraftNum 1
|
||||
makeTypeCraft = head . makeTypeCraftNum 1
|
||||
|
||||
energyBallCraft :: EnergyBallType -> Item
|
||||
energyBallCraft ebt = makeTypeCraft (ENERGYBALLCRAFT ebt) & itInvSize .~ 1
|
||||
|
||||
@@ -121,8 +121,10 @@ itemNumberDisplay cr itm = case iu of
|
||||
HeldUse{} -> []
|
||||
LeftUse{} -> [showAutoRechargeProgress (_leftConsumption iu)]
|
||||
EquipUse{} -> showEquipmentNumber cr itm
|
||||
CraftUse x -> [show $ x ^. getItAmount]
|
||||
ConsumeUse {_useAmount = x} -> [show $ x ^. getItAmount]
|
||||
--CraftUse x -> [show $ x ^. getItAmount]
|
||||
CraftUse -> []
|
||||
--ConsumeUse {_useAmount = x} -> [show $ x ^. getItAmount]
|
||||
ConsumeUse {} -> []
|
||||
AttachUse {} -> [] --[showReloadProgress cr itm]
|
||||
AmmoMagUse {} -> [showLoadedAmount itm]
|
||||
-- this could be cleaner here...
|
||||
|
||||
@@ -7,6 +7,9 @@ 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)
|
||||
itSlotsTaken it = moduleSizes it + ceiling (_itInvSize it)
|
||||
|
||||
--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)
|
||||
|
||||
Reference in New Issue
Block a user