From c94547c68eb589865451a76a4ce62d2966b0f481 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 30 Jul 2016 00:17:58 +0200 Subject: [PATCH] Move FarmingOrder a bit higher and add missing example.json property In general we should prioritize properties according to the ones user will want to modify first, but as it's unpredictable, we can only guess and do it more or less --- ArchiSteamFarm/BotConfig.cs | 6 +++--- ArchiSteamFarm/config/example.json | 1 + ConfigGenerator/BotConfig.cs | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ArchiSteamFarm/BotConfig.cs b/ArchiSteamFarm/BotConfig.cs index 946530497..b8495dcfc 100644 --- a/ArchiSteamFarm/BotConfig.cs +++ b/ArchiSteamFarm/BotConfig.cs @@ -74,6 +74,9 @@ namespace ArchiSteamFarm { [JsonProperty(Required = Required.DisallowNull)] internal readonly bool DismissInventoryNotifications = true; + [JsonProperty(Required = Required.DisallowNull)] + internal readonly EFarmingOrder FarmingOrder = EFarmingOrder.Unordered; + [JsonProperty(Required = Required.DisallowNull)] internal readonly bool FarmOffline = false; @@ -119,9 +122,6 @@ namespace ArchiSteamFarm { [JsonProperty(Required = Required.DisallowNull)] internal readonly HashSet GamesPlayedWhileIdle = new HashSet(); - [JsonProperty(Required = Required.DisallowNull)] - internal readonly EFarmingOrder FarmingOrder = EFarmingOrder.Unordered; - internal static BotConfig Load(string filePath) { if (string.IsNullOrEmpty(filePath)) { Logging.LogNullError(nameof(filePath)); diff --git a/ArchiSteamFarm/config/example.json b/ArchiSteamFarm/config/example.json index 53f811afd..15e82cc78 100644 --- a/ArchiSteamFarm/config/example.json +++ b/ArchiSteamFarm/config/example.json @@ -10,6 +10,7 @@ "SteamMasterClanID": 0, "CardDropsRestricted": false, "DismissInventoryNotifications": true, + "FarmingOrder": 0, "FarmOffline": false, "HandleOfflineMessages": false, "AcceptGifts": false, diff --git a/ConfigGenerator/BotConfig.cs b/ConfigGenerator/BotConfig.cs index ab610a577..bddc94c0f 100644 --- a/ConfigGenerator/BotConfig.cs +++ b/ConfigGenerator/BotConfig.cs @@ -81,6 +81,9 @@ namespace ConfigGenerator { [JsonProperty(Required = Required.DisallowNull)] public bool DismissInventoryNotifications { get; set; } = true; + [JsonProperty(Required = Required.DisallowNull)] + public EFarmingOrder FarmingOrder { get; set; } = EFarmingOrder.Unordered; + [JsonProperty(Required = Required.DisallowNull)] public bool FarmOffline { get; set; } = false; @@ -126,9 +129,6 @@ namespace ConfigGenerator { [JsonProperty(Required = Required.DisallowNull)] public List GamesPlayedWhileIdle { get; set; } = new List(); - [JsonProperty(Required = Required.DisallowNull)] - public EFarmingOrder FarmingOrder { get; set; } = EFarmingOrder.Unordered; - internal static BotConfig Load(string filePath) { if (string.IsNullOrEmpty(filePath)) { Logging.LogNullError(nameof(filePath));