Safe Haskell | None |
---|---|
Language | Haskell2010 |
Inventory management and party cycling. TODO: document
- failMsg :: MonadClientUI m => Msg -> m Slideshow
- msgCannotChangeLeader :: Msg
- getGroupItem :: MonadClientUI m => (Item -> Bool) -> Part -> Part -> [CStore] -> [CStore] -> m (SlideOrCmd ((ItemId, ItemFull), Container))
- getAnyItem :: MonadClientUI m => Part -> [CStore] -> [CStore] -> Bool -> Bool -> m (SlideOrCmd ((ItemId, ItemFull), Container))
- getStoreItem :: MonadClientUI m => (Actor -> [ItemFull] -> Text) -> (Actor -> Text) -> Part -> Container -> 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 | |
=> (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.
:: 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.
:: 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 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.