Exemple #1
0
 public ConfigManager()
 {
     this.vanillaMachineConfig   = VanillaMachineRecipeConfig.InitializeConfig();
     this.shops_blacksmithConfig = Shops_BlacksmithConfig.InitializeConfig();
     this.furnitureConfig        = FurnitureConfig.InitializeConfig();
     this.machinesConfig         = GlobalMachineConfig.InitializeConfig();
     this.objectsConfig          = ObjectsConfig.InitializeConfig();
     this.miningDrillConfig      = MiningDrillConfig.InitializeConfig();
 }
Exemple #2
0
 /// <summary>
 /// Initializes the config for vanilla machine recipes.
 /// </summary>
 /// <returns></returns>
 public static VanillaMachineRecipeConfig InitializeConfig()
 {
     if (File.Exists(Path.Combine(ModCore.ModHelper.DirectoryPath, "Configs", "VanillaMachineRecipeConfig.json")))
     {
         return(ModCore.ModHelper.Data.ReadJsonFile <VanillaMachineRecipeConfig>(Path.Combine("Configs", "VanillaMachineRecipeConfig.json")));
     }
     else
     {
         VanillaMachineRecipeConfig Config = new VanillaMachineRecipeConfig();
         ModCore.ModHelper.Data.WriteJsonFile <VanillaMachineRecipeConfig>(Path.Combine("Configs", "VanillaMachineRecipeConfig.json"), Config);
         return(Config);
     }
 }