From 776755d3ab68b97df5990e9d761eebabbdfa18c7 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 20 Jun 2022 21:08:24 +0200 Subject: [PATCH] Change GamesPlayedWhileIdle to ImmutableList Similar to FarmingOrders, the order of elements might be relevant in regards to games displayed e.g. in recently played. --- ArchiSteamFarm/Steam/Storage/BotConfig.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArchiSteamFarm/Steam/Storage/BotConfig.cs b/ArchiSteamFarm/Steam/Storage/BotConfig.cs index e3254836b..d3c19046d 100644 --- a/ArchiSteamFarm/Steam/Storage/BotConfig.cs +++ b/ArchiSteamFarm/Steam/Storage/BotConfig.cs @@ -132,7 +132,7 @@ public sealed class BotConfig { public static readonly ImmutableList DefaultFarmingOrders = ImmutableList.Empty; [PublicAPI] - public static readonly ImmutableHashSet DefaultGamesPlayedWhileIdle = ImmutableHashSet.Empty; + public static readonly ImmutableList DefaultGamesPlayedWhileIdle = ImmutableList.Empty; [PublicAPI] public static readonly ImmutableHashSet DefaultLootableTypes = ImmutableHashSet.Create(Asset.EType.BoosterPack, Asset.EType.FoilTradingCard, Asset.EType.TradingCard); @@ -177,7 +177,7 @@ public sealed class BotConfig { [JsonProperty(Required = Required.DisallowNull)] [MaxLength(ArchiHandler.MaxGamesPlayedConcurrently)] [SwaggerItemsMinMax(MinimumUint = 1, MaximumUint = uint.MaxValue)] - public ImmutableHashSet GamesPlayedWhileIdle { get; private set; } = DefaultGamesPlayedWhileIdle; + public ImmutableList GamesPlayedWhileIdle { get; private set; } = DefaultGamesPlayedWhileIdle; [JsonProperty(Required = Required.DisallowNull)] [Range(byte.MinValue, byte.MaxValue)] @@ -340,7 +340,7 @@ public sealed class BotConfig { public bool ShouldSerializeFarmPriorityQueueOnly() => !Saving || (FarmPriorityQueueOnly != DefaultFarmPriorityQueueOnly); [UsedImplicitly] - public bool ShouldSerializeGamesPlayedWhileIdle() => !Saving || ((GamesPlayedWhileIdle != DefaultGamesPlayedWhileIdle) && !GamesPlayedWhileIdle.SetEquals(DefaultGamesPlayedWhileIdle)); + public bool ShouldSerializeGamesPlayedWhileIdle() => !Saving || ((GamesPlayedWhileIdle != DefaultGamesPlayedWhileIdle) && !GamesPlayedWhileIdle.SequenceEqual(DefaultGamesPlayedWhileIdle)); [UsedImplicitly] public bool ShouldSerializeHoursUntilCardDrops() => !Saving || (HoursUntilCardDrops != DefaultHoursUntilCardDrops);