Commit Graph

2205 Commits

Author SHA1 Message Date
Dev
f623b1d52e Adjust trader reset times based on live testing 2024-03-12 15:45:48 +00:00
Dev
dcd70fb5b5 Allow traders to have timers be based on amount of time to next hour (bsg style) OR spt server start time 2024-03-12 14:27:07 +00:00
Cj
8397e4690b Add server mod check to cool debug message (!258)
needs merged with: https://dev.sp-tarkov.com/SPT-AKI/Modules/pulls/95

Get a bool from the server to indicate server mods being present and send to the client

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/258
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-11 22:03:14 +00:00
Dev
38b96f43b0 Update server locales 2024-03-11 10:35:32 +00:00
DrakiaXYZ
7fdb9083a5 Move isBeta to a compile time variable (!257)
Split isBeta and isModdable into two seperate variables

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/257
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-11 08:45:05 +00:00
DrakiaXYZ
15257ea263 Fix daily reward budget not using preset prices for some items (!256)
- Switch item cost calculation to use a new helper that checks for a preset first, to more accurately keep track of the budget
- Subtract weapon price from reward budget
- Decrement reward counter for skipped ammo
- Add a new helper for filtering the reward pool by budget, so it's consistent in the two places it's done
- Add a metric boatload of debug output for daily generation

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/256
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-11 00:03:41 +00:00
Dev
561c5a7ffc Remove unused injection + lint 2024-03-10 23:18:42 +00:00
Dev
e6b0dbbf8e Removed unused injection 2024-03-10 23:17:19 +00:00
Dev
da3b2944a7 Move reward code out of repeatable controller and into its own class 2024-03-10 23:15:03 +00:00
Dev
b45a091099 Prevent daily quest system choosing armor rewards to duplicate 2024-03-10 23:02:12 +00:00
Dev
1098a9d869 Fixed wallets not having money stacks in them
Increased chance of money in wallets

some lint fixes
2024-03-10 14:13:08 +00:00
Dev
ef81363ec6 Merge branch '3.8.0' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0 2024-03-10 12:37:57 +00:00
Dev
68d0007545 Fix german locales not working because bsg map DE to GE for some reason 2024-03-10 12:37:47 +00:00
DrakiaXYZ
1326ee9626 Remove special handling for LK Locked tasks in post-raid (!255)
Handling of time-gated LK tasks is now properly handled in the client via `InRaidQuestAvailablePatch`, so we no longer need to handle `Locked` status quests post-raid

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/255
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-09 22:45:07 +00:00
Dev
4ce4663fbe Add msising object 2024-03-09 16:57:47 +00:00
Dev
7e1a47bedc Remove unused endpoint client/match/group/create 2024-03-09 16:46:40 +00:00
Dev
5011af03ea Removed unused endpoint + related code /raid/profile/list 2024-03-09 16:38:43 +00:00
Dev
b11c9579b5 Cleanup of comments inside ProfileHelper
merged unnecessary functions
2024-03-09 16:35:46 +00:00
Dev
f860642882 Add ability to adjust skill gain per skill when in menus via inventory config 2024-03-09 16:14:34 +00:00
Dev
5343f8982c Add IDEA rig to rig slots on PMCs 2024-03-09 11:49:20 +00:00
DrakiaXYZ
f95ed922a4 Fix quest statusTimers ending up with named keys (!254)
- Don't depend on status being non-numeric to fix statusTimers
- Cleaner tracking of fix counts in `updateProfileQuestDataValues`
- Better number checking for quest status, since `0` is a valid status, but fails the `!Number()` check
- Cleanup of quest status setting in `processAlteredQuests`

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/254
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-09 08:49:26 +00:00
Dev
75a8007842 Fix issue with PMC name causing formatting issues inside of client + lint 2024-03-09 08:44:40 +00:00
qe201020335
c17ab30d4d Add --arch and --platform options to NPM build commands to support cross-compiling (!247)
A previous commit 03ae37ec2f hardcoded windows x64 into the build options for build automation. This change restores the ability to build the server using the builder's architecture and platform to the default behavior and adds support for cross-compling via optional parameters `--arch` and `--platform`.

The option can be used by `npm run build:release -- --arch=x64 --platform=win32`.
Note the `--` in the middle is to tell npm whatever comes next, is for the script, not npm.

Additionally, the copy pnpm executables step has been changed to download pnpm release for the correct platform directly from the npm registry.

Co-authored-by: qe201020335 <qe201020335@sina.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/247
Co-authored-by: qe201020335 <qe201020335@noreply.dev.sp-tarkov.com>
Co-committed-by: qe201020335 <qe201020335@noreply.dev.sp-tarkov.com>
2024-03-08 18:11:04 +00:00
Dev
5ea7d7b97d Merge branch '3.8.0' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0 2024-03-08 12:05:56 +00:00
Dev
92c5dc7f6b Reworked how items are chosen to be force-stacked
Fixes medical items not stacking correctly when there was multiple of the same item with different resource values

Added additional item types to be force-stacked
Added backpack item limit
Sligfhtly reduce item limit to account for items now stacking
2024-03-08 12:05:43 +00:00
DrakiaXYZ
56c0007caf Fix scav case timer not taking crafting skill into account (!252)
The assembly calculation for scav case timer first applies the player's crafting skill reduction, then multiplies by the resulting time by the Fence modifier:

```
return base.ReductionCoefficient * this.fenceTraderInfo_0.FenceLoyalty.ScavCaseTimeModifier;
```

This change makes the server calculation match this expected value

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/252
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-08 09:00:06 +00:00
DrakiaXYZ
77bc22f27e Fix being returned to the main menu when inventory full (!251)
- Add a new method of sending errors back but not flagging the response as failed in ItemEventCallback
- Don't treat `NOTENOUGHSPACE` errors as critical errors
- Return proper `NOTENOUGHSPACE` error code for stash space issues for trader/flea/craft
- Add missing error codes to `BackendErrorCodes`

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/251
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-08 08:59:14 +00:00
Cj
d4ee8f64d4 Implement IRelease interface, add new route action and data to core.json (!249)
This will need merged with: https://dev.sp-tarkov.com/SPT-AKI/Modules/pulls/90

Added
- IRelease interface
- betaDisclaimer: Beta text to be shown in the client
- betaDisclaimerTimeoutDelay: delay before the client exits if `OK` isnt pressed
- releaseSummary: a place to add release notes shown on first run, or if version has changed.

- new route for the client to request beta and changelog information

Im not the most familiar with the server, so if any of this needs moved to a different class or a new class made for it, ping me and let me know and I'll adjust it accordingly.

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/249
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-07 18:16:55 +00:00
Dev
b79fc89d11 Filter out seasonal items from scavcase rewards when not inside seasonal event 2024-03-07 18:15:42 +00:00
Dev
f439f5888b Fix warning being logged constantly 2024-03-07 13:44:43 +00:00
Dev
479898ecab Centralise check for upd object / creation if it doesnt exist into one helper function inside ItemHelper
Some minor formatting updates
2024-03-07 09:18:39 +00:00
DrakiaXYZ
246f0d5030 Fix give command not working on armor presets and not marking presets as FiR (!250)
- Commando `give` command now handles all presets in the same way, so if BSG adds new types of presets in the future they should be supported without changes
- Commando `give` command now marks all given items as FiR for consistency

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/250
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-07 08:43:15 +00:00
Dev
c0ae34052b Made basic melee weapons more common on low level PMCs 2024-03-06 21:49:38 +00:00
Dev
9b07a11a1b Merge branch '3.8.0' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0 2024-03-06 21:38:12 +00:00
Dev
5e3d7e457d Add additional item types to fence always-stack array
Adjust code to filter out all wearable equipment that has slots
Add +1 to items that are always-stackable - ensures items that have no key in `itemStackSizeOverrideMinMax` get incremented
2024-03-06 21:38:00 +00:00
Cj
2249337a02 Small optimization (!248)
Change `foreach` to use `for of` instead, `for of` is faster than `foreach`

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/248
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-06 19:50:45 +00:00
Dev
96bace1288 Remove unused property from interface 2024-03-06 18:38:43 +00:00
Cj
4da70b80d3 Implement keeping pocket items on death to LostOnDeath.json configuration (!246)
Addresses: https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/443

Re-added the ability to keep pocket items on death. The reason for the naming is to not confuse the root `Pockets` item. Where as `PocketItems` is a better descriptive fit for the behaviour.

New property in lostondeath.json -> `equipment.PocketItems` default `true` to discard items in pockets as normal on death.

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/246
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-06 08:50:04 +00:00
Refringe
03ae37ec2f
Hardcoded Build Platform and Architecture
When the server was being built on systems other than Windows, that system's version of node was being downloaded for the build instead of the expected versions (Win/x64). This change hardcodes the values so that they're no longer dynamically pulled from the current system. Should help with generating automated builds.

Also, re-enabled the build step that added the icon to the Windows executable. It was being skipped over on non-Windows platforms and I don't know why... it should be a cross-platform solution.
2024-03-05 17:04:26 -05:00
Dev
570a81ff78 Show commit hash on debug and release versions 2024-03-05 20:23:10 +00:00
Dev
3846363758 Added system to weight stack size of money in bot inventories
Removed `dynamicLoot` system from pmc config as its been replaced with this one

#546
2024-03-05 12:24:09 +00:00
Dev
095fcf08fd Expand fence item force stacking system
Remove redundant multi-stack tracking system
Expand `getSingleItemStackCount()` to check for parent ids too
2024-03-05 10:43:47 +00:00
Dev
8f4df131ac Make use of itemHelper.isOfBaseclasses() inside duplicate fence offer check
Can now handle items that have a blacklisted grandparent
2024-03-05 08:52:21 +00:00
Cj
0740a84f6f [Enhancement] Ability to prevent duplicate fence offers by parentId (!245)
In relation to this QoL issue: https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/547

This PR allows us to prevent fence selling duplicate items by parentId.

It adds a new property to `trader.json` `fence.preventDuplicateOffersOfCategory` its an array that takes parentIds. The scope of this PR only extends to ammo and ammo boxes. It can be expanded upon in the future with no code changes should the need arise.

The reason for this change is because currently fence can have duplicate stacks of identical ammo with different prices, which makes no sense. If you have any questions feel free to ping me on discord.

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/245
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-05 08:49:10 +00:00
Dev
e3f341416d Add missing property to default profile templates 2024-03-04 21:39:10 +00:00
Dev
f0c589ff8e Update trader assorts 2024-03-04 21:27:25 +00:00
Dev
7a6422932b Update achievement json 2024-03-04 21:17:43 +00:00
Dev
5406bf0f07 Update quests data
Capturing outposts has a condition change, can now be done in zone "prapor_27_3" only, not 4
Missing informant had its available for finish conditions altered + has a new visibility condition
2024-03-04 21:15:28 +00:00
Dev
0c206385f1 Add missing nvgIsActiveChanceX values for cursed assault bots 2024-03-04 20:48:15 +00:00
Dev
63d5da4c18 Wallet loot improvements:
Added % chance to have loot to config
Added currency added weigfht system to config (only roubles by default)
Added allowed wallet types array to config
Added WZ wallet to pool of wallets to add money to

Fixed bug where itemCount type was incorrect
2024-03-04 20:18:53 +00:00