mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 22:40:30 +00:00
Misc
This commit is contained in:
@@ -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.");
|
||||
|
||||
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) {
|
||||
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) {
|
||||
if (sender == null) {
|
||||
|
||||
@@ -318,7 +318,7 @@ namespace ArchiSteamFarm.Core {
|
||||
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)) {
|
||||
Bot.ArchiLogger.LogGenericTrace(Strings.ErrorAborted);
|
||||
|
||||
|
||||
@@ -911,7 +911,7 @@ namespace ArchiSteamFarm.Steam {
|
||||
BotDatabase.AddGamesToRedeemInBackground(gamesToRedeemInBackground);
|
||||
|
||||
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) {
|
||||
throw new InvalidOperationException(nameof(ASF.GlobalConfig));
|
||||
}
|
||||
@@ -2052,7 +2052,7 @@ namespace ArchiSteamFarm.Steam {
|
||||
await PluginsCore.OnBotInitModules(this, BotConfig.AdditionalProperties).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private async void InitPermanentConnectionFailure(object? state) {
|
||||
private async void InitPermanentConnectionFailure(object? state = null) {
|
||||
if (!KeepRunning) {
|
||||
return;
|
||||
}
|
||||
@@ -2808,7 +2808,7 @@ namespace ArchiSteamFarm.Steam {
|
||||
Utilities.InBackground(ArchiWebHandler.HasValidApiKey);
|
||||
|
||||
if ((GamesRedeemerInBackgroundTimer == null) && BotDatabase.HasGamesToRedeemInBackground) {
|
||||
Utilities.InBackground(() => RedeemGamesInBackground(this));
|
||||
Utilities.InBackground(() => RedeemGamesInBackground());
|
||||
}
|
||||
|
||||
ArchiHandler.SetCurrentMode(BotConfig.UserInterfaceMode);
|
||||
@@ -3019,7 +3019,7 @@ namespace ArchiSteamFarm.Steam {
|
||||
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) {
|
||||
if (notification == null) {
|
||||
@@ -3131,7 +3131,7 @@ namespace ArchiSteamFarm.Steam {
|
||||
WalletCurrency = callback.Currency;
|
||||
}
|
||||
|
||||
private async void RedeemGamesInBackground(object? state) {
|
||||
private async void RedeemGamesInBackground(object? state = null) {
|
||||
if (!await GamesRedeemerInBackgroundSemaphore.WaitAsync(0).ConfigureAwait(false)) {
|
||||
return;
|
||||
}
|
||||
@@ -3279,7 +3279,7 @@ namespace ArchiSteamFarm.Steam {
|
||||
await ArchiHandler.PlayGames(BotConfig.GamesPlayedWhileIdle, BotConfig.CustomGamePlayedWhileIdle).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private void ResetPlayingWasBlockedWithTimer(object? state) {
|
||||
private void ResetPlayingWasBlockedWithTimer(object? state = null) {
|
||||
PlayingWasBlocked = false;
|
||||
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) {
|
||||
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)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace ArchiSteamFarm.Steam.Integration {
|
||||
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user