diff --git a/project/src/callbacks/InraidCallbacks.ts b/project/src/callbacks/InraidCallbacks.ts index 185d394b..7661e218 100644 --- a/project/src/callbacks/InraidCallbacks.ts +++ b/project/src/callbacks/InraidCallbacks.ts @@ -111,4 +111,9 @@ export class InraidCallbacks { return this.httpResponse.noBody(this.inraidController.getSandboxMaxPatrolValue(url, sessionId)); } + + public getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string + { + return this.httpResponse.noBody(this.inraidController.getBossConvertSettings(url, sessionId)) + } } diff --git a/project/src/controllers/InraidController.ts b/project/src/controllers/InraidController.ts index 39f322ef..dc4b8884 100644 --- a/project/src/controllers/InraidController.ts +++ b/project/src/controllers/InraidController.ts @@ -41,6 +41,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks @@ -55,6 +56,7 @@ export class InraidController protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor( @inject("PrimaryLogger") protected logger: ILogger, @@ -86,6 +88,7 @@ export class InraidController this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION); this.ragfairConfig = this.configServer.getConfig(ConfigTypes.RAGFAIR); this.hideoutConfig = this.configServer.getConfig(ConfigTypes.HIDEOUT); + this.botConfig = this.configServer.getConfig(ConfigTypes.BOT); } /** @@ -702,4 +705,9 @@ export class InraidController { return this.locationConfig.sandboxMaxPatrolvalue; } + + public getBossConvertSettings(url: string, sessionId: string): string[] + { + return Object.keys(this.botConfig.assaultToBossConversion.bossesToConvertToWeights); + } } diff --git a/project/src/routers/static/InraidStaticRouter.ts b/project/src/routers/static/InraidStaticRouter.ts index 0bf08cd5..36cc371f 100644 --- a/project/src/routers/static/InraidStaticRouter.ts +++ b/project/src/routers/static/InraidStaticRouter.ts @@ -65,6 +65,13 @@ export class InraidStaticRouter extends StaticRouter return this.inraidCallbacks.getSandboxMaxPatrolValue(url, info, sessionID); }, ), + new RouteAction( + "/singleplayer/BossConvert", + async (url: string, info: any, sessionID: string, output: string): Promise => + { + return this.inraidCallbacks.getBossConvertSettings(url, info, sessionID); + }, + ), ]); } }