| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Game.LambdaHack.Client.UI.HandleHelperM
Description
Helper functions for both inventory management and human commands.
Synopsis
- data FailError
 - showFailError :: FailError -> Text
 - type MError = Maybe FailError
 - mergeMError :: MError -> MError -> MError
 - type FailOrCmd a = Either FailError a
 - failWith :: MonadClientUI m => Text -> m (FailOrCmd a)
 - failSer :: MonadClientUI m => ReqFailure -> m (FailOrCmd a)
 - failMsg :: MonadClientUI m => Text -> m MError
 - weaveJust :: FailOrCmd a -> Either MError a
 - ppSLore :: SLore -> Text
 - loreFromMode :: ItemDialogMode -> SLore
 - loreFromContainer :: ItemKind -> Container -> SLore
 - sortSlots :: MonadClientUI m => FactionId -> Maybe Actor -> m ()
 - memberCycle :: MonadClientUI m => Bool -> m MError
 - memberBack :: MonadClientUI m => Bool -> m MError
 - partyAfterLeader :: MonadClientUI m => ActorId -> m [(ActorId, Actor, ActorUI)]
 - pickLeader :: MonadClientUI m => Bool -> ActorId -> m Bool
 - pickLeaderWithPointer :: MonadClientUI m => m MError
 - itemOverlay :: MonadClientUI m => SingleItemSlots -> LevelId -> ItemBag -> m OKX
 - statsOverlay :: MonadClient m => ActorId -> m OKX
 - pickNumber :: MonadClientUI m => Bool -> Int -> m (Either MError Int)
 - lookAtTile :: MonadClientUI m => Bool -> Point -> ActorId -> LevelId -> m Text
 - lookAtActors :: MonadClientUI m => Point -> LevelId -> m Text
 - lookAtItems :: MonadClientUI m => Bool -> Point -> ActorId -> m Text
 
Documentation
Message describing the cause of failure of human command.
showFailError :: FailError -> Text Source #
failSer :: MonadClientUI m => ReqFailure -> m (FailOrCmd a) Source #
loreFromMode :: ItemDialogMode -> SLore Source #
memberCycle :: MonadClientUI m => Bool -> m MError Source #
Switches current member to the next on the level, if any, wrapping.
memberBack :: MonadClientUI m => Bool -> m MError Source #
Switches current member to the previous in the whole dungeon, wrapping.
partyAfterLeader :: MonadClientUI m => ActorId -> m [(ActorId, Actor, ActorUI)] Source #
pickLeader :: MonadClientUI m => Bool -> ActorId -> m Bool Source #
Select a faction leader. False, if nothing to do.
pickLeaderWithPointer :: MonadClientUI m => m MError Source #
itemOverlay :: MonadClientUI m => SingleItemSlots -> LevelId -> ItemBag -> m OKX Source #
statsOverlay :: MonadClient m => ActorId -> m OKX Source #
pickNumber :: MonadClientUI m => Bool -> Int -> m (Either MError Int) Source #
Arguments
| :: MonadClientUI m | |
| => Bool | can be seen right now?  | 
| -> Point | position to describe  | 
| -> ActorId | the actor that looks  | 
| -> LevelId | level the position is at  | 
| -> m Text | 
Produces a textual description of the tile at a position.
Arguments
| :: MonadClientUI m | |
| => Point | position to describe  | 
| -> LevelId | level the position is at  | 
| -> m Text | 
Produces a textual description of actors at a position.
Arguments
| :: MonadClientUI m | |
| => Bool | can be seen right now?  | 
| -> Point | position to describe  | 
| -> ActorId | the actor that looks  | 
| -> m Text | 
Produces a textual description of items at a position.