Merge branch 'master' of https://dev.sp-tarkov.com/SPT/Server into 310-dev

This commit is contained in:
Dev 2024-07-05 17:48:58 +01:00
commit ed152caa1e
3 changed files with 20 additions and 0 deletions

View File

@ -111,4 +111,9 @@ export class InraidCallbacks
{ {
return this.httpResponse.noBody(this.inraidController.getSandboxMaxPatrolValue(url, sessionId)); 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))
}
} }

View File

@ -41,6 +41,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService";
import { TraderServicesService } from "@spt/services/TraderServicesService"; import { TraderServicesService } from "@spt/services/TraderServicesService";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil"; import { TimeUtil } from "@spt/utils/TimeUtil";
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
/** /**
* Logic for handling In Raid callbacks * Logic for handling In Raid callbacks
@ -55,6 +56,7 @@ export class InraidController
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
protected botConfig: IBotConfig;
constructor( constructor(
@inject("PrimaryLogger") protected logger: ILogger, @inject("PrimaryLogger") protected logger: ILogger,
@ -86,6 +88,7 @@ export class InraidController
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION); this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
this.ragfairConfig = this.configServer.getConfig(ConfigTypes.RAGFAIR); this.ragfairConfig = this.configServer.getConfig(ConfigTypes.RAGFAIR);
this.hideoutConfig = this.configServer.getConfig(ConfigTypes.HIDEOUT); 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; return this.locationConfig.sandboxMaxPatrolvalue;
} }
public getBossConvertSettings(url: string, sessionId: string): string[]
{
return Object.keys(this.botConfig.assaultToBossConversion.bossesToConvertToWeights);
}
} }

View File

@ -65,6 +65,13 @@ export class InraidStaticRouter extends StaticRouter
return this.inraidCallbacks.getSandboxMaxPatrolValue(url, info, sessionID); return this.inraidCallbacks.getSandboxMaxPatrolValue(url, info, sessionID);
}, },
), ),
new RouteAction(
"/singleplayer/BossConvert",
async (url: string, info: any, sessionID: string, output: string): Promise<string> =>
{
return this.inraidCallbacks.getBossConvertSettings(url, info, sessionID);
},
),
]); ]);
} }
} }