Fix: convert BotLootCache to interface

This commit is contained in:
Dev 2023-03-22 14:49:24 +00:00
parent 8c37bc7837
commit e2074ffc7a
3 changed files with 13 additions and 13 deletions

View File

@ -11,7 +11,7 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { BaseClasses } from "../models/enums/BaseClasses"; import { BaseClasses } from "../models/enums/BaseClasses";
import { ConfigTypes } from "../models/enums/ConfigTypes"; import { ConfigTypes } from "../models/enums/ConfigTypes";
import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { EquipmentSlots } from "../models/enums/EquipmentSlots";
import { LootCacheType } from "../models/spt/bots/BotLootCache"; import { LootCacheType } from "../models/spt/bots/IBotLootCache";
import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IBotConfig } from "../models/spt/config/IBotConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";

View File

@ -1,17 +1,17 @@
import { ITemplateItem } from "../../eft/common/tables/ITemplateItem"; import { ITemplateItem } from "../../eft/common/tables/ITemplateItem";
export class BotLootCache export interface IBotLootCache
{ {
backpackLoot: ITemplateItem[]; backpackLoot: ITemplateItem[]
pocketLoot: ITemplateItem[]; pocketLoot: ITemplateItem[]
vestLoot: ITemplateItem[]; vestLoot: ITemplateItem[]
combinedPoolLoot: ITemplateItem[]; combinedPoolLoot: ITemplateItem[]
specialItems: ITemplateItem[]; specialItems: ITemplateItem[]
healingItems: ITemplateItem[]; healingItems: ITemplateItem[]
drugItems: ITemplateItem[]; drugItems: ITemplateItem[]
stimItems: ITemplateItem[]; stimItems: ITemplateItem[]
grenadeItems: ITemplateItem[]; grenadeItems: ITemplateItem[]
} }
export enum LootCacheType export enum LootCacheType

View File

@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper";
import { IBotType } from "../models/eft/common/tables/IBotType"; import { IBotType } from "../models/eft/common/tables/IBotType";
import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem";
import { BaseClasses } from "../models/enums/BaseClasses"; import { BaseClasses } from "../models/enums/BaseClasses";
import { BotLootCache, LootCacheType } from "../models/spt/bots/BotLootCache"; import { IBotLootCache, LootCacheType } from "../models/spt/bots/IBotLootCache";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
@ -15,7 +15,7 @@ import { RagfairPriceService } from "./RagfairPriceService";
@injectable() @injectable()
export class BotLootCacheService export class BotLootCacheService
{ {
protected lootCache: Record<string, BotLootCache>; protected lootCache: Record<string, IBotLootCache>;
constructor( constructor(
@inject("WinstonLogger") protected logger: ILogger, @inject("WinstonLogger") protected logger: ILogger,