LambdaHack-0.2.6: A roguelike game engine in early and active development

Safe HaskellNone

Game.LambdaHack.Action.ConfigIO

Description

Personal game configuration file support.

Synopsis

Documentation

mkConfig :: String -> IO CPSource

Read the player configuration file and use it to override any default config options. Currently we can't unset options, only override.

The default config, passed in argument configDefault, is expected to come from the default configuration file included via CPP in file ConfigDefault.hs.

appDataDir :: IO FilePathSource

Personal data directory for the game. Depends on the OS and the game, e.g., for LambdaHack under Linux it's ~/.LambdaHack/.

getFile :: CP -> SectionSpec -> OptionSpec -> IO FilePathSource

Looks up a file path in the config file and makes it absolute. If the game's configuration directory exists, the file path is appended to it; otherwise, it's appended to the current directory.

dump :: FilePath -> CP -> IO ()Source

Dumps the current configuration to a file.

getSetGenSource

Arguments

:: CP

config

-> String

name of the generator

-> IO (StdGen, CP) 

Gets a random generator from the config or, if not present, generates one and updates the config with it.