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

2332 Commits

Author SHA1 Message Date
Chomp
423daf3ed0 made bonuses match 2024-12-20 19:27:10 +00:00
Chomp
1e7fd6232a Fixed max buy restriction bonus not applying for unheard edition 2024-12-20 19:26:18 +00:00
Chomp
e173b3d361 Added nullguards to removeResourceFromArea 2024-12-20 09:33:13 +00:00
Chomp
04f22601d4 Updated warning logging to be debug inside getExperienceRewardForKillByDifficulty 2024-12-19 21:54:54 +00:00
99ea325013
ProgressWriter: Logic Modifications
- The progress and percentage is now calculated separately.
- The progress bar is removed once the operation has completed.
2024-12-19 16:10:04 -05:00
d9fd560a5b
ProgressWriter: Removes character length checks
In case using emojis is your thing.
2024-12-19 15:49:39 -05:00
4af5f2507a
ProgressWriter: Updates default characters 2024-12-19 15:46:43 -05:00
8926e286bb
Database Import Progress Bar (#987)
Waffle wrote a PR (#986) that shows a progress bar when the database is
populating. I pulled it into a local branch and made some adjustments.

I've tested this on my end and it's working okay. In the compiled
project, and directly in terminals (that *I have installed*) it looks
great, but in VSCode's built in terminal you can see escape characters
at the beginning of the line:


![image](https://github.com/user-attachments/assets/c547a675-5331-44f3-a44e-940edaba6fe8)

I can't figure out why, or how to get rid of it, but it doesn't really
bother me much.

---------

Co-authored-by: waffle-lord <76401815+waffle-lord@users.noreply.github.com>
2024-12-19 09:20:44 +00:00
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
Chomp
fc09a3ff53 Added comments to interface 2024-12-17 17:26:52 +00:00
653b9723b8
Vitest Updates (#985)
Includes updates to Vitest dependencies, a small bug fix, and a
configuration change. All three of which were throwing warnings when the
test suite was ran.

### Dependency Updates:
*
[`project/package.json`](diffhunk://#diff-18e5b8a4dad7b1ed0da6b50ed507b3ab8116e07a8e44abd959a28261878d021fL69-R70):
Updated `@vitest/coverage-istanbul` and `@vitest/ui` to version `^2.1.8`
and added `vitest` dependency.
[[1]](diffhunk://#diff-18e5b8a4dad7b1ed0da6b50ed507b3ab8116e07a8e44abd959a28261878d021fL69-R70)
[[2]](diffhunk://#diff-18e5b8a4dad7b1ed0da6b50ed507b3ab8116e07a8e44abd959a28261878d021fL84-R85)

### Bug Fix:
*
[`project/src/controllers/RepeatableQuestController.ts`](diffhunk://#diff-92e6bd4234ed3c13309eb9bd27437f0933e58dedee51544e9b017b57c2a3c51cL581-R581):
Fixed a bug in the charisma bonus calculation for the `cost.count`
value.

### Configuration Changes:
*
[`project/tests/CustomEnvironment.ts`](diffhunk://#diff-79780538b7a90a5f7befb22838a460f65e3e0bce53d3685f36ed2b74894246a0L9-R9):
Updated the import path for `Environment` from `vitest`.
*
[`project/vitest.config.mts`](diffhunk://#diff-18152746ad4df10b798ca21a09c321bc8ad4adc393ebc6a26016a524203e599cR5-L10):
Added `cacheDir` configuration and renamed the file from
`vitest.config.ts`.
2024-12-16 22:12:30 +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
Chomp
42b3d7abc3 Added nullguard protection to getFriends() 2024-12-15 17:06:20 +00: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
571819906e made eventId property inside IWsNotificationEvent optional + cleaned up TODO 2024-12-14 09:49:34 +00:00
Chomp
85cdcd16c5 Removed unnecessary call inside deleteFriend() 2024-12-14 09:47:32 +00:00
DrakiaXYZ
4614c890a6 Implement basic friends list functionality
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
2024-12-13 21:25:32 -08:00
Chomp
ccc9a8ba5b Removed unused imports
(cherry picked from commit cdd1831f46005825913ca7a4d8ed89428b568528)
2024-12-13 17:06:53 +00:00
Chomp
a027ca017d Removed workaround as underlying issue has been resolved 2024-12-13 09:48:21 +00:00
Chomp
f3fdd4c47d Added "TG-Vi-24 true vaccine" to production quest id mapping blacklist 2024-12-12 16:51:38 +00:00
Chomp
cf6868b3b9 Added code to handle cleaning up of repeatable change requirements 2024-12-12 14:46:55 +00:00
Chomp
32c0bc0348 Added 5 missing properties to quest.json file 2024-12-12 14:02:52 +00:00
Chomp
4b2620093e Moved profile quest management code into its own function 2024-12-12 13:23:52 +00:00
d3d7a6ed35
Adds RandomUtil.randNum that can generate random integers or floating-point numbers within a range.
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.
2024-12-09 21:42:16 -05:00
f278ff9294
Updates RandomUtil.randInt to handle floating-point parameters by flooring values. I hate this! 2024-12-09 21:42:11 -05:00
1074306758
Updates RandomUtil.randInt to return the input when the input values are the same.
Adds a test.
2024-12-09 21:42:05 -05:00
Chomp
90b6f28f31 Added fallback to randInt when min and max are the same 2024-12-10 00:09:43 +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
2abf216a07 Using live data, improved emulation accuracy of repeatable quest system 2024-12-09 23:23:31 +00:00
Chomp
ff5bc64acf Added workaround for non-fence repeatable quests crashing client when the same trader is picked for replacement quest 2024-12-09 15:53:39 +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
Chomp
478b9b3914 Moved repeatablesInProfile nullguard to early in function when it can be helpful + make it check for questToReplace property too 2024-12-09 13:47:37 +00:00
Chomp
aa928ac43d only purge inactive repeatables When repeatableToChangeClone exists 2024-12-09 13:41:06 +00:00
Chomp
8f416c5dee Added logging of quest being replaced when generating new repeatable 2024-12-09 13:30:07 +00:00
Chomp
d9e893149a Improved debug logging when repeatable quest is generated 2024-12-09 13:25:22 +00:00
be88a2224e
Merge branch '3.10.2-dev' 2024-12-07 13:52:24 -05: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