Commit graph

27 commits

Author SHA1 Message Date
Łukasz Domeradzki
5e81c3fdef
Closes #3175 2024-03-29 14:44:07 +01:00
Archi
b86f83a634
Misc 2024-03-17 02:54:28 +01: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
Łukasz Domeradzki
6b0bf0f9c1
Closes #3061 (#3145)
* Good start

* Misc

* Make ApiAuthenticationMiddleware use new json

* Remove first newtonsoft dependency

* Pull latest ASFB json enhancements

* Start reimplementing newtonsoft!

* One thing at a time

* Keep doing all kind of breaking changes which need to be tested later

* Add back ShouldSerialize() support

* Misc

* Eradicate remaining parts of newtonsoft

* WIP

* Workaround STJ stupidity in regards to derived types

STJ can't serialize derived type properties by default, so we'll use another approach in our serializable file function

* Make CI happy

* Bunch of further fixes

* Fix AddFreeLicense() after rewrite

* Add full support for JsonDisallowNullAttribute

* Optimize our json utilities even further

* Misc

* Add support for fields in disallow null

* Misc optimization

* Fix deserialization of GlobalCache in STD

* Fix non-public [JsonExtensionData]

* Fix IM missing method exception, correct db storage helpers

* Fix saving into generic databases

Thanks STJ

* Make Save() function abstract to force inheritors to implement it properly

* Correct ShouldSerializeAdditionalProperties to be a method

* Misc cleanup

* Code review

* Allow JSON comments in configs, among other

* Allow trailing commas in configs

Users very often add them accidentally, no reason to throw on them

* Fix confirmation ID

Probably needs further fixes, will need to check later

* Correct confirmations deserialization

* Use JsonNumberHandling

* Misc

* Misc

* [JsonDisallowNull] corrections

* Forbid [JsonDisallowNull] on non-nullable structs

* Not really but okay

* Add and use ToJson() helpers

* Misc

* Misc
2024-02-21 03:09:36 +01:00
Archi
042fadca28
Merge branch 'main' of https://github.com/JustArchiNET/ArchiSteamFarm 2024-01-11 16:46:48 +01:00
Archi
4a9e6f6cc6
Deprioritize bots with 1-game inventory
Those are usually stash accounts, and while we still want to match them, we can leave them only as a last resort if no other bots are available.

This decreases chance of hitting a bot that was just recently turned off or had its items traded away, as what usually happens with such accounts.
2024-01-11 16:46:45 +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
92858de9e2
Misc 2023-12-05 00:04:38 +01:00
Archi
a3aa93fce8
Fix diff announcement with no items added/changed 2023-12-03 16:11:38 +01:00
Archi
def3e26c92
Closes #3084 2023-12-03 13:48:51 +01:00
Archi
eff60bf307
Implement background announcements for ASF STM
This will be used exclusively by users with extraordinary large inventories, or if ASF backend will just be slower than usual.
2023-12-02 19:36:34 +01:00
Łukasz Domeradzki
36ae066c65
Closes #3073 (#3077)
* Initial implementation of announce with diff

* Add missing logic pieces

* Change in logic

* Fix checksums

* Add deduplication logic

* Update SetPart.cs

* Use standalone endpoint for diff

* Use different hashcode impl

* Update AssetForListing.cs

* Misc

* Push all the changes for this to finally work

* Use original index rather than self-calculated

ASFB makes some calculations based on index, it's better for us to have holes rather than hiding skipped items.

* Handle edge case of no assets after deduplication

* Remove dead code

* Address trim warnings

* Misc optimization
2023-11-29 00:08:16 +01:00
Łukasz Domeradzki
b34f18497d
.NET 8 (#3005)
* Initial .NET 8

* Make it compile in release mode ignoring warnings for now

* First round of improvements

* Second round of improvements

* Third round of improvements

* Use new throws

* Fix .NET Framework, YAY, thanks madness!

Madness devs are awesome

* Misc

* Misc

* AF_NETLINK might be required for some http calls

No clue why

* Fix service files

Doesn't do what it should

* Update CardsFarmer.cs

* New improvements

* Address feedback

* Misc

* Misc

* Misc refactor

* Misc
2023-11-14 19:12:33 +01:00
Archi
d7722fae84
Misc code cleanup 2023-06-29 21:56:05 +02:00
Sebastian Göls
0c125db118
Happy new year! (#2809) 2023-01-25 15:43:12 +01:00
Archi
4cb8244353
Move to announce endpoint v3
By using ordered list for json body, we can further minimize amount of data sent by getting rid of the index.

We still need previous asset ID, as we send only a subset of real data and server is unable to calculate it from the data sent.
2023-01-21 20:32:42 +01:00
Archi
fc93f86060
Improve preferences of matching
We should try to match smallest bots first, but since assets are deduplicated exclusively for us, we should use total inventory count instead
2023-01-15 01:04:15 +01:00
Archi
e5ff2e9f02
Include TotalInventoryCount for the backend 2023-01-15 00:16:53 +01:00
Archi
e6e82e19bd
Cut excessive data from announcement
Now that we don't need to transmit whole inventory to the backend anymore, we can cut it to matchable types only
2023-01-14 15:08:28 +01:00
Archi
097ac05ceb
Remove assetID from inventories request
Backend doesn't need to know that
2023-01-11 19:16:38 +01:00
Archi
4895a95794
Decrease size of the request
We reached a point where it actually matters whether we say "realAppID" or just "r", since we're doing this sometimes even 600k times, multiplied by 9 properties that we have
2023-01-11 18:40:46 +01:00
Archi
3cadcd16b4
Help ArchiNet calculating previous asset IDs if possible 2023-01-11 18:34:31 +01:00
Archi
71a52eb3b2
Remove unnecessary information from inventories request 2022-12-23 15:31:14 +01:00
Archi
4e382732d9
Misc refactor 2022-12-15 19:16:28 +01:00