Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- sortSlots :: MonadClientUI m => 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
- skillsOverlay :: MonadClientRead m => ActorId -> m OKX
- placesFromState :: ContentData PlaceKind -> ClientOptions -> State -> EnumMap (ContentId PlaceKind) (EnumSet LevelId, Int, Int, Int)
- placeParts :: (EnumSet LevelId, Int, Int, Int) -> [Part]
- placesOverlay :: MonadClientRead m => m OKX
- pickNumber :: MonadClientUI m => Bool -> Int -> m (Either MError Int)
- lookAtItems :: MonadClientUI m => Bool -> Point -> ActorId -> m Text
- lookAtPosition :: MonadClientUI m => LevelId -> Point -> m Text
- displayItemLore :: MonadClientUI m => ItemBag -> Int -> (ItemId -> ItemFull -> Int -> Text) -> Int -> SingleItemSlots -> m Bool
- viewLoreItems :: MonadClientUI m => Bool -> String -> SingleItemSlots -> ItemBag -> Text -> (Int -> SingleItemSlots -> m Bool) -> m KM
- cycleLore :: MonadClientUI m => [m KM] -> [m KM] -> m ()
- spoilsBlurb :: Text -> Int -> Int -> Text
- lookAtTile :: MonadClientUI m => Bool -> Point -> ActorId -> LevelId -> m Text
- lookAtActors :: MonadClientUI m => Point -> LevelId -> m Text
Documentation
Message describing the cause of failure of human command.
showFailError :: FailError -> Text Source #
failSer :: MonadClientUI m => ReqFailure -> m (FailOrCmd a) Source #
sortSlots :: MonadClientUI m => m () 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 #
skillsOverlay :: MonadClientRead m => ActorId -> m OKX Source #
placesFromState :: ContentData PlaceKind -> ClientOptions -> State -> EnumMap (ContentId PlaceKind) (EnumSet LevelId, Int, Int, Int) Source #
placesOverlay :: MonadClientRead m => m OKX Source #
pickNumber :: MonadClientUI m => Bool -> Int -> m (Either MError Int) Source #
:: 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.
lookAtPosition :: MonadClientUI m => LevelId -> Point -> m Text Source #
Produces a textual description of everything at the requested level's position.
displayItemLore :: MonadClientUI m => ItemBag -> Int -> (ItemId -> ItemFull -> Int -> Text) -> Int -> SingleItemSlots -> m Bool Source #
viewLoreItems :: MonadClientUI m => Bool -> String -> SingleItemSlots -> ItemBag -> Text -> (Int -> SingleItemSlots -> m Bool) -> m KM Source #
Internal operations
:: 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.
:: MonadClientUI m | |
=> Point | position to describe |
-> LevelId | level the position is at |
-> m Text |
Produces a textual description of actors at a position.