Commit Graph

2036 Commits

Author SHA1 Message Date
Cj
4139e85f1f Clothing service fix (!407)
Server implementation of my `TraderServiceFix` mod.

Since 3.9 trader services were refactored by BSG. Resulting in them hard coding service ID's. This PR allows modders to push their trader ID to the `TraderConfig.moddedTraders.clothingService` array. It is then sent to the client where it adds it to the dictionary. I made this modular with its own interface in-case it needs expanded on in the future. So the this acts as both a fix and a groundwork for similar future fixes if need be as well.

Needs merged with https://dev.sp-tarkov.com/SPT/Modules/pulls/165

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/407
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-09-04 08:31:15 +00:00
Dev
2768217d57 Fixed quest status not correctly mapping to integer 2024-09-03 19:12:23 +01:00
Dev
f3f72f34db Cleaned up nullguard and comments 2024-09-03 18:42:26 +01:00
Dev
9d923a8b0e Fixed Exhaustion effect persisting after raid 2024-09-03 18:38:32 +01:00
Dev
f5dd69f43d Processed quests into original format post-raid - untested 2024-09-03 17:09:56 +01:00
Dev
8b2b9f7651 Filtered out Christmas tree hideout area from reward pool calculation when Christmas is not active 2024-09-03 10:19:24 +01:00
Dev
6b4a69b023 Merge branch '3.10.0-DEV' of https://dev.sp-tarkov.com/SPT/Server into 3.10.0-DEV 2024-09-03 09:58:38 +01:00
Dev
c3bd6e05b6 Cultist circle expansion:
Added reward blacklist
Added itemrewardblacklist in cultist reward calculation
Added reward pool expansion
2024-09-03 09:58:13 +01:00
DrakiaXYZ
c793b7e0b3 Fix repair prices for all traders being the same (Should also fix other loyalty related issues) (!405)
- The client doesn't expect to receive the player's loyalty level in their profile, so set it to 0 before sending the profile
- Slight refactor of `getCompleteProfile` to always clone, so we can modify the data sent to the client without changing it on the server

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/405
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-09-03 06:09:23 +00:00
Dev
7de0a112dc Added missing favoriteItems array to profile templates + extra optional param to body part object 2024-09-02 20:40:15 +01:00
Dev
cd2b7b460f Fixed typo 2024-09-02 11:25:30 +01:00
Dev
73c75596e2 updated profile templates to use Improvements instead of improvement + added migration for 3.9 profile + Added logging to 3.9 migrations 2024-09-02 11:16:23 +01:00
Dev
c9218fce7f Updated Karma value on new and migrated profiles to be 0.2 instead of 0 2024-09-02 09:37:31 +01:00
Dev
3dc32f5b70 Removed redundant removeLostInsuranceFromProfile function 2024-09-01 17:20:50 +01:00
Dev
ca23daa7b8 Do not overwrite insuredItems array this early, is required by insurance service to send items out, cleaned up later 2024-09-01 17:14:40 +01:00
Dev
bb0ffa6fbc Updated money bonus calculation to match live 2024-09-01 17:06:32 +01:00
Dev
c359f41c63 Updated how money reward bonuses are calculated, slightly more accurate but still not identical to live 2024-09-01 16:53:48 +01:00
Dev
e6b05a6660 Added back accidentally removed code that adds missing bonuses to profiles 2024-09-01 16:45:31 +01:00
Dev
3a3a7b1026 Fixed item sell prices not varying per trader - client/items/prices/TRADERID endpoint requires prices to be altered by the traders sell coef (which is based on player loyalty level with said trader) 2024-09-01 15:04:59 +01:00
Dev
02b903e13e Renamed IHandbookBase interfaces 2024-09-01 13:18:30 +01:00
Dev
955416f5be Renamed ProfileTraderTemplate to IProfileTraderTemplate` 2024-09-01 13:00:20 +01:00
Dev
aabbdd040b Cleaned up trader interfaces
Updated trader base json values from live data dumps
2024-09-01 12:58:41 +01:00
Dev
030efeae49 Fixed weapons/armor not counting towards the sacrifice reward budget/item count 2024-09-01 09:57:07 +01:00
Dev
b0cd48ac0c Added directRewards to cultist config, can now give explicit rewards when sacrificing specific items, currently used for 4 figurines (killa/tagilla/reshala/cultist) 2024-09-01 09:56:00 +01:00
Dev
919b41bb4b Fixed reward duplication when rewarded weapon/armor 2024-09-01 09:52:50 +01:00
Dev
c2402af09e Add small refactors to 2 functions 2024-08-31 20:48:32 +01:00
Dev
d518549711 Added early exit to adjustLooseLootSpawnProbabilities() 2024-08-31 20:35:39 +01:00
Dev
97bcce9819 Refactored getContainerMap() 2024-08-31 15:17:24 +01:00
Dev
184c81b912 Added hideout_management skill into cultist circle reward calculation 2024-08-31 14:14:23 +01:00
Dev
27540f31f0 Updated profile migrations to partially support 3.9 2024-08-29 18:07:19 +01:00
Dev
d7ce092a4a Added code to clean up insured items data post-raid 2024-08-29 17:36:31 +01:00
Dev
60e82cf3f9 Updated Insured item data after a raid 2024-08-29 17:06:28 +01:00
Dev
6d9db36a78 Refreshed bot data values 2024-08-28 12:17:41 +01:00
crustyselenium
0342a0c39c 3.10.0-DEV WIP: Fixes #771 - Quest items not appearing on the case of dying after collecting them. Fixes an issue with gulp v5 corrupting pngs. (!403)
See #771 for discussion and bug report. Implementation deletes the specific task's completedCondition so as to allow the item to appear again.

Gulp v5 has a known issue that corrupts pngs when copying or moving them, this turns off encoding for the copying assets part of the build task.
Reference was [this stack post](https://stackoverflow.com/questions/78391263/copying-images-with-gulp-are-corrupted-damaged).

Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/403
Co-authored-by: crustyselenium <crustyselenium@gmail.com>
Co-committed-by: crustyselenium <crustyselenium@gmail.com>
2024-08-27 22:15:08 +00:00
Dev
32066d0e3b Updated interface to match dumps 2024-08-26 21:32:20 +01:00
Kaeno
ae6f2e4417 Gear stand changes to match dump data. Will cause client to hang. 2024-08-26 21:31:31 +01:00
CWX
05c4bb1946 Update comments, refactor check 2024-08-26 20:47:09 +01:00
CWX
b3b36c37ee dont send upgrades back to client for gear area 2024-08-26 20:39:04 +01:00
Dev
7dd240b600 Updated returnPlayerOffer() to regenerate root items' parentId 2024-08-26 20:31:36 +01:00
Dev
0d611eae24 Add pocket item to mannequin on area upgrade 2024-08-26 18:54:10 +01:00
Dev
7dfa911213 Added comments to function 2024-08-26 14:23:23 +01:00
Dev
4f8b926ad5 Removed isFunctional limit on reward item filter 2024-08-26 13:55:42 +01:00
Dev
98b19ff1db Added cultistCircle config section to HideoutConfig and made use of values 2024-08-26 13:41:59 +01:00
Dev
63cf9ae132 Created new CircleOfCultist service and transplanted all code from Hideout controller into it 2024-08-26 11:46:38 +01:00
Dev
6803ee6241 Cultist circle:
Added support for weapon/armor rewards
Added support for variable stack sizes (only ammo for now)
Added support for breaking out of reward item while loop if no item is found (5 attempts max)
Added helper function `itemHelper.getRandomisedAmmoStackSize()`
2024-08-26 11:17:10 +01:00
Dev
d720f7fa3a Refactor of Circle of sacrifice code, added getRewardsWithinBudget() 2024-08-25 19:29:13 +01:00
Dev
768a275253 Logged error when nothing can be placed in reward grid 2024-08-25 15:13:50 +01:00
Dev
d3e7e1006b Increased multipler to 140%
Limited reward items to 5
2024-08-25 15:02:18 +01:00
Dev
94f3bd0d02 Removed debug/redundant code 2024-08-25 14:47:02 +01:00
Dev
c13d5c49a5 Added functionality to send player rewards based on cost of items sacrificed 2024-08-25 14:32:29 +01:00
TetrisGG
eee46aad30 Fix CircleOfCultists not finishing (!402)
Production resp should be null according to network dumps. Also instead of delete nulled out the recipe, so that it properly overwrites the id.

Co-authored-by: TetrisGG <tetrisggdev@gmail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/402
Co-authored-by: TetrisGG <tetrisgg@noreply.dev.sp-tarkov.com>
Co-committed-by: TetrisGG <tetrisgg@noreply.dev.sp-tarkov.com>
2024-08-25 13:30:10 +00:00
Dev
244fe62617 Added code to create a pool of items the player needs to complete crafts/upgrade areas in their hideout for the cultist circle rewards 2024-08-25 13:46:47 +01:00
W1ngZ
eff5f14e5c Added feature to keep daily quest type when replacing. Refering issue #745 (!400)
## Added:
* Config to keep daily quest type

## Changed:
* changeRepeatableQuest to check if the daily quest type should be kept the same

Co-authored-by: W1ngZ <W1ngZ@NoRealMail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/400
Co-authored-by: W1ngZ <w1ngz@noreply.dev.sp-tarkov.com>
Co-committed-by: W1ngZ <w1ngz@noreply.dev.sp-tarkov.com>
2024-08-25 07:56:48 +00:00
Dev
c8e66de039 Refactored addUpdateInventoryItemToProfile()and added addMissingPresetStandItemsToProfile() 2024-08-24 22:34:53 +01:00
Dev
3ac4074434 Added handling of twitch 2024 gamble boxes
Improved random loot box system to support `rewardTypePool` instead of `rewardTplPool`
2024-08-24 20:32:18 +01:00
Kaeno
150ae6637e Merge branch '3.10.0-DEV' of https://dev.sp-tarkov.com/SPT/Server into 3.10.0-DEV 2024-08-23 23:51:03 +01:00
Kaeno
655c0d9f27 Add check to only replace items if equipment id matches. Preventing from profile breaking 2024-08-23 23:50:52 +01:00
Dev
557dc55a33 Implemented inclusion of standx items when updating/installing hideout equipment area
Set area to level 0 for USEC
Removed unnecessary mannequin pose array from dev profiles
2024-08-23 23:41:50 +01:00
Kaeno
171fdfd6dd Remove FiR status from items on run through. Added toggle to always keep FiR status on items regardless of end raid status 2024-08-23 19:20:44 +01:00
TetrisGG
386b93e7e6 Handle Softinsertslots when insuring armor (!401)
fixes SPT/Issues#765
Tested with Uptodate Bleedingedge

Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/401
Co-authored-by: TetrisGG <dmiller2606@gmail.com>
Co-committed-by: TetrisGG <dmiller2606@gmail.com>
2024-08-23 16:35:17 +00:00
Dev
8d9a396914 Added back missing singleplayer/settings/raid/menu endpoint 2024-08-23 17:08:14 +01:00
Dev
8fc2428239 Added helper function handleInsuredItemLostEvent() 2024-08-23 10:35:41 +01:00
Dev
3d1aa5e4fc Removed unused singleplayer/settings/raid/endstate endpoint 2024-08-23 10:19:23 +01:00
Dev
24cd94abd3 Expanded pmcConfig.maxBackpackLootTotalRub to work per PMC level
non-PMC backpack loot is no longer limited to 150,000 roubles
2024-08-22 20:42:47 +01:00
Dev
607189926a Removed chanceSameSideIsHostilePercent config property and code that uses it, now implemented inside every maps base.json 2024-08-22 19:08:40 +01:00
Dev
6d7c4d95b6 Added further progress on cultist circle - now rewards items upon completion
Now handles `HideoutDeleteProductionCommand` event, Deletes sacrificed items on craft start
Set craft time to 30 secs for debugging
2024-08-22 17:48:39 +01:00
Dev
eccf4ee969 Further improvements to cultist circle 2024-08-22 16:32:27 +01:00
Dev
38d2f88e0c Fixed circle craft not registering correctly 2024-08-22 12:43:30 +01:00
Dev
c6877f998b Updated StartTimestamp to be stored as a string 2024-08-22 12:34:54 +01:00
Dev
472c258187 Fix cultist circle craft not progressing due to lack of recipe 2024-08-22 11:05:32 +01:00
Dev
47fcff1338 Added further work to circle of sacrifice area 2024-08-22 10:32:35 +01:00
Dev
f24318603f Fixed flea market not showing items 2024-08-21 21:34:50 +01:00
Dev
3d8d09cc18 Expanded implementation of circleOfCultistProductionStart 2024-08-21 19:56:29 +01:00
Dev
409d146fa9 Added new properties to profile templates + updated some interfaces to match live 2024-08-21 17:50:12 +01:00
Dev
7316e6377d Added equipment preset area to addUpdateinventoryItemToProfile blacklist 2024-08-21 17:05:38 +01:00
Dev
1aa8233b4c Updated itemtpl enum 2024-08-21 15:34:55 +01:00
Dev
471c606e12 Updated production recipe interface to match live 2024-08-21 14:43:19 +01:00
Dev
f4d1ac9097 Added TODO inside circleOfCultistProductionStart 2024-08-21 13:45:03 +01:00
Dev
0a7394c2e3 Added timestamp to IHideoutCircleOfCultistProductionStartRequestData 2024-08-21 13:39:14 +01:00
Dev
726e4f4b2c Stubbed out HIDEOUT_CIRCLE_OF_CULTIST_PRODUCTION_START event 2024-08-21 13:36:51 +01:00
Dev
858026b5b9 Handled edge case handling for adding an item to a hideout area 2024-08-21 13:28:30 +01:00
Kaeno
87ac190b37 Update Wildspawntypenumber to add new boss 2024-08-21 13:26:55 +01:00
Kaeno
d4cc41d3fc Fix Dev profiles not having access to Weapon wall and Cultist stash 2024-08-21 13:26:10 +01:00
Dev
0839f34b9b Updated addContainerImprovementToProfile to better handle cultist circle 2024-08-21 13:05:59 +01:00
Dev
391273e7fb Fixed incorrect value assignment 2024-08-21 12:32:32 +01:00
Dev
c6e6b52baa Updated some map base jsons 2024-08-20 22:46:38 +01:00
Dev
23875045c9 Updated factory base json + interfaces 2024-08-20 22:20:16 +01:00
Dev
c45f4c5f4b Added s to Improvement
Updated hideout area enum
2024-08-20 21:19:00 +01:00
Dev
8e4c4e4a0f Updated various JSON files + interfaces 2024-08-20 20:58:46 +01:00
Dev
10dfb89787 Fixed incorrect IRestrictionsInRaid interface 2024-08-19 18:35:06 +01:00
DrakiaXYZ
bd5d4bfb66 Fix fuel ticks returning fuel to the player instead of removing it (!397)
Resolves the issue of incorrect fuel usage by using relative percentages for both the profile bonus and hideout management bonus
Add a sanity check to make sure we never return fuel to the player (No negative fuel consumption)
2024-08-19 16:58:45 +01:00
Alex McAuliffe
79f0949610 Updated bot tests 2024-08-19 16:55:11 +01:00
Alex McAuliffe
9e9baf49b3 Add types for variables on global scope. (!398)
Adds a type definition for the variables added to the global scope.

Personally i'd probably stick them in an object off the route and drop the G_prefix but didn't want to make any major changes with no reason.

Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/398
Co-authored-by: Alex McAuliffe <alex@romanx.co.uk>
Co-committed-by: Alex McAuliffe <alex@romanx.co.uk>
(cherry picked from commit 18d39224a9)
2024-08-19 16:54:06 +01:00
Dev
5ffedfa91a Attempted to fix issue with calculateItemWorth() failing on child items without a upd object
Clone children when returned to prevent modification + add missing upd object to child before calculating price
2024-08-18 09:52:13 +01:00
Dev
52d9fbaeb6 Improved weapon mod selection when a default mod is desired but is incompatible with weapon
Introduced a `Set` into request object that holds conflicting items instead of constantly recalculating them when needed
2024-08-16 23:19:07 +01:00
Dev
2e8e91385e Fixed bad variable use
(cherry picked from commit daf70ea67f)
2024-08-15 20:17:18 +01:00
Dev
37fb49bffa Fixed issue that would cause repeatable completion quests to get stuck in an infinite loop
Improved performance of completion quests picking items to return

(cherry picked from commit f04382c9bb)
2024-08-15 20:17:10 +01:00
Dev
093afe002c #747 Fixed items added to ragfair configs custom blacklist still be sellable on flea by player
Moved confusing `isValidItem()` check out of `isItemOnCustomFleaBlacklist()` and into main function
Removed redundant blacklist check from flea item generation as its already covered in `isValidItem()`

(cherry picked from commit f46694a169)
2024-08-15 20:16:35 +01:00
Archangel
a4a3c8c89a Skip items that are listed in the custom blacklist from being set as sellable (!396)
Fixes issue #747

Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/396
Co-authored-by: Archangel <jesse@archangel.wtf>
Co-committed-by: Archangel <jesse@archangel.wtf>
(cherry picked from commit 5017b01938)
2024-08-15 20:16:09 +01:00
Dev
4582bb6fe2 Improved handling of bot stock generation.
Moved code into own function
Expanded force stock check to look for any child items instead of ones for slot `mod_stock`
Expanded check to include additional slot names
2024-08-12 17:43:42 +01:00