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(); }
/// <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); } }