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>
This PR is required by SPT-AKI/Modules!104 in order for it to function correctly.
## Overview
- Adds the package `buffer-crc32`, it can generate CRC32 hashes from buffers or strings
- Splits `HashCacheService` into 2 classes `ModHashCacheService` does exactly the same `HashCacheService` used to do, and added a new `BundleHashCacheService`
- `BundleLoader` now generates a CRC32 hash of every bundle file from every loaded mod
- Reworked `BundleInfo` to better represent the data expected by the client when requesting `/singleplayer/bundles`
- Removes all checks on `BundleLoader` that verified if the request was made to a localhost address, this is now addressed by the client.
## Testing
The code has been tested by @Senko-san and me.
Co-authored-by: chomp <chomp@noreply.dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/274
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Bundle up profile save time and display in one line + do not log to file
Don't log when each profile is saved
Do not log to file how much fuel is left in generator
Categories:
Are now much more accurate
take into account when player is below flea unlock level
Any with a (1) and no offers have been fixed
Take into account when offers are barters + barters are filtered out
Skip items with a type of `node` during flea assort generation
Moved logic out of `updateProfileBaseStats()` and into separate functions for pmc/scav, left profile-agnostic code alone
new functions `updatePmcProfileDataPostRaid` and `updateScavProfileDataPostRaid`
scav - Only copy active quest progress from client profile to server scav profile
scav - dont attempt to update trader standings, none exist on scav profile
scav - dont transfer psot-raid limb damage to server profile
Update quest status values similarly to PMC quests post raid to ensure they're consistent with existing quest data in profile
Simplifies `migrateScavQuestProgressToPmcProfile`
made various warnings debug instead
Remove unneeded HttpBufferHandler
-----------
The old code processed each chunk of data as an entire request, which is not correct. It was observed split data after ~14600 bytes (on a 1 gig lan connection). I think it was worse on remote connections.
This was the cause of the "unknown compression method" and invalid json parse errors when saving the profile.
Co-authored-by: Decoy <redacted@example.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/162
Reviewed-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
Co-authored-by: ree <ree@noreply.dev.sp-tarkov.com>
Co-committed-by: ree <ree@noreply.dev.sp-tarkov.com>
- Ability to use @spt-aki path alias on the whole project.
- Swapped all imports from relative paths, for imports using the path alias.
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/157
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Initially this was going to be an update to dependencies but it seems i got a little carried away!
Anyways this PR removes 2 unused dependencies (`jshint` and `utf-8-validate`), and 2 other, `del` and `fs-extra` that were replaced by the built-in `fs/promises`.
It also renames all `tsconfig` and `Dockerfile` files, in a way that when viewed in a file tree sorted alphabetically they will be next to each other.
It also updates the typescript target to `ES2022`, and changes moduleResolution from `Node` to `Node10` (this isn't an update, they are the same thing but `Node` is now deprecated).
It also adds the `node:` discriminator to every import from built-in modules.
It also has major changes to the build script, `del` and `fs-extra` were only being used in the build script, it's now using `fs/promises` instead, cleaned up the code from some functions, adds better documentation to a few functions, and renames some gulp tasks and npm scripts to better represent what they actually do.
And finally it updates dependencies, except for `atomically` which can't be updated unless the project switches to ESM.
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/150
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Replaced calls (where possible) to JSON.parse/stringify with use of `jsonUtil` functions
`VFS.ts` was tricky, it can't be updated as it'd create a circular dependency
Also add json5 to package.json for modders to have access to
Co-authored-by: Dev <dev@dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/112
Slight weapon variety improvement for PMCs
Only generate backpack loot if bot has backpack - reduces warnings during botgen
Move warning mesage to debug
Add sanitar medkit to pmc blacklist
Pass ur to warning message when endpoint body fails json validation
Pass sessionId into `locationController.generateAll()` to help modders when overriding function
Test - Added grizzly x5 to PMC secure containers to see if they heal more when damaged