0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

2582 Commits

Author SHA1 Message Date
Chomp
bd00542793 Reduce server start time when running in debug mode by generating less flea offers 2025-01-09 10:52:36 +00:00
Chomp
f5600fe215 Stub out get Prestige endpoint 2025-01-09 10:52:09 +00:00
9c17464ae3
File System (#1050)
This adds the `FileSystem` and `FileSystemSync` classes to replace the
VFS class. These classes handle file system operations using `fs-extra`
for most tasks, except where the `atomically` package can be used to
improve reads and writes. The goal is to ensure that file operations are
as safe as possible while still providing a comfortable API. File
operation atomicity is focused on single files, as there's no trivial,
strict way to ensure atomicity for directory operations.

## Changes
- Adds `FileSystem` class for asynchronous file operations
- Adds `FileSystemSync` class for synchronous file operations
- Updates `atomically` to `2.0.3`
- Updates build script to transpiles ESM modules
- Resolves `AbstractWinstonLogger` bug that could cause a log file to be
overwritten
- Removes `VFS` class
- Removes `AsyncQueue` class
- Removes `proper-lockfile` package

## TODO

- Test anything that touches a file.

I'm leaving this in a draft state until I can test this further. Help is
more than welcome at this point. The classes are pretty solid, but
ensuring that they're being used properly throughout the existing code
still needs work.

---------

Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
2025-01-09 10:50:39 +00:00
Chomp
52aba88e49 Removed unused script 2025-01-09 10:05:23 +00:00
Chomp
ce4cf5aabb Fixed cultist circle not utilising itemConfig.rewardItemTypeBlacklist 2025-01-09 09:26:38 +00:00
DrakiaXYZ
0435b09810 Fix exception when heal item can't be found 2025-01-08 12:56:34 -08:00
Chomp
97e4fa98ff Revert "Added locationConfig.forcedRaidEndState property"
This reverts commit d578e5f001cac460d2eac10ec81465b54ac334fd.
2025-01-08 19:38:58 +00:00
Chomp
d578e5f001 Added locationConfig.forcedRaidEndState property 2025-01-08 19:30:41 +00:00
Chomp
33591df715 Added system to strip children from containers defined in new config property tplsToStripChildItemsFrom
Fixes Christmas gifts causing strange behaviour when moved to stash as we generate container gift loot when player opens then
2025-01-08 19:03:50 +00:00
Chomp
35a2d74e8f Set LowerNickname property on bot generation 2025-01-08 11:37:37 +00:00
Chomp
8e016b0ab7 Fixed type errors 2025-01-08 10:15:02 +00:00
Chomp
61532d917d Silenced various warnings 2025-01-08 10:11:48 +00:00
Chomp
a7a92bdc6b Improved ICustomization types and matching code
Improved  `setBotAppearance` code flow
2025-01-08 09:47:40 +00:00
bbf56f7d23
Potential Type Fixes
These are possible fixes for the two type errors that are currently holding back type checking this branch. I say possible because it's not tested in game and I've only solved the issues with the current types and have no idea if the types are actually correct.

Needs a review.
2025-01-07 19:35:37 -05:00
Chomp
4ca19b73f7 Fixed quest/achievement customisation unlocks not working 2025-01-07 23:09:57 +00:00
Chomp
86d303fcf9 Added more questHelper fixes 2025-01-07 23:09:30 +00:00
Chomp
ed6f645d93 Fixed quest reward errors on quest completion 2025-01-07 22:37:41 +00:00
Chomp
145551cf5e Fixed scav repeatable quest progress not persisting after raid 2025-01-07 22:05:26 +00:00
Chomp
2e1e13e563 Replace usages of objectId.generate() with hashUtil.generate() 2025-01-07 22:04:24 +00:00
Chomp
6a2afe2fa7 Added ability to filter out PMC loot items from pool based on its value, configured via pmc.json/lootItemLimitsRub 2025-01-07 20:28:41 +00:00
2d7fdc0dc2
Various Async improvements (#1044)
- Done some slight refactoring to `DatabaseImporter` to get rid of the
old loading methods that have been sitting unused for sometime, as well
as slightly refactoring `loadAsync` for better readability and using
map's wherever possible, this should also yield a slight performance
improvement?
- Updated VFS to use node:fs/promises rather than our own promisfying of
those methods.
- Got rid of commands on VFS, I don't see why these are necessary
anymore? If there's a good reason to still leave these I can revert
this.
- Changed loadImages to loadImagesAsync

---------

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2025-01-07 18:31:22 +00:00
Chomp
2139c19a47 Cleaned up IGLobals ICustomization 2025-01-07 17:59:07 +00:00
Chomp
0b82c617c1 Fixed incorrect type 2025-01-07 17:50:54 +00:00
Chomp
93859dbdcd Removed debug code 2025-01-07 17:47:18 +00:00
Chomp
f5ac224b37 Added functionality to add customisations gained from achievements to profile upon completion of raid 2025-01-07 17:45:18 +00:00
Chomp
e7f5d9d0a2 Fixed incorrect types found in globals 2025-01-07 17:44:39 +00:00
Chomp
7e606376c5 Fixed getGameMode return type 2025-01-07 16:40:11 +00:00
7190557805
Biome Configuration Updates (#1042)
See 0d1e1ba3591458bb195812232d3b8c3345abbeaa for actual changes. The
rest is from running the `style:fix` script.

- Consolidated ignores
- Enabled for `ModCompilerService.ts`
- Added a format ignore line to `ModCompilerService.ts` to prevent
mappings from being affected
- Enabled for `jsonc` file types

---------

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2025-01-07 15:36:08 +00:00
Chomp
0ef36fa5bc Fixed incorrect type for backendPort 2025-01-07 15:03:32 +00:00
Chomp
20ec7f9858 Created new class QuestRewardHelper, migrated reward code from QuestHelper 2025-01-07 13:32:09 +00:00
Chomp
3e760e88e4 Added code to add hideout customisation unlocks to profile when quest completion rewards an achievement
Fixed inaccurate `rewards` type for achievement object
2025-01-07 13:06:28 +00:00
Chomp
b0d3d68d01 Moved dogtag customisation options into profile controller instead of inside client/customization/storage handler
Renamed variable to better reflect what it holds
2025-01-07 12:51:16 +00:00
Chomp
9b16af7cb6 On quest completion, store hideout customisation unlocks inside profile json
Append the unlock customisations to results of `client/customization/storage` call

Added `hideoutCustomisationUnlocks` to profile on creation
2025-01-07 12:47:32 +00:00
Chomp
7fcdfa7a56 Added nullguard to hideoutCustomizationSetMannequinPose 2025-01-07 11:28:57 +00:00
Chomp
57a56440f7 Implemented hideoutCustomizationSetMannequinPose endpoint 2025-01-07 11:19:19 +00:00
d5891e083f
Node Version Validation
This introduces a node version validation check on server start-up. The expected node version is pulled from the `package.json`. Locally, the expected version is pulled directly. The build script writes the expected node version into the `build.json` file, which is used in the built environment. When an invalid match is made the server start-up halts.
2025-01-06 12:34:35 -05:00
ed2b90fa0a
Various fixes so biome is happy (#1032)
- Changes to import typing for ILogger and ICloner
- Targets es2022 in compilerOptions (Matching the target in .swcrc)
because otherwise Biome doesn't seem to find a proper target.
- Fixes up the seasonal event typing
- fixes run:debug to target the correct file
2025-01-06 17:09:33 +00:00
Chomp
0442f5c28c Reverted workarounds now cycling dep issue is resolved 2025-01-06 16:55:38 +00:00
Chomp
b64c46c95d Remove redundant function that requires ragfair trader that was removed awhile ago 2025-01-06 15:21:35 +00:00
Chomp
2e4f15d5a8 Reduced nesting 2025-01-06 15:16:32 +00:00
Chomp
fc7b33cd53 Fixed trader offer prices being rounded to whole int, breaking items that are sold for < 1, e.g. ammo sold for dollars
Clone trader data before we create flea offers with it, prevents contamination due to pass by reference

Moved trader item price modification for `config.traderPriceMultipler` into `onLoad` event of `TraderController`
2025-01-06 15:16:22 +00:00
Chomp
3cbadf9ce9 Enclosed stdout.setEncoding("utf8") inside a isTTY check 2025-01-06 11:25:48 +00:00
Chomp
873f9c7aad Fixed final circular dep 2025-01-06 10:41:31 +00:00
Chomp
733a23f994 Moved interfaces out of ISptProfile into their own files to reduce circular deps 2025-01-06 10:38:06 +00:00
Chomp
b5936286bd Moved Program statics into their own class to reduce circular dep errors from 19 to 2
Fixed various ILogger warnings
2025-01-06 10:34:21 +00:00
Chomp
dd5d1373fb Temp fix for script 2025-01-05 19:42:54 +00:00
Chomp
9f6269f98b Fixed errors 2025-01-05 19:39:56 +00:00
Chomp
7681d07ab9 Added new command to hydrate customisationStorage data 2025-01-05 15:27:27 +00:00
Chomp
43c5ef8d61 Added new quest reward type 2025-01-05 10:44:27 +00:00
0587fc398b Fix up edge case error with tiered flea weapon builds 2025-01-05 02:57:04 +01:00