[Plugin API] allow plugins read-only access to ParseTradeResult.EResult
zypA13510 opened this issue · comments
Checklist
- I read and understood ASF's Contributing guidelines
- I also read Setting-up and FAQ, I don't need help, this is an enhancement idea
- This is not a duplicate of an existing issue
- My idea doesn't duplicate existing ASF functionality described on the wiki
- I believe that my idea falls into ASF's scope and should be offered as part of ASF built-in functionality
- My idea doesn't violate the Steam Subscriber Agreement
- My idea doesn't violate the Steam Online Conduct
- This is not ASF-ui suggestion
Enhancement purpose
As of today, plugins with IBotTradeOffer
interface can register their own trading logic to ASF. However, the plugin only has access to the Bot
and TradeOffer
objects, there is no way for the plugin to know why the trade is rejected by ASF core logic.
Solution
Upon reading the relevant code, I can see that the ShouldAcceptTrade
function actually returns more information, including a reason when the trade is not accepted.
I would like to propose exposing this information via the interface to plugins, so plugins can selectively override certain outcomes while leaving others untouched.
Why currently available solutions are not sufficient?
For example, if the plugin would like to respect the FilterBadBots
global config and give it priority, there is no way to do so without re-implementing the entire blacklisting logic.
Can you help us with this enhancement idea?
Yes, I can code the solution myself and send a pull request
Additional info
No response
Very good idea, I don't have anything against, thanks for suggesting it 🏆 - use new IBotTradeOffer2
interface instead, which replaces the functionality of the previous one 🙂
I've marked V6.0.4.1 with release of this.