Commit Graph

78 Commits

Author SHA1 Message Date
Refringe
0ac9e147cb
Resolved post-conflict syntax errors. Sorry! 2023-11-16 10:07:46 -05:00
Dev
fce724b380 Fix water collector craft not resetting after completion of craft 2023-11-16 12:55:57 +00:00
Refringe
8066eb942e
Merge branch 'fix/linting-errors' into 3.8.0
# Conflicts:
#	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/InventoryCallbacks.ts
#	project/src/callbacks/LauncherCallbacks.ts
#	project/src/callbacks/ModCallbacks.ts
#	project/src/callbacks/PresetCallbacks.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/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/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/BotGenerator.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/HttpServerHelper.ts
#	project/src/helpers/InRaidHelper.ts
#	project/src/helpers/TradeHelper.ts
#	project/src/helpers/TraderHelper.ts
#	project/src/loaders/PostDBModLoader.ts
#	project/src/loaders/PreAkiModLoader.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/IProcessSellTradeRequestData.ts
#	project/src/models/external/HttpFramework.ts
#	project/src/models/external/tsyringe.ts
#	project/src/models/spt/config/ILocationConfig.ts
#	project/src/models/spt/server/ILocations.ts
#	project/src/routers/dynamic/BundleDynamicRouter.ts
#	project/src/routers/dynamic/DataDynamicRouter.ts
#	project/src/routers/dynamic/HttpDynamicRouter.ts
#	project/src/routers/dynamic/NotifierDynamicRouter.ts
#	project/src/routers/save_load/HealthSaveLoadRouter.ts
#	project/src/routers/save_load/InraidSaveLoadRouter.ts
#	project/src/routers/save_load/InsuranceSaveLoadRouter.ts
#	project/src/routers/save_load/ProfileSaveLoadRouter.ts
#	project/src/routers/static/BundleStaticRouter.ts
#	project/src/routers/static/ClientLogStaticRouter.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/LauncherStaticRouter.ts
#	project/src/routers/static/LocationStaticRouter.ts
#	project/src/routers/static/MatchStaticRouter.ts
#	project/src/routers/static/ProfileStaticRouter.ts
#	project/src/routers/static/QuestStaticRouter.ts
#	project/src/routers/static/RagfairStaticRouter.ts
#	project/src/routers/static/WeatherStaticRouter.ts
#	project/src/services/BotGenerationCacheService.ts
#	project/src/services/BotLootCacheService.ts
#	project/src/services/LocalisationService.ts
#	project/src/services/ProfileFixerService.ts
#	project/src/services/RagfairOfferService.ts
#	project/src/services/RagfairTaxService.ts
#	project/src/services/RepairService.ts
#	project/src/utils/App.ts
#	project/src/utils/DatabaseImporter.ts
#	project/src/utils/RagfairOfferHolder.ts
#	project/src/utils/collections/queue/Queue.ts
#	project/tests/__factories__/ProfileInsurance.factory.ts
#	project/tests/controllers/InsuranceController.test.ts

Manually resolved by Refringe
2023-11-15 22:28:43 -05:00
Refringe
622949cd83
Auto-formatting Sweep 2023-11-15 21:12:40 -05:00
Refringe
0793df60c2
Formatting Change - Space is now given around object properties. 2023-11-13 12:38:16 -05:00
Refringe
32b47bdc18
Formatting Change - When a statement can be moved into a single line and still be under the maximum line length, it is. 2023-11-13 12:31:52 -05:00
Refringe
e709b6c111
Reformatted imports with (only) Biome. 2023-11-13 11:43:37 -05:00
Refringe
b90fb8c8b9
Formatting for routers. 2023-11-13 11:12:17 -05:00
Dev
0666aad779 Implement Unbind event handler
Occurs when player moves item from quick access panel to inventory

Small optimistion for `Bind` event, once item is found, exit loop
2023-11-12 10:10:34 +00:00
TheSparta
3eee163aae fixed lint/complexity/noForEach 2023-11-08 19:51:52 +00:00
TheSparta
40a9ed4102 fixed lint/complexity/noUselessConstructor 2023-11-08 19:51:52 +00:00
Dev
cc86ecce2b Send correct data to client to inform it craft has been cancelled 2023-10-28 17:48:37 +01:00
Dev
0316278b15 First pass at handling the cancellation of a hideout craft.
Doesnt explode server with unhandled exception error
Does remove craft from profile
Doesnt remove it from client screen until client refresh
2023-10-28 15:53:13 +01:00
DrakiaXYZ
170a185928 Add a new /singleplayer/log route (!160)
Add a new /singleplayer/log route for logging data to the server console from the client

Supports:
- All server log levels
- `Custom` log level with text/background color
- Specifying the source of the log line (ex. Plugin name)

Example output:
![Example](https://i.imgur.com/c0XBYLm.png)

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/160
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2023-10-26 09:44:17 +00:00
Dev
729b180e85 Add request object type 2023-10-25 11:54:11 +01:00
TheSparta
418d9f2a8f Import path alias on the whole project (!157)
- 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>
2023-10-19 17:21:17 +00:00
TheSparta
723f8db572 Updated dependencies + A few other things (!150)
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>
2023-10-14 09:01:41 +00:00
chomp
0b67a9a0e9 0.13.5.0 (!147)
Co-authored-by: Dev <dev@dev.sp-tarkov.com>
Co-authored-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-authored-by: Refringe <refringe@noreply.dev.sp-tarkov.com>
Co-authored-by: Kaeno <e>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/147
2023-10-10 11:03:20 +00:00
Dev
91ec0144ed Esxpose two endpoints for launcher to get mod-related data 2023-08-10 14:29:09 +01:00
chomp
c1a4c544bc Add JSONC support to server configs + use by modders (!112)
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
2023-08-09 10:49:45 +00:00
Dev
965e3efbc7 Handle additional events: ignore/set and ignore/remove
Pass full request object generateDialogueView instead of just id

Handle case when getting dialogue from profile that does not exist

Improve `getMessagePreview()`  nullguard properties that may be missing
2023-07-15 15:01:23 +01:00
Dev
2df0d44de5 Add mock implementation for client/friend/request/cancel endpoint
Addec comments
2023-07-14 13:03:55 +01:00
Dev
17afc9e460 Add endpoint stubs and improve request/response objects 2023-05-20 18:37:39 +01:00
Dev
f52c42e8b7 Fixed bug when enabling generator for long-running generator-off crafts gaining a burst of progress as if generator was on the whole time
Refactor updateProductionProgress() to get seconds between `sptUpdateLastRunTimestamp` and now instead of crafts `StartTimestamp` and now

Store hideout craft progress as decimal for better accuracy when crafting without generator

Added code to EventOutputHolder to ensure we continue to return progress as an int
2023-04-23 19:24:00 +01:00
Dev
8115b62e73 Fix: add nullguards to getResponse() 2023-03-18 09:19:20 +00:00
chomp
e4bc6c8d68 Feature: Improve numerous endpoints + add function for sending messages to player (!39)
Co-authored-by: Dev <dev@noreply.dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/39
2023-03-07 22:25:23 +00:00
chomp
17dcf6a45f Feature: Stub out /client/match/group/invite/cancel-all endpoint (!36)
Co-authored-by: Dev <dev@noreply.dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/36
2023-03-07 12:56:44 +00:00
Dev
e1310d74ca Add Repo 2023-03-03 15:23:46 +00:00