Example #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();
 }
Example #2
0
 public static GlobalMachineConfig InitializeConfig()
 {
     if (File.Exists(Path.Combine(ModCore.ModHelper.DirectoryPath, "Configs", "MachinesConfig.json")))
     {
         return(ModCore.ModHelper.Data.ReadJsonFile <GlobalMachineConfig>(Path.Combine("Configs", "MachinesConfig.json")));
     }
     else
     {
         GlobalMachineConfig Config = new GlobalMachineConfig();
         ModCore.ModHelper.Data.WriteJsonFile(Path.Combine("Configs", "MachinesConfig.json"), Config);
         return(Config);
     }
 }