LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Client.UI.Content.Input

Contents

- Internal operations

Description

The type of definitions of key-command mappings to be used for the UI and shorthands for specifying command triples in the content files.

Synopsis

- newtype InputContentRaw = InputContentRaw [(KM, CmdTriple)]
- data InputContent = InputContent {
  - bcmdMap :: Map KM CmdTriple
  - bcmdList :: [(KM, CmdTriple)]
  - brevMap :: Map HumanCmd [KM]
  }
- makeData :: Maybe UIOptions -> InputContentRaw -> InputContent
- evalKeyDef :: (String, CmdTriple) -> (KM, CmdTriple)
- addCmdCategory :: CmdCategory -> CmdTriple -> CmdTriple
- replaceDesc :: Text -> CmdTriple -> CmdTriple
- moveItemTriple :: [CStore] -> CStore -> Part -> Bool -> CmdTriple
- repeatTriple :: Int -> [CmdCategory] -> CmdTriple
- repeatLastTriple :: Int -> [CmdCategory] -> CmdTriple
- mouseLMB :: HumanCmd -> Text -> CmdTriple
- mouseMMB :: CmdTriple
- mouseMMBMute :: CmdTriple
- mouseRMB :: CmdTriple
- goToCmd :: HumanCmd
- runToAllCmd :: HumanCmd
- autoexploreCmd :: HumanCmd
- autoexplore25Cmd :: HumanCmd
- aimFlingCmd :: HumanCmd
- projectI :: [TriggerItem] -> CmdTriple
- projectA :: [TriggerItem] -> CmdTriple
- flingTs :: [TriggerItem]
- applyIK :: [TriggerItem] -> CmdTriple
- applyI :: [TriggerItem] -> CmdTriple
- grabItems :: Text -> CmdTriple
- dropItems :: Text -> CmdTriple
- descIs :: [TriggerItem] -> Text
- defaultHeroSelect :: Int -> (String, CmdTriple)
- macroRun25 :: [String]
- memberCycle :: Direction -> [CmdCategory] -> CmdTriple
- memberCycleLevel :: Direction -> [CmdCategory] -> CmdTriple
- replaceCmd :: HumanCmd -> CmdTriple -> CmdTriple
- projectICmd :: [TriggerItem] -> HumanCmd
- grabCmd :: HumanCmd
- dropCmd :: HumanCmd

# Documentation

newtype InputContentRaw Source #

Key-command mappings to be specified in content and used for the UI.

Constructors

InputContentRaw [(KM, CmdTriple)] |

data InputContent Source #

Bindings and other information about human player commands.

Constructors

InputContent |

Fields

- bcmdMap :: Map KM CmdTriple

  binding of keys to commands

- bcmdList :: [(KM, CmdTriple)]

  the properly ordered list of commands for the help menu

- brevMap :: Map HumanCmd [KM]

  and from commands to their keys

makeData Source #

Arguments

:: Maybe UIOptions | UI client options
-> InputContentRaw | default key bindings from the content
-> InputContent | concrete binding

Create binding of keys to movement and other standard commands, as well as commands defined in the config file.

evalKeyDef :: (String, CmdTriple) -> (KM, CmdTriple) Source #

addCmdCategory :: CmdCategory -> CmdTriple -> CmdTriple Source #

replaceDesc :: Text -> CmdTriple -> CmdTriple Source #

moveItemTriple :: [CStore] -> CStore -> Part -> Bool -> CmdTriple Source #

repeatTriple :: Int -> [CmdCategory] -> CmdTriple Source #

repeatLastTriple :: Int -> [CmdCategory] -> CmdTriple Source #

mouseLMB :: HumanCmd -> Text -> CmdTriple Source #

mouseMMB :: CmdTriple Source #

mouseMMBMute :: CmdTriple Source #

mouseRMB :: CmdTriple Source #

goToCmd :: HumanCmd Source #

runToAllCmd :: HumanCmd Source #

autoexploreCmd :: HumanCmd Source #

autoexplore25Cmd :: HumanCmd Source #

aimFlingCmd :: HumanCmd Source #

projectI :: [TriggerItem] -> CmdTriple Source #

projectA :: [TriggerItem] -> CmdTriple Source #

flingTs :: [TriggerItem] Source #

flingTs - list containing one flingable projectile >>> flingTs [TriggerItem {tiverb = Text "fling", tiobject = Text "in-range projectile", tisymbols = ""}]

I question the value of that test. But would Bob Martin like it on the grounds it's like double-bookkeeping?

applyIK :: [TriggerItem] -> CmdTriple Source #

applyI :: [TriggerItem] -> CmdTriple Source #

grabItems :: Text -> CmdTriple Source #

dropItems :: Text -> CmdTriple Source #

descIs :: [TriggerItem] -> Text Source #

defaultHeroSelect :: Int -> (String, CmdTriple) Source #

macroRun25 :: [String] Source #

memberCycle :: Direction -> [CmdCategory] -> CmdTriple Source #

memberCycleLevel :: Direction -> [CmdCategory] -> CmdTriple Source #

# Internal operations

replaceCmd :: HumanCmd -> CmdTriple -> CmdTriple Source #

projectICmd :: [TriggerItem] -> HumanCmd Source #

grabCmd :: HumanCmd Source #

dropCmd :: HumanCmd Source #