mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-13 15:10:36 +00:00
Misc
This commit is contained in:
@@ -510,6 +510,17 @@ namespace ArchiSteamFarm {
|
||||
return result;
|
||||
}
|
||||
|
||||
internal void IdleGame(uint gameID) => IdleGames(gameID.ToEnumerable());
|
||||
|
||||
internal void IdleGames(IEnumerable<uint> gameIDs) {
|
||||
if (gameIDs == null) {
|
||||
ArchiLogger.LogNullError(nameof(gameIDs));
|
||||
return;
|
||||
}
|
||||
|
||||
ArchiHandler.PlayGames(gameIDs, BotConfig.CustomGamePlayedWhileFarming);
|
||||
}
|
||||
|
||||
internal static async Task InitializeSteamConfiguration(ProtocolTypes protocolTypes, uint cellID, InMemoryServerListProvider serverListProvider) {
|
||||
if (serverListProvider == null) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(serverListProvider));
|
||||
@@ -635,17 +646,6 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
internal void PlayGame(uint gameID, string gameName = null) => PlayGames(gameID.ToEnumerable(), gameName);
|
||||
|
||||
internal void PlayGames(IEnumerable<uint> gameIDs, string gameName = null) {
|
||||
if (gameIDs == null) {
|
||||
ArchiLogger.LogNullError(nameof(gameIDs));
|
||||
return;
|
||||
}
|
||||
|
||||
ArchiHandler.PlayGames(gameIDs, gameName);
|
||||
}
|
||||
|
||||
internal async Task<bool> RefreshSession() {
|
||||
if (!IsConnectedAndLoggedOn) {
|
||||
return false;
|
||||
|
||||
@@ -638,7 +638,7 @@ namespace ArchiSteamFarm {
|
||||
Bot.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningIdlingGameMismatch, game.AppID, game.GameName, game.PlayableAppID));
|
||||
}
|
||||
|
||||
Bot.PlayGame(game.PlayableAppID, Bot.BotConfig.CustomGamePlayedWhileFarming);
|
||||
Bot.IdleGame(game.PlayableAppID);
|
||||
DateTime endFarmingDate = DateTime.UtcNow.AddHours(Program.GlobalConfig.MaxFarmingTime);
|
||||
|
||||
bool? keepFarming = await ShouldFarm(game).ConfigureAwait(false);
|
||||
@@ -682,7 +682,7 @@ namespace ArchiSteamFarm {
|
||||
return true;
|
||||
}
|
||||
|
||||
Bot.PlayGames(games.Select(game => game.AppID), Bot.BotConfig.CustomGamePlayedWhileFarming);
|
||||
Bot.IdleGames(games.Select(game => game.PlayableAppID));
|
||||
|
||||
bool success = true;
|
||||
while (maxHour < 2) {
|
||||
|
||||
Reference in New Issue
Block a user