diff --git a/FreePackages.Tests/Apps.cs b/FreePackages.Tests/Apps.cs index fdd286a..435edb6 100644 --- a/FreePackages.Tests/Apps.cs +++ b/FreePackages.Tests/Apps.cs @@ -57,7 +57,6 @@ public void CanDetectRedeemableAppWithAppRequirement() { Assert.IsTrue(app.MustOwnAppToPurchase > 0); Assert.IsTrue(PackageFilter.IsRedeemableApp(app)); - Assert.IsTrue(app.MustOwnAppToPurchase == app.DLCForAppID); } [TestMethod] diff --git a/FreePackages/PackageFilter/Filterables/FilterableApp.cs b/FreePackages/PackageFilter/Filterables/FilterableApp.cs index 587df37..d32b73a 100644 --- a/FreePackages/PackageFilter/Filterables/FilterableApp.cs +++ b/FreePackages/PackageFilter/Filterables/FilterableApp.cs @@ -14,7 +14,6 @@ internal sealed class FilterableApp { internal string? ReleaseState; internal string? State; internal uint MustOwnAppToPurchase; - internal uint DLCForAppID; internal List? RestrictedCountries; internal List? PurchaseRestrictedCountries; internal bool AllowPurchaseFromRestrictedCountries; @@ -28,7 +27,6 @@ internal sealed class FilterableApp { internal List? OSList; internal uint DeckCompatibility; internal DateTime SteamReleaseDate; - internal bool ActivationOnlyDLC; internal bool Hidden; internal FilterableApp(SteamApps.PICSProductInfoCallback.PICSProductInfo productInfo) : this(productInfo.ID, productInfo.KeyValues) {} @@ -44,7 +42,6 @@ internal FilterableApp(uint id, KeyValue kv) { ReleaseState = kv["common"]["releasestate"].AsString(); State = kv["extended"]["state"].AsString(); MustOwnAppToPurchase = kv["extended"]["mustownapptopurchase"].AsUnsignedInteger(); - DLCForAppID = kv["extended"]["dlcforappid"].AsUnsignedInteger(); RestrictedCountries = kv["common"]["restricted_countries"].AsString()?.ToUpper().Split(",").ToList(); PurchaseRestrictedCountries = kv["extended"]["purchaserestrictedcountries"].AsString()?.ToUpper().Split(" ").ToList(); AllowPurchaseFromRestrictedCountries = kv["extended"]["allowpurchasefromrestrictedcountries"].AsBoolean(); @@ -58,7 +55,6 @@ internal FilterableApp(uint id, KeyValue kv) { OSList = kv["common"]["oslist"].AsString()?.ToUpper().Split(",").ToList(); DeckCompatibility = kv["common"]["steam_deck_compatibility"]["category"].AsUnsignedInteger(); SteamReleaseDate = DateTimeOffset.FromUnixTimeSeconds(kv["common"]["steam_release_date"].AsUnsignedInteger()).UtcDateTime; - ActivationOnlyDLC = kv["extended"]["activationonlydlc"].AsBoolean(); Hidden = kv["common"] == KeyValue.Invalid; // Fix the category for games which do have trading cards, but which don't have the trading card category, Ex: https://steamdb.info/app/316260/ diff --git a/FreePackages/PackageFilter/PackageFilter.cs b/FreePackages/PackageFilter/PackageFilter.cs index aa3fa53..42fa3b5 100644 --- a/FreePackages/PackageFilter/PackageFilter.cs +++ b/FreePackages/PackageFilter/PackageFilter.cs @@ -67,17 +67,6 @@ internal bool IsRedeemableApp(FilterableApp app, HashSet? includedAppIDs = return false; } - if (app.DLCForAppID > 0 && !OwnedAppIDs.Contains(app.DLCForAppID) && (includedAppIDs == null || !includedAppIDs.Contains(app.DLCForAppID))) { - // Missing a necessary app - // Note: Some apps have only DLCForAppid and are missing MustOwnAppToPurchase, so we need to check this also, ex: https://steamdb.info/app/41046 - - if (!app.ActivationOnlyDLC) { - // Some DLC can be redeemed without owning the base game, ex: https://steamdb.info/app/2765950/ - // All I see that's special here is having ActivationOnlyDLC set to true, and missing MustOwnAppToPurchase - return false; - } - } - if (app.RestrictedCountries != null && app.RestrictedCountries.Contains(Country, StringComparer.OrdinalIgnoreCase)) { // App is restricted in this bot's country return false;