- Backups now have a cooldown, default of 30 seconds
- Backups now have a lock, in the event of a TOC/TOU race condition, the lock will stop duplicate backups
* Fix post-raid health
- Re-add death penalty for limbs
- Correctly set body part HP to 1 for cursed death only
- Use the server profile body part max HP for calculating penalties
- Never modify the body part max HP on the profile
- Remove ResetMaxLimbHp as it's unnecessary if we never update max HP elsewhere
* Formatting
* Remove unnecessary null coalescing
* Stupid formatting
---------
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
* 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>
The chance of a PMC transaction ID overlapping with a trader is slim to none, but the request type can be multiple this for traders. Skip checking type, and validate just using the transaction ID
* First pass at Weather generation refactor
* Moved generation logic around
* Added seasonal variability support
* Expanded weather generation to use DI system and allow easier modding
* Updated weather weight values
Converted records into classes
* Added fallback when generator isn't found
* Fixed colliding lambda
Added method comments
* Cleanup of weather code
* Adjusted `weatherPresetWeight` values
---------
Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
* Initial work
* add todo
* Fix up errors
* More work on CustomQuestService
* Fix mistake
* Remove cloning work, its cancer
* clean-up
* Use TryAdd as a guard
* localize errors
* remove unused exception
* fix using
* fix not passing logging params