From e2074ffc7a6c0d28a9945dccd9cca36d9577a9f6 Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 22 Mar 2023 14:49:24 +0000 Subject: [PATCH] Fix: convert BotLootCache to interface --- project/src/generators/BotLootGenerator.ts | 2 +- .../{BotLootCache.ts => IBotLootCache.ts} | 20 +++++++++---------- project/src/services/BotLootCacheService.ts | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) rename project/src/models/spt/bots/{BotLootCache.ts => IBotLootCache.ts} (52%) diff --git a/project/src/generators/BotLootGenerator.ts b/project/src/generators/BotLootGenerator.ts index 6a722f59..7c03f5b3 100644 --- a/project/src/generators/BotLootGenerator.ts +++ b/project/src/generators/BotLootGenerator.ts @@ -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"; diff --git a/project/src/models/spt/bots/BotLootCache.ts b/project/src/models/spt/bots/IBotLootCache.ts similarity index 52% rename from project/src/models/spt/bots/BotLootCache.ts rename to project/src/models/spt/bots/IBotLootCache.ts index 847bc1cc..10b7f294 100644 --- a/project/src/models/spt/bots/BotLootCache.ts +++ b/project/src/models/spt/bots/IBotLootCache.ts @@ -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 diff --git a/project/src/services/BotLootCacheService.ts b/project/src/services/BotLootCacheService.ts index e1278ed8..05eb0d06 100644 --- a/project/src/services/BotLootCacheService.ts +++ b/project/src/services/BotLootCacheService.ts @@ -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; + protected lootCache: Record; constructor( @inject("WinstonLogger") protected logger: ILogger,