Commit Graph

1417 Commits

Author SHA1 Message Date
Dev
d2cf495426 Merge branch '3.8.1-DEV' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.1-DEV 2024-04-23 09:34:58 +01:00
Dev
f82cbc189b Improved how drawAmmoTpl() handles bad static ammo distribution data input 2024-04-23 09:34:01 +01:00
Refringe
01d97953fa
Fixes Linting Issues
Fixes a number of Biome linting issues:
- Variable implicitly has the any type.
- Use a function type instead of a call signature.
- Reassigning a function parameter is confusing.
- Suppression comment is not being used
2024-04-22 23:43:35 -04:00
Refringe
a572e8e67e
Runs Style Fix 2024-04-22 15:53:07 -04:00
Dev
be841fbe3f Improved handling of a missing updobject inside removeRandomItemFromAssorts() 2024-04-22 17:54:32 +01:00
Dev
fe7d09e075 Improved logic inside isModValidForSlot() to better handle edge cases 2024-04-22 09:39:32 +01:00
Dev
00691becd1 Add extra protection against null objects inside itemAllowedInContainer() 2024-04-20 20:33:36 +01:00
Dev
716df08983 Revert "Revert "Inverted check to allow correct server comms""
This reverts commit f873edb456.
2024-04-20 15:24:21 +01:00
Dev
5f9c51f1e3 Revert "Revert "Split out debug heading into 2 headers, one each for request/response""
This reverts commit 7fd9dadb13.
2024-04-20 15:24:07 +01:00
Dev
f63da802b2 Fix addPlayer not correctly assigning location value 2024-04-20 15:23:24 +01:00
Dev
7fd9dadb13 Revert "Split out debug heading into 2 headers, one each for request/response"
This reverts commit e2f3191212.
2024-04-20 14:19:35 +01:00
Dev
f873edb456 Revert "Inverted check to allow correct server comms"
This reverts commit 8bcb47b391.
2024-04-20 14:19:10 +01:00
Dev
8bcb47b391 Inverted check to allow correct server comms 2024-04-20 13:12:32 +01:00
Dev
ef65074dc3 Resolve server error inside removeRandomItemFromAssorts() when the item being processed has no upd object 2024-04-20 13:05:44 +01:00
Dev
b8b72e593d Added nullguards insode addPlayer() to prevent server errors when profile not found or inraid object not found 2024-04-20 10:10:58 +01:00
Dev
e2f3191212 Split out debug heading into 2 headers, one each for request/response
0 = no zlib compression
1 = use zlib compression
2024-04-20 09:58:06 +01:00
Brent
df93245e9d Fix incompatible default mods being used in required slots (!299)
This prevents weapons from getting the default mods for their base preset when they won't fit other required mods.

This was observed on the AK-74M, where the weapon generator would choose the VDM CS gas tube, which is incompatible with the default AK-74 polymer handguard (6P20 Sb.9).

When this occurs, the generator will bypass the default mod selection and instead choose from the loot pool assigned to the handguard in the bot configs.

https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/596

Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/299
Co-authored-by: Brent <wiggyvidyadev@gmail.com>
Co-committed-by: Brent <wiggyvidyadev@gmail.com>
2024-04-18 14:29:16 +00:00
Dev
b305ffdc24 Add currency to generation configuration for each bot
Fix various missing properties in some bot jsons
2024-04-18 11:56:45 +01:00
DrakiaXYZ
0d553e8ea6 Move setting of the generated bools to inside the cache methods (!298)
Also make `generateDynamicPrices` public to match the static method, and allow mods to refresh the cache

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/298
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-04-18 07:55:39 +00:00
DrakiaXYZ
820a5caccb Bake build data directly into the executable (!297)
This is primarily to stop confusion when a user overwrites their `aki_data` folder with an old version, the data shown in logs/server console is now based on compile time data instead of runtime data.

- New build.json file added to the `obj/ide/` folder that gets populated with the build data on build
- Moved asset copying prior to packaging, so that `obj/ide/build.json` is available at package time
- Updated all references of core.commit, and core.buildTime to use globalThis
- Updated all references of core.akiVersion to use globalThis with a fallback if not found (When running in VSCode for example)

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/297
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-04-18 07:54:16 +00:00
Brent
c71aaa7fb3 Use dynamic ragfair pricing for insurance deletion sorting (!294)
Change sort value for insured attachments to use dynamic ragfair prices.
Small change to method to return directly instead of setting passed-by-value parameter.

https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/618

Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/294
Co-authored-by: Brent <wiggyvidyadev@gmail.com>
Co-committed-by: Brent <wiggyvidyadev@gmail.com>
2024-04-17 13:10:43 +00:00
DrakiaXYZ
acb02ed53d Update client/server/list to use the right backend ip (!295)
Update missed property to use new IP config value

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/295
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-04-17 07:39:11 +00:00
Dev
0bc807a6b8 Added ability to send insurance mail after Labs raid via editing of labs `base.json/insurance property 2024-04-16 17:28:00 +01:00
Dev
f50a400cde Add missing validation checks to ammo cache generation for scav case 2024-04-16 16:05:33 +01:00
Dev
d609d4b41a Improved local request log handling 2024-04-16 15:53:54 +01:00
Dev
4e936572e5 Update filterInsuredItems() to log when insurance items are found 2024-04-16 10:57:27 +01:00
Dev
62a0731cd1 Merge branch '3.8.1-DEV' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.1-DEV 2024-04-16 09:57:45 +01:00
Dev
82d568a428 Cleaned up findAndAddRandomPresetToLoot()
Added nullcheck for an empty presetPool parameter

Cleaned up comments where possible
Cleaned up variable names where possible
2024-04-16 09:57:19 +01:00
Brent
c2b376e697 Add missing weapons to WeaponType enum, fix assort comments (!292)
Added RSh-12 and 40mm GLs to WeaponTypes.ts
Fixed incorrect comments on assort functions

Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/292
Co-authored-by: Brent <wiggyvidyadev@gmail.com>
Co-committed-by: Brent <wiggyvidyadev@gmail.com>
2024-04-16 07:34:08 +00:00
DrakiaXYZ
521cf51f0e Fix multiple server instances overwriting profiles with old data (!291)
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/291
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-04-16 07:15:49 +00:00
Dev
ffbeefba6f Allow 3.8.0 mods to load into 3.8.1 with warning 2024-04-15 14:12:16 +01:00
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
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
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
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