Commit graph

28 commits

Author SHA1 Message Date
Łukasz Domeradzki
ca3f3e0cab
Resolve selected .NET 9 analyzer warnings 2024-06-25 00:18:38 +02:00
Archi
48a14136a9
Update all file headers, again 2024-03-17 02:35:40 +01:00
Archi
c9acbb7bf2
Big post-PR cleanup 2024-03-17 02:29:04 +01:00
Archi
f98a159799
File header update 2024-03-17 00:06:13 +01:00
Vita Chumakova
184232995d
Inventory fetching through CM (#3155)
* New inventory fetching

* use new method everywhere

* Store description in the asset, add protobuf body as a backing field for InventoryDescription, add properties to description

* parse trade offers as json, stub descriptions, fix build

* formatting, misc fixes

* fix pragma comments

* fix passing tradable property

* fix convesion of assets, add compatibility method

* fix fetching tradeoffers

* use 40k as default count per request

* throw an exception instead of silencing the error
2024-03-16 23:57:25 +01:00
Archi
6c9e9da740
Modernize unit tests 2024-02-22 16:08:54 +01:00
Sebastian Göls
dbf7148fbe
Happy new year! (#3121)
Co-authored-by: Sebastian Göls <sebastian.goels@salvagninigroup.com>
2024-01-08 11:33:28 +01:00
Archi
40ab1d848c
.NET 8 code enhancements 2023-12-11 23:55:13 +01:00
Sebastian Göls
0c125db118
Happy new year! (#2809) 2023-01-25 15:43:12 +01:00
Archi
1809028c77
Rider cleanup 2022-01-06 20:22:38 +01:00
Archi
225003c5d1
Try to fix netf, once again into the breach 2021-12-12 01:44:17 +01:00
Archi
4f598d5c8f
Latest Rider cleanups 2021-12-12 01:12:54 +01:00
Archi
1e6ab11d9f
Use file-scoped namespaces 2021-11-10 21:23:24 +01:00
Sebastian Göls
fb4eb0b03a
Use Madness via global usings (#2447)
* Use Madness via global usings

* Apply feedback

* Disable false positive null warning
2021-11-09 16:33:09 +01:00
Archi
7e9e90764b
Use static lambdas wherever possible
Thanks Rider
2021-09-27 21:33:52 +02:00
Łukasz Domeradzki
9f281c6055
Embrace madness (#2394)
* Embrace madness

* Remove unused code

* Misc

* Address Abry's note

* Update for Madness 0.3.0
2021-08-07 14:03:46 +02:00
Archi
05d45bb8cd
Misc 2021-06-14 00:32:23 +02:00
JustArchi
d21d2473fe RuntimeCompatibility -> Compatibility 2021-05-08 01:43:08 +02:00
JustArchi
e60b54e402 Refactor EVERYTHING
Directories structure + namespaces relevant to them
2021-05-08 01:37:22 +02:00
JustArchi
aed11c59ee Cleanup round 2021-05-06 20:44:17 +02:00
JustArchi
b6772b9b1e Resolve CA1034 2021-05-06 20:16:06 +02:00
JustArchi
efec44e593 R# code improvements & cleanups 2021-04-11 00:33:32 +02:00
Sebastian Göls
b8fe02e2b6
Limit full set trades (#2133)
* Limit items to send when looting full sets

* Add test for item limit when looting full sets

* Fix small mistakes

* Change another type to byte

* And another one

* Add test to verify that the amount of appIDs does not matter in limiting the amount of items

* Add maxItems parameter to GetFullItemSets

* Test for exception with too small parameter value

* Let's get the finishing touches on that PR :'<,'>s/byte/ushort/g

* Use named const instead of hard-coded magic number

* Fix the last remaining typecast (hopefully)

* Send as many sets as possible and Add test for this and Check values of amountsToExtract as it is part of the public API

* Remove check for minimum items per set. Plugins could still use this with smaller sets on non-steam items

* Correct force of habit to match the projects code-style
2021-01-18 14:58:25 +01:00
JustArchi
45a5fec95a Happy 2021
And let's hope it'll be better than 2020
2021-01-03 22:24:22 +01:00
JustArchi
a90b49ecd8 Correct tests 2020-11-14 22:41:02 +01:00
JustArchi
e82560259b Final code cleanup 2020-11-14 22:37:00 +01:00
JustArchi
25e549b7e2 Code cleanup after #2004 2020-10-21 18:48:13 +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