mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 22:20:52 +00:00
Move MaxGamesPlayedConcurrently logic higher
This commit is contained in:
@@ -1180,10 +1180,6 @@ namespace ArchiSteamFarm {
|
||||
|
||||
await CardsFarmer.SwitchToManualMode(false).ConfigureAwait(false);
|
||||
} else {
|
||||
if (gameIDs.Count > CardsFarmer.MaxGamesPlayedConcurrently) {
|
||||
gameIDs = new HashSet<uint>(gameIDs.Take(CardsFarmer.MaxGamesPlayedConcurrently));
|
||||
}
|
||||
|
||||
if (!CardsFarmer.ManualMode) {
|
||||
await CardsFarmer.SwitchToManualMode(true).ConfigureAwait(false);
|
||||
}
|
||||
@@ -1219,6 +1215,10 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
gamesToPlay.Add(gameID);
|
||||
|
||||
if (gamesToPlay.Count >= CardsFarmer.MaxGamesPlayedConcurrently) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (gamesToPlay.Count == 0) {
|
||||
|
||||
@@ -508,14 +508,6 @@ namespace ArchiSteamFarm {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (maxHour >= 2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (appIDs.Count > MaxGamesPlayedConcurrently) {
|
||||
appIDs = new ConcurrentHashSet<uint>(appIDs.Take(MaxGamesPlayedConcurrently));
|
||||
}
|
||||
|
||||
Bot.ArchiHandler.PlayGames(appIDs);
|
||||
|
||||
bool success = true;
|
||||
|
||||
Reference in New Issue
Block a user