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