JustArchiNET / ArchiSteamFarm

C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
Apache License 2.0
11.28k stars 1.05k forks source link

Add `loot&` and `transfer&` commands #3287

Closed dm1tz closed 2 months ago

dm1tz commented 2 months ago

Checklist

Changes

New functionality

Adds two derivatives of loot^ and transfer^ commands: loot& and transfer&, allowing one to transfer Steam items that match user-provided set of EAssetRarity.

Additional info

This implementation expands the current EAssetRarity enum with rarities inherent in official Valve games, namely: CS2, DOTA2 and TF2, as well as some non-Valve games that I'm somewhat familiar with (eg. PAYDAY2). Covering every possible item rarity in non-Valve games that support Steam Inventory Service is pretty unrealistic since, to my knowledge, there's no strict naming conventions.

Some clarifications:

Also, I'm not sure about Arcana rarity. It is DOTA2 specific, maybe it would be better to combine it with Unusual? Would greatly appreciate any kind of feedback.

dm1tz commented 2 months ago

@JustArchi, thanks a lot for the suggestions! Hope I got them right.

dm1tz commented 2 months ago

Will remove the trailing // in the next push, don't want to trigger CI twice in case there are new suggestions.

Rudokhvist commented 2 months ago

I looked at the code and it looks fine (no wonder after Abrynos' and Archi's reviews), but to be honest I don't understand reasoning behind those commands and chosen way in which they work. First of all, ASF is a card farming app, not general account management tool, shouldn't it be in a plugin instead? And, secondly, why we try to convert rarities to enum, instead of just filtering by internal name (how user is supposed to know this name is another question, but understanding the match between enum and shown rarity is not straighforward anyway, if I understand it right). If we pick by internal name, wouldn't it be more generic and applicable to any game inventory, not just to Valve's games?

dm1tz commented 2 months ago

First of all, ASF is a card farming app, not general account management tool, shouldn't it be in a plugin instead?

As I stated earlier, added commands are derivatives of loot^ and transfer^, if they were shipped as plugins, I would happily do as you proposed. Besides:

C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.

how user is supposed to know this name is another question

Some variation of this where we can state the list of all available rarities, aliases and internal names.

If we pick by internal name, wouldn't it be more generic and applicable to any game inventory, not just to Valve's games?

I don't think it would be a good idea to have something like Rarity_Common_Weapon as a valid user input. Additionally, matching directly from internal name would negate the usage of numeric input.

Abrynos commented 2 months ago

if they were shipped as plugins, I would happily do as you proposed

Still possible to extract them into official plugin shipped with ASF 😉

JustArchi commented 2 months ago

Thanks for your contribution :trophy: