Fulfil Dynamic Recipe Components
As discussed in https://github.com/DoctorMcKay/node-tf2/issues/6 enable fulfilling of dynamic recipes
I have a few comments:
- You changed a lot of whitespace for no reason
- You don't seem to have implemented
FulfillDynamicRecipeComponentResponse- Even if you did, it doesn't match the format of existing events
- I'd like the module to be smart enough to figure out the defindex by itself without it having to be provided
My editor seemed to enjoy changing the whitespace for no reason, woops! Yeah I didn't implement that.
Making it smart enough is definitely on the list of things to do, but parsing the valueBytes in the backpack item attributes to obtain the info you could get from the steam web api is proving to be difficult without any kind of struct to work from, the existing CSOEconItemAttribute seems to be incomplete (for reference here's the attributes you might get from a prof ks kit when using the web api, 2000-2009 are the one's we're interested as they're the inputs and outputs)
"attributes": [
{
"defindex": 211,
"value": 1436551064,
"float_value": 21994309419008
},
{
"defindex": 2022,
"value": 1065353216,
"float_value": 1
},
{
"defindex": 2000,
"is_output": false,
"quantity": 0,
"quality": 6,
"match_all_attribs": true,
"attributes": [
{
"defindex": 2025,
"value": 1073741824,
"float_value": 2
}
]
},
{
"defindex": 2001,
"is_output": false,
"quantity": 13,
"itemdef": 5705,
"quality": 6
},
{
"defindex": 2002,
"is_output": false,
"quantity": 3,
"itemdef": 5706,
"quality": 6
},
{
"defindex": 2003,
"is_output": false,
"quantity": 6,
"itemdef": 5702,
"quality": 6
},
{
"defindex": 2004,
"is_output": false,
"quantity": 0,
"itemdef": 5701,
"quality": 6
},
{
"defindex": 2005,
"is_output": false,
"quantity": 0,
"itemdef": 5700,
"quality": 6
},
{
"defindex": 2006,
"is_output": true,
"quantity": 1,
"itemdef": 6526,
"quality": 6,
"attributes": [
{
"defindex": 2012,
"value": 1108606976,
"float_value": 37
},
{
"defindex": 2013,
"value": 1157283840,
"float_value": 2006
},
{
"defindex": 2014,
"value": 1082130432,
"float_value": 4
}
]
}
]