Commit Graph

2248 Commits

Author SHA1 Message Date
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
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
DrakiaXYZ
2404e7a5ab Fix issues with incorrectly configured airdrops (!280)
- Don't try to add items to the airdrop if the filtered item list is empty
- If we somehow get into `findAndAddRandomPresetToLoot` with an empty list, don't try to output the id of undefined

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/280
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-04-08 17:39:08 +00:00
Dev
f73802ec17 Updated USEC EoD profile to match live 2024-04-08 13:31:05 +01:00
Dev
ef2442178a Implement weights for food/drink on bots 2024-04-08 12:31:51 +01:00
Dev
6d2c17596b Updated Bear EoD profile to match live 2024-04-08 10:52:37 +01:00
Dev
afa5700076 Improved IArmorPlateWeights type 2024-04-08 08:56:05 +01:00
DrakiaXYZ
49f4eda90a Fix coop extract gifts (!279)
Add missing properties to coopExtractGifts in fence trader.json

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/279
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-04-07 08:02:32 +00:00
TheSparta
198c7a9720 Workaround swc parsing string as inline sourcemap 2024-04-06 22:36:23 +01:00
Leaves
3be1768672 Make sure trader has enough stock before selling (!278)
Make sure trader has enough stock before selling

Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/278
Co-authored-by: Leaves <mwarciel@gmail.com>
Co-committed-by: Leaves <mwarciel@gmail.com>
2024-04-06 21:22:41 +00:00
Dev
35e48add20 Added ability to override hideout craft times via config 2024-04-06 20:25:57 +01:00
r2go
31641334aa
Issue #246 Reduce server log retention time (!186)
https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/246

Reduces log rotation frequency to 3h.

Co-authored-by: r2go <please@work.now>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/186
Co-authored-by: r2go <r2go@noreply.dev.sp-tarkov.com>
Co-committed-by: r2go <r2go@noreply.dev.sp-tarkov.com>
2024-04-06 12:06:19 -04:00
Dev
13ab57298b Add endpoint to allow getting all bot difficulty data in one call 2024-04-06 16:57:01 +01:00