From c089e3007d48608c65e605547456a986988dbe04 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 26 Dec 2016 22:09:59 +0100 Subject: [PATCH] Code cleanup --- ArchiSteamFarm/CardsFarmer.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ArchiSteamFarm/CardsFarmer.cs b/ArchiSteamFarm/CardsFarmer.cs index f3f2ec335..0a36d04b5 100755 --- a/ArchiSteamFarm/CardsFarmer.cs +++ b/ArchiSteamFarm/CardsFarmer.cs @@ -44,6 +44,13 @@ namespace ArchiSteamFarm { [JsonProperty] internal readonly ConcurrentHashSet GamesToFarm = new ConcurrentHashSet(); + [JsonProperty] + internal TimeSpan TimeRemaining => new TimeSpan( + Bot.BotConfig.CardDropsRestricted ? (int) Math.Ceiling(GamesToFarm.Count / (float) ArchiHandler.MaxGamesPlayedConcurrently * HoursToBump) : 0, + 30 * GamesToFarm.Sum(game => game.CardsRemaining), + 0 + ); + private readonly Bot Bot; private readonly SemaphoreSlim FarmingSemaphore = new SemaphoreSlim(1); private readonly ManualResetEventSlim FarmResetEvent = new ManualResetEventSlim(false); @@ -56,13 +63,6 @@ namespace ArchiSteamFarm { private bool NowFarming; private bool StickyPause; - [JsonProperty] - internal TimeSpan TimeRemaining => new TimeSpan( - Bot.BotConfig.CardDropsRestricted ? (int) Math.Ceiling(GamesToFarm.Count / (float) ArchiHandler.MaxGamesPlayedConcurrently * HoursToBump) : 0, - 30 * GamesToFarm.Sum(game => game.CardsRemaining), - 0 - ); - internal CardsFarmer(Bot bot) { if (bot == null) { throw new ArgumentNullException(nameof(bot));