This is because the base value doesn't take into account any craft bonuses the profile has
After collecting a product from a continious craft, `ProductionTime` in the profiles craft data will be refreshed, this resolves issues with adjusting the `production.json` craft times not applying to continuous crafts
(cherry picked from commit 8014bdd06f)
Fix for SPT/Issues#743
FuelConsumptionBonus only looked for the first value, not all Bonuses a PMC has.
TODO: Find a way for the Broken Wall to not give too much bonus when a player mops the floor in between the stages. Resulting with too much negative bonus once the broken wall is completed.
Co-authored-by: Dev <dev@dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/393
Co-authored-by: TetrisGG <dmiller2606@gmail.com>
Co-committed-by: TetrisGG <dmiller2606@gmail.com>
When compiled natively to linux, logfiles are saved in main SPT folder instead of default location. It's caused by file paths being hardcoded as text.
This patch fixes logs location on linux build.
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/390
Co-authored-by: witek <falls-toluene.0q@icloud.com>
Co-committed-by: witek <falls-toluene.0q@icloud.com>
**Before merging: Please test on a real Windows installation if possible!**
I tested this on Linux as well as inside a Windows VM hosted on Linux, but wasn't able to test it on a real Windows installation.
This commit fixes an issue with loading bundles from a native Linux server:
When compiling the server natively for Linux & installing some mods, everything works except for mods trying to load bundles from the server. Reason is a malformed path to the bundle:
```ts
2024-07-30 23:48:16.968 +02:00|0.14.9.1.30626|Error|Default|
EXCEPTION: System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\home\USER\Games\escape-from-tarkov\drive_c\SPTarkov\user\mods\Bloody-Bullet-Wounds\bundles\assets\systems\effects\particlesystems\effects.bundle".
```
`process.cwd()` returns the linux-agnostic path of course, but for some reason it also returns `C:`.
Changing the line to `modpath.slice(0, -1).replace(/\\/g, "/");` seems to work and the bundles seem to get loaded without issues (did a quick test raid), even without passing the absolute path to the mod.
I tried to check why that is, and I think node is able to [get the cwd and resolve the relative path](4d1d88118b/src/path.cc (L101)) by itself..
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/389
Co-authored-by: MadByte <madbyte@noreply.dev.sp-tarkov.com>
Co-committed-by: MadByte <madbyte@noreply.dev.sp-tarkov.com>
Previously `highestValue` could be lower than `lowestValue`, resulting in an exception. These values are now generated in the same method and clamped
Add a catch to the botgen promise await so we get more useful errors if botgen fails
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/388
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
The httpListeners are promise based but they aren't awaited when handling the request.
I found this while implementing another version of HttpServer in a mod but couldn't actually find where this would cause an issue so feel free to close this if you think it's not worth it.
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/387
Co-authored-by: RomanxTheLast <alex@romanx.co.uk>
Co-committed-by: RomanxTheLast <alex@romanx.co.uk>
Added item reward pools for `Unlocked equipment create (x)`
Added support for weapon/armor presets inside `getRandomLootContainerLoot()`
Expanded pool for `Unlocked valuables crate (x)",` by 8 items
(cherry picked from commit 4a1a5d924c)
Fixes a trailing space in the base class id `COMB_MUZZLE_DEVICE` that rendered it unusable.
Note: No idea where these wacky formatting changes came from, sorry about that. Assuming Biome things.
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/386
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
Boogidy, boogidy, boogidy. Let's go racing! 🏎️
Removes the over-complicated and super-slow setup we had with ESLint & Prettier in favour of Biome. The largest change with the formatting is moving from Allman braces to 1TBS braces. Other than that, it's *pretty much* the same. Ah, and that Biome runs formatting and linting on the entire project about x10 faster than the old system ran formatting on one file. Seriously, the guy who came up with that last solution should be fired. :runs:
I've kept all of the formatting and linting commands the same as before, with the main mamma-jamma being: `npm run format`, which applies formatting and linting changes to the entire project.
Formatting-on-save works (quickly!) by (1) ensuring that you're working within the VSC workspace (as you should be), and (2) have the recommended Biome VSC extension installed. The link to the Biome extension is in the README.
This limits our options on code formatting going forward; Biome, like prettier, is very opinionated with very few formatting options available. But I see this as a good thing. I'd rather spend my time arguing about which gun in Tarkov is the best, rather than coding brace styles...
...It's the TOZ, and it always will be. Don't DM me.
Co-authored-by: chomp <chomp@noreply.dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/383
Co-authored-by: Refringe <me@refringe.com>
Co-committed-by: Refringe <me@refringe.com>
# Conflicts:
# project/src/callbacks/GameCallbacks.ts
# project/src/callbacks/MatchCallbacks.ts
# project/src/routers/static/GameStaticRouter.ts
Resolved by Refringe
Adds a method to the `ProfileFixerService` to fix null offer ratings. Will fix both the profiles primary rating, and any offers created when the rating was null.
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/385
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>