Commit Graph

96 Commits

Author SHA1 Message Date
Chomp 2891fd41fd Improved ConfigServer obsolete messages 2026-03-02 17:36:33 +00:00
Archangel 87b2597ebc Add obsolete markers from 4.1 2025-11-14 18:10:02 +01:00
Chomp 3d5cc4ca03 Fixed message_send_failed_with_error log message 2025-11-11 09:52:33 +00:00
Archangel 4eecb485c6 Mark various removed implementations as obsolete 2025-11-05 14:41:28 +01:00
DrakiaXYZ a524dc47dd Merge pull request #658 from DrakiaXYZ/fix-savecontention
Fix potential file access contention in SaveProfileAsync
2025-10-25 21:43:14 +00:00
DrakiaXYZ 47089afdd1 Further attempt to resolve profile corruption issues (#650)
* Further attempt to resolve profile corruption issues
- FileUtil now uses File.Replace and does a sync flush
- Add restore capabilities to BackupService
- If loading a profile fails, attempt to restore from the most recent backup
- Trigger a backup creation on raid start, raid end, and game close
- Load profiles before starting the backupService to avoid backing up corrupt profiles

* - Switch async calls to .GetAwaiter().GetResult() for better exception handling

---------

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
2025-10-23 07:49:24 +02:00
Chomp 813e00479d Validate filename is mongoId before we load it as profile #648 2025-10-21 16:52:23 +01:00
DrakiaXYZ a5fe584cee - Pass through main exception on json deserialization failure
- Fix below to above
2025-10-18 11:13:10 -07:00
DrakiaXYZ 5a6f560736 Harden config loading against exceptions
- Extra files in the `config` folder are now skipped
- Exceptions deserializing now output what file failed and the exception more clearly
2025-10-18 11:07:07 -07:00
Archangel 211e6a62b9 Remove unused service 2025-09-20 17:01:56 +02:00
Archangel d9e660f5b5 Remove unecessary double log 2025-09-20 16:58:20 +02:00
Archangel 72559be340 Dont handle RequestDelegate in SptHttpListener anymore 2025-09-20 16:57:04 +02:00
Jesse ef6e3b8c3a Http server refactor (#593)
* Refactor various parts of the HttpListener to support Blazor loading

* Add logging for WebSocket requests

* Add better handling for WebSockets not belonging to SPT

* Remove unecessary check

* Remove check as it's already handled earlier now

* Cleanup

* Set delegate
2025-09-20 14:05:23 +00:00
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