0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

627 Commits

Author SHA1 Message Date
Chomp
7caec6efad Added system to insert items into bot storage areas during seasonal events - Used to add Christmas items to scavs 2024-12-18 23:51:25 +00:00
a38dac1e4e
Backup Service Profile Directory Error
This changes the backup service to log in debug instead of error when the profiles directory can't be found. The profiles directory will not exist on initial run, so this is actually expected to catch until it's created.
2024-12-15 23:29:18 -05:00
ef14ad27e1
Profile Backups (#983)
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>
2024-12-14 10:20:45 +00:00
Chomp
ccc9a8ba5b Removed unused imports
(cherry picked from commit cdd1831f46005825913ca7a4d8ed89428b568528)
2024-12-13 17:06:53 +00:00
Chomp
be31f7248f Moved reward fitting code into its own function, moved logic around 2024-12-10 00:01:40 +00:00
Chomp
b4061b3e41 Better handle cultist rewards not fitting the container (#979)
Better handle rewards not fitting (they shouldn't just poof) by instead
trimming the rewards amount until they fit.

(cherry picked from commit 8d05bf0069b22968d7e4fcdc4901ae0babd948c3)
2024-12-09 23:30:57 +00:00
Chomp
53599e46f3 Wired up item type blacklist across loot generator/airdrop and cultist circle in consistent way
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
2024-12-09 15:03:21 +00:00
Chomp
55857a7e7a Wired up Cultist circle to use item type blacklist 2024-12-09 14:44:28 +00:00
Chomp
b41d8683b3 Added array to config to allow ignoring of item types from rewards, wired up function in itemFilterService to return values + Added built in inserts to blacklist 2024-12-09 14:41:42 +00:00
21939dcf38
Biome Format
Ran the `npm run style:fix` command. These are the code-formatting fixes.
2024-12-07 13:50:09 -05:00
Chomp
ec517bba2c Expanded error message 2024-12-07 11:43:50 +00:00
Chomp
6a4bd7ba3f Removed spammy log message 2024-12-07 11:42:21 +00:00
Chomp
07699e4144 Removed unused varaible 2024-12-07 11:42:09 +00:00
Chomp
fe482127ab Added null protection to addHideoutEliteSlots() when profile lacks a generator 2024-12-07 11:41:51 +00:00
Chomp
b211b40c13 Added more comments 2024-12-07 10:13:47 +00:00
Chomp
3867ff336e Moved circle-specific types into correct location in project + renamed them for clarity 2024-12-07 10:05:32 +00:00
Chomp
050edec9f3 Renamed getRandomLoot to generateRandomisedItemsAndAddToRewardPool
Removed hard-coded money/ammo blacklist from `generateRandomisedItemsAndAddToRewardPool()` and moved into config
Updated function to check chosen reward items parentid against item reward blacklist
2024-12-07 10:04:12 +00:00
Chomp
b20777e1c3 Removed unnecessary comments 2024-12-07 09:54:26 +00:00
Chomp
0c02591422 Refactored code into separate functions 2024-12-07 09:53:21 +00:00
Chomp
7284bb2fdc Fixed getCultistCircleRewardPool erroring when trying to access a hideout area stage that doesnt exist 2024-12-07 09:49:49 +00:00
Chomp
66c1d23df2 Fixed cultist circle saving direct rewards to the profile incorrectly 2024-12-07 09:44:12 +00:00
Chomp
83a3fb16fe Fixed cultist circle returning direct weapon/armor rewards without mods 2024-12-07 09:43:41 +00:00
Chomp
d2b7baa8b6
Cultist circle improvements (#973)
Brings Cultist Cicle rewards closer to live behavior.

---------

Co-authored-by: Bob S <shibdib@users.noreply.github.com>
Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
2024-12-06 17:15:06 +00:00
DrakiaXYZ
d34eca32bb
Further favorite item/weapon functionality and fixes (#974)
- Resolve issue where we were storing favorites in the incorrect format,
resulting in a client error on game load
- Resolve issue where we were clearing favorites when they were meant to
be saved
- On login, fix any previously corrupted favorites array
- Properly implement favorite data in `getOtherProfile`, now shows your
favorites when viewing your profile

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2024-12-06 17:14:19 +00:00
Chomp
e7f5db9f0a Fixed generateUniqueBotNickname() failing when no data is passed into its optional parameter 2024-12-06 16:49:39 +00:00
Chomp
9ef8206517 Updated sortModKeys() to use mount-specific mod sorting, prioritises the scope before additional mounts
Fixed null ref exceptions due to some items lacking `slots` objects
2024-12-06 16:20:18 +00:00
Chomp
e8c3b69975 Reordered checks to slightly reduce processing required for check 2024-12-06 15:43:20 +00:00
Chomp
0397c9e121 Improved weapon mod limit check for mounts - do not prevent sub-mounts being added to existing mounts (e.g. red dots on top of scope mounts) 2024-12-06 15:42:53 +00:00
Chomp
93c34bd189 Added edge-case handling of PT locale inside getPlatformForServerLocale() 2024-12-01 19:09:49 +00:00
Chomp
6562d05142 Fixed configureZombies() incorrectly handling location ids 2024-12-01 10:21:47 +00:00
Chomp
016fc2a51e Ensure verifyQuestProductionUnlocks() skips quests that cannot be found in db 2024-11-30 22:42:02 +00:00
DrakiaXYZ
8b1a3158cb Add quest production unlocks to the PMC Profile fixer service 2024-11-30 10:08:51 -08:00
Chomp
063d1eaea8 Added forceSnow to seasonal mod event
Moved majority of code into `handleModEvent` to help modders handle custom events via method overriding
2024-11-30 14:13:18 +00:00
Chomp
dd88571e29 Flagged christmas gifts as being part of christmas event 2024-11-30 12:23:43 +00:00
Chomp
967330132f Formatting changes 2024-11-24 18:33:23 +00:00
Chomp
effcc37e68 Fixed checkForAndFixPickupQuestsAfterDeath() running when the player was alive
Removed old code that did the same but wasn't working
2024-11-24 18:29:04 +00:00
Chomp
6ef18e1835 Made getDesiredServerLocale() public 2024-11-24 17:52:48 +00:00
Chomp
946cf10659 Second pass at ensuring failed quests let player pick items up in raid
Now checks if multiple quests match requirements, fails when >1
2024-11-24 17:00:10 +00:00
Chomp
7ba772d458 Fixed issue where player dying with a quest item would prevent the quest item from appearing in a raid again due to the profile flagging the quest item as being picked up 2024-11-24 15:47:03 +00:00
Chomp
320835f122 Fixed dep injection issue causing server to not start - http server isn't capable of injecting DatabaseService
Made `PostDbLoadProcess` error out if db validation fails
2024-11-23 15:38:58 +00:00
DrakiaXYZ
9a8cf9a8a9 Add MongoID validation to databaseService
- Validate that quests, traders, items and customizations all have MongoID IDs
- If any validation fails, output an error and stop server startup
2024-11-22 23:01:11 -08:00
Dev
898582fff9 Log when player begins transit to new map 2024-11-22 18:46:57 +00:00
Dev
218c720cdb Add extra check to transit code inside endLocalRaid() 2024-11-22 15:10:45 +00:00
Dev
75caa6d989 Fixed casing issue with getLocationFromInfectedLocation() 2024-11-21 13:16:13 +00:00
Dev
9632238fab Added removeInvalidTradersFromProfile to core.json config to allow cleanup of incorrect trader data in profile 2024-11-20 10:49:18 +00:00
Dev
1aecd7680e Merge branch '3.10.0-DEV' of https://dev.sp-tarkov.com/SPT/Server into 3.10.0-DEV 2024-11-20 09:49:50 +00:00
Dev
0c5ecefc41 Refactored scavcase reward code to use correct data and interfaces 2024-11-20 09:48:42 +00:00
5ab3ee722e Fix issues caused when having NewSpawn enabled (!430)
- When NewSpawn is active, clear spawn waves sent to the client
- Copy `maxBotCap` to both BotMaxPvE and BotMax, as the client only reads BotMax

These changes cause bots to abide by the NewSpawn parameters when NewSpawn is enabled, as previously it was combining bot waves and dynamic spawning resulting in bots instantly respawning

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT/Server#430
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-11-20 09:20:59 +00:00
Dev
59eb80f29b Fixed configureZombies() not correctly handling factory or sandbox maps 2024-11-19 19:15:25 +00:00
Dev
d6a5c25b20 Cleanup of survival state code
Moved hard coded fence rep values into trader config
Improved outcome debug logging
2024-11-16 20:22:24 +00:00