From d33a9055ed1346680c6eca5242f87d5389f96c11 Mon Sep 17 00:00:00 2001 From: Chomp Date: Sun, 18 Dec 2022 19:01:48 +0000 Subject: [PATCH] Update types --- TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts | 4 +++- TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts | 4 +++- TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts | 4 +++- .../types/models/eft/common/tables/IBotType.d.ts | 2 +- .../types/models/eft/common/tables/IRepeatableQuests.d.ts | 2 +- .../models/eft/insurance/IGetInsuranceCostResponseData.d.ts | 2 +- .../models/eft/inventory/IInventoryBaseActionRequestData.d.ts | 2 +- .../types/models/eft/itemEvent/IItemEventRouterBase.d.ts | 2 +- .../types/models/eft/launcher/IRemoveProfileData.d.ts | 2 +- .../1LogToConsole/types/models/external/HttpFramework.d.ts | 2 +- TypeScript/1LogToConsole/types/services/InsuranceService.d.ts | 4 +++- .../1LogToConsole/types/services/ItemBaseClassService.d.ts | 4 +++- 12 files changed, 22 insertions(+), 12 deletions(-) diff --git a/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts index bfc157f..de8b5bf 100644 --- a/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts @@ -2,14 +2,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { LocalisationService } from "../services/LocalisationService"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { protected logger: ILogger; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected questHelper: QuestHelper; - constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** * Remove assorts from a trader that have not been unlocked yet * @param pmcProfile player profile diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index 962df38..c7b7329 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -5,6 +5,7 @@ import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; +import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; @@ -16,8 +17,9 @@ export declare class InRaidHelper { protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; + protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, profileFixerService: ProfileFixerService); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues diff --git a/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts index 0baf7d8..62a3492 100644 --- a/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts @@ -8,6 +8,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; +import { LocalisationService } from "../services/LocalisationService"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; import { HandbookHelper } from "./HandbookHelper"; @@ -23,11 +24,12 @@ export declare class TraderHelper { protected itemHelper: ItemHelper; protected handbookHelper: HandbookHelper; protected playerService: PlayerService; + protected localisationService: LocalisationService; protected fenceService: FenceService; protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, timeUtil: TimeUtil, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; /** diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotType.d.ts index 02c4b41..e02d990 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotType.d.ts @@ -156,4 +156,4 @@ export interface Items { SpecialLoot: string[]; TacticalVest: string[]; } -export declare type Mods = Record>; +export type Mods = Record>; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IRepeatableQuests.d.ts index e23ec73..6a02958 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -25,7 +25,7 @@ export interface IPmcDataRepeatableQuest { endTime: number; changeRequirement: TChangeRequirementRecord; } -export declare type TChangeRequirementRecord = Record; +export type TChangeRequirementRecord = Record; export interface IChangeRequirement { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/insurance/IGetInsuranceCostResponseData.d.ts b/TypeScript/1LogToConsole/types/models/eft/insurance/IGetInsuranceCostResponseData.d.ts index bf209c6..4579fdb 100644 --- a/TypeScript/1LogToConsole/types/models/eft/insurance/IGetInsuranceCostResponseData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/insurance/IGetInsuranceCostResponseData.d.ts @@ -1 +1 @@ -export declare type IGetInsuranceCostResponseData = Record>; +export type IGetInsuranceCostResponseData = Record>; diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b45e459..6d7c190 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -16,7 +16,7 @@ export interface ToLocation { export interface Container { id: string; container: string; - location: Location | number; + location?: Location | number; } export interface Location { x: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 60ab284..6b18df3 100644 --- a/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -7,7 +7,7 @@ export interface IItemEventRouterBase { warnings: Warning[]; profileChanges: TProfileChanges | ""; } -export declare type TProfileChanges = Record; +export type TProfileChanges = Record; export interface Warning { index: number; errmsg: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/launcher/IRemoveProfileData.d.ts b/TypeScript/1LogToConsole/types/models/eft/launcher/IRemoveProfileData.d.ts index d31c9ac..4cc5618 100644 --- a/TypeScript/1LogToConsole/types/models/eft/launcher/IRemoveProfileData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/launcher/IRemoveProfileData.d.ts @@ -1,2 +1,2 @@ import { ILoginRequestData } from "./ILoginRequestData"; -export declare type IRemoveProfileData = ILoginRequestData; +export type IRemoveProfileData = ILoginRequestData; diff --git a/TypeScript/1LogToConsole/types/models/external/HttpFramework.d.ts b/TypeScript/1LogToConsole/types/models/external/HttpFramework.d.ts index 3b4a56a..64a37d6 100644 --- a/TypeScript/1LogToConsole/types/models/external/HttpFramework.d.ts +++ b/TypeScript/1LogToConsole/types/models/external/HttpFramework.d.ts @@ -1,6 +1,6 @@ /// import { IncomingMessage, ServerResponse } from "http"; -export declare type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) => void; +export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) => void; /** * Associates handlers, HTTP methods and a base url to a listener using a proxy * @param basePath The base path diff --git a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts index 4474129..9328b54 100644 --- a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts @@ -13,6 +13,7 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; export declare class InsuranceService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -23,10 +24,11 @@ export declare class InsuranceService { protected traderHelper: TraderHelper; protected dialogueHelper: DialogueHelper; protected handbookHelper: HandbookHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; getInsurance(sessionId: string): Record; diff --git a/TypeScript/1LogToConsole/types/services/ItemBaseClassService.d.ts b/TypeScript/1LogToConsole/types/services/ItemBaseClassService.d.ts index 3c60658..d7bc4bc 100644 --- a/TypeScript/1LogToConsole/types/services/ItemBaseClassService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ItemBaseClassService.d.ts @@ -1,15 +1,17 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { LocalisationService } from "./LocalisationService"; /** * Cache the baseids for each item in the tiems db inside a dictionary */ export declare class ItemBaseClassService { protected logger: ILogger; + protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; protected itemBaseClassesCache: Record; protected cacheGenerated: boolean; - constructor(logger: ILogger, databaseServer: DatabaseServer); + constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); /** * Create cache and store inside ItemBaseClassService */