Skip to content

Commit

Permalink
Remove AutoSteamSaleEvent farming preference
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Dec 14, 2024
1 parent 0db414d commit 0fab411
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 216 deletions.
8 changes: 0 additions & 8 deletions ArchiSteamFarm/Localization/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,6 @@ StackTrace:
Process uptime: {1}</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used, {1} will be replaced by translated TimeSpan string (such as "25 minutes"). Please note that this string should include newlines for formatting.</comment>
</data>
<data name="ClearingDiscoveryQueue" xml:space="preserve">
<value>Clearing Steam discovery queue #{0}...</value>
<comment>{0} will be replaced by queue number</comment>
</data>
<data name="DoneClearingDiscoveryQueue" xml:space="preserve">
<value>Done clearing Steam discovery queue #{0}.</value>
<comment>{0} will be replaced by queue number</comment>
</data>
<data name="BotOwnsOverviewPerGame" xml:space="preserve">
<value>{0}/{1} bots already own game {2}.</value>
<comment>{0} will be replaced by number of bots that already own particular game being checked, {1} will be replaced by total number of bots that were checked during the process, {2} will be replaced by game's ID (number)</comment>
Expand Down
16 changes: 0 additions & 16 deletions ArchiSteamFarm/Steam/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ private set {
private bool SendCompleteTypesScheduled;
private Timer? SendItemsTimer;
private bool SteamParentalActive;
private SteamSaleEvent? SteamSaleEvent;
private Timer? TradeCheckTimer;
private string? TwoFactorCode;
private bool UnpackBoosterPacksScheduled;
Expand Down Expand Up @@ -427,7 +426,6 @@ public void Dispose() {
PlayingWasBlockedTimer?.Dispose();
RefreshTokensTimer?.Dispose();
SendItemsTimer?.Dispose();
SteamSaleEvent?.Dispose();
TradeCheckTimer?.Dispose();
}

Expand Down Expand Up @@ -465,10 +463,6 @@ public async ValueTask DisposeAsync() {
await SendItemsTimer.DisposeAsync().ConfigureAwait(false);
}

if (SteamSaleEvent != null) {
await SteamSaleEvent.DisposeAsync().ConfigureAwait(false);
}

if (TradeCheckTimer != null) {
await TradeCheckTimer.DisposeAsync().ConfigureAwait(false);
}
Expand Down Expand Up @@ -2504,12 +2498,6 @@ private async Task InitModules() {
SendItemsTimer = null;
}

if (SteamSaleEvent != null) {
await SteamSaleEvent.DisposeAsync().ConfigureAwait(false);

SteamSaleEvent = null;
}

if (TradeCheckTimer != null) {
await TradeCheckTimer.DisposeAsync().ConfigureAwait(false);

Expand All @@ -2525,10 +2513,6 @@ private async Task InitModules() {
);
}

if (BotConfig.FarmingPreferences.HasFlag(BotConfig.EFarmingPreferences.AutoSteamSaleEvent)) {
SteamSaleEvent = new SteamSaleEvent(this);
}

if (BotConfig.TradeCheckPeriod > 0) {
TradeCheckTimer = new Timer(
OnTradeCheckTimer,
Expand Down
39 changes: 0 additions & 39 deletions ArchiSteamFarm/Steam/Data/NewDiscoveryQueueResponse.cs

This file was deleted.

30 changes: 0 additions & 30 deletions ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1530,17 +1530,6 @@ internal async Task<bool> ChangePrivacySettings(UserPrivacy userPrivacy) {
return true;
}

internal async Task<bool> ClearFromDiscoveryQueue(uint appID) {
ArgumentOutOfRangeException.ThrowIfZero(appID);

Uri request = new(SteamStoreURL, $"/app/{appID}");

// Extra entry for sessionID
Dictionary<string, string> data = new(2, StringComparer.Ordinal) { { "appid_to_clear_from_queue", appID.ToString(CultureInfo.InvariantCulture) } };

return await UrlPostWithSession(request, data: data).ConfigureAwait(false);
}

internal async Task<bool> DeclineTradeOffer(ulong tradeID) {
ArgumentOutOfRangeException.ThrowIfZero(tradeID);

Expand All @@ -1551,17 +1540,6 @@ internal async Task<bool> DeclineTradeOffer(ulong tradeID) {

internal HttpClient GenerateDisposableHttpClient() => WebBrowser.GenerateDisposableHttpClient();

internal async Task<ImmutableHashSet<uint>?> GenerateNewDiscoveryQueue() {
Uri request = new(SteamStoreURL, "/explore/generatenewdiscoveryqueue");

// Extra entry for sessionID
Dictionary<string, string> data = new(2, StringComparer.Ordinal) { { "queuetype", "0" } };

ObjectResponse<NewDiscoveryQueueResponse>? response = await UrlPostToJsonObjectWithSession<NewDiscoveryQueueResponse>(request, data: data).ConfigureAwait(false);

return response?.Content?.Queue;
}

internal async Task<HashSet<uint>?> GetAppList() {
KeyValue? response = null;

Expand Down Expand Up @@ -1793,14 +1771,6 @@ internal async Task<byte> GetCardCountForGame(uint appID) {
return results;
}

internal async Task<IDocument?> GetDiscoveryQueuePage() {
Uri request = new(SteamStoreURL, "/explore?l=english");

HtmlDocumentResponse? response = await UrlGetToHtmlDocumentWithSession(request, checkSessionPreemptively: false).ConfigureAwait(false);

return response?.Content;
}

internal async Task<HashSet<ulong>?> GetFamilySharingSteamIDs() {
Uri request = new(SteamStoreURL, "/account/managedevices?l=english");

Expand Down
121 changes: 0 additions & 121 deletions ArchiSteamFarm/Steam/Integration/SteamSaleEvent.cs

This file was deleted.

3 changes: 1 addition & 2 deletions ArchiSteamFarm/Steam/Storage/BotConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,8 @@ public enum EFarmingPreferences : ushort {
SkipRefundableGames = 16,
SkipUnplayedGames = 32,
EnableRiskyCardsDiscovery = 64,
AutoSteamSaleEvent = 128,
AutoUnpackBoosterPacks = 256,
All = FarmingPausedByDefault | ShutdownOnFarmingFinished | SendOnFarmingFinished | FarmPriorityQueueOnly | SkipRefundableGames | SkipUnplayedGames | EnableRiskyCardsDiscovery | AutoSteamSaleEvent | AutoUnpackBoosterPacks
All = FarmingPausedByDefault | ShutdownOnFarmingFinished | SendOnFarmingFinished | FarmPriorityQueueOnly | SkipRefundableGames | SkipUnplayedGames | EnableRiskyCardsDiscovery | AutoUnpackBoosterPacks
}

[Flags]
Expand Down

0 comments on commit 0fab411

Please sign in to comment.