seishun/node-steam-trade

Stackable items (at least Spiral Knights, maybe others) don't work at all

Opened this issue · 11 comments

The amount property of the item (both in offerChanged and themAssets) is always the total number the person offering the item has, not the number they offered (unless they offered all they had, of course).

Also, Crowns and Energy (from Spiral Knights) don't trigger offerChanged when the partner adds or removes them and they don't show up in themAssets at all.

Finally, trades seem to silently end at random when offering SK items, though this may just be due to my connection or something.

EDIT: Forgot to mention that changing the number of offered items doesn't emit offerChanged. It also doesn't update the amount property, but I guess that was implied by the rest of the issue report.

I've added you on Steam. I would like to see how adding/removing currency looks like on the receiving side.

The amount property of the item (both in offerChanged and themAssets) is always the total number the person offering the item has, not the number they offered (unless they offered all they had, of course).

Fixing it in themAssets is simple, although it will make the code ugly. Fixing offerChanged would be complicated, since there is no amount in the object for event 8 which apparently stands for "stackable amount changed" (and Valve's trading code doesn't even handle it, the trading log doesn't reflect amount changes).

Also, Crowns and Energy (from Spiral Knights) don't trigger offerChanged when the partner adds or removes them and they don't show up in themAssets at all.

Yeah, currencies are not supported. I wonder if inserting them at the front of themAssets like in the trade window would work (although the property name would be technically wrong - assets and currencies are different).

Finally, trades seem to silently end at random when offering SK items, though this may just be due to my connection or something.

How exactly do they end? Do you get an error from the library, or what's the trade result?

I could have sworn I replied to this
Yeah, I think the issue of silently ending the trade was related to something on my end
The rest of that is unfortunate, though
Do you know if a workaround would be possible?

ylms commented

@seishun Hello, how can I get in touch with you privately?

Do you know if a workaround would be possible?

Not a workaround, no. If you meant a fix, then yes, it's possible, but I need your input on the points I raised in my previous response.

What kind of input, exactly?

So, there are a couple of issues you pointed out.

  • Unable to know the stackable amount the user has offered.

I could tweak the amount property of the item in themAssets unless you can suggest some other way.

  • Unable to know anything about currencies the user has offered.

See my previous response:

Yeah, currencies are not supported. I wonder if inserting them at the front of themAssets like in the trade window would work (although the property name would be technically wrong - assets and currencies are different).

I would like to get your opinion on this.

Did I miss anything else?

Fixing the stackable amount in themAssets would be sufficient, if imperfect.
Either adding currencies to the front of themAssets or making a currency variable would be fine with me as long as it works properly.

Could you take a look at the spirals branch?

@Exxion is this issue still relevant to you?

Yes. Sorry about the lack of response. I've been busy. I'll get back to you sometime hopefully in the next couple weeks.