Commit Graph

83 Commits

Author SHA1 Message Date
Chomp 01570a1621 Improved locking inside RagfairRequiredItemsService
Comment and name improvements
2025-09-08 10:58:08 +01:00
Chomp e5d0af3890 Formatting and naming consistency changes 2025-09-02 14:27:10 +01:00
Chomp 307071fa9f Moved GC to later in map gen
Store Mongoid correctly
2025-08-29 09:48:14 +01:00
Chomp 71b33a174b Only log profile save time when there's more than 1 profile 2025-08-21 15:06:30 +01:00
Jesse 80f759a0da Http server router refactor (#553)
* Add edge case for Reverse Proxies

* Cleanup HttpListener, remove unecessary MemoryStreams

* Handle with IPAddress instead of string

* Handle nullabiity of RouteAction, tighten typing on requests

* Cleanup HttpRouter

* Use tighter typing on Routers
2025-08-18 17:59:07 +00:00
Chomp 485883f216 Merge branch 'develop' of https://github.com/sp-tarkov/server-csharp into develop 2025-08-17 16:29:08 +01:00
Chomp c87bace62c Made RagfairRequiredItemsService cache generate on use instead of every Update() 2025-08-17 16:28:58 +01:00
Archangel ab4545b3b5 Update exception 2025-08-17 17:19:24 +02:00
Archangel 35568adb0b Handle DB nullability 2025-08-17 17:17:39 +02:00
Chomp cf35b9f66f Update comment 2025-08-17 15:50:30 +01:00
Jesse 60958b3d24 Merge pull request #544 from sp-tarkov/remove-warnings
Remove unused dependencies and improve code quality
2025-08-12 19:26:05 +02:00
Chomp 4a081a7ac3 Updated class param formatting 2025-08-11 21:08:55 +01:00
Chomp 67f7b762e8 Improved profile lookup safety of IsProfileInvalidOrUnloadable 2025-08-09 11:51:47 +01:00
Lacyway d468848b0c Improve MongoIds (#537)
* Mongoid improvements pt1

* Format Style Fixes

* Fix incorrect string

* Fix != comparison

---------

Co-authored-by: sp-tarkov-bot <singleplayertarkov@gmail.com>
2025-08-09 11:50:49 +01:00
Chomp 5cd5ed1f42 Refactored logic of ragfairServer.update()
typo fixes
2025-08-06 15:17:34 +01:00
Archangel c3b36f4c7d Handle invalid profiles on all IOnUpdate 2025-08-05 17:20:49 +02:00
Archangel d5514c6bb4 Only write InvalidOrUnloadableProfile if it's not null 2025-08-05 16:59:45 +02:00
Jesse c7e40deb90 Add support for partially loading invalid profiles (#533)
* Add support for partially loading invalid profiles

* Return early in exception
2025-08-05 15:25:47 +01:00
sp-tarkov-bot b14b74bf24 Format Style Fixes 2025-07-28 19:39:29 +00:00
Chomp 83cb707551 Updated comment styles 2025-07-27 12:56:09 +01:00
Chomp 856fa0633d List to IEnumerable changes
Removed use of tolist()
2025-07-25 15:57:57 +01:00
Chomp 34bd002876 list to ienumerable changes
Removed unused methods

strong to mongoId changes
2025-07-25 12:28:40 +01:00
Chomp 8865484e2b string to MongoId changes 2025-07-21 14:52:30 +01:00
Chomp 3901a91f45 Improved how ragfair offer creator status is checked - store creator type in offer
Converted `IsTraderOffer` into extension method
string to mongoid conversions
2025-07-21 13:36:51 +01:00
Chomp e20c56e4f1 Improved transition from string to mongoId inside httpListener 2025-07-18 17:12:11 +01:00
clodanSPT 1af50bfd34 Application cleanup (#485)
* Changed application to use background services and removed hacky http server startup

* Small improvements and method removals

* Removed Core dependency on Web application SDK

* Fixed wrong imported type

---------

Co-authored-by: Alex <clodanSPT@hotmail.com>
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2025-07-18 16:21:24 +01:00
Chomp 42d2e3f7ea Updated properties to not be nullable + various fixes 2025-07-16 14:57:24 +01:00
chompDev 58068f7c6a .NET Format Style Fixes 2025-07-16 10:34:34 +00:00
Lacyway 32510bd67f Add SendMessageToAll method (#484)
* Fix typo

* Add SendMessageToAll method
2025-07-16 11:34:05 +01:00
Chomp 040be2feaa More strings to MongoIds
Convert constructors into primary constructors

Simplified logic with use of ??, ??= and method groups

Cleaned up redundant conditional access qualifiers
2025-07-14 22:29:41 +01:00
Chomp 6f3ce60cec Simplified calls to .Remove() 2025-07-14 20:02:46 +01:00
Jesse 533a7356fd Add new service to handle profile migrations (#468)
* Add new service to handle profile migrations

* Handle various null checks

* Remove unecessary assignments

* Further works on this:

- Loads profiles as JObject's initally, so migration can take place on profiles that don't have proper compatability
- Adds prerequisite migrations, and sorts them after one another

* Throw exception if profile can't be deserialized after migration

* Cleanup & use profile version

* Further migrations work, support 3.10 & 3.11 profiles upgrading to 4.0

* Update parameter name
2025-07-11 13:11:02 +01:00
Chomp 7bda1b525f Updated acceptableFileExtensions to be a frozenSet
Removed more boxing
2025-07-07 13:31:39 +01:00
Cj 0b18b7e4ba Convert routers and callback sessionIds to MongoIds (#453)
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2025-07-06 10:19:56 +01:00
Chomp 2609db2536 Removed unused injections 2025-07-04 09:40:22 +01:00
Jesse ebe8f9ded5 Mongoid changes (#440)
* Remove old IsValidMongoId and Regex

* Convert more configs to MongoId, as well as BaseClasses

* Remove HashUtil.Generate(), replaced with new MongoId()
2025-07-03 15:42:16 +01:00
Jesse 6ac747d18d Begin converting some id's to MongoId (#435)
* Begin converting some id's to MongoId

* Remove nullability on MongoId's

* Update trader MongoId's
2025-06-30 15:25:47 +01:00
Jesse 5686f4a486 Remove I18nService, migrate to renamed ServerLocalisationService (#433)
* Remove I18nService, migrate to renamed ServerLocalisationService

* Revert VS fuckup

* Update using

* Remove unused parameter, update comment

* Fix develop branch not building
2025-06-28 19:08:42 +01:00
Chomp da5644cfa2 made properties readonly 2025-06-28 12:53:21 +01:00
Chomp d11ffd38d7 Updated JSONs for 37711 + added new properties to globals.cs 2025-06-23 17:18:44 +01:00
Chomp 26ce1d9562 Clone offer items prior to processing them as we delete them all in line below 2025-06-19 14:31:58 +01:00
refringe 6e01428b2b .NET Format Style Fixes 2025-06-18 17:09:20 +00:00
Chomp b69544ae2c Added lock to GetStaleOfferIds
Made `RagfairRequiredItemService` a singleton
Made `RagfairRequiredItemService ` store offerIds instead of offer objects, reducing memory footprint
Reworked `GetOffersThatRequireItem` to work with `RagfairRequiredItemService` changes
Moved `GenerateDynamicOffers` to run after garbage colelction, this means GC will work on memory prior to new offers being added but after stale offers are removed

Made `PaymentHelper` a singleton + Store currency tpls in a hashset instead of list

Comment improvements
2025-06-16 14:46:37 +01:00
Chomp e869f6ebef Refactored ragfair code for improved readability 2025-06-16 13:00:06 +01:00
Cj 07f57e16a8 Task: Rename Assets folder to SPT_Data (#394)
* Rename `Assets` to `SPT_Data`

* Added GZ 20+ variant to repeatable quest system #395

* Repeatable code cleanup

* Removed PMC level check for repeatable Quest pool generation #395
they will always generate for both GZ variants

* Rename `Assets` to `SPT_Data`

---------

Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
2025-06-15 09:54:33 +01:00
Chomp e596974d07 Cleaned up usings 2025-06-14 16:43:24 +01:00
Jesse 2c52012740 Further async changes (#387)
* Further async changes
- SaveServer & Backup Server are now async
- Anything that ties in with SaveServer saving (Such as callbacks) are now async
- Various async util methods added
- Removed two wrapper methods and switched code over to use the actual method

* Update test
2025-06-09 20:09:12 +01:00
Jesse 2ff286e5ed Handle closure of WebSockets better, improve formatting of code (#383)
* Handle closure of WebSockets better, improve formatting of code

* Update comment
2025-06-09 08:56:07 +01:00
Chomp 9dd62471e8 Fixed typo 2025-06-05 09:51:30 +01:00
Chomp a92994e50b Changed Error handling request to critical 2025-06-04 19:58:04 +01:00