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

Safe HaskellNone

Game.LambdaHack.Client.UI.InventoryClient

Description

Inventory management and party cycling. TODO: document

Synopsis

Documentation

getGroupItemSource

Arguments

:: MonadClientUI m 
=> (Item -> Bool)

which items to consider suitable

-> Part

name of the item group

-> Part

the verb describing the action

-> [CStore]

initial legal containers

-> [CStore]

legal containers after Calm taken into account

-> m (SlideOrCmd ((ItemId, ItemFull), Container)) 

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.

getAnyItemSource

Arguments

:: MonadClientUI m 
=> Part

the verb describing the action

-> [CStore]

initial legal containers

-> [CStore]

legal containers after Calm taken into account

-> Bool

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

-> Bool

whether to ask for the number of items

-> m (SlideOrCmd ((ItemId, ItemFull), Container)) 

Let the human player choose any item from a list of items and let him specify the number of items.

getStoreItemSource

Arguments

:: MonadClientUI m 
=> (Actor -> [ItemFull] -> Text)

how to describe suitable items in CSha

-> (Actor -> Text)

how to describe suitable items elsewhere

-> Part

the verb describing the action

-> Container

initial container

-> m (SlideOrCmd ((ItemId, ItemFull), Container)) 

Display all items from a store and let the human player choose any or switch to any other store.

memberCycle :: MonadClientUI m => Bool -> m SlideshowSource

Switches current member to the next on the level, if any, wrapping.

memberBack :: MonadClientUI m => Bool -> m SlideshowSource

Switches current member to the previous in the whole dungeon, wrapping.

pickLeader :: MonadClientUI m => Bool -> ActorId -> m BoolSource

Select a faction leader. False, if nothing to do.