LambdaHack-0.7.1.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.UI.InventoryM

Description

UI of inventory management.

Synopsis

Documentation

getFull Source #

Arguments

:: MonadClientUI m 
=> m Suitability

which items to consider suitable

-> (Actor -> ActorUI -> AspectRecord -> ItemDialogMode -> Text)

specific prompt for only suitable items

-> (Actor -> ActorUI -> AspectRecord -> ItemDialogMode -> Text)

generic prompt

-> [CStore]

initial legal modes

-> [CStore]

legal modes with Calm taken into account

-> Bool

whether to ask, when the only item in the starting mode is suitable

-> Bool

whether to permit multiple items as a result

-> m (Either Text ([(ItemId, ItemFull)], (ItemDialogMode, Either KM SlotChar))) 

Let the human player choose a single, preferably suitable, item from a list of items. Don't display stores empty for all actors. Start with a non-empty store.

getGroupItem Source #

Arguments

:: MonadClientUI m 
=> m Suitability

which items to consider suitable

-> Text

specific prompt for only suitable items

-> Text

generic prompt

-> [CStore]

initial legal modes

-> [CStore]

legal modes after Calm taken into account

-> m (Either Text ((ItemId, ItemFull), (ItemDialogMode, Either KM SlotChar))) 

Let a human player choose any item from a given group. Note that this does not guarantee the chosen item belongs to the group, as the player can override the choice. Used e.g., for applying and projecting.

getStoreItem Source #

Arguments

:: MonadClientUI m 
=> (Actor -> ActorUI -> AspectRecord -> ItemDialogMode -> Text)

how to describe suitable items

-> ItemDialogMode

initial mode

-> m (Either Text (ItemId, ItemFull), (ItemDialogMode, Either KM SlotChar)) 

Display all items from a store and let the human player choose any or switch to any other store. Used, e.g., for viewing inventory and item descriptions.