Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Client.UI.InventoryClient
Description
Inventory management and party cycling. TODO: document
- data Suitability
- = SuitsEverything
- | SuitsNothing Msg
- | SuitsSomething (ItemFull -> Bool)
- getGroupItem :: MonadClientUI m => m Suitability -> Text -> Text -> Bool -> [CStore] -> [CStore] -> m (SlideOrCmd ((ItemId, ItemFull), ItemDialogMode))
- getAnyItems :: MonadClientUI m => Part -> [CStore] -> [CStore] -> Bool -> Bool -> m (SlideOrCmd ([(ItemId, ItemFull)], ItemDialogMode))
- getStoreItem :: MonadClientUI m => (Actor -> [ItemFull] -> ItemDialogMode -> Text) -> ItemDialogMode -> m (SlideOrCmd ((ItemId, ItemFull), ItemDialogMode))
- memberCycle :: MonadClientUI m => Bool -> m Slideshow
- memberBack :: MonadClientUI m => Bool -> m Slideshow
- pickLeader :: MonadClientUI m => Bool -> ActorId -> m Bool
- cursorPointerFloor :: MonadClientUI m => Bool -> Bool -> m Slideshow
- cursorPointerEnemy :: MonadClientUI m => Bool -> Bool -> m Slideshow
- moveCursorHuman :: MonadClientUI m => Vector -> Int -> m Slideshow
- tgtFloorHuman :: MonadClientUI m => m Slideshow
- tgtEnemyHuman :: MonadClientUI m => m Slideshow
- epsIncrHuman :: MonadClientUI m => Bool -> m Slideshow
- tgtClearHuman :: MonadClientUI m => m Slideshow
- doLook :: MonadClientUI m => Bool -> m Slideshow
- describeItemC :: MonadClientUI m => ItemDialogMode -> m (SlideOrCmd (RequestTimed AbMoveItem))
Documentation
data Suitability Source
Constructors
SuitsEverything | |
SuitsNothing Msg | |
SuitsSomething (ItemFull -> Bool) |
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.
Arguments
:: MonadClientUI m | |
=> Part | the verb describing the action |
-> [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.
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.
cursorPointerFloor :: MonadClientUI m => Bool -> Bool -> m Slideshow Source
cursorPointerEnemy :: MonadClientUI m => Bool -> Bool -> m Slideshow Source
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.
tgtEnemyHuman :: MonadClientUI m => m Slideshow Source
epsIncrHuman :: MonadClientUI m => Bool -> m Slideshow Source
Tweak the eps
parameter of the targeting digital line.
tgtClearHuman :: MonadClientUI m => m Slideshow Source
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.
describeItemC :: MonadClientUI m => ItemDialogMode -> m (SlideOrCmd (RequestTimed AbMoveItem)) Source