Safe Haskell | None |
---|---|
Language | Haskell2010 |
Inventory management and party cycling. TODO: document
- failMsg :: MonadClientUI m => Msg -> m Slideshow
- getGroupItem :: MonadClientUI m => (ItemFull -> Bool) -> T.Text -> T.Text -> [CStore] -> [CStore] -> m (SlideOrCmd ((ItemId, ItemFull), Container))
- getAnyItem :: MonadClientUI m => MU.Part -> [CStore] -> [CStore] -> Bool -> Bool -> m (SlideOrCmd ((ItemId, ItemFull), Container))
- getStoreItem :: MonadClientUI m => (Actor -> [ItemFull] -> Container -> T.Text) -> Container -> Bool -> m (SlideOrCmd ((ItemId, ItemFull), Container))
- memberCycle :: MonadClientUI m => Bool -> m Slideshow
- memberBack :: MonadClientUI m => Bool -> m Slideshow
- pickLeader :: MonadClientUI m => Bool -> ActorId -> m Bool
Documentation
failMsg :: MonadClientUI m => Msg -> m Slideshow Source
:: MonadClientUI m | |
=> (ItemFull -> Bool) | which items to consider suitable |
-> T.Text | specific prompt for only suitable items |
-> T.Text | generic prompt |
-> [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.
:: MonadClientUI m | |
=> MU.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.
:: MonadClientUI m | |
=> (Actor -> [ItemFull] -> Container -> T.Text) | how to describe suitable items |
-> Container | initial container |
-> Bool | whether Enter should be disabled |
-> 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 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.