From 02b903e13e64880b1f1cd0c85a34347c360ecd6b Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 1 Sep 2024 13:18:30 +0100 Subject: [PATCH] Renamed `IHandbookBase` interfaces --- project/src/helpers/HandbookHelper.ts | 4 ++-- project/src/models/eft/common/tables/IHandbookBase.ts | 8 ++++---- project/src/services/RagfairPriceService.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/project/src/helpers/HandbookHelper.ts b/project/src/helpers/HandbookHelper.ts index 05dc6900..fd218169 100644 --- a/project/src/helpers/HandbookHelper.ts +++ b/project/src/helpers/HandbookHelper.ts @@ -1,4 +1,4 @@ -import { Category } from "@spt/models/eft/common/tables/IHandbookBase"; +import { IHandbookCategory } from "@spt/models/eft/common/tables/IHandbookBase"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; import { Money } from "@spt/models/enums/Money"; @@ -176,7 +176,7 @@ export class HandbookHelper { return price ? Math.max(1, Math.round(roubleCurrencyCount / price)) : 0; } - public getCategoryById(handbookId: string): Category { + public getCategoryById(handbookId: string): IHandbookCategory { return this.databaseService.getHandbook().Categories.find((category) => category.Id === handbookId); } } diff --git a/project/src/models/eft/common/tables/IHandbookBase.ts b/project/src/models/eft/common/tables/IHandbookBase.ts index d1b20fd8..e0a3e6d0 100644 --- a/project/src/models/eft/common/tables/IHandbookBase.ts +++ b/project/src/models/eft/common/tables/IHandbookBase.ts @@ -1,9 +1,9 @@ export interface IHandbookBase { - Categories: Category[]; - Items: HandbookItem[]; + Categories: IHandbookCategory[]; + Items: IHandbookItem[]; } -export interface Category { +export interface IHandbookCategory { Id: string; ParentId?: string; Icon: string; @@ -11,7 +11,7 @@ export interface Category { Order: string; } -export interface HandbookItem { +export interface IHandbookItem { Id: string; ParentId: string; Price: number; diff --git a/project/src/services/RagfairPriceService.ts b/project/src/services/RagfairPriceService.ts index d8fe0a15..28595956 100644 --- a/project/src/services/RagfairPriceService.ts +++ b/project/src/services/RagfairPriceService.ts @@ -5,7 +5,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { HandbookItem } from "@spt/models/eft/common/tables/IHandbookBase"; +import { IHandbookItem } from "@spt/models/eft/common/tables/IHandbookBase"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; @@ -327,7 +327,7 @@ export class RagfairPriceService implements OnLoad { * @returns Adjusted price of item */ protected adjustUnreasonablePrice( - handbookPrices: HandbookItem[], + handbookPrices: IHandbookItem[], unreasonableItemChange: IUnreasonableModPrices, itemTpl: string, price: number,