public static void ReadConfig(ICoreServerAPI api) { try { meteorConfig = LoadConfig(api); if (meteorConfig == null) { GenerateConfig(api); meteorConfig = LoadConfig(api); } else { GenerateConfig(api, meteorConfig); } } catch { GenerateConfig(api); meteorConfig = LoadConfig(api); } }
//-- Generate config from previous settings and implement current version config changes --// private static void GenerateConfig(ICoreServerAPI api, MeteorConfig previousConfig) { api.StoreModConfig <MeteorConfig>(new MeteorConfig(previousConfig), "MeteoricExpansionConfig.json"); }