From a5fd69944286bc8b59d064f02a1f6015ac412434 Mon Sep 17 00:00:00 2001 From: Chomp Date: Fri, 27 Dec 2024 12:43:48 +0000 Subject: [PATCH] Stubbed out `hideoutCustomizationApply` event --- project/src/callbacks/HideoutCallbacks.ts | 11 +++++++++++ project/src/controllers/HideoutController.ts | 10 ++++++++++ project/src/models/enums/HideoutEventActions.ts | 1 + .../src/routers/item_events/HideoutItemEventRouter.ts | 3 +++ 4 files changed, 25 insertions(+) diff --git a/project/src/callbacks/HideoutCallbacks.ts b/project/src/callbacks/HideoutCallbacks.ts index 066f273b..f80d8f54 100644 --- a/project/src/callbacks/HideoutCallbacks.ts +++ b/project/src/callbacks/HideoutCallbacks.ts @@ -210,6 +210,17 @@ export class HideoutCallbacks implements OnUpdate { return this.hideoutController.hideoutDeleteProductionCommand(sessionId, pmcData, request); } + /** + * Handle client/game/profile/items/moving - HideoutCustomizationApply + */ + public hideoutCustomizationApplyCommand( + pmcData: IPmcData, + request: any, + sessionId: string, + ): IItemEventRouterResponse { + return this.hideoutController.hideoutCustomizationApply(sessionId, pmcData, request); + } + public async onUpdate(timeSinceLastRun: number): Promise { if (timeSinceLastRun > this.hideoutConfig.runIntervalSeconds) { this.hideoutController.update(); diff --git a/project/src/controllers/HideoutController.ts b/project/src/controllers/HideoutController.ts index 625dc899..e507cee9 100644 --- a/project/src/controllers/HideoutController.ts +++ b/project/src/controllers/HideoutController.ts @@ -1397,6 +1397,16 @@ export class HideoutController { return output; } + /** + * Handle HideoutCustomizationApply event + * @param sessionId Session id + * @param pmcData Player profile + * @param request Client request data + */ + public hideoutCustomizationApply(sessionId: string, pmcData: IPmcData, request: any): IItemEventRouterResponse { + throw new Error("Method not implemented."); + } + /** * Function called every `hideoutConfig.runIntervalSeconds` seconds as part of onUpdate event */ diff --git a/project/src/models/enums/HideoutEventActions.ts b/project/src/models/enums/HideoutEventActions.ts index d58b568e..b3c28864 100644 --- a/project/src/models/enums/HideoutEventActions.ts +++ b/project/src/models/enums/HideoutEventActions.ts @@ -13,4 +13,5 @@ export enum HideoutEventActions { HIDEOUT_CANCEL_PRODUCTION_COMMAND = "HideoutCancelProductionCommand", HIDEOUT_CIRCLE_OF_CULTIST_PRODUCTION_START = "HideoutCircleOfCultistProductionStart", HIDEOUT_DELETE_PRODUCTION_COMMAND = "HideoutDeleteProductionCommand", + HIDEOUT_CUSTOMIZATION_APPLY_COMMAND = "HideoutCustomizationApply", } diff --git a/project/src/routers/item_events/HideoutItemEventRouter.ts b/project/src/routers/item_events/HideoutItemEventRouter.ts index f9ddc73e..b78b5b63 100644 --- a/project/src/routers/item_events/HideoutItemEventRouter.ts +++ b/project/src/routers/item_events/HideoutItemEventRouter.ts @@ -27,6 +27,7 @@ export class HideoutItemEventRouter extends ItemEventRouterDefinition { new HandledRoute(HideoutEventActions.HIDEOUT_CANCEL_PRODUCTION_COMMAND, false), new HandledRoute(HideoutEventActions.HIDEOUT_CIRCLE_OF_CULTIST_PRODUCTION_START, false), new HandledRoute(HideoutEventActions.HIDEOUT_DELETE_PRODUCTION_COMMAND, false), + new HandledRoute(HideoutEventActions.HIDEOUT_CUSTOMIZATION_APPLY_COMMAND, false), ]; } @@ -66,6 +67,8 @@ export class HideoutItemEventRouter extends ItemEventRouterDefinition { return this.hideoutCallbacks.circleOfCultistProductionStart(pmcData, body, sessionID); case HideoutEventActions.HIDEOUT_DELETE_PRODUCTION_COMMAND: return this.hideoutCallbacks.hideoutDeleteProductionCommand(pmcData, body, sessionID); + case HideoutEventActions.HIDEOUT_CUSTOMIZATION_APPLY_COMMAND: + return this.hideoutCallbacks.hideoutCustomizationApplyCommand(pmcData, body, sessionID); default: throw new Error(`Unhandled event ${url} request: ${JSON.stringify(body)}`); }