View Single Post
01-08-15, 05:18 PM   #3
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
All a file dedicated to configuration does it separate configurable settings from non-configurable/relevant code. The fact that the file is named config.lua or configuration.lua makes it no different than core.lua or MyAddon.lua or modules.lua etc.

Config1.lua:
Lua Code:
  1. local _, AddonTable = ...
  2.  
  3. AddonTable.Config1 = {
  4.     MyNeatSetting      = true,
  5.     MyNotSoNeatSetting = false
  6. }

Config2.lua
Lua Code:
  1. local _, AddonTable = ...
  2.  
  3. AddonTable.Config2 = {
  4.     DucksAreNeat = true,
  5.     CowsAreNeat  = false
  6. }

Understand that you can place anything you can place into a table, into the addon table. As such, you could split your configuration into 1000 files if you wanted to.
  Reply With Quote