private void OnConfigurationChange(object s, ConfigurationEventArgs e) { var old = shouldUpdate; shouldUpdate = Configuration.GetBool("objExpAutoUpdate", false); if (!old) { StartCoroutine(AutoUpdate()); } }
private static void SetValue(string modName, string key, Value value) { if (!configs.ContainsKey(modName)) { configs.Add(modName, new Dictionary <string, Value>()); } configs[modName][key] = value; EventHandler <ConfigurationEventArgs> handler; if (eventDelegates.ContainsKey(modName) && null != (handler = (EventHandler <ConfigurationEventArgs>)eventDelegates[modName])) { var eventArgs = new ConfigurationEventArgs(key, value.type, value.value); handler(null, eventArgs); } }