Commit Graph

78 Commits

Author SHA1 Message Date
Dev
13ab57298b Add endpoint to allow getting all bot difficulty data in one call 2024-04-06 16:57:01 +01:00
Dev
18b28a6d0b
Remove unused /singleplayer/settings/weapon/durability endpoint 2024-04-06 11:23:57 -04:00
TheSparta
c3e203922e bundle-crc-cache (!274)
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>
2024-03-29 18:43:36 +00:00
Dev
4e744d3103 Add correct type to cancel-all route + improve comment accouracy of client/match/group/status 2024-03-26 15:44:11 +00:00
Kaeno
d5517d7fdf Remove server calculation of scav rep post raid changes. awaiting Client Calculations 2024-03-21 15:21:02 +00:00
Dev
04aad787d3 Store the fence rep diff after a raid has concluded, add endpoint to allow retreval of this value 2024-03-21 12:23:03 +00:00
Cj
be64e897b9 Enable BSG logging (!262)
Needs merged with: https://dev.sp-tarkov.com/SPT-AKI/Modules/pulls/96

Read details there.

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/262
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-16 21:03:52 +00:00
Dev
4ce4663fbe Add msising object 2024-03-09 16:57:47 +00:00
Dev
7e1a47bedc Remove unused endpoint client/match/group/create 2024-03-09 16:46:40 +00:00
Dev
5011af03ea Removed unused endpoint + related code /raid/profile/list 2024-03-09 16:38:43 +00:00
Cj
d4ee8f64d4 Implement IRelease interface, add new route action and data to core.json (!249)
This will need merged with: https://dev.sp-tarkov.com/SPT-AKI/Modules/pulls/90

Added
- IRelease interface
- betaDisclaimer: Beta text to be shown in the client
- betaDisclaimerTimeoutDelay: delay before the client exits if `OK` isnt pressed
- releaseSummary: a place to add release notes shown on first run, or if version has changed.

- new route for the client to request beta and changelog information

Im not the most familiar with the server, so if any of this needs moved to a different class or a new class made for it, ping me and let me know and I'll adjust it accordingly.

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/249
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-07 18:16:55 +00:00
Kaeno
9d96f97b55 Add maxPatrolValue route for module to pull data from. Added sandboxMaxPatrolvalue to location.json. linting on location.json 2024-02-16 16:17:55 +00:00
Dev
f449a51f6a Further output object changes 2024-02-14 15:11:19 +00:00
Dev
99df88ec24 Clean up passing IItemEventRouterResponse around and then returning it in same function 2024-02-14 14:59:43 +00:00
Dev
ff1e80e302 Add endpoint to configure trailtor scavs 2024-02-11 10:32:13 +00:00
Dev
fea17cf3db Pass output into more event functions 2024-02-10 16:32:37 +00:00
Dev
f7a16e15f9 Reset client output object data at end of function, instead of at start - fixes issue where old profile change data persists in memory after player logs out and into another profile
Pass output into failquest function
2024-02-10 16:23:26 +00:00
Dev
4232ba6db1 Pass output object into various other inventroy actions 2024-02-10 16:08:42 +00:00
Dev
9fe739debb EXPERIMENTAL - pass output object into handleItemEvent and into move function 2024-02-10 15:44:21 +00:00
Refringe
90492f3aa2
Formatting
Have you been using the recommended VSCode extensions? ;)
2024-02-02 15:00:21 -05:00
Dev
399bbb2e3b Add framework for BTR config 2024-01-20 18:47:57 +00:00
DrakiaXYZ
3401b4094e Initial commit of trader services structure (!187)
- Only contains BTR taxi and delivery services
- Super basic implementation, client doesn't seem to need anything except the service type for these
- Includes handling of the BTR Item Delivery service

Basic implementation can be merged and expanded on later, doesn't break anything by existing (Hopefully)

I've opted to add the routes to the `InRaid` controller/Callbacks, because it is a route only accessed within the raid. Seemed like it would be the best place for it

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/187
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-01-08 08:51:46 +00:00
Dev
8ef405e551 Correctly implemented:
`client/builds/delete`
`client/builds/equipment/save`
`client/builds/weapon/save`

Updated `defaultEquipmentPresets` json data

Removed old 0.13 preset implementation files

profile-breaking change
2024-01-06 11:11:04 +00:00
Dev
861987406e Handle quest failures 2024-01-05 21:14:20 +00:00
Dev
3979e6ef61 Add handling for quest failing while player is at menu 2024-01-05 15:27:28 +00:00
Dev
b5951a147b Log request data when endpoint is missing 2024-01-05 14:50:27 +00:00
Dev
ca7958afed Implement Place of face hideout area
Implement adding/removing favorite items
2023-12-29 20:22:50 +00:00
Dev
8dc322180f Implement magazine template saving 2023-12-28 12:02:37 +00:00
Dev
db296499e9 Fix profile ids being prepended with pmc/scav killing game load 2023-12-27 22:01:30 +00:00
Dev
8bd4a31c1e Remove more code 2023-12-27 20:32:22 +00:00
Dev
9e55a52965 update quest objects and implement get achievemetns 2023-12-27 17:15:38 +00:00
Dev
5eaca29a50 Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0
# Conflicts:
#	project/assets/configs/bot.json
#	project/assets/database/locations/shoreline/base.json
#	project/assets/database/locations/tarkovstreets/base.json
#	project/assets/database/templates/handbook.json
#	project/assets/database/templates/items.json
2023-12-27 16:08:54 +00:00
Dev
b70ef6df39 Stub out various endpoints 2023-12-27 15:05:07 +00:00
Dev
b993226296 Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0
# Conflicts:
#	project/src/callbacks/DialogueCallbacks.ts
#	project/src/callbacks/MatchCallbacks.ts
#	project/src/callbacks/NotifierCallbacks.ts
#	project/src/controllers/InventoryController.ts
#	project/src/controllers/MatchController.ts
#	project/src/routers/static/RagfairStaticRouter.ts
2023-12-21 09:07:23 +00:00
Dev
cf782a8fcb Add endpoint client/ragfair/offer/findbyid 2023-12-19 23:52:39 +00:00
Dev
268a9b8abd Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0
# Conflicts:
#	project/src/callbacks/BundleCallbacks.ts
#	project/src/controllers/RepeatableQuestController.ts
#	project/src/helpers/InRaidHelper.ts
#	project/src/loaders/PreAkiModLoader.ts
2023-12-15 14:16:15 +00:00
Dev
3acd07c034 Update cleanUpCompleteCraftsInProfile() to handle when a hideout craft is cancelled by player
value in kvp will be null
2023-12-10 22:31:55 +00:00
Dev
77dba80fbd Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0
# Conflicts:
#	project/assets/configs/core.json
#	project/assets/database/locales/global/ch.json
#	project/assets/database/locales/global/cz.json
#	project/assets/database/locales/global/en.json
#	project/assets/database/locales/global/es-mx.json
#	project/assets/database/locales/global/es.json
#	project/assets/database/locales/global/fr.json
#	project/assets/database/locales/global/ge.json
#	project/assets/database/locales/global/hu.json
#	project/assets/database/locales/global/it.json
#	project/assets/database/locales/global/jp.json
#	project/assets/database/locales/global/kr.json
#	project/assets/database/locales/global/pl.json
#	project/assets/database/locales/global/po.json
#	project/assets/database/locales/global/ru.json
#	project/assets/database/locales/global/sk.json
#	project/assets/database/locales/global/tu.json
#	project/src/controllers/TradeController.ts
#	project/src/generators/LocationGenerator.ts
2023-12-08 22:20:16 +00:00
Dev
c015882eac Improve handling of a mail profileChangeEvents property 2023-12-07 20:16:04 +00:00
Dev
1db690afb3 Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0
# Conflicts:
#	project/src/controllers/HideoutController.ts
2023-12-03 11:13:22 +00:00
Dev
3d01fe6211 Move TraderData object into ItemEventRouterBase where it will cause less confusion 2023-11-30 10:30:13 +00:00
Dev
2148eaafe5 Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0
# Conflicts:
#	project/src/context/ApplicationContext.ts
#	project/src/context/ContextVariableType.ts
#	project/src/controllers/QuestController.ts
#	project/src/di/Container.ts
#	project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts
2023-11-30 10:20:37 +00:00
Dev
ac459335c0 Add new endpoint to calcualte a reduced raid time for scavs and send the maps base.EscapeTimeLimit value to client for PMC raids 2023-11-26 21:11:03 +00:00
Dev
aa6f765a64 Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0
# Conflicts:
#	project/assets/configs/core.json
2023-11-22 14:28:30 +00:00
Dev
2132ea7adb Fix issue with hideout crafts being collectable twice 2023-11-20 10:14:21 +00:00
Dev
0d205ed50c Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0
# Conflicts:
#	project/src/controllers/HealthController.ts
2023-11-18 14:13:08 +00:00
Dev
ba2666f801 Set production property to null when no updates are to be sent to the client 2023-11-17 11:13:14 +00:00
Refringe
6cd86e67b0
Merge branch 'master' into 3.8.0
# Conflicts:
#	project/.vscode/launch.json
#	project/assets/database/locations/bigmap/base.json
#	project/assets/database/locations/interchange/base.json
#	project/assets/database/locations/rezervbase/base.json
#	project/gulpfile.mjs
#	project/package.json
#	project/src/ErrorHandler.ts
#	project/src/Program.ts
#	project/src/callbacks/DataCallbacks.ts
#	project/src/callbacks/DialogueCallbacks.ts
#	project/src/callbacks/GameCallbacks.ts
#	project/src/callbacks/HandbookCallbacks.ts
#	project/src/callbacks/HealthCallbacks.ts
#	project/src/callbacks/HttpCallbacks.ts
#	project/src/callbacks/LauncherCallbacks.ts
#	project/src/callbacks/LocationCallbacks.ts
#	project/src/callbacks/MatchCallbacks.ts
#	project/src/callbacks/ModCallbacks.ts
#	project/src/callbacks/NotifierCallbacks.ts
#	project/src/callbacks/PresetCallbacks.ts
#	project/src/callbacks/ProfileCallbacks.ts
#	project/src/callbacks/RagfairCallbacks.ts
#	project/src/callbacks/TraderCallbacks.ts
#	project/src/context/ApplicationContext.ts
#	project/src/context/ContextVariableType.ts
#	project/src/controllers/BotController.ts
#	project/src/controllers/CustomizationController.ts
#	project/src/controllers/DialogueController.ts
#	project/src/controllers/GameController.ts
#	project/src/controllers/HealthController.ts
#	project/src/controllers/HideoutController.ts
#	project/src/controllers/InraidController.ts
#	project/src/controllers/InsuranceController.ts
#	project/src/controllers/InventoryController.ts
#	project/src/controllers/LauncherController.ts
#	project/src/controllers/LocationController.ts
#	project/src/controllers/MatchController.ts
#	project/src/controllers/QuestController.ts
#	project/src/controllers/RagfairController.ts
#	project/src/controllers/RepeatableQuestController.ts
#	project/src/controllers/TradeController.ts
#	project/src/di/Container.ts
#	project/src/di/Router.ts
#	project/src/generators/BotEquipmentModGenerator.ts
#	project/src/generators/BotLevelGenerator.ts
#	project/src/generators/BotWeaponGenerator.ts
#	project/src/generators/LocationGenerator.ts
#	project/src/generators/LootGenerator.ts
#	project/src/generators/RepeatableQuestGenerator.ts
#	project/src/generators/WeatherGenerator.ts
#	project/src/generators/weapongen/InventoryMagGen.ts
#	project/src/generators/weapongen/implementations/BarrelInventoryMagGen.ts
#	project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts
#	project/src/helpers/AssortHelper.ts
#	project/src/helpers/BotGeneratorHelper.ts
#	project/src/helpers/InRaidHelper.ts
#	project/src/helpers/ProfileHelper.ts
#	project/src/helpers/RagfairHelper.ts
#	project/src/helpers/RagfairOfferHelper.ts
#	project/src/helpers/TraderHelper.ts
#	project/src/loaders/ModLoadOrder.ts
#	project/src/loaders/PostDBModLoader.ts
#	project/src/loaders/PreAkiModLoader.ts
#	project/src/models/eft/common/IGlobals.ts
#	project/src/models/eft/common/ILocationBase.ts
#	project/src/models/eft/common/tables/IBotBase.ts
#	project/src/models/eft/common/tables/IProfileTemplate.ts
#	project/src/models/eft/common/tables/ITemplateItem.ts
#	project/src/models/eft/dialog/IAcceptFriendRequestData.ts
#	project/src/models/eft/dialog/IDeleteFriendRequest.ts
#	project/src/models/eft/game/IGameConfigResponse.ts
#	project/src/models/eft/game/IGameKeepAliveResponse.ts
#	project/src/models/eft/game/IGameStartResponse.ts
#	project/src/models/eft/match/IJoinMatchResult.ts
#	project/src/models/eft/notifier/INotifier.ts
#	project/src/models/eft/profile/GetProfileStatusResponseData.ts
#	project/src/models/eft/trade/IProcessBuyTradeRequestData.ts
#	project/src/models/eft/trade/IProcessSellTradeRequestData.ts
#	project/src/models/enums/WildSpawnTypeNumber.ts
#	project/src/models/spt/bots/BotGenerationDetails.ts
#	project/src/models/spt/config/IBotConfig.ts
#	project/src/models/spt/config/IBotDurability.ts
#	project/src/models/spt/config/IInRaidConfig.ts
#	project/src/models/spt/config/ILocationConfig.ts
#	project/src/models/spt/config/IQuestConfig.ts
#	project/src/models/spt/config/ISeasonalEventConfig.ts
#	project/src/models/spt/server/ILocations.ts
#	project/src/models/spt/utils/IUuidGenerator.ts
#	project/src/routers/dynamic/BotDynamicRouter.ts
#	project/src/routers/dynamic/BundleDynamicRouter.ts
#	project/src/routers/dynamic/CustomizationDynamicRouter.ts
#	project/src/routers/dynamic/DataDynamicRouter.ts
#	project/src/routers/dynamic/HttpDynamicRouter.ts
#	project/src/routers/dynamic/InraidDynamicRouter.ts
#	project/src/routers/dynamic/LocationDynamicRouter.ts
#	project/src/routers/dynamic/NotifierDynamicRouter.ts
#	project/src/routers/dynamic/TraderDynamicRouter.ts
#	project/src/routers/save_load/InsuranceSaveLoadRouter.ts
#	project/src/routers/save_load/ProfileSaveLoadRouter.ts
#	project/src/routers/serializers/NotifySerializer.ts
#	project/src/routers/static/BotStaticRouter.ts
#	project/src/routers/static/BundleStaticRouter.ts
#	project/src/routers/static/ClientLogStaticRouter.ts
#	project/src/routers/static/CustomizationStaticRouter.ts
#	project/src/routers/static/DataStaticRouter.ts
#	project/src/routers/static/DialogStaticRouter.ts
#	project/src/routers/static/GameStaticRouter.ts
#	project/src/routers/static/HealthStaticRouter.ts
#	project/src/routers/static/InraidStaticRouter.ts
#	project/src/routers/static/InsuranceStaticRouter.ts
#	project/src/routers/static/ItemEventStaticRouter.ts
#	project/src/routers/static/LauncherStaticRouter.ts
#	project/src/routers/static/LocationStaticRouter.ts
#	project/src/routers/static/MatchStaticRouter.ts
#	project/src/routers/static/NotifierStaticRouter.ts
#	project/src/routers/static/PresetStaticRouter.ts
#	project/src/routers/static/ProfileStaticRouter.ts
#	project/src/routers/static/QuestStaticRouter.ts
#	project/src/routers/static/RagfairStaticRouter.ts
#	project/src/routers/static/TraderStaticRouter.ts
#	project/src/routers/static/WeatherStaticRouter.ts
#	project/src/services/BotEquipmentFilterService.ts
#	project/src/services/BotGenerationCacheService.ts
#	project/src/services/BotWeaponModLimitService.ts
#	project/src/services/PaymentService.ts
#	project/src/services/ProfileFixerService.ts
#	project/src/services/RagfairOfferService.ts
#	project/src/services/RagfairTaxService.ts
#	project/src/services/RepairService.ts
#	project/src/services/SeasonalEventService.ts
#	project/src/utils/RagfairOfferHolder.ts
#	project/src/utils/TimeUtil.ts
#	project/src/utils/UUidGenerator.ts
#	project/src/utils/VFS.ts
#	project/src/utils/collections/queue/Queue.ts
#	project/src/utils/logging/AbstractWinstonLogger.ts
#	project/src/utils/logging/WinstonMainLogger.ts
#	project/src/utils/logging/WinstonRequestLogger.ts
#	project/tests/utils/TimeUtil.test.ts

Manually resolved by Refringe.
2023-11-16 23:35:11 -05:00
Refringe
4ac12ef70a Formatting/Linting Changes (!168)
These are the formatting & linting configuration changes from the `3.8.0` branch and the changes that they make to the overall project.

The majority of these changes are from running two commands:

`npm run lint:fix`
`npm run style:fix`

This has already been run on the `3.8.0` branch and this PR should make `master` play nicer when it comes to merges going forward.

There are now four VSCode plugins recommended for server development. They've been added to the workspace file and a user should get a UI notification when the workspace is opened if they're not installed.

The four plugins are:
https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
https://marketplace.visualstudio.com/items?itemName=dprint.dprint
https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
https://marketplace.visualstudio.com/items?itemName=biomejs.biome

Once installed they should just work within the workspace.

Also, be sure to `npm i` to get the new dprint application.

Co-authored-by: Refringe <brownelltyler@gmail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/168
2023-11-16 21:42:06 +00:00
Refringe
f6ba864ea8
Removes unnecessary constructor. 2023-11-16 10:16:20 -05:00