Class mct_settings

Settings Object.

INTERNAL USE ONLY.

Functions

settings:add_cached_settings (mod_key, option_data) Add a new cached_settings object for a specific mod key, or adds new option keys if one exists already.
settings:get_cached_settings (mod_key, option_keys) Check the cached_settings object for a specific mod key, and a single (or multiple) option.
settings:remove_cached_setting (mod_key, option_keys) Remove any cached settings within the mod-key provided with the option keys provided.
settings:load () This is the function that reads the mct_settings.lua file and loads up all the necessary components from it.


Functions

Methods
settings:add_cached_settings (mod_key, option_data)
Add a new cached_settings object for a specific mod key, or adds new option keys if one exists already.

Parameters:

  • mod_key
  • option_data
settings:get_cached_settings (mod_key, option_keys)
Check the cached_settings object for a specific mod key, and a single (or multiple) option. Will return a table of settings keys in the order the option keys were presented. Nil if none are found.

Parameters:

  • mod_key
  • option_keys
settings:remove_cached_setting (mod_key, option_keys)
Remove any cached settings within the mod-key provided with the option keys provided.
If no option keys are provided, the entire mod's cached settings will be axed.

Parameters:

  • mod_key
  • option_keys
settings:load ()
This is the function that reads the mctsettings.lua file and loads up all the necessary components from it. -- If no file is found, or the file has some sort of script break, MCT will make a new one using all defaults. -- This is also where settings are "cached" for any mctmods that aren't currently enabled but are in the mct_settings.lua file
generated by LDoc 1.4.6 Last updated 2021-01-03 11:23:43