Safe Haskell | None |
---|---|
Language | Haskell2010 |
Helper functions for both inventory management and human commands.
- 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
- 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 => CStore -> LevelId -> ItemBag -> m OKX
- statsOverlay :: MonadClient m => ActorId -> m OKX
- pickNumber :: MonadClientUI m => Bool -> Int -> m (Either MError Int)
- lookAt :: MonadClientUI m => Bool -> Text -> Bool -> Point -> ActorId -> Text -> m Text
Documentation
Message describing the cause of failure of human command.
showFailError :: FailError -> Text Source #
failSer :: MonadClientUI m => ReqFailure -> m (FailOrCmd a) 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 => CStore -> LevelId -> ItemBag -> m OKX Source #
statsOverlay :: MonadClient m => ActorId -> m OKX Source #
pickNumber :: MonadClientUI m => Bool -> Int -> m (Either MError Int) Source #
:: MonadClientUI m | |
=> Bool | detailed? |
-> Text | how to start tile description |
-> Bool | can be seen right now? |
-> Point | position to describe |
-> ActorId | the actor that looks |
-> Text | an extra sentence to print |
-> m Text |
Produces a textual description of the terrain and items at an already explored position. Mute for unknown positions. The detailed variant is for use in the aiming mode.