From 8095bcab8df77ec3b2143daab5d9b87c3f14af76 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Tue, 13 Feb 2018 22:17:04 +0700 Subject: Write documentation for config --- README.rst | 40 +++++++++++++++++++--------------------- brutalmaze/main.py | 2 +- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/README.rst b/README.rst index a48c946..fac504a 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ Brutal Maze =========== -Brutal Maze is a hash and slash game with fast-paced action and a minimalist +Brutal Maze is a hack and slash game with fast-paced action and a minimalist art style. .. image:: https://raw.githubusercontent.com/McSinyx/brutalmaze/master/screenshot.png @@ -31,27 +31,25 @@ The installation procedure should be as simply as follow: directory for `Python scripts `_ is in your ``$PATH``. * Open Terminal or Command Prompt and run ``pip install --user brutalmaze``. - Now you can lauch the game by running the command ``brutalmaze``. + Now you can launch the game by running the command ``brutalmaze``. For more information, see the `Installation `_ from Brutal Maze wiki. -Control -------- - -F2 - New game. -Escape, ``p`` - Pause. -Up, ``w`` - Move up. -Down, ``s`` - Move down. -Left, ``a`` - Move left. -Right, ``d`` - Move right. -Left Mouse - Long-range attack. -Return, Right Mouse - Close-range attack, also dodge from bullets. +Configuration +------------- + +Brutal Maze reads settings from both configuration file and command-line +arguments. These settings are read in the following order: + +1. System-wide configuration file [1]_ +2. Local configuration file [1]_ +3. Manually set configuration file [2]_ +4. Command-line arguments [3]_ + +The later-read preferences will overide the previous ones. + +.. [1] These will be listed as fallback config in the help message + (``brutalmaze --help``). +.. [2] This can be set using ``brutalmaze --config PATH``. +.. [3] Listed in the help message. diff --git a/brutalmaze/main.py b/brutalmaze/main.py index 1bcf3d1..8d391f1 100644 --- a/brutalmaze/main.py +++ b/brutalmaze/main.py @@ -133,7 +133,7 @@ def main(): config = ConfigReader(filenames) config.parse_graphics() - # Parse command line arguments + # Parse command-line arguments parser = ArgumentParser(formatter_class=RawTextHelpFormatter) parser.add_argument('-v', '--version', action='version', version='Brutal Maze {}'.format(__version__)) -- cgit 1.4.1