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 { ConfigTypes } from "../models/enums/ConfigTypes";
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 { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";

View File

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

View File

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