bartervg / barter.vg

Track and hold discussion on Barter.vg bugs, enhancements, and other issues
https://barter.vg
MIT License
20 stars 4 forks source link

Blacklist inheritance [possible bug] #210

Closed Tecfan closed 3 years ago

Tecfan commented 3 years ago

What problem does this feature address?

I have a package containing two games as tradable. I have blacklisted the package, but I still want the individual games in my tradeable as well. Packages in general can be worth a lot more than just a singular game.

The problem is that if I go to a bundle page, and I see a game that is included in this package in the list of games in the bundle, this game gets a "blacklist" symbol, even though the game is not blacklisted, only the package including the game.

So to conclude: Blacklist https://barter.vg/i/76196/ Go to https://barter.vg/bundle/4193/ Observe that Iron Fisticle base game has a blacklist symbol in the bundle's game list, even though it is not in your blacklist.

Describe a solution

If this is intended behavior, I would like to opt out. I propose a profile setting.

Examples of similar features

Luckz commented 3 years ago

Blacklist inheritance sounds like a bug to me.

bartervg commented 3 years ago

I believe this is a display issue rather than blacklist inheritance. However, I was not able to send you (Tecfan) an offer because you have Iron Fisticle in your tradables. Therefore, it's effectively blacklisted, but due to a different reason.

bartervg commented 3 years ago

image different bug

bartervg commented 3 years ago

Bundle icon display bug of blacklist inheritance: fixed image The method gets all of the items from the specified collection and if Steam package, all of the included items. For backward compatibility reasons, included items have negative quantities. Therefore, to avoid displaying the blacklist icon, check that the blacklist item has a quantity > 0.

bartervg commented 3 years ago

Tradable x0 no longer blocks offers for that item. It is as if the item wasn't in tradable. image This wasn't part of your issue, comment or create a new issue if this is unresolved or creates new issues, but I believe the original issue is solved.

Tecfan commented 3 years ago

Not sure if this is a side effect of the changes. I have all these games in my blacklist, but they do not have a blacklist symbol next to them:

image

I assume this is because I ALSO have blacklisted the package i/129222 which includes all of these apps.

I have both combined and standalone tradables.

bartervg commented 3 years ago

Having both the package and the included games created the bug. Originally, the icon appeared if the app was blacklisted or if it was included in a blacklisted package. With the change to not show included games as blacklisted on the bundle page, the problem arose. The item IDs are saved in an array with the item ID as the index. The included games are added after the standalone items, and therefore the included games overwrite them. There's no trace of Leisure Suite Larry items being blacklisted, only the included items from the package.

The avoid this problem, there's a !isset() check before adding any included items to the array. I checked this bundle https://barter.vg/bundle/4425/ as 49c and there are plenty of 🚫︎ icons now. I'll leave this open to confirm it's fixed.

Feel free to re-open issues when you encounter a fix that isn't fixed or breaks other things.

Tecfan commented 3 years ago

Seems to be working now: image

Here's from a bundle where I have package blacklisted and episode one blacklisted, but not episode two, and everything is working as intended.