Adds missing weapon and ammo types to enums for generated types.
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/290
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
Maintains a timestamp of when each profile was last active on the server.
Timestamp is refreshed on two events: `game/start and `game/keepalive`
Timestamp is used to determine if a profiles hideout should be processed. If a profile has a timestamp older than 90 minutes, it is not processed. (could be set lower but its a conservative value)
This has the side effects of not adjusting the `sptUpdateLastRunTimestamp` property, resulting in `saveProfile()` not running for every profile.
My testing shows a 20x perf increase for every profile in SPT not in use.
Service could likely be used in other scenarios to avoid doing unnecessary work
- Allow fixing the profile even if it has no items in the inventory
- Refactor weapon build fixing so we can re-use it for equipment builds, switch both to be a .filter() call
- Add magazine build fixing, also as a .filter() call
- For any fix that iterates over an array and splices, use Object.entries to create an in-place shallow copy of the array, so we don't skip entries
- Reverse the order of the removeOrphanedQuests loop so we don't skip entries
- Updates the tests for insuranceController methods for v3.8
- Updates the profileInsurance fixture with updated insurance packages for v3.8
- Updated the profileInsurance factory to remove outdated references as of v3.8
- Made the sessionId parameter for generateBotNickname optional and marked it as deprecated, to be removed in v3.9. It wasn't being used.
- Refactored the tests for the generateBotNickname method in the BotGenerator class. Mostly to bring it inline with v3.8 changes to the structure of botGenerationDetails.
- Removes unused code from getRepairableItemQualityValue in itemHelper
- Updated tests for getRepairableItemQualityValue to no longer assume a special calculation for armour
- Added tests for adoptOrphanedItems (moved from insuranceController)