two-slot-extended-mags/types/services/MatchBotDetailsCacheService.d.ts

26 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-04-03 20:15:11 +11:00
import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { LocalisationService } from "@spt-aki/services/LocalisationService";
2023-10-09 20:21:00 +11:00
/** Cache bots in a dictionary, keyed by the bots name, keying by name isnt ideal as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */
2023-06-11 15:10:34 +10:00
export declare class MatchBotDetailsCacheService {
protected logger: ILogger;
2023-10-09 20:21:00 +11:00
protected localisationService: LocalisationService;
2023-06-11 15:10:34 +10:00
protected botDetailsCache: Record<string, IBotBase>;
2023-10-09 20:21:00 +11:00
constructor(logger: ILogger, localisationService: LocalisationService);
2023-06-11 15:10:34 +10:00
/**
* Store a bot in the cache, keyed by its name
* @param botToCache Bot details to cache
*/
cacheBot(botToCache: IBotBase): void;
/**
* Clean the cache of all bot details
*/
clearCache(): void;
/**
2023-10-09 20:21:00 +11:00
* Find a bot in the cache by its name and side
2023-06-11 15:10:34 +10:00
* @param botName Name of bot to find
* @returns Bot details
*/
2023-10-09 20:21:00 +11:00
getBotByNameAndSide(botName: string, botSide: string): IBotBase;
2023-06-11 15:10:34 +10:00
}