Skip to content

Commit

Permalink
Stubbed out hideoutCustomizationApply event
Browse files Browse the repository at this point in the history
  • Loading branch information
Chomp committed Dec 27, 2024
1 parent 4fc76d5 commit a5fd699
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions project/src/callbacks/HideoutCallbacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean> {
if (timeSinceLastRun > this.hideoutConfig.runIntervalSeconds) {
this.hideoutController.update();
Expand Down
10 changes: 10 additions & 0 deletions project/src/controllers/HideoutController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
1 change: 1 addition & 0 deletions project/src/models/enums/HideoutEventActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
3 changes: 3 additions & 0 deletions project/src/routers/item_events/HideoutItemEventRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
];
}

Expand Down Expand Up @@ -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)}`);
}
Expand Down

0 comments on commit a5fd699

Please sign in to comment.