ClearVision/types/controllers/GameController.d.ts

101 lines
5.3 KiB
TypeScript
Raw Normal View History

2022-11-20 14:59:15 -05:00
import { ApplicationContext } from "../context/ApplicationContext";
2023-05-18 15:57:25 -04:00
import { HideoutHelper } from "../helpers/HideoutHelper";
2022-07-09 16:03:26 -04:00
import { HttpServerHelper } from "../helpers/HttpServerHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
2023-05-18 15:57:25 -04:00
import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
2022-07-09 16:03:26 -04:00
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
2023-05-18 15:57:25 -04:00
import { IPmcData } from "../models/eft/common/IPmcData";
2022-11-20 14:59:15 -05:00
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
2023-05-30 19:24:58 -04:00
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
2022-07-09 16:03:26 -04:00
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
2022-11-20 14:59:15 -05:00
import { IServerDetails } from "../models/eft/game/IServerDetails";
2022-07-09 16:03:26 -04:00
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
2023-05-18 15:57:25 -04:00
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
2022-07-09 16:03:26 -04:00
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
2022-10-06 23:29:01 -04:00
import { DatabaseServer } from "../servers/DatabaseServer";
2023-05-18 15:57:25 -04:00
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
2022-11-20 14:59:15 -05:00
import { LocalisationService } from "../services/LocalisationService";
2023-05-18 15:57:25 -04:00
import { OpenZoneService } from "../services/OpenZoneService";
2022-10-06 23:29:01 -04:00
import { ProfileFixerService } from "../services/ProfileFixerService";
2023-05-18 15:57:25 -04:00
import { SeasonalEventService } from "../services/SeasonalEventService";
2023-05-30 19:24:58 -04:00
import { EncodingUtil } from "../utils/EncodingUtil";
2023-05-18 15:57:25 -04:00
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
2022-07-09 16:03:26 -04:00
export declare class GameController {
protected logger: ILogger;
2022-10-06 23:29:01 -04:00
protected databaseServer: DatabaseServer;
2023-05-18 15:57:25 -04:00
protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil;
protected preAkiModLoader: PreAkiModLoader;
2022-07-09 16:03:26 -04:00
protected httpServerHelper: HttpServerHelper;
2023-05-30 19:24:58 -04:00
protected encodingUtil: EncodingUtil;
2023-05-18 15:57:25 -04:00
protected hideoutHelper: HideoutHelper;
2022-07-09 16:03:26 -04:00
protected profileHelper: ProfileHelper;
2022-10-06 23:29:01 -04:00
protected profileFixerService: ProfileFixerService;
2022-11-20 14:59:15 -05:00
protected localisationService: LocalisationService;
2023-05-18 15:57:25 -04:00
protected customLocationWaveService: CustomLocationWaveService;
protected openZoneService: OpenZoneService;
protected seasonalEventService: SeasonalEventService;
2022-11-20 14:59:15 -05:00
protected applicationContext: ApplicationContext;
2022-07-09 16:03:26 -04:00
protected configServer: ConfigServer;
2023-05-30 19:24:58 -04:00
protected os: any;
2022-07-09 16:03:26 -04:00
protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig;
2023-05-18 15:57:25 -04:00
protected locationConfig: ILocationConfig;
2023-05-30 19:24:58 -04:00
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
2022-11-20 14:59:15 -05:00
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
/**
2023-05-18 15:57:25 -04:00
* BSG have two values for shotgun dispersion, we make sure both have the same value
2022-11-20 14:59:15 -05:00
*/
2023-05-18 15:57:25 -04:00
protected fixShotgunDispersions(): void;
2022-11-20 14:59:15 -05:00
/**
2023-05-18 15:57:25 -04:00
* Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it
* @param pmcProfile Player profile
2022-11-20 14:59:15 -05:00
*/
2023-05-18 15:57:25 -04:00
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
2022-11-20 14:59:15 -05:00
/**
2023-05-18 15:57:25 -04:00
* When player logs in, iterate over all active effects and reduce timer
* TODO - add body part HP regen
* @param pmcProfile
2022-11-20 14:59:15 -05:00
*/
2023-05-18 15:57:25 -04:00
protected updateProfileHealthValues(pmcProfile: IPmcData): void;
2022-11-20 14:59:15 -05:00
/**
2023-05-18 15:57:25 -04:00
* Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max
2022-11-20 14:59:15 -05:00
*/
2023-05-18 15:57:25 -04:00
protected fixBrokenOfflineMapWaves(): void;
/**
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
*/
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
/**
* Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long
*/
protected splitBotWavesIntoSingleWaves(): void;
/**
* Get a list of installed mods and save their details to the profile being used
* @param fullProfile Profile to add mod details to
*/
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
/**
* Add the logged in players name to PMC name pool
* @param pmcProfile
*/
protected addPlayerToPMCNames(pmcProfile: IPmcData): void;
/**
* Blank out the "test" mail message from prapor
*/
protected removePraporTestMessage(): void;
2022-10-06 23:29:01 -04:00
/**
* Make non-trigger-spawned raiders spawn earlier + always
*/
protected adjustLabsRaiderSpawnRate(): void;
protected logProfileDetails(fullProfile: IAkiProfile): void;
2022-07-09 16:03:26 -04:00
getGameConfig(sessionID: string): IGameConfigResponse;
2022-11-20 14:59:15 -05:00
getServer(): IServerDetails[];
2023-05-30 19:24:58 -04:00
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
2022-11-20 14:59:15 -05:00
getValidGameVersion(): ICheckVersionResponse;
2022-07-09 16:03:26 -04:00
}