iq -> fq
ib -> fb
bl -> tb
This commit is contained in:
Archi
2021-11-11 22:07:21 +01:00
parent 66344a1a3d
commit c01a2ba863
5 changed files with 558 additions and 558 deletions

View File

@@ -382,7 +382,7 @@ internal sealed class Statistics : IAsyncDisposable {
HashSet<Asset> ourInventory;
try {
ourInventory = await Bot.ArchiWebHandler.GetInventoryAsync().Where(item => acceptedMatchableTypes.Contains(item.Type) && !Bot.BotDatabase.MatchActivelyBlacklistedAppIDs.Contains(item.RealAppID)).ToHashSetAsync().ConfigureAwait(false);
ourInventory = await Bot.ArchiWebHandler.GetInventoryAsync().Where(item => acceptedMatchableTypes.Contains(item.Type) && !Bot.BotDatabase.MatchActivelyBlacklistAppIDs.Contains(item.RealAppID)).ToHashSetAsync().ConfigureAwait(false);
} catch (HttpRequestException e) {
Bot.ArchiLogger.LogGenericWarningException(e);

View File

@@ -1347,7 +1347,7 @@ public sealed class Bot : IAsyncDisposable {
throw new ArgumentOutOfRangeException(nameof(appID));
}
return BotDatabase.IdlingBlacklistedAppIDs.Contains(appID);
return BotDatabase.FarmingBlacklistAppIDs.Contains(appID);
}
internal bool IsBlacklistedFromTrades(ulong steamID) {
@@ -1355,7 +1355,7 @@ public sealed class Bot : IAsyncDisposable {
throw new ArgumentOutOfRangeException(nameof(steamID));
}
return BotDatabase.BlacklistedFromTradesSteamIDs.Contains(steamID);
return BotDatabase.TradingBlacklistSteamIDs.Contains(steamID);
}
internal bool IsPriorityIdling(uint appID) {
@@ -1363,7 +1363,7 @@ public sealed class Bot : IAsyncDisposable {
throw new ArgumentOutOfRangeException(nameof(appID));
}
return BotDatabase.IdlingPriorityAppIDs.Contains(appID);
return BotDatabase.FarmingPriorityAppIDs.Contains(appID);
}
internal async Task OnConfigChanged(bool deleted) {

View File

@@ -259,7 +259,7 @@ public sealed class CardsFarmer : IAsyncDisposable {
return;
}
if (!Bot.CanReceiveSteamCards || (Bot.BotConfig.FarmPriorityQueueOnly && (Bot.BotDatabase.IdlingPriorityAppIDs.Count == 0))) {
if (!Bot.CanReceiveSteamCards || (Bot.BotConfig.FarmPriorityQueueOnly && (Bot.BotDatabase.FarmingPriorityAppIDs.Count == 0))) {
Bot.ArchiLogger.LogGenericInfo(Strings.NothingToIdle);
await Bot.OnFarmingFinished(false).ConfigureAwait(false);

File diff suppressed because it is too large Load Diff

View File

@@ -37,17 +37,17 @@ using Newtonsoft.Json;
namespace ArchiSteamFarm.Steam.Storage;
internal sealed class BotDatabase : SerializableFile {
[JsonProperty(Required = Required.DisallowNull)]
internal readonly ConcurrentHashSet<ulong> BlacklistedFromTradesSteamIDs = new();
[JsonProperty("IdlingBlacklistedAppIDs", Required = Required.DisallowNull)]
internal readonly ConcurrentHashSet<uint> FarmingBlacklistAppIDs = new();
[JsonProperty(Required = Required.DisallowNull)]
internal readonly ConcurrentHashSet<uint> IdlingBlacklistedAppIDs = new();
[JsonProperty("IdlingPriorityAppIDs", Required = Required.DisallowNull)]
internal readonly ConcurrentHashSet<uint> FarmingPriorityAppIDs = new();
[JsonProperty(Required = Required.DisallowNull)]
internal readonly ConcurrentHashSet<uint> IdlingPriorityAppIDs = new();
[JsonProperty("MatchActivelyBlacklistedAppIDs", Required = Required.DisallowNull)]
internal readonly ConcurrentHashSet<uint> MatchActivelyBlacklistAppIDs = new();
[JsonProperty(Required = Required.DisallowNull)]
internal readonly ConcurrentHashSet<uint> MatchActivelyBlacklistedAppIDs = new();
[JsonProperty("BlacklistedFromTradesSteamIDs", Required = Required.DisallowNull)]
internal readonly ConcurrentHashSet<ulong> TradingBlacklistSteamIDs = new();
internal uint GamesToRedeemInBackgroundCount {
get {
@@ -104,10 +104,10 @@ internal sealed class BotDatabase : SerializableFile {
[JsonConstructor]
private BotDatabase() {
BlacklistedFromTradesSteamIDs.OnModified += OnObjectModified;
IdlingBlacklistedAppIDs.OnModified += OnObjectModified;
IdlingPriorityAppIDs.OnModified += OnObjectModified;
MatchActivelyBlacklistedAppIDs.OnModified += OnObjectModified;
FarmingBlacklistAppIDs.OnModified += OnObjectModified;
FarmingPriorityAppIDs.OnModified += OnObjectModified;
MatchActivelyBlacklistAppIDs.OnModified += OnObjectModified;
TradingBlacklistSteamIDs.OnModified += OnObjectModified;
}
[UsedImplicitly]
@@ -117,27 +117,27 @@ internal sealed class BotDatabase : SerializableFile {
public bool ShouldSerializeBackingMobileAuthenticator() => BackingMobileAuthenticator != null;
[UsedImplicitly]
public bool ShouldSerializeBlacklistedFromTradesSteamIDs() => BlacklistedFromTradesSteamIDs.Count > 0;
public bool ShouldSerializeFarmingBlacklistAppIDs() => FarmingBlacklistAppIDs.Count > 0;
[UsedImplicitly]
public bool ShouldSerializeFarmingPriorityAppIDs() => FarmingPriorityAppIDs.Count > 0;
[UsedImplicitly]
public bool ShouldSerializeGamesToRedeemInBackground() => HasGamesToRedeemInBackground;
[UsedImplicitly]
public bool ShouldSerializeIdlingBlacklistedAppIDs() => IdlingBlacklistedAppIDs.Count > 0;
public bool ShouldSerializeMatchActivelyBlacklistAppIDs() => MatchActivelyBlacklistAppIDs.Count > 0;
[UsedImplicitly]
public bool ShouldSerializeIdlingPriorityAppIDs() => IdlingPriorityAppIDs.Count > 0;
[UsedImplicitly]
public bool ShouldSerializeMatchActivelyBlacklistedAppIDs() => MatchActivelyBlacklistedAppIDs.Count > 0;
public bool ShouldSerializeTradingBlacklistSteamIDs() => TradingBlacklistSteamIDs.Count > 0;
protected override void Dispose(bool disposing) {
if (disposing) {
// Events we registered
BlacklistedFromTradesSteamIDs.OnModified -= OnObjectModified;
IdlingBlacklistedAppIDs.OnModified -= OnObjectModified;
IdlingPriorityAppIDs.OnModified -= OnObjectModified;
MatchActivelyBlacklistedAppIDs.OnModified -= OnObjectModified;
FarmingBlacklistAppIDs.OnModified -= OnObjectModified;
FarmingPriorityAppIDs.OnModified -= OnObjectModified;
MatchActivelyBlacklistAppIDs.OnModified -= OnObjectModified;
TradingBlacklistSteamIDs.OnModified -= OnObjectModified;
// Those are objects that might be null and the check should be in-place
BackingMobileAuthenticator?.Dispose();