LambdaHack-0.6.2.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.UI.HandleHumanGlobalM

Contents

Description

Semantics of Cmd client commands that return server commands. A couple of them do not take time, the rest does. Here prompts and menus and displayed, but any feedback resulting from the commands (e.g., from inventory manipulation) is generated later on, for all clients that witness the results of the commands.

Synopsis

Meta commands

byAreaHuman :: MonadClientUI m => (HumanCmd -> m (Either MError ReqUI)) -> [(CmdArea, HumanCmd)] -> m (Either MError ReqUI) Source #

Pick command depending on area the mouse pointer is in. The first matching area is chosen. If none match, only interrupt.

Global commands that usually take time

waitHuman :: MonadClientUI m => m (RequestTimed AbWait) Source #

Leader waits a turn (and blocks, etc.).

waitHuman10 :: MonadClientUI m => m (RequestTimed AbWait) Source #

Leader waits a 1/10th of a turn (and doesn't block, etc.).

alterDirHuman :: MonadClientUI m => [Trigger] -> m (FailOrCmd (RequestTimed AbAlter)) Source #

Ask for a direction and alter a tile in the specified way, if possible.

alterWithPointerHuman :: MonadClientUI m => [Trigger] -> m (FailOrCmd (RequestTimed AbAlter)) Source #

Try to alter a tile using a feature under the pointer.

helpHuman :: MonadClientUI m => (HumanCmd -> m (Either MError ReqUI)) -> m (Either MError ReqUI) Source #

Display command help.

mainMenuHuman :: MonadClientUI m => (HumanCmd -> m (Either MError ReqUI)) -> m (Either MError ReqUI) Source #

Display the main menu.

settingsMenuHuman :: MonadClientUI m => (HumanCmd -> m (Either MError ReqUI)) -> m (Either MError ReqUI) Source #

Display the settings menu.

challengesMenuHuman :: MonadClientUI m => (HumanCmd -> m (Either MError ReqUI)) -> m (Either MError ReqUI) Source #

Display the challenges menu.

Global commands that never take time