rafaelgomesxyz / esgst

An extension that enhances SteamGifts / SteamTrades.
MIT License
146 stars 23 forks source link

Display ? instead of negative CV in Game Categories - Giveaway Info and get the price from the giveaway points when available #678

Closed Eiion closed 6 years ago

Eiion commented 6 years ago

Real CV displayed with Giveaway Info (7.2.9) is negative for games that have been given away multiple times after they got removed from store.

rafaelgomesxyz commented 6 years ago

Because since they were removed from the store the script was unable to retrieve their price and stores it as -1, not sure if there's a way to get prices of removed games.

Tristar7 commented 6 years ago

Using the SG value?

rafaelgomesxyz commented 6 years ago

Doesn't the SG value go to 0?

Tristar7 commented 6 years ago

Not always. Cg once mentioned of working on an automatic system. Not sure if already in place but many removed games have a value.

Eiion commented 6 years ago

There's issues with games (not completely) removed from the store. Only actually deleted games can be assigned their last known value. Up to then their value is 0. Either way, the sum shouldn't become negative something but 0 at the lowest.

rafaelgomesxyz commented 6 years ago

The negative value is to inform you that the script was unable to retrieve the price. Showing 0 would be misleading because it would mean that the price was retrieved correctly.

at46 commented 6 years ago

But a negative value is also misleading. Maybe it would be better if ESGST writes i12$error, i12$unknown or i12$removed instead of i12$-0,06 and explains in the mouseover that it can not calculate the value for removed games.

Eiion commented 6 years ago

"0" is not more misleading than "-0,06". The game has "0" value according to Steamgifts for as long as the game can't be bought in the shop while still not deleted from steam's database; since only after deletion the mods can put the previous value of the removed game in steamgifts database. Make it "-0" if you feel like the value "0" needs a specific indicator.

rafaelgomesxyz commented 6 years ago

@at46 I wasn't saying otherwise, I was just saying changing it to 0 would be misleading.

rafaelgomesxyz commented 6 years ago

@Eiion 0 definitely is more misleading than a negative value, a 0 value means that the price was correctly retrieved and the game will give you 0 CV. But a negative value already lets you know that something is wrong.

rafaelgomesxyz commented 6 years ago

Ok, should be better now. It will show "?" if it could not retrieve the price, but it will first check if the amount of points that the giveaway is worth is available and use that.

Although, this could still be inaccurate... Games worth more than $50 will be reduced to 50P. Probably rare though, that a game worth more than $50 is removed from the store, right?