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

3936 Commits

Author SHA1 Message Date
Chomp
ada2fd7717 Updated bot loot weights
(cherry picked from commit bd5dd9df9bd9cfe2ea82c7d368e5fd7c6bfd9071)
2024-12-13 17:06:44 +00:00
Chomp
9bf6ee3a5e Updated bot JSON data 2024-12-13 10:08:46 +00:00
Chomp
a027ca017d Removed workaround as underlying issue has been resolved 2024-12-13 09:48:21 +00:00
Chomp
f12a5d3029 Updated location data 2024-12-12 22:31:30 +00:00
Chomp
a9c05980df Updated flea prices + sort dictionary by key 2024-12-12 17:01:35 +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
bd8cc26535 Updated JSONs 2024-12-12 16:51:10 +00:00
Chomp
dc3258d986 Full refresh of trader assorts 2024-12-12 16:17:52 +00:00
Chomp
9f0f09707c Fixed 2 additional placeholder quest reward properties 2024-12-12 16:17:26 +00:00
Chomp
f743d1f59d Fixed placeholder quest reward properties for reconnaissance 2024-12-12 16:10:28 +00:00
Chomp
cf6868b3b9 Added code to handle cleaning up of repeatable change requirements 2024-12-12 14:46:55 +00:00
Chomp
8f001ff8f0 Updated spanish locale 2024-12-12 14:25:43 +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
Chomp
dd5d26fe36 Added O-832DU Shrapnel to blacklist 2024-12-11 09:05:44 +00:00
Chomp
9f551d0e41 Updated server locales 2024-12-10 13:25:10 +00:00
Chomp
9c1f692746
RandomUtil Changes (#980)
This pull request introduces several enhancements and fixes to the
`RandomUtil` class in the `project/src/utils/RandomUtil.ts` file, as
well as corresponding updates to the test suite in
`project/tests/utils/RandomUtil.test.ts`. The primary changes include
the addition of new methods for determining number precision and
generating random numbers with specified precision, as well as
improvements to existing methods to handle edge cases and log warnings
appropriately.

Enhancements to `RandomUtil` class:

* Added `MAX_SIGNIFICANT_DIGITS` constant to define the safe upper bound
for significant digits in floating-point numbers.
* Introduced `getNumberPrecision` method to determine the number of
decimal places in a number, addressing floating-point precision issues.
* Enhanced `randInt` method to handle float inputs by logging a warning
and rounding to the nearest integer.
* Added `randNum` method to generate random numbers between two values
with optional precision, including validation for precision and handling
of edge cases.

Updates to test suite:

* Added tests for the new `getNumberPrecision` method to verify correct
handling of various numeric inputs.
* Expanded tests for `randInt` to cover scenarios with equal low and
high values, float inputs, and logging of debug messages.
* Added comprehensive tests for the new `randNum` method to ensure
correct functionality across different ranges, precision levels, and
edge cases.
2024-12-10 09:53:01 +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
ee07bd8c0f Revert "Better handle cultist rewards not fitting the container (#979)"
This reverts commit 8d05bf0069b22968d7e4fcdc4901ae0babd948c3, reversing
changes made to d5ce6c4d709f000972ae9f9fdb596eba98184f29.
2024-12-09 23:30:22 +00:00
Chomp
8d05bf0069
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.
2024-12-09 23:26:23 +00:00
Chomp
2abf216a07 Using live data, improved emulation accuracy of repeatable quest system 2024-12-09 23:23:31 +00:00
Bob S
0527fc2cc8 Better handle rewards not fitting (they shouldn't just poof) by trimming the rewards amount until they fit. 2024-12-09 17:55:10 -05:00
Chomp
a15a28e460 Updated JSON data 2024-12-09 20:19:28 +00:00
Chomp
7092c9991c Locked event quest behind config 2024-12-09 20:17:47 +00:00
Chomp
bfacb09268 Added Thats a Great Plan Walter quest 2024-12-09 19:33:46 +00:00
Chomp
d5ce6c4d70
Revise PMC names (#978) 2024-12-09 19:06:40 +00:00
stella
631c63a817 Revise PMC names 2024-12-09 09:56:21 -07:00
Chomp
f6c575ac5e Updated version number 2024-12-09 16:55:07 +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
b3683f2f23
Image Asset LFS Transfer (#977)
This PR includes changes to the `.gitattributes` file to ensure images
are now stored on the custom LFS server.
2024-12-09 14:28:31 +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
c3cd67d8b9 Moved Christmas start day from 7th to 12th 3.10.2 2024-12-07 11:56:08 +00: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
a431a3454b Removed duplicate face plate from killa helmet reward 2024-12-07 11:16:16 +00:00