72 lines
3.4 KiB
TypeScript
72 lines
3.4 KiB
TypeScript
import { ApplicationContext } from "../context/ApplicationContext";
|
|
import { BotGenerator } from "../generators/BotGenerator";
|
|
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
|
import { BotHelper } from "../helpers/BotHelper";
|
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
|
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
|
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
import { ILogger } from "../models/spt/utils/ILogger";
|
|
import { ConfigServer } from "../servers/ConfigServer";
|
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
|
import { LocalisationService } from "../services/LocalisationService";
|
|
import { JsonUtil } from "../utils/JsonUtil";
|
|
export declare class BotController {
|
|
protected logger: ILogger;
|
|
protected databaseServer: DatabaseServer;
|
|
protected botGenerator: BotGenerator;
|
|
protected botHelper: BotHelper;
|
|
protected botDifficultyHelper: BotDifficultyHelper;
|
|
protected botGenerationCacheService: BotGenerationCacheService;
|
|
protected localisationService: LocalisationService;
|
|
protected profileHelper: ProfileHelper;
|
|
protected configServer: ConfigServer;
|
|
protected applicationContext: ApplicationContext;
|
|
protected jsonUtil: JsonUtil;
|
|
protected botConfig: IBotConfig;
|
|
static readonly pmcTypeLabel = "PMC";
|
|
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
|
|
/**
|
|
* Return the number of bot loadout varieties to be generated
|
|
* @param type bot Type we want the loadout gen count for
|
|
* @returns number of bots to generate
|
|
*/
|
|
getBotPresetGenerationLimit(type: string): number;
|
|
/**
|
|
* Get the core.json difficulty settings from database\bots
|
|
* @returns IBotCore
|
|
*/
|
|
getBotCoreDifficulty(): IBotCore;
|
|
/**
|
|
* Get bot difficulty settings
|
|
* adjust PMC settings to ensure they engage the correct bot types
|
|
* @param type what bot the server is requesting settings for
|
|
* @param difficulty difficulty level server requested settings for
|
|
* @returns Difficulty object
|
|
*/
|
|
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
|
/**
|
|
* Generate bot profiles and store in cache
|
|
* @param sessionId Session id
|
|
* @param info bot generation request info
|
|
* @returns IBotBase array
|
|
*/
|
|
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
|
/**
|
|
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
|
* @param requestedDifficulty
|
|
* @returns
|
|
*/
|
|
getPMCDifficulty(requestedDifficulty: string): string;
|
|
/**
|
|
* Get the max number of bots allowed on a map
|
|
* Looks up location player is entering when getting cap value
|
|
* @returns cap number
|
|
*/
|
|
getBotCap(): number;
|
|
getPmcBotTypes(): Record<string, Record<string, Record<string, number>>>;
|
|
}
|