Class mct

Mod Configuration Tool Manager

mct

Methods

mct:init () startup function
mct:mp_prep () triggers the listeners for MP communication events!
mct:log (text) Basic logging function for outputting text into the MCT log file.
mct:warn (text) Basic warning logging function for outputting text into the MCT log file.
mct:error (text) Basic error logging function for outputting text into the MCT log file.
mct:load_mod (filename, filename_for_out) For internal use, loads specific mod files located in script/mct/settings/.
mct:load_module (module_name, path) Internal loader for scripts located in script/mct/modules/.
mct:finalize (specific_mod) Internal use only.
mct:get_mod_by_key (mod_name) Getter for the mct_mod with the supplied key.
mct:register_mod (mod_name) Primary function to begin adding settings to a "mod".
mct:is_mct_mod (obj) Type-checker for mct_mods
mct:is_mct_option (obj) Type-checker for mct_options
mct:is_mct_section (obj) Type-checker for mct_sections
mct:is_valid_option_type (val) Type-checker for mct_option types.

API

mct.get_mct () This is just get_mct(), the documentation program is being stupid.


Methods

mct:init ()
startup function
mct:mp_prep ()
triggers the listeners for MP communication events!
mct:log (text)
Basic logging function for outputting text into the MCT log file.

Parameters:

  • text string The string used for output
mct:warn (text)
Basic warning logging function for outputting text into the MCT log file.

Parameters:

  • text string The string used for output
mct:error (text)
Basic error logging function for outputting text into the MCT log file.

Parameters:

  • text string The string used for output
mct:load_mod (filename, filename_for_out)
For internal use, loads specific mod files located in script/mct/settings/.
Any .lua file found in here is given the MCT manager as the variable mct within the full scope of the file.

Parameters:

  • filename string The filename being required and loaded.
  • filename_for_out string The original filename with the full directory path still included; used for outputs.
mct:load_module (module_name, path)
Internal loader for scripts located in script/mct/modules/.

Parameters:

  • module_name string The .lua file name. Exclude the ".lua" part of it!
  • path string The path to find this .lua file. Make sure package.path has been editing before this function is called!
mct:finalize (specific_mod)
Internal use only. Triggers all the functionality for "Finalize Settings!"

Parameters:

  • specific_mod
mct:get_mod_by_key (mod_name)
Getter for the mct_mod with the supplied key.

Parameters:

  • mod_name string Unique identifier for the desired mct_mod.

Returns:

    mct_mod
mct:register_mod (mod_name)
Primary function to begin adding settings to a "mod". Calls the internal function mct_mod.new.

Parameters:

  • mod_name string The identifier for this mod.

See also:

mct:is_mct_mod (obj)
Type-checker for mct_mods

Parameters:

  • obj any Tested value.

Returns:

    boolean Whether it passes.
mct:is_mct_option (obj)
Type-checker for mct_options

Parameters:

  • obj any Tested value.

Returns:

    boolean Whether it passes.
mct:is_mct_section (obj)
Type-checker for mct_sections

Parameters:

  • obj any Tested value.

Returns:

    boolean Whether it passes.
mct:is_valid_option_type (val)
Type-checker for mct_option types.

Parameters:

  • val any Tested value.

Returns:

    boolean If this is a valid option type.

API

mct.get_mct ()
This is just get_mct(), the documentation program is being stupid. Global getter for the mct object.

Returns:

    mct
generated by LDoc 1.4.6 Last updated 2021-01-03 11:23:43