node-steam-trade icon indicating copy to clipboard operation
node-steam-trade copied to clipboard

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

Open Exxion opened this issue 9 years ago • 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.

Exxion avatar Mar 15 '15 22:03 Exxion

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

seishun avatar Mar 19 '15 21:03 seishun

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?

seishun avatar Mar 20 '15 14:03 seishun

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?

Exxion avatar May 18 '15 20:05 Exxion

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

ylms avatar Jul 24 '15 00:07 ylms

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.

seishun avatar Oct 15 '15 14:10 seishun

What kind of input, exactly?

Exxion avatar Oct 18 '15 18:10 Exxion

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?

seishun avatar Nov 05 '15 19:11 seishun

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.

Exxion avatar Nov 05 '15 23:11 Exxion

Could you take a look at the spirals branch?

seishun avatar Nov 06 '15 18:11 seishun

@Exxion is this issue still relevant to you?

seishun avatar Nov 20 '15 16:11 seishun

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

Exxion avatar Nov 20 '15 17:11 Exxion