Commit Graph

68 Commits

Author SHA1 Message Date
JustArchi
e82560259b Final code cleanup 2020-11-14 22:37:00 +01:00
JustArchi
47b42d6fc0 More code cleanups 2020-11-11 19:51:52 +01:00
Łukasz Domeradzki
35f4651ed6 .NET 5.0 (#1999)
* Initial work

* Fix CIs

* Fix warnings

* Update .travis.yml

* Update dockerfiles

* Update libraries to .NET 5.0

* Misc

* Remove workaround for #1812

* Update cc.sh

* CI updates

* CI updates

* Update .travis.yml
2020-11-10 23:22:57 +01:00
JustArchi
f99d296687 Closes #2014 2020-11-04 23:39:57 +01:00
JustArchi
4319175905 Improve trading locks usage 2020-10-31 19:48:47 +01:00
JustArchi
bad0db1775 Correct @Abrynos overlook 2020-10-22 22:48:59 +02:00
Vitaliy
93cd30f820 Add itemsPerTrade argument (#2011)
* Add itemsPerTrade argument

* Validate parameter, add to Actions.SendInventory

* Add check, fix merge
2020-10-21 21:41:09 +02:00
Sebastian Göls
1f8b68f5ee Implement #852 (#2004)
* Update Actions.cs, Bot.cs, and BotConfig.cs

* First round of refactoring

* Check all badge pages

* Update Bot.cs

* Make sure multiple pages of badges work with foil badges and Make item selection algorithm work with all kinds of amount values we could get from Valve

* Change order of params in Actions.SendInventory(...), Cache amount of cards for game ids, Count card elements on page when fetching card count per game, Calculate items to send for all games in parallel

* Add unit tests

* Make sure only one real app id and one asset type are present while computing cards to send and Test it

* Update ArchiWebHandler.cs

* Update Bot.cs

* Fix iteration over badge pages

* Update Bot.cs

* Make stackable item stacks smaller if possible

* Simplify code based on changing stack size of stackable items and Adapt tests

* Consider only cards of the same rarity to be of one set and Add handling of already crafted level 5 badges

* Implement feedback

* Update Bot.cs

* Update Bot.cs

* Implement feedback from review

* Adapt tests

* Improve XPath efficiency

* Check real result for additional values in unit tests

* Implement feedback

* Add additional test combining classID, type and rarity

* Make collections readonly wherever you can

* Optimize misc. code and Add SetTypesToComplete to BotConfig

* Throw exception if we have more card types than cards per set

* Remove SendSetsOnCompleted and Make CompleteTypesToSend empty per default

* Fix existing unit tests and add new ones due to new exception

* Please nitpicky Archi

* Update Bot.cs

* Change expected exception type

* Make appID constants local

* Update Bot.cs and BotConfig.cs

* Do as JetBrains Rider says

* Only fetch card count for badge if we have cards for it

* Improve naming and fix handling of URIs for foil badges

* Add Bot.LoadCardsPerSet(...), Bot.GetItemsForFullSets(...) and Trading.GetInventorySets(...) to public API

* Let AWH do its job

* Make Bot.GetPossiblyCompletedBadgeAppIDs() part of public API as well
2020-10-21 18:41:20 +02:00
JustArchi
42f388e370 Closes #1950 2020-09-05 12:51:03 +02:00
Łukasz Domeradzki
9fc1ea65a5 Closes #1543 (#1944)
* Start working on nullable checks

help me

* Update GlobalConfig.cs

* Finish initial fixup round

* nullability code review
2020-08-22 21:41:01 +02:00
JustArchi
06b1b8deeb Misc trade logging enhancements 2020-08-11 11:34:32 +02:00
JustArchi
978e6a3d0c Change acceptedTradeOfferIDs into acceptedCreatorIDs
This makes it possible to accept other confirmation types than trading if they follow the same logic with creator ID. If somebody wants to ensure that he's accepting only trades with given IDs, then he should combine it with acceptedType, which is already supported and expected.

This makes it possible to use ASF's HandleTwoFactorAuthenticationConfirmations() e.g. for market listings in custom plugins.

Answers the remaining part of #1891
2020-07-10 00:40:11 +02:00
JustArchi
56cc106c11 Misc 2020-07-10 00:31:27 +02:00
JustArchi
97e5969362 Closes #1891 2020-07-10 00:28:46 +02:00
JustArchi
e0ba773e78 Make GetFirstSteamMasterID() fall back to SteamOwnerID in case no master users are specified 2020-06-27 15:27:00 +02:00
JustArchi
01482e8dd0 Misc 2020-05-21 22:47:23 +02:00
JustArchi
6c22724835 Implement OS-wide, cross-process semaphores for ASF instances
Distinction is preserved on webproxy basis (even for LoginLimiter which shouldn't work like that)

Addresses crucial part of #1798
2020-05-20 22:01:29 +02:00
JustArchi
b23f634c9b Implement IAsyncDisposable for all ASF classes that can make use of it 2020-04-18 17:52:11 +02:00
JustArchi
5360cba93a Remove deprecated features 2020-04-06 17:33:31 +02:00
JustArchi
847c78b650 R# cleanup 2020-03-05 21:05:40 +01:00
Vitaliy
6657945b7d Use IAsyncEnumerable for getting inventory (#1652)
* Use IAsyncEnumerable for getting inventory

* Don't suppress exceptions, catch them in ResponseUnpackBoosters

* Make sure we don't get duplicate assets during unpack

* Rewrite inventory filters to LINQ methods

* Add handling duplicate items, mark GetInventory as obsolete, catch exceptions from getting inventory errors

* Mark GetInventoryEnumerable as NotNull, don't check received inventory for null, use comparison with nullable values

* Use specific types of exceptions, log exceptions using LogGenericWarningException, handle IOException separately (without logging the exception), remove default null value

* Use old method signature for obsolete API

* Use error level for generic exceptions

* Fix wantedSets not being used

* Correct exception types, rename function

* Replace exception types

* Make SendTradeOfferAsync that accepts Func<Steam.Asset, bool> as a filter

* Fix missing targetSteamID in ResponseTransferByRealAppIDs

* Make parameter name readable

* Rename method
2020-02-22 18:03:22 +01:00
JustArchi
0370168b02 Happy new year 2020-02-01 23:33:35 +01:00
JustArchi
f0292a07b9 Misc 2020-01-01 12:45:32 +01:00
JustArchi
fc564d766c Add loot% command 2019-12-26 18:57:02 +01:00
JustArchi
a0dfb28e59 R# cleanup 2019-10-13 17:21:40 +02:00
Łukasz Domeradzki
5b4867c387 Update ASF to .NET Core 3.0 (#1427)
* Initial bump to .net core 3.0

* Update cc.sh

* Update appveyor.yml

* Update ArchiSteamFarm.csproj

* Update appveyor.yml

* Update .travis.yml

* Build corrections

* Cleanup

* Update .travis.yml

* Don't publish trimmed for now

* Update ArchiSteamFarm.csproj
2019-09-26 20:28:25 +02:00
JustArchi
ca2109d3d7 Open TradingLock and API key check for public 2019-08-16 16:37:55 +02:00
JustArchi
22c1b6130a Closes #1290 2019-06-23 17:30:34 +02:00
JustArchi
285449b3ea State count of handled confirmations in 2fa commands 2019-04-08 21:15:09 +02:00
JustArchi
947c9e9f23 Bot-related improvements 2019-04-03 18:57:25 +02:00
JustArchi
6241e283b5 Increase contextID to 64 bits 2019-02-22 04:42:36 +01:00
JustArchi
b677ba8202 Code/style cleanup 2019-02-16 17:34:17 +01:00
JustArchi
dd621a90e4 Misc 2019-02-04 03:19:00 +01:00
JustArchi
53ecd8d8e6 Misc 2019-01-31 02:31:01 +01:00
JustArchi
47b2aa137f Move token fetching further below 2019-01-26 22:11:35 +01:00
JustArchi
546cc55ab9 Misc 2019-01-26 22:07:00 +01:00
JustArchi
e86bf695c8 Closes #1060 2019-01-26 22:05:31 +01:00
JustArchi
c594da5acb Add 2FA actions to ASF API 2019-01-23 17:58:37 +01:00
JustArchi
08b1d4190d Expose version in update API 2019-01-18 17:07:00 +01:00
JustArchi
18d5f1938f Open configs for public API 2019-01-14 21:50:23 +01:00
JustArchi
e1e9a9f457 Rider cleanup 2019-01-14 19:11:17 +01:00
JustArchi
b28e45fb87 Misc 2019-01-12 19:13:29 +01:00
JustArchi
e448284174 Misc 2019-01-12 19:08:36 +01:00
JustArchi
e5fff9309f Misc items-related improvements 2019-01-11 01:51:38 +01:00
JustArchi
192656cd02 Implement basic code contracts 2019-01-10 23:44:32 +01:00
Łukasz Domeradzki
0f2a816b92 Implement plugin system (#1020)
* Implement basic plugin system

* The dawn of new era

* Add plugins warning

* Move more members to PublicAPI

* Open commands for the plugins

* Add IBotHackNewChat

* Run plugin events in parallel

* Use properties in IPlugin

* Hook our custom plugin into CI to ensure it compiles

* Fix dotnet brain damage

* Add IBotsComparer

* Add code documentation

* Add IBotTradeOffer

* Add IBotTradeOffer example

* Add IBotTradeOfferResults

* Final bulletproofing

* Final renaming
2019-01-10 22:33:07 +01:00
JustArchi
3bbddcf723 Happy new year 🎉 2019-01-02 16:32:53 +01:00
JustArchi
7d59062217 Misc 2018-12-29 19:01:56 +01:00
Vital7
90303ece36 Fix ContextID type (#990)
* Fix NullReferenceException in AcceptConfirmations()

* Change ContextID type from byte to uint

* Change const types
2018-12-29 14:35:58 +01:00
JustArchi
f8aa8babcf R# cleanup 2018-12-15 00:27:15 +01:00