mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Misc
This commit is contained in:
parent
9fa55f31f9
commit
3dec189e14
8 changed files with 14 additions and 14 deletions
|
@ -50,7 +50,7 @@ namespace ArchiSteamFarm.CustomPlugins.PeriodicGC {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void PerformGC(object? state) {
|
private static void PerformGC(object? state = null) {
|
||||||
ASF.ArchiLogger.LogGenericWarning("Performing GC, current memory: " + (GC.GetTotalMemory(false) / 1024) + " KB.");
|
ASF.ArchiLogger.LogGenericWarning("Performing GC, current memory: " + (GC.GetTotalMemory(false) / 1024) + " KB.");
|
||||||
|
|
||||||
lock (LockObject) {
|
lock (LockObject) {
|
||||||
|
|
|
@ -453,7 +453,7 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async void SubmitData(object? state) {
|
private static async void SubmitData(object? state = null) {
|
||||||
if (Bot.Bots == null) {
|
if (Bot.Bots == null) {
|
||||||
throw new InvalidOperationException(nameof(Bot.Bots));
|
throw new InvalidOperationException(nameof(Bot.Bots));
|
||||||
}
|
}
|
||||||
|
|
|
@ -438,7 +438,7 @@ namespace ArchiSteamFarm.Core {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async void OnAutoUpdatesTimer(object? state) => await UpdateAndRestart().ConfigureAwait(false);
|
private static async void OnAutoUpdatesTimer(object? state = null) => await UpdateAndRestart().ConfigureAwait(false);
|
||||||
|
|
||||||
private static async void OnChanged(object sender, FileSystemEventArgs e) {
|
private static async void OnChanged(object sender, FileSystemEventArgs e) {
|
||||||
if (sender == null) {
|
if (sender == null) {
|
||||||
|
|
|
@ -318,7 +318,7 @@ namespace ArchiSteamFarm.Core {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void MatchActively(object? state) {
|
private async void MatchActively(object? state = null) {
|
||||||
if (!Bot.IsConnectedAndLoggedOn || Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.MatchEverything) || !Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.MatchActively) || (await IsEligibleForMatching().ConfigureAwait(false) != true)) {
|
if (!Bot.IsConnectedAndLoggedOn || Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.MatchEverything) || !Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.MatchActively) || (await IsEligibleForMatching().ConfigureAwait(false) != true)) {
|
||||||
Bot.ArchiLogger.LogGenericTrace(Strings.ErrorAborted);
|
Bot.ArchiLogger.LogGenericTrace(Strings.ErrorAborted);
|
||||||
|
|
||||||
|
|
|
@ -911,7 +911,7 @@ namespace ArchiSteamFarm.Steam {
|
||||||
BotDatabase.AddGamesToRedeemInBackground(gamesToRedeemInBackground);
|
BotDatabase.AddGamesToRedeemInBackground(gamesToRedeemInBackground);
|
||||||
|
|
||||||
if ((GamesRedeemerInBackgroundTimer == null) && BotDatabase.HasGamesToRedeemInBackground && IsConnectedAndLoggedOn) {
|
if ((GamesRedeemerInBackgroundTimer == null) && BotDatabase.HasGamesToRedeemInBackground && IsConnectedAndLoggedOn) {
|
||||||
Utilities.InBackground(() => RedeemGamesInBackground(this));
|
Utilities.InBackground(() => RedeemGamesInBackground());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1884,7 +1884,7 @@ namespace ArchiSteamFarm.Steam {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void HeartBeat(object? state) {
|
private async void HeartBeat(object? state = null) {
|
||||||
if (ASF.GlobalConfig == null) {
|
if (ASF.GlobalConfig == null) {
|
||||||
throw new InvalidOperationException(nameof(ASF.GlobalConfig));
|
throw new InvalidOperationException(nameof(ASF.GlobalConfig));
|
||||||
}
|
}
|
||||||
|
@ -2052,7 +2052,7 @@ namespace ArchiSteamFarm.Steam {
|
||||||
await PluginsCore.OnBotInitModules(this, BotConfig.AdditionalProperties).ConfigureAwait(false);
|
await PluginsCore.OnBotInitModules(this, BotConfig.AdditionalProperties).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void InitPermanentConnectionFailure(object? state) {
|
private async void InitPermanentConnectionFailure(object? state = null) {
|
||||||
if (!KeepRunning) {
|
if (!KeepRunning) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2808,7 +2808,7 @@ namespace ArchiSteamFarm.Steam {
|
||||||
Utilities.InBackground(ArchiWebHandler.HasValidApiKey);
|
Utilities.InBackground(ArchiWebHandler.HasValidApiKey);
|
||||||
|
|
||||||
if ((GamesRedeemerInBackgroundTimer == null) && BotDatabase.HasGamesToRedeemInBackground) {
|
if ((GamesRedeemerInBackgroundTimer == null) && BotDatabase.HasGamesToRedeemInBackground) {
|
||||||
Utilities.InBackground(() => RedeemGamesInBackground(this));
|
Utilities.InBackground(() => RedeemGamesInBackground());
|
||||||
}
|
}
|
||||||
|
|
||||||
ArchiHandler.SetCurrentMode(BotConfig.UserInterfaceMode);
|
ArchiHandler.SetCurrentMode(BotConfig.UserInterfaceMode);
|
||||||
|
@ -3019,7 +3019,7 @@ namespace ArchiSteamFarm.Steam {
|
||||||
await CheckOccupationStatus().ConfigureAwait(false);
|
await CheckOccupationStatus().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnSendItemsTimer(object? state) => await Actions.SendInventory(filterFunction: item => BotConfig.LootableTypes.Contains(item.Type)).ConfigureAwait(false);
|
private async void OnSendItemsTimer(object? state = null) => await Actions.SendInventory(filterFunction: item => BotConfig.LootableTypes.Contains(item.Type)).ConfigureAwait(false);
|
||||||
|
|
||||||
private async void OnServiceMethod(SteamUnifiedMessages.ServiceMethodNotification notification) {
|
private async void OnServiceMethod(SteamUnifiedMessages.ServiceMethodNotification notification) {
|
||||||
if (notification == null) {
|
if (notification == null) {
|
||||||
|
@ -3131,7 +3131,7 @@ namespace ArchiSteamFarm.Steam {
|
||||||
WalletCurrency = callback.Currency;
|
WalletCurrency = callback.Currency;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void RedeemGamesInBackground(object? state) {
|
private async void RedeemGamesInBackground(object? state = null) {
|
||||||
if (!await GamesRedeemerInBackgroundSemaphore.WaitAsync(0).ConfigureAwait(false)) {
|
if (!await GamesRedeemerInBackgroundSemaphore.WaitAsync(0).ConfigureAwait(false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3279,7 +3279,7 @@ namespace ArchiSteamFarm.Steam {
|
||||||
await ArchiHandler.PlayGames(BotConfig.GamesPlayedWhileIdle, BotConfig.CustomGamePlayedWhileIdle).ConfigureAwait(false);
|
await ArchiHandler.PlayGames(BotConfig.GamesPlayedWhileIdle, BotConfig.CustomGamePlayedWhileIdle).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ResetPlayingWasBlockedWithTimer(object? state) {
|
private void ResetPlayingWasBlockedWithTimer(object? state = null) {
|
||||||
PlayingWasBlocked = false;
|
PlayingWasBlocked = false;
|
||||||
StopPlayingWasBlockedTimer();
|
StopPlayingWasBlockedTimer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,7 +385,7 @@ namespace ArchiSteamFarm.Steam.Cards {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void CheckGamesForFarming(object? state) {
|
private async void CheckGamesForFarming(object? state = null) {
|
||||||
if (NowFarming || Paused || !Bot.IsConnectedAndLoggedOn) {
|
if (NowFarming || Paused || !Bot.IsConnectedAndLoggedOn) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace ArchiSteamFarm.Steam.Integration {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async void RefreshChanges(object? state) {
|
private static async void RefreshChanges(object? state = null) {
|
||||||
if (!await RefreshSemaphore.WaitAsync(0).ConfigureAwait(false)) {
|
if (!await RefreshSemaphore.WaitAsync(0).ConfigureAwait(false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace ArchiSteamFarm.Steam.Integration {
|
||||||
|
|
||||||
public async ValueTask DisposeAsync() => await SaleEventTimer.DisposeAsync().ConfigureAwait(false);
|
public async ValueTask DisposeAsync() => await SaleEventTimer.DisposeAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
private async void ExploreDiscoveryQueue(object? state) {
|
private async void ExploreDiscoveryQueue(object? state = null) {
|
||||||
if (!Bot.IsConnectedAndLoggedOn) {
|
if (!Bot.IsConnectedAndLoggedOn) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue