Commit Graph

2272 Commits

Author SHA1 Message Date
Cj
37ec7bc9d1 Type fixes (!290)
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>
2024-04-15 12:47:44 +00:00
Dev
29ef7769ee Update akiVersion property inside core.json 2024-04-15 09:07:44 +01:00
Dev
9c81df91d1 Fixed itemDelivery() failing when trader lacks a dialogue object (incorrectly configured custom traders) 2024-04-15 09:06:11 +01:00
Dev
8cbc51d20e Revert "Merge branch '3.9.0-DEV' into 3.8.1-DEV"
This reverts commit 6121e65b4e, reversing
changes made to 10b1b2b3aa.
2024-04-15 09:00:52 +01:00
chomp
6121e65b4e Merge branch '3.9.0-DEV' into 3.8.1-DEV 2024-04-15 07:57:24 +00:00
Dev
10b1b2b3aa Added nullguard when req.socket.remoteAddress is null inside handleRequest() 2024-04-15 00:06:53 +01:00
Dev
ad54e7ae98 Fixed itemAllowedInContainer() failing when filter object is null 2024-04-14 19:33:44 +01:00
Dev
d31eedf92b Fixed itemAllowedInContainer() failing when the filter or excluded filter objects are null 2024-04-14 19:32:11 +01:00
Dev
0d6239ea42 Added getActiveProfileIdsWithinMinutes() to ProfileActivityService 2024-04-13 23:04:17 +01:00
Dev
33496aa5c3 Merge branch '3.8.1-DEV' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.1-DEV 2024-04-13 12:47:12 +01:00
Dev
a9d89695f0 Added new service ProfileActivityService
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
2024-04-13 12:46:43 +01:00
DrakiaXYZ
272050c7cf Fix some issues in the ProfileFixerService
- 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
2024-04-12 21:58:37 -07:00
Dev
73a1dd9511 Split out static/dynamic magazine fill options in config
set static mag fill to 0%
2024-04-12 23:05:27 +01:00
Dev
a33325cbf5 Revert change to minFillStaticMagazinePercent 2024-04-12 22:12:26 +01:00
Dev
765c2ae270 Only send failed message to player if failure message text length is great than 0 (after having whitespace trimmed) 2024-04-12 11:29:50 +01:00
Dev
364e590960 Improved logic for failing a quest - will never send a failed message for daily 2024-04-12 11:20:30 +01:00
Dev
9dc8211268 Refactored fence partial refresh code to be more generic and shared between normal/discounted assorts 2024-04-12 11:08:32 +01:00
Dev
a5924dbe0d Fix incorrect calculation for normal fence assort count 2024-04-12 10:36:24 +01:00
Dev
1c660fcf4e Reduced magazine fill size to 0 for static loot to match live 2024-04-12 09:50:37 +01:00
Dev
61d63d9ca6 Slightly reduce mp7a1/2 weighting on PMCs 2024-04-12 09:33:17 +01:00
Dev
d60cdb6be2 Separate out address used by backend to assist with users who have locked down local machines and cannot connect to a local http server
Remove unsed ip/port property assignment on server start that wasn't used anywhere
2024-04-12 09:27:15 +01:00
Refringe
8cf8688eba
Spelling Mistake 2024-04-11 21:18:38 -04:00
Refringe
0e63ced3ac
Test - Insurance - Updates for v3.8
- 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
2024-04-11 21:18:38 -04:00
Refringe
4a0d3c3487
Test - BotGenerator - Refactored
- 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.
2024-04-11 21:18:37 -04:00
Refringe
b59ffd8ff2
Test - InRaidHelper
- Removes tests for missing calculateFenceStandingChangeFromKills method
- Adds a test for the resetSkillPointsEarnedDuringRaid method
2024-04-11 21:18:36 -04:00
Refringe
5aebbb9c86
Test - ItemHelper - 3.8 Refactor
- 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)
2024-04-11 21:18:36 -04:00
Refringe
7d3eaf735a
Test - PaymentService - Refactored payMoney test
Refactored the payMoney test to work with 3.8. The output is no longer returned, but updated by reference.
2024-04-11 21:18:35 -04:00
Dev
fe7ef06c6c Dont force regen stims into PMC secures, may cause problems 2024-04-11 16:29:52 +01:00
Refringe
1cd4b055eb
Test - Updates ItemBaseClassService tests to inline with recent code changes 2024-04-10 23:16:04 -04:00
Refringe
c123c034cf
Test - Updates ItemHelper Tests
- Removes tests for a method that no longer exists: `generateItemsFromStackSlot`
- Updates a test to use a mock to ensure test data reliability
2024-04-10 23:13:46 -04:00
Refringe
0ec0b7a40c
Test - Updates fromRUB tests to use mocks 2024-04-10 23:10:17 -04:00
Refringe
68c2358b08
Test - Adds missing property to mock of BotGenerationDetails 2024-04-10 23:07:41 -04:00
Refringe
85aec72a63
Test - Updates the experince needed to reach level 79 2024-04-10 23:06:40 -04:00
Dev
e48362ae6e Added setting to allow/deny player wiping a profile via launcher - default true 2024-04-10 22:49:26 +01:00
Terkoiz
6f98d0c696 Fixed bad name 2024-04-10 21:38:25 +03:00
Terkoiz
341a99f883 Adjusted PMC names list 2024-04-10 21:30:50 +03:00
Dev
885205c742 Fixed fence slowly losing assorts over time 2024-04-10 18:47:51 +01:00
Refringe
3d77ed8595
Seperates ragfair pricing into seperate method
This changes the `RagfairPriceService.getDynamicOfferPriceForOffer()` method to handle the logic surrounding collecting prices for items in offers, while offloading the individual price generation to a new method. The new method, `RagfairPriceService.getDynamicItemPrice()`, is responsible for generating a price for either an item template, or optionally an offerItems collection. This change also allows `getDynamicItemPrice()` to be used elsewhere in the code-base to gather more "realistic" pricing for specific item templates.

Fixes an edge-case where unreasonable prices would only be adjusted on the first item within an offer.

Includes some tests.

Related to #618. This will allow the insurance system to use this method to get better pricing for items.
2024-04-10 12:23:28 -04:00
Refringe
834a2e3ef5 Expanded give command logic (!283)
This change was originally made in master branch, between the time v3.7.6 and v3.8.0 were released. Due to the way that v3.8.0 was merged into master, and the fact that this change was never merged into v3.8.0, it had to be cherry-picked and have some conflicts resolved. I gave it my best and I would love some help testing it before it's merged for v3.8.1.

Conflicts:
- project/package.json
- project/src/helpers/Dialogue/Commando/SptCommands/GiveSptCommand.ts

Resolved by Refringe <me@refringe.com>

Original PR: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/182
Original Commit: 9846adc68b

Original Message:

- Added give by name
- Refactored Commando so its abstracted, that way modders can use it too! :)

Co-authored-by: clodan <clodan@clodan.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/182
Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com>
Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.com>

Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com>
Co-authored-by: chomp <chomp@noreply.dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/283
Co-authored-by: Refringe <refringe@noreply.dev.sp-tarkov.com>
Co-committed-by: Refringe <refringe@noreply.dev.sp-tarkov.com>
2024-04-10 09:48:28 +00:00
Dev
8342edf55f Added 1x golden chain item limit to bloodhounds 2024-04-09 20:50:12 +01:00
Dev
30dbc85c14 Added dev balaclava to reward item blacklist 2024-04-09 12:58:26 +01:00
Dev
9cae27c37e Refactor of isAmmoAbovePenetrationLimit() to separate concerns 2024-04-09 10:39:01 +01:00
Dev
46d48c7531 Added system to filter out ammos from fence by its penetration value
Removed redundant hard-coded ammos from blacklist
2024-04-09 10:29:12 +01:00
Dev
4830d474e7 Merge branch '3.8.1-DEV' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.1-DEV 2024-04-09 09:14:04 +01:00
Dev
c5ca346466 Limit Sanitar to 1 Keycard with a blue marking item 2024-04-09 09:13:51 +01:00
DrakiaXYZ
db6ef9bddb Fix bitcoin production time being incorrect (!284)
- Don't apply crafting skill cooldown reduction to bitcoin farm
- Adjust profile bitcoin production time on login to be the correct production time (takes into account dev profile)

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/284
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-04-09 07:48:18 +00:00
Dev
64ddca4124 Improved handling of fence assort item refresh. Duplicate stacks should be much less common
Stacked items can now be partially reduced instead of all or nothing
2024-04-08 20:01:51 +01:00
Dev
b0576a3115 Add 100 round PK box to blacklist 2024-04-08 19:51:13 +01:00
Dev
84729cc5dd Added ammo boxes to fence blacklist 2024-04-08 19:20:41 +01:00
DrakiaXYZ
8e91842d4c Resolve ItemBaseClassService cache error when iterating all items (!281)
The ItemBaseClassCache is only generated for items with a _type of 'Items', so before trying to look up an item in itemHasBaseClass, make sure the item also has a _type of 'Item'
Move `allDbItems` to a class variable since we need it for looking up the _type of the given template Id

This shouldn't require any changes to mods

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/281
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-04-08 17:40:04 +00:00