Safe Haskell | None |
---|---|
Language | Haskell2010 |
Item slots for UI and AI item collections.
Synopsis
- data SlotChar = SlotChar {
- slotPrefix :: Int
- slotChar :: Char
- newtype ItemSlots = ItemSlots (EnumMap SLore SingleItemSlots)
- type SingleItemSlots = EnumMap SlotChar ItemId
- allSlots :: [SlotChar]
- intSlots :: [SlotChar]
- slotLabel :: SlotChar -> Text
- assignSlot :: EnumSet ItemId -> SLore -> ItemSlots -> SlotChar
- partyItemSet :: SLore -> FactionId -> Maybe Actor -> State -> EnumSet ItemId
- sortSlotMap :: (ItemId -> ItemFull) -> EnumSet ItemId -> SingleItemSlots -> SingleItemSlots
- mergeItemSlots :: (ItemId -> ItemFull) -> EnumSet ItemId -> [SingleItemSlots] -> SingleItemSlots
Documentation
Slot label. Usually just a character. Sometimes with a numerical prefix.
SlotChar | |
|
Instances
Enum SlotChar Source # | |
Defined in Game.LambdaHack.Client.UI.ItemSlot | |
Eq SlotChar Source # | |
Ord SlotChar Source # | |
Defined in Game.LambdaHack.Client.UI.ItemSlot | |
Show SlotChar Source # | |
Binary SlotChar Source # | |
A collection of mappings from slot labels to item identifiers.
assignSlot :: EnumSet ItemId -> SLore -> ItemSlots -> SlotChar Source #
Assigns a slot to an item, e.g., for inclusion in the inventory of a hero.
sortSlotMap :: (ItemId -> ItemFull) -> EnumSet ItemId -> SingleItemSlots -> SingleItemSlots Source #
mergeItemSlots :: (ItemId -> ItemFull) -> EnumSet ItemId -> [SingleItemSlots] -> SingleItemSlots Source #