Пример #1
0
        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);
            }
        }
Пример #2
0
 //-- 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");
 }