示例#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();
 }
示例#2
0
 /// <summary>
 /// Initializes the config for furniture.
 /// </summary>
 /// <returns></returns>
 public static FurnitureConfig InitializeConfig()
 {
     if (File.Exists(Path.Combine(ModCore.ModHelper.DirectoryPath, "Configs", "FurnitureConfig.json")))
     {
         return(ModCore.ModHelper.Data.ReadJsonFile <FurnitureConfig>(Path.Combine("Configs", "FurnitureConfig.json")));
     }
     else
     {
         FurnitureConfig Config = new FurnitureConfig();
         ModCore.ModHelper.Data.WriteJsonFile <FurnitureConfig>(Path.Combine("Configs", "FurnitureConfig.json"), Config);
         return(Config);
     }
 }