Commit Graph

1233 Commits

Author SHA1 Message Date
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
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
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
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
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
Cj
534e9d2ba1 [Enhancement] Custom flea category blacklist (!244)
Allows modders to blacklist entire categories from ragfair in relation to https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/525

new properties under `RagfairConfig.dynamic.blacklist`
`enableCustomItemCategoryList` - this enables the custom custom category blacklist
`customItemCategoryList` - this is an array to take a list of parent id's

I tested it to confirm its working, will need some further testing.

Co-authored-by: Corey <dirtbikercj@gmail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/244
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-04 19:36:31 +00:00
Cj
c7a577d903 Use globals ratingSumForIncrease value (!243)
Corrects previous pull request hardcoding the value for `ratingSumForIncrease`.

Anytime it changes in globals it will now be reflected without needing to change it in `RagFairOfferHelper`

Co-authored-by: Corey <dirtbikercj@gmail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/243
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-04 18:06:10 +00:00
Cj
9bd9ad30c0 Divide ratingInceaseCount by 100000 (!242)
Should address massive flea rep gains. Tested about 10 cases, all seem within expected range.

Divided ratingIncreaseCount by a factor of 100000

Co-authored-by: Corey <dirtbikercj@gmail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/242
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-04 17:16:34 +00:00
Dev
a5de871c92 Added seasonal item handling inside daily quest reward generation code 2024-03-04 17:13:36 +00:00
chomp
9a28e86261 Fix incorrect trader messages being sent when dealing with insurance on labs (!241)
Co-authored-by: HiddenCirno <hiddencirno@noreply.dev.sp-tarkov.com>
Co-authored-by: Dev <dev@dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/241
2024-03-03 11:06:33 +00:00
Dev
d828e9da7d Revert change made to increaseProfileRagfairRating() 2024-03-02 20:12:40 +00:00
Dev
767063d291 Adjust water_collector total craft time every update() to include the players current CRAFTINGskill level instead of the first time profile is created
Refactored `registerProduction()` to also use this code

Fix code that was getting value to 4dp, not 3dp
Skip doing work in `getHideoutManagementConsumptionBonus()` if hideoutMgmt skill is 0
2024-02-29 16:24:47 +00:00
Dev
cfee4c10db Added additional soft insert slots to getSoftInsertSlotIds()
Fixes ronin face shield missing soft inserts
2024-02-29 12:24:32 +00:00
Dev
002279c787 Changed flea rep gain code to use globals data instead of ragfair json 2024-02-29 12:19:43 +00:00
Dev
c64e5f7239 Correct comment now power has changed 2024-02-28 22:34:07 +00:00
Dev
eee10407e8 Further changes to sell curve 2024-02-28 22:31:15 +00:00
Dev
5cbc4b7014 Improve sell chance % of player offers that are close to the average price 2024-02-28 22:24:58 +00:00
Dev
874463509a Remove unused base value from ragfair config 2024-02-28 21:37:42 +00:00
Dev
69bf8939d5 Add Optional chaining to registerProduction() to fix null error relating to crafts without tools 2024-02-28 20:33:10 +00:00
Dev
854670d4d5 Merge branch '3.8.0' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0 2024-02-28 18:34:37 +00:00
Dev
3a301b02cc Handle when pscav kills a bot that doesnt have a json, default to 0 rep loss 2024-02-28 18:34:25 +00:00
DrakiaXYZ
4b8b62ae83 Utilize the release callback returned by lockFileSync to release the lock file (!239)
The error people are getting about a lock file already existing is due to `checkFileSync` returning false if the lock file is "stale".
The default "stale" timeout is 10 seconds, so if a save takes longer than this, the user will end up in a state where they can no longer save.

The documentation for `proper-lockfile` recommends using the callback returned by `lockFileSync` to remove the lock file, so I've switched to using this, and the error no longer occurs with long running save operations

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/239
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-02-28 07:56:53 +00:00
DrakiaXYZ
0433308fa8 Fix tools not coming back with the right properties after crafting (!238)
This resolves an issue where FiR tools were coming back as non-FiR. We now just store the whole .upd property, so any stats on the tool should carry over to after the craft is finished

Note: Will break any in-progress crafts that use tools

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/238
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-02-28 07:55:39 +00:00
phrisk
42782589e0 Return after returning player offers to avoid redundant remove offer following (!237)
#### Summary

> Should fix [Issue 523](https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/523)

Tested a few different scenarios and the items were always correctly removed and returned to the player, however I did see the console warnings reported in the issue.

Both of the following call `this.ragfairOfferHandler.removeOffer(...)`:

 - `this.returnPlayerOffer(...)`
 - `this.removeOfferById(...)`

The latter logs a warning to the console because the offer is already removed when we reach that point.

This fix simply returns after the offer has been returned to the player, letting `returnPlayerOffer` deal with removing from the flea

Co-authored-by: phrisk <phrisk@phrisk.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/237
Co-authored-by: phrisk <phrisk@noreply.dev.sp-tarkov.com>
Co-committed-by: phrisk <phrisk@noreply.dev.sp-tarkov.com>
2024-02-27 23:45:47 +00:00
Dev
a1a5aa356a Add missing medical filter on backpack loot cache builder
remove hard coded 2 stim limit from assault
2024-02-27 23:44:23 +00:00
Dev
bf317b6c2f updated setFindInRaidStatusForItem() to be protected + added return type
Improve comments inside `InventoryHelper`
2024-02-27 12:12:46 +00:00
Dev
3bc9833e57 Update getPlayerStashSize() to take into account bonus STASH_ROWS 2024-02-27 12:02:03 +00:00
Dev
7ec5d89608 Add ability to insert stash rows to profile 2024-02-26 23:51:45 +00:00
Dev
bde364388f Allow enabling snow in raid via SPT friend 2024-02-26 19:35:18 +00:00
Dev
51e1f7734e Add missing standing logging inside getFenceStandingChangeForKillAsScav() 2024-02-26 19:15:26 +00:00
Dev
47882e59d6 only show Found x insurance packages in profile in console, not log file 2024-02-26 18:24:45 +00:00
Kaeno
3c113ddf7f Fixed ammobox breaking client + profile due to ragfair refresh adding extra ammo to ammo boxes 2024-02-26 16:32:56 +00:00
DrakiaXYZ
1deb6d9488 Add trader service requirement support & LKS Service requirements (!235)
Add LightKeeper trader service requirements

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/235
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-02-25 20:18:54 +00:00
Dev
40b31e1fe0 improved initialize() inside PresetController 2024-02-25 11:54:13 +00:00
Dev
a5450c6552 Moved addItemWithChildrenToEquipmentSlot() from BotWeaponGeneratorHelper to botGeneratorHelper 2024-02-25 11:45:34 +00:00
Dev
5f8b0592cc Updated foldItem() to use a .find() call instead of looping over all inventory items 2024-02-25 11:43:49 +00:00
Dev
2839ce8c77 Merge branch '3.8.0' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0 2024-02-25 11:18:01 +00:00