static public string PlugInGetValue(ModToolPlugin tool, string key) { ConfigSection pluginSection = GetSectionForPlugin(tool); if (pluginSection.ContainsValue(key)) return pluginSection[key]; return null; }
static private ConfigSection GetSectionForPlugin(ModToolPlugin tool) { string sectionName = tool.GetType().Name; if (!s_pluginsConfig.ContainsValue(sectionName)) s_pluginsConfig[sectionName] = new ConfigSection(sectionName); return s_pluginsConfig[sectionName]; }
static public void PlugInSetValue(ModToolPlugin tool, string key, string val) { ConfigSection pluginSection = GetSectionForPlugin(tool); pluginSection[key] = val; }
static public void PlugInRemoveValue(ModToolPlugin tool, string key) { ConfigSection pluginSection = GetSectionForPlugin(tool); pluginSection.RemoveValue(key); }