ConfigAgent
Provides access to config values.
Description
The ConfigAgents main purpose is to provide access to config values. It mirrors the exact layout of the actual config. For example, if a config looks like:
Then the values may be accessed and set as follows: The values are directly retrieved from and stored to the config nodes that make up the config screen.Methods
void | load_cfg ( ) |
void | mark_dirty ( ) |
void | save_cfg ( bool force = false ) |
Method Descriptions
void save_cfg ( bool force = false ):
Saves the config to its config file. Set force to true to force saving even if the config is unchanged.
void load_cfg ( ):
Loads the config from its config file.
void mark_dirty ( ):
Marks the config as dirty so it will be saved on the next save_cfg call.