Nuklon / Steam-Economy-Enhancer

Enhances the Steam Inventory and Steam Market.
MIT License
1.59k stars 181 forks source link

"Merges the description in the normal object" is modifying the object on the page #201

Open xPaw opened 4 months ago

xPaw commented 4 months ago

This:

https://github.com/Nuklon/Steam-Economy-Enhancer/blob/8f90b9950c7ab482a73f7c52348545ff747db4eb/code.user.js#L2215-L2216

I was writing some code for steamdb extension, and assumed the properties I saw on the item were present, but I should have been looking at item.description instead.

Is this merging actually needed?

Nuklon commented 4 months ago

On inventory page, m_rgAssetsholds only basic info where the bulk of the data is inside description. On the market page, m_rgAssetscontains everything directly and there the descriptionis empty. It's likely possible to remove this merging entirely, but then all uses need to be checked as the properties are likely under description.

xPaw commented 4 months ago

I've noticed some code already does this, like so:

https://github.com/Nuklon/Steam-Economy-Enhancer/blob/c5b059bd4cee6302a277dc293cec362f9ca5b1bc/code.user.js#L820-L823

Nuklon commented 4 months ago

Yeah, I think it's possible to disable merging, but I think all usages need to be well checked, I think the inventory stuff is pretty easy to fix as it's mostly under the description.