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 the blacksmith shop prices. /// </summary> /// <returns></returns> public static Shops_BlacksmithConfig InitializeConfig() { if (File.Exists(Path.Combine(ModCore.ModHelper.DirectoryPath, "Configs", "Shops", "BlacksmithShopPricesConfig.json"))) { return(ModCore.ModHelper.Data.ReadJsonFile <Shops_BlacksmithConfig>(Path.Combine("Configs", "Shops", "BlacksmithShopPricesConfig.json"))); } else { Shops_BlacksmithConfig Config = new Shops_BlacksmithConfig(); ModCore.ModHelper.Data.WriteJsonFile(Path.Combine("Configs", "Shops", "BlacksmithShopPricesConfig.json"), Config); return(Config); } }