Here's a jumping off point for the profile backup feature. Included some
basic configuration options. Currently backup runs on server start-up
(before the profiles are loaded into memory) and on a configurable
interval.
I think it still needs work.
- [x] The folder name dates should be used to detect which old backups
should be removed
- [x] Not sure about the interval implementation...
- [x] Could make the clean method thinner
- [x] Remove VFS; I don't believe it's needed for copy operations
- [x] Save a list of active mods used by the backed up profiles
---------
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
This commit implements basic friends list functionality including adding, auto accepting, and removing friends. As well as storing the list in the profile and providing the friends list back to the client on login.
This is a one-way implementation, the target profile will not have the source account added to its friends list.
This is primarily useful in combination with the recent favorites fixes, to allow users to inspect favorited weapons on other profiles to "copy" weapon builds between their profiles
Adds a public `randNum` method to the `RandomUtil` class which can be seen as a "superseeded" version of the `randInt` method. It can handle generating random numbers, including both integers or floating-point numbers with support for providing a precision.
Adds a private `getNumberPrecision` method to the `RandomUtil` class which simply counts the number of fractional digits in a number.
Changes `randInt` to log a debug message saying that the ability to pass it a floating-point number is deprecated.
Better handle rewards not fitting (they shouldn't just poof) by instead
trimming the rewards amount until they fit.
(cherry picked from commit 8d05bf0069b22968d7e4fcdc4901ae0babd948c3)
Reworked Cultist circle code to pass blacklist around as a set rather than array
Removed cultist circle use of `itemRewardBlacklist` to store item parent ids, feature is handled by new config property