tuxemon.config module

class tuxemon.config.TuxemonConfig(config_path=None)[source]

Bases: object

Handles loading of the config file for the primary game and map editor.

Do not forget to edit the default configuration specified below!

Parameters:

config_path (Optional[str]) –

tuxemon.config.generate_default_config()[source]

Get new config file from defaults.

Return type:

ConfigParser

tuxemon.config.get_custom_pygame_keyboard_controls(cfg)[source]
Parameters:

cfg (ConfigParser) – Config parser.

Return type:

Mapping[int | None, int]

tuxemon.config.get_custom_pygame_keyboard_controls_names(cfg)[source]

Basically the same thing as get_custom_pygame_keyboard_controls(), but returns with the key’s string value instead of int

Parameters:

cfg (ConfigParser) – Config parser.

Return type:

Mapping[str | None, int]

tuxemon.config.get_defaults()[source]

Generate a config from defaults.

When making game changes, do not forget to edit this config!

Returns:

Mapping of default values.

Return type:

Mapping[str, Any]