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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.UI.InventoryClient

Description

Inventory management and party cycling. TODO: document

Synopsis

Documentation

getGroupItem Source

Arguments

:: MonadClientUI m 
=> m Suitability

which items to consider suitable

-> Text

specific prompt for only suitable items

-> Text

generic prompt

-> Bool

whether to enable setting cursor with mouse

-> [CStore]

initial legal modes

-> [CStore]

legal modes after Calm taken into account

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

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.

getAnyItems 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

-> Bool

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

-> Bool

whether to ask for the number of items

-> m (SlideOrCmd ([(ItemId, ItemFull)], ItemDialogMode)) 

Let the human player choose any item from a list of items and let him specify the number of items. Used, e.g., for picking up and inventory manipulation.

getStoreItem Source

Arguments

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

how to describe suitable items

-> ItemDialogMode

initial mode

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

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.

memberCycle :: MonadClientUI m => Bool -> m Slideshow Source

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

memberBack :: MonadClientUI m => Bool -> m Slideshow Source

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

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

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

moveCursorHuman :: MonadClientUI m => Vector -> Int -> m Slideshow Source

Move the cursor. Assumes targeting mode.

tgtFloorHuman :: MonadClientUI m => m Slideshow Source

Cycle targeting mode. Do not change position of the cursor, switch among things at that position.

epsIncrHuman :: MonadClientUI m => Bool -> m Slideshow Source

Tweak the eps parameter of the targeting digital line.

doLook :: MonadClientUI m => Bool -> m Slideshow Source

Perform look around in the current position of the cursor. Normally expects targeting mode and so that a leader is picked.