- Remove locale check for give command (Now handled in the localeService itself)
- Fix variable names/spelling/lowercase in LocaleService.getPlatformForServerLocale (should be no change in behaviour)
- Rewrite LocaleService.getPlatformForClientLocale to not depend on serverSupportedLocales, and instead just use the tables for validity checking
- Expand fallback of client locale handling to include the region code (Handles Czech and Korean locales)
- Write tests for locales
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/332
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
I don't want em'. Grumble. Ahem...
This change allows for "extra" parentheses to be added in situations where, without them, the code could possibly, potentially be seen as maybe a little-bit, tiny confusing.
Also, fixes a bunch of other ESLint errors. Mostly down to naming warnings now. Mostly.
I'm currently hosting the Project Fika Docker on a dedicated Server to have the Server up 24/7 without the need to let my PC run.
When hosting this as a docker container behind traefik (reverse proxy), the logger currently logs the internal IP of the traefik container.
This change makes it so that the headers that traefik/nginx can set are actually read and used. If these headers are not present, we fall back to the original method of using the `socket.remoteAdress`.
Since this is for logging only, the security implications are minimal.
Co-authored-by: Vincent Niehues <vincent.niehues@zeitag.ch>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/329
Co-authored-by: vniehues <vniehues@noreply.dev.sp-tarkov.com>
Co-committed-by: vniehues <vniehues@noreply.dev.sp-tarkov.com>
Comment changes
Variable change
Only log debug message when default mod not found + multiple choices exist in pool
Fixed possible nullref if `getMatchingPreset()` returns null
This is the first pass of ESLint on the codebase.
ESLint formatting is less strict when it comes to line-length and line-breaks then dprint/biome, so if you see formatting that you don't like... fix it! It shouldn't require a configuration change.
- This should merge clean into master (when the time comes).
- This will not merge clean into `3.9.0-DEV`, but the conflicts aren't that bad.
The built-in ESLint import settings will lint the imports, but not fix them, as that's concidered stylistic. The ESLint Stylistic package doesn't currently support sorting. We have to use the ESLint Import plugin to force import sorting. This Import plugin doesn't yet support the new ESLint flat-configuration file format so we've had to convert back to the old no-flat format.
Now has a chance to not pick any to remove (default 10%)
Now only removes attachments that are above a rouble price (default 2000)
Stores attachments in a dictionary weighted by rouble price
Picks random amount of attachments to remove and then picks from pool by price, removing items from pool as they're picked
Fixed cases for modded items causing problems with Commando.
Co-authored-by: clodan <clodan@clodan.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/325
Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com>
Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.com>
- Drops DPrint
- Drops Biome
- Adds ESList Stylistic
- Updates ESLint config to new FlatConfig format
- Removed the `dprint.dprint` and `biomejs.biome` VSC extentions from the recommendations list
- Updates README to reflect all the above changes
TODO: Import sorting & minor fixes after `npm run lint:fix`.
Curse you, Alex!
- Added 2 methods that expose the websocket server and each session's websocket
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/321
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
This PR updates a few interfaces and consequently a few functions returned data,
it also handles 2 new routes:
`/client/friend/request/decline`
`/client/friend/request/accept-all`
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/320
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Fixed ragfair memory leak where NPC player ids would continuously get added into the cache map, when those offers expire the entry on the dictionary would be left empty but the string allocation on the key would remain in memory, overtime it would stack up to massive amounts of memory usage
Co-authored-by: clodan <clodan@clodan.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/319
Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com>
Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.com>
This functionality is currently not in use and would be nice to have for mod developers. There have been 'seasonal' quests in the past that had stash rows as a reward but this was never implemented in SPT.
Co-authored-by: acidphantasm <127812106+acidphantasm@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/316
Co-authored-by: acidphantasm <acidphantasm@noreply.dev.sp-tarkov.com>
Co-committed-by: acidphantasm <acidphantasm@noreply.dev.sp-tarkov.com>
Fixed linting/syntax of the weightingAdjustmentsByBotLevel function to properly end equipment and start clothing as part of IAdjustmentDetails.
Additionally, added the "add" subfunctions to equipment for the last three levelRanges as they were missing.
Co-authored-by: VforValens <8889280+VforValens@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/315
Co-authored-by: Valens <valens@noreply.dev.sp-tarkov.com>
Co-committed-by: Valens <valens@noreply.dev.sp-tarkov.com>
Added new spt commands for commando to alter profile levels and skill, as well as trader rep and money spent.
Co-authored-by: clodan <clodan@clodan.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/309
Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com>
Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.com>