ClearVision/types/controllers/BotController.d.ts

74 lines
3.6 KiB
TypeScript
Raw Normal View History

2022-10-06 23:29:01 -04:00
import { ApplicationContext } from "../context/ApplicationContext";
2022-07-09 16:03:26 -04:00
import { BotGenerator } from "../generators/BotGenerator";
2022-11-20 14:59:15 -05:00
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
2022-07-09 16:03:26 -04:00
import { BotHelper } from "../helpers/BotHelper";
2023-05-18 15:57:25 -04:00
import { ProfileHelper } from "../helpers/ProfileHelper";
2022-07-09 16:03:26 -04:00
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";
2022-10-06 23:29:01 -04:00
import { ILogger } from "../models/spt/utils/ILogger";
2022-07-09 16:03:26 -04:00
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
2022-10-06 23:29:01 -04:00
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
2022-11-20 14:59:15 -05:00
import { LocalisationService } from "../services/LocalisationService";
2023-05-18 15:57:25 -04:00
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
2022-11-20 14:59:15 -05:00
import { JsonUtil } from "../utils/JsonUtil";
2022-07-09 16:03:26 -04:00
export declare class BotController {
2022-10-06 23:29:01 -04:00
protected logger: ILogger;
2022-07-09 16:03:26 -04:00
protected databaseServer: DatabaseServer;
protected botGenerator: BotGenerator;
protected botHelper: BotHelper;
2022-11-20 14:59:15 -05:00
protected botDifficultyHelper: BotDifficultyHelper;
2022-10-06 23:29:01 -04:00
protected botGenerationCacheService: BotGenerationCacheService;
2023-05-18 15:57:25 -04:00
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
2022-11-20 14:59:15 -05:00
protected localisationService: LocalisationService;
2023-05-18 15:57:25 -04:00
protected profileHelper: ProfileHelper;
2022-07-09 16:03:26 -04:00
protected configServer: ConfigServer;
2022-10-06 23:29:01 -04:00
protected applicationContext: ApplicationContext;
2022-11-20 14:59:15 -05:00
protected jsonUtil: JsonUtil;
2022-07-09 16:03:26 -04:00
protected botConfig: IBotConfig;
2022-11-20 14:59:15 -05:00
static readonly pmcTypeLabel = "PMC";
2023-05-18 15:57:25 -04:00
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
2022-07-09 16:03:26 -04:00
/**
* Return the number of bot loadout varieties to be generated
* @param type bot Type we want the loadout gen count for
2023-05-18 15:57:25 -04:00
* @returns number of bots to generate
2022-07-09 16:03:26 -04:00
*/
getBotPresetGenerationLimit(type: string): number;
2023-05-18 15:57:25 -04:00
/**
* Get the core.json difficulty settings from database\bots
* @returns IBotCore
*/
2022-07-09 16:03:26 -04:00
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;
2022-10-06 23:29:01 -04:00
/**
* 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[];
2023-05-18 15:57:25 -04:00
/**
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
* @param requestedDifficulty
* @returns
*/
getPMCDifficulty(requestedDifficulty: string): string;
2022-10-06 23:29:01 -04:00
/**
* Get the max number of bots allowed on a map
* Looks up location player is entering when getting cap value
* @returns cap number
*/
2022-07-09 16:03:26 -04:00
getBotCap(): number;
2022-11-20 14:59:15 -05:00
getPmcBotTypes(): Record<string, Record<string, Record<string, number>>>;
2022-07-09 16:03:26 -04:00
}