Merge branch 'master' of https://dev.sp-tarkov.com/SPT/Server into 310-dev
This commit is contained in:
commit
ed152caa1e
@ -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))
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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<string> =>
|
||||
{
|
||||
return this.inraidCallbacks.getBossConvertSettings(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user