diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index 66d71317..c81fdeaf 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -8,7 +8,7 @@ import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocation } from "@spt/models/eft/common/ILocation"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { BodyPartHealth } from "@spt/models/eft/common/tables/IBotBase"; +import { IBodyPartHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ICheckVersionResponse } from "@spt/models/eft/game/ICheckVersionResponse"; import { ICurrentGroupResponse } from "@spt/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; @@ -669,7 +669,7 @@ export class GameController { // Check all body parts for (const bodyPartKey in pmcProfile.Health.BodyParts) { - const bodyPart = pmcProfile.Health.BodyParts[bodyPartKey] as BodyPartHealth; + const bodyPart = pmcProfile.Health.BodyParts[bodyPartKey] as IBodyPartHealth; // Check part hp if (bodyPart.Health.Current < bodyPart.Health.Maximum) { diff --git a/project/src/controllers/HideoutController.ts b/project/src/controllers/HideoutController.ts index a7b3f19d..cf97fa82 100644 --- a/project/src/controllers/HideoutController.ts +++ b/project/src/controllers/HideoutController.ts @@ -6,7 +6,7 @@ import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { HideoutArea, ITaskConditionCounter, Product, ScavCase } from "@spt/models/eft/common/tables/IBotBase"; +import { IBotHideoutArea, IProduct, IScavCase, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; @@ -270,7 +270,7 @@ export class HideoutController { output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, - profileParentHideoutArea: HideoutArea, + profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage, ): void { @@ -553,7 +553,7 @@ export class HideoutController { pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, - hideoutArea: HideoutArea, + hideoutArea: IBotHideoutArea, ): IItemEventRouterResponse { const slotIndexToRemove = removeResourceRequest.slots[0]; @@ -749,7 +749,7 @@ export class HideoutController { * @param rewards reward items to add to profile * @param recipeId recipe id to save into Production dict */ - protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipeId: string): void { + protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: IProduct[], recipeId: string): void { pmcData.Hideout.Production[`ScavCase${recipeId}`] = { Products: rewards }; } @@ -1085,7 +1085,7 @@ export class HideoutController { for (const production of ongoingProductions) { if (this.hideoutHelper.isProductionType(production[1])) { // Production or ScavCase - if ((production[1] as ScavCase).RecipeId === request.recipeId) { + if ((production[1] as IScavCase).RecipeId === request.recipeId) { prodId = production[0]; // Set to objects key break; } diff --git a/project/src/controllers/NoteController.ts b/project/src/controllers/NoteController.ts index d175275f..043d08de 100644 --- a/project/src/controllers/NoteController.ts +++ b/project/src/controllers/NoteController.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Note } from "@spt/models/eft/common/tables/IBotBase"; +import { INote } from "@spt/models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -10,14 +10,14 @@ export class NoteController { constructor(@inject("EventOutputHolder") protected eventOutputHolder: EventOutputHolder) {} public addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse { - const newNote: Note = { Time: body.note.Time, Text: body.note.Text }; + const newNote: INote = { Time: body.note.Time, Text: body.note.Text }; pmcData.Notes.Notes.push(newNote); return this.eventOutputHolder.getOutput(sessionID); } public editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse { - const noteToEdit: Note = pmcData.Notes.Notes[body.index]; + const noteToEdit: INote = pmcData.Notes.Notes[body.index]; noteToEdit.Time = body.note.Time; noteToEdit.Text = body.note.Text; diff --git a/project/src/generators/BotGenerator.ts b/project/src/generators/BotGenerator.ts index cd7aeca1..c62ca9c7 100644 --- a/project/src/generators/BotGenerator.ts +++ b/project/src/generators/BotGenerator.ts @@ -9,9 +9,9 @@ import { IBaseJsonSkills, IBaseSkill, IBotBase, - Info, - Health as PmcHealth, - Skills as botSkills, + IInfo, + IHealth as PmcHealth, + ISkills as botSkills, } from "@spt/models/eft/common/tables/IBotBase"; import { Appearance, BodyPart, Health, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; @@ -516,7 +516,7 @@ export class BotGenerator { * @param botInfo bot info object to update * @returns Chosen game version */ - protected setRandomisedGameVersionAndCategory(botInfo: Info): string { + protected setRandomisedGameVersionAndCategory(botInfo: IInfo): string { // Special case if (botInfo.Nickname?.toLowerCase() === "nikita") { botInfo.GameVersion = GameEditions.UNHEARD; diff --git a/project/src/generators/BotInventoryGenerator.ts b/project/src/generators/BotInventoryGenerator.ts index f7094a93..caaf02c3 100644 --- a/project/src/generators/BotInventoryGenerator.ts +++ b/project/src/generators/BotInventoryGenerator.ts @@ -5,7 +5,7 @@ import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { Inventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; +import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; diff --git a/project/src/generators/BotLootGenerator.ts b/project/src/generators/BotLootGenerator.ts index 3e1f5783..0d7d659c 100644 --- a/project/src/generators/BotLootGenerator.ts +++ b/project/src/generators/BotLootGenerator.ts @@ -5,7 +5,7 @@ import { HandbookHelper } from "@spt/helpers/HandbookHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { Inventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; +import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, Inventory, ModsChances } from "@spt/models/eft/common/tables/IBotType"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; diff --git a/project/src/generators/BotWeaponGenerator.ts b/project/src/generators/BotWeaponGenerator.ts index a9afe442..41ad3e5b 100644 --- a/project/src/generators/BotWeaponGenerator.ts +++ b/project/src/generators/BotWeaponGenerator.ts @@ -6,7 +6,7 @@ import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper" import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Inventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; +import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { GenerationData, Inventory, ModsChances } from "@spt/models/eft/common/tables/IBotType"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; diff --git a/project/src/generators/LocationLootGenerator.ts b/project/src/generators/LocationLootGenerator.ts index a47ffa0c..4efdddf3 100644 --- a/project/src/generators/LocationLootGenerator.ts +++ b/project/src/generators/LocationLootGenerator.ts @@ -10,7 +10,7 @@ import { IStaticLootDetails, } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; @@ -71,9 +71,9 @@ export class LocationLootGenerator { public generateStaticContainers( locationBase: ILocationBase, staticAmmoDist: Record, - ): SpawnpointTemplate[] { + ): ISpawnpointTemplate[] { let staticLootItemCount = 0; - const result: SpawnpointTemplate[] = []; + const result: ISpawnpointTemplate[] = []; const locationId = locationBase.Id.toLowerCase(); const mapData = this.databaseService.getLocation(locationId); @@ -575,9 +575,9 @@ export class LocationLootGenerator { dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string, - ): SpawnpointTemplate[] { - const loot: SpawnpointTemplate[] = []; - const dynamicForcedSpawnPoints: SpawnpointsForced[] = []; + ): ISpawnpointTemplate[] { + const loot: ISpawnpointTemplate[] = []; + const dynamicForcedSpawnPoints: ISpawnpointsForced[] = []; // Build the list of forced loot from both `spawnpointsForced` and any point marked `IsAlwaysSpawn` dynamicForcedSpawnPoints.push(...dynamicLootDist.spawnpointsForced); @@ -598,10 +598,10 @@ export class LocationLootGenerator { ); // Positions not in forced but have 100% chance to spawn - const guaranteedLoosePoints: Spawnpoint[] = []; + const guaranteedLoosePoints: ISpawnpoint[] = []; const blacklistedSpawnpoints = this.locationConfig.looseLootBlacklist[locationName]; - const spawnpointArray = new ProbabilityObjectArray(this.mathUtil, this.cloner); + const spawnpointArray = new ProbabilityObjectArray(this.mathUtil, this.cloner); for (const spawnpoint of allDynamicSpawnpoints) { // Point is blacklsited, skip @@ -626,7 +626,7 @@ export class LocationLootGenerator { // Select a number of spawn points to add loot to // Add ALL loose loot with 100% chance to pool - let chosenSpawnpoints: Spawnpoint[] = [...guaranteedLoosePoints]; + let chosenSpawnpoints: ISpawnpoint[] = [...guaranteedLoosePoints]; const randomSpawnpointCount = desiredSpawnpointCount - chosenSpawnpoints.length; // Only draw random spawn points if needed @@ -732,8 +732,8 @@ export class LocationLootGenerator { * @param locationName Name of map currently having force loot created for */ protected addForcedLoot( - lootLocationTemplates: SpawnpointTemplate[], - forcedSpawnPoints: SpawnpointsForced[], + lootLocationTemplates: ISpawnpointTemplate[], + forcedSpawnPoints: ISpawnpointsForced[], locationName: string, ): void { const lootToForceSingleAmountOnMap = this.locationConfig.forcedLootSingleSpawnById[locationName]; @@ -752,7 +752,7 @@ export class LocationLootGenerator { } // Create probability array of all spawn positions for this spawn id - const spawnpointArray = new ProbabilityObjectArray( + const spawnpointArray = new ProbabilityObjectArray( this.mathUtil, this.cloner, ); @@ -824,7 +824,7 @@ export class LocationLootGenerator { */ protected createDynamicLootItem( chosenComposedKey: string, - spawnPoint: Spawnpoint, + spawnPoint: ISpawnpoint, staticAmmoDist: Record, ): IContainerItem { const chosenItem = spawnPoint.template.Items.find((item) => item._id === chosenComposedKey); diff --git a/project/src/generators/PlayerScavGenerator.ts b/project/src/generators/PlayerScavGenerator.ts index 41307c5e..d94c8ecc 100644 --- a/project/src/generators/PlayerScavGenerator.ts +++ b/project/src/generators/PlayerScavGenerator.ts @@ -4,7 +4,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IBotBase, Settings, Skills, Stats } from "@spt/models/eft/common/tables/IBotBase"; +import { IBotBase, IBotInfoSettings, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { AccountTypes } from "@spt/models/enums/AccountTypes"; @@ -89,7 +89,7 @@ export class PlayerScavGenerator { scavData.savage = undefined; scavData.aid = pmcDataClone.aid; scavData.TradersInfo = pmcDataClone.TradersInfo; - scavData.Info.Settings = {} as Settings; + scavData.Info.Settings = {} as IBotInfoSettings; scavData.Info.Bans = []; scavData.Info.RegistrationDate = pmcDataClone.Info.RegistrationDate; scavData.Info.GameVersion = pmcDataClone.Info.GameVersion; @@ -262,7 +262,7 @@ export class PlayerScavGenerator { } } - protected getScavSkills(scavProfile: IPmcData): Skills { + protected getScavSkills(scavProfile: IPmcData): ISkills { if (scavProfile.Skills) { return scavProfile.Skills; } @@ -270,11 +270,11 @@ export class PlayerScavGenerator { return this.getDefaultScavSkills(); } - protected getDefaultScavSkills(): Skills { + protected getDefaultScavSkills(): ISkills { return { Common: [], Mastering: [], Points: 0 }; } - protected getScavStats(scavProfile: IPmcData): Stats { + protected getScavStats(scavProfile: IPmcData): IStats { if (scavProfile.Stats) { return scavProfile.Stats; } diff --git a/project/src/generators/RepeatableQuestGenerator.ts b/project/src/generators/RepeatableQuestGenerator.ts index 6176c8bf..89c2b029 100644 --- a/project/src/generators/RepeatableQuestGenerator.ts +++ b/project/src/generators/RepeatableQuestGenerator.ts @@ -1,8 +1,8 @@ import { RepeatableQuestRewardGenerator } from "@spt/generators/RepeatableQuestRewardGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper"; -import { Exit } from "@spt/models/eft/common/ILocationBase"; -import { TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; +import { IExit } from "@spt/models/eft/common/ILocationBase"; +import { ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; import { IQuestCondition, IQuestConditionCounterCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; @@ -58,7 +58,7 @@ export class RepeatableQuestGenerator { */ public generateRepeatableQuest( pmcLevel: number, - pmcTraderInfo: Record, + pmcTraderInfo: Record, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig, ): IRepeatableQuest { @@ -748,7 +748,7 @@ export class RepeatableQuestGenerator { * @param playerSide Scav/Pmc * @returns Array of Exit objects */ - protected getLocationExitsForSide(locationKey: string, playerSide: string): Exit[] { + protected getLocationExitsForSide(locationKey: string, playerSide: string): IExit[] { const mapExtracts = this.databaseService.getLocation(locationKey.toLocaleLowerCase()).allExtracts; return mapExtracts.filter((exit) => exit.Side === playerSide); @@ -816,7 +816,7 @@ export class RepeatableQuestGenerator { * @param {string} exit The exit name to generate the condition for * @returns {object} Exit condition */ - protected generateExplorationExitCondition(exit: Exit): IQuestConditionCounterCondition { + protected generateExplorationExitCondition(exit: IExit): IQuestConditionCounterCondition { return { conditionType: "ExitName", exitName: exit.Name, id: this.objectId.generate(), dynamicLocale: true }; } diff --git a/project/src/generators/weapongen/InventoryMagGen.ts b/project/src/generators/weapongen/InventoryMagGen.ts index 03a7f8bd..1f37da62 100644 --- a/project/src/generators/weapongen/InventoryMagGen.ts +++ b/project/src/generators/weapongen/InventoryMagGen.ts @@ -1,4 +1,4 @@ -import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; +import { IInventory } from "@spt/models/eft/common/tables/IBotBase"; import { GenerationData } from "@spt/models/eft/common/tables/IBotType"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; @@ -8,7 +8,7 @@ export class InventoryMagGen { private magazineTemplate: ITemplateItem, private weaponTemplate: ITemplateItem, private ammoTemplate: ITemplateItem, - private pmcInventory: Inventory, + private pmcInventory: IInventory, ) {} public getMagCount(): GenerationData { @@ -27,7 +27,7 @@ export class InventoryMagGen { return this.ammoTemplate; } - public getPmcInventory(): Inventory { + public getPmcInventory(): IInventory { return this.pmcInventory; } } diff --git a/project/src/helpers/BotGeneratorHelper.ts b/project/src/helpers/BotGeneratorHelper.ts index 2196c780..c256f8be 100644 --- a/project/src/helpers/BotGeneratorHelper.ts +++ b/project/src/helpers/BotGeneratorHelper.ts @@ -4,7 +4,7 @@ import { ContainerHelper } from "@spt/helpers/ContainerHelper"; import { DurabilityLimitsHelper } from "@spt/helpers/DurabilityLimitsHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; +import { IInventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt/models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; @@ -412,7 +412,7 @@ export class BotGeneratorHelper { rootItemId: string, rootItemTplId: string, itemWithChildren: Item[], - inventory: Inventory, + inventory: IInventory, containersIdFull?: Set, ): ItemAddedResult { /** Track how many containers are unable to be found */ diff --git a/project/src/helpers/BotWeaponGeneratorHelper.ts b/project/src/helpers/BotWeaponGeneratorHelper.ts index a22fd140..2df8232e 100644 --- a/project/src/helpers/BotWeaponGeneratorHelper.ts +++ b/project/src/helpers/BotWeaponGeneratorHelper.ts @@ -1,7 +1,7 @@ import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; +import { IInventory } from "@spt/models/eft/common/tables/IBotBase"; import { GenerationData } from "@spt/models/eft/common/tables/IBotType"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; @@ -103,7 +103,7 @@ export class BotWeaponGeneratorHelper { public addAmmoIntoEquipmentSlots( ammoTpl: string, cartridgeCount: number, - inventory: Inventory, + inventory: IInventory, equipmentSlotsToAddTo: EquipmentSlots[] = [EquipmentSlots.TACTICAL_VEST, EquipmentSlots.POCKETS], ): void { const ammoItems = this.itemHelper.splitStack({ diff --git a/project/src/helpers/HealthHelper.ts b/project/src/helpers/HealthHelper.ts index 1a75e477..40034b10 100644 --- a/project/src/helpers/HealthHelper.ts +++ b/project/src/helpers/HealthHelper.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { BodyPartsHealth, Health } from "@spt/models/eft/common/tables/IBotBase"; +import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; @@ -74,7 +74,7 @@ export class HealthHelper { */ public updateProfileHealthPostRaid( pmcData: IPmcData, - postRaidHealth: Health, + postRaidHealth: IHealth, sessionID: string, isDead: boolean, ): void { @@ -132,7 +132,7 @@ export class HealthHelper { * @param postRaidBodyParts Post-raid body part data * @param profileData Player profile on server */ - protected transferPostRaidLimbEffectsToProfile(postRaidBodyParts: BodyPartsHealth, profileData: IPmcData): void { + protected transferPostRaidLimbEffectsToProfile(postRaidBodyParts: IBodyPartsHealth, profileData: IPmcData): void { // Iterate over each body part const effectsToIgnore = ["Dehydration", "Exhaustion"]; for (const bodyPartId in postRaidBodyParts) { diff --git a/project/src/helpers/HideoutHelper.ts b/project/src/helpers/HideoutHelper.ts index 99e70f34..cf5fc95f 100644 --- a/project/src/helpers/HideoutHelper.ts +++ b/project/src/helpers/HideoutHelper.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt/models/eft/common/tables/IBotBase"; +import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -126,7 +126,7 @@ export class HideoutHelper { productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle = false, - ): Production { + ): IProduction { return { Progress: 0, inProgress: true, @@ -148,8 +148,8 @@ export class HideoutHelper { * @param productive * @returns */ - public isProductionType(productive: Productive): productive is Production { - return (productive as Production).Progress !== undefined || (productive as Production).RecipeId !== undefined; + public isProductionType(productive: IProductive): productive is IProduction { + return (productive as IProduction).Progress !== undefined || (productive as IProduction).RecipeId !== undefined; } /** @@ -231,7 +231,7 @@ export class HideoutHelper { return hideoutProperties; } - protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean { + protected doesWaterCollectorHaveFilter(waterCollector: IBotHideoutArea): boolean { // Can put filters in from L3 if (waterCollector.level === 3) { // Has filter in at least one slot @@ -396,7 +396,7 @@ export class HideoutHelper { this.flagCultistCircleCraftAsComplete(production); } - protected flagCultistCircleCraftAsComplete(production: Productive) { + protected flagCultistCircleCraftAsComplete(production: IProductive) { // Craft is complete, flas as such production.AvailableForFinish = true; @@ -465,7 +465,7 @@ export class HideoutHelper { * @param pmcData Player profile * @param isGeneratorOn Is the generator turned on since last update */ - protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void { + protected updateFuel(generatorArea: IBotHideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void { // 1 resource last 14 min 27 sec, 1/14.45/60 = 0.00115 // 10-10-2021 From wiki, 1 resource last 12 minutes 38 seconds, 1/12.63333/60 = 0.00131 let fuelUsedSinceLastTick = @@ -565,7 +565,7 @@ export class HideoutHelper { protected updateWaterCollector( sessionId: string, pmcData: IPmcData, - area: HideoutArea, + area: IBotHideoutArea, hideoutProperties: { btcFarmCGs: number; isGeneratorOn: boolean; waterCollectorHasFilter: boolean }, ): void { // Skip water collector when not level 3 (cant collect until 3) @@ -670,8 +670,8 @@ export class HideoutHelper { * @param pmcData Player profile */ protected updateWaterFilters( - waterFilterArea: HideoutArea, - production: Production, + waterFilterArea: IBotHideoutArea, + production: IProduction, isGeneratorOn: boolean, pmcData: IPmcData, ): void { @@ -837,7 +837,7 @@ export class HideoutHelper { }; } - protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void { + protected updateAirFilters(airFilterArea: IBotHideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void { // 300 resources last 20 hrs, 300/20/60/60 = 0.00416 /* 10-10-2021 from WIKI (https://escapefromtarkov.fandom.com/wiki/FP-100_filter_absorber) Lasts for 17 hours 38 minutes and 49 seconds (23 hours 31 minutes and 45 seconds with elite hideout management skill), @@ -891,7 +891,7 @@ export class HideoutHelper { protected updateBitcoinFarm( pmcData: IPmcData, - btcProduction: Productive, + btcProduction: IProductive, btcFarmCGs: number, isGeneratorOn: boolean, ): void { @@ -982,7 +982,7 @@ export class HideoutHelper { * @param btcProd Bitcoin production object * @param coinCraftTimeSeconds Time to craft a bitcoin */ - protected addBtcToProduction(btcProd: Production, coinCraftTimeSeconds: number): void { + protected addBtcToProduction(btcProd: IProduction, coinCraftTimeSeconds: number): void { btcProd.Products.push({ _id: this.hashUtil.generate(), _tpl: ItemTpl.BARTER_PHYSICAL_BITCOIN, @@ -1113,8 +1113,8 @@ export class HideoutHelper { return productionTime * skillTimeReductionMultipler; } - public isProduction(productive: Productive): productive is Production { - return (productive as Production).Progress !== undefined || (productive as Production).RecipeId !== undefined; + public isProduction(productive: IProductive): productive is IProduction { + return (productive as IProduction).Progress !== undefined || (productive as IProduction).RecipeId !== undefined; } /** diff --git a/project/src/helpers/InventoryHelper.ts b/project/src/helpers/InventoryHelper.ts index bd8c62e9..f2d8343d 100644 --- a/project/src/helpers/InventoryHelper.ts +++ b/project/src/helpers/InventoryHelper.ts @@ -6,7 +6,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; +import { IInventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Location, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; @@ -345,7 +345,7 @@ export class InventoryHelper { stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], - playerInventory: Inventory, + playerInventory: IInventory, useSortingTable: boolean, output: IItemEventRouterResponse, ): void { diff --git a/project/src/helpers/ProfileHelper.ts b/project/src/helpers/ProfileHelper.ts index 5de033ea..dd168396 100644 --- a/project/src/helpers/ProfileHelper.ts +++ b/project/src/helpers/ProfileHelper.ts @@ -1,6 +1,6 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { BanType, Common, CounterKeyValue, Stats } from "@spt/models/eft/common/tables/IBotBase"; +import { BanType, Common, ICounterKeyValue, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; import { AccountTypes } from "@spt/models/enums/AccountTypes"; @@ -276,7 +276,7 @@ export class ProfileHelper { * Get baseline counter values for a fresh profile * @returns Default profile Stats object */ - public getDefaultCounters(): Stats { + public getDefaultCounters(): IStats { return { Eft: { CarriedQuestItems: [], @@ -388,7 +388,7 @@ export class ProfileHelper { * @param counters Counters to search for key * @param keyToIncrement Key */ - public incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void { + public incrementStatCounter(counters: ICounterKeyValue[], keyToIncrement: string): void { const stat = counters.find((x) => x.Key.includes(keyToIncrement)); if (stat) { stat.Value++; diff --git a/project/src/models/eft/common/ILocation.ts b/project/src/models/eft/common/ILocation.ts index f56a00a0..5bdb276f 100644 --- a/project/src/models/eft/common/ILocation.ts +++ b/project/src/models/eft/common/ILocation.ts @@ -1,5 +1,5 @@ -import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; +import { IExit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; +import { IGroupPostion, ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; import { Ixyz } from "@spt/models/eft/common/Ixyz"; import { Item } from "@spt/models/eft/common/tables/IItem"; @@ -16,7 +16,7 @@ export interface ILocation { /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; /** All possible map extracts */ - allExtracts: Exit[]; + allExtracts: IExit[]; } export interface IStaticContainer { @@ -59,9 +59,9 @@ export interface IStaticPropsBase { Rotation: Ixyz; IsGroupPosition: boolean; IsAlwaysSpawn: boolean; - GroupPositions: any[]; + GroupPositions: IGroupPostion[]; Root: string; - Items: any[]; + Items: Item[]; } export interface IStaticWeaponProps extends IStaticPropsBase { @@ -90,10 +90,10 @@ export interface IStaticForcedProps { } export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; + Items: IStaticItem[]; } -export interface StaticItem { +export interface IStaticItem { _id: string; _tpl: string; } diff --git a/project/src/models/eft/common/ILocationBase.ts b/project/src/models/eft/common/ILocationBase.ts index 7e3bbc97..a6f041fd 100644 --- a/project/src/models/eft/common/ILocationBase.ts +++ b/project/src/models/eft/common/ILocationBase.ts @@ -1,19 +1,20 @@ import { MinMax } from "@spt/models/common/MinMax"; import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { ISpawnpointTemplate } from "./ILooseLoot"; export interface ILocationBase { AccessKeys: string[]; - AirdropParameters: AirdropParameter[]; + AirdropParameters: IAirdropParameter[]; Area: number; AveragePlayTime: number; AveragePlayerLevel: number; - Banners: Banner[]; - BossLocationSpawn: BossLocationSpawn[]; + Banners: IBanner[]; + BossLocationSpawn: IBossLocationSpawn[]; BotAssault: number; BotEasy: number; BotHard: number; BotImpossible: number; - BotLocationModifier: BotLocationModifier; + BotLocationModifier: IBotLocationModifier; BotMarksman: number; BotMax: number; BotMaxPlayer: number; @@ -42,14 +43,14 @@ export interface ILocationBase { Insurance: boolean; IsSecret: boolean; Locked: boolean; - Loot: any[]; - MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; + Loot: ISpawnpointTemplate[]; + MatchMakerMinPlayersByWaitTime: IMinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; MinDistToExitPoint: number; MinDistToFreePoint: number; - MinMaxBots: MinMaxBot[]; + MinMaxBots: IMinMaxBot[]; MinPlayers: number; MaxCoopGroup: number; Name: string; @@ -58,7 +59,7 @@ export interface ILocationBase { OcculsionCullingEnabled: boolean; OldSpawn: boolean; OpenZones: string; - Preview: Preview; + Preview: IPreview; PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; @@ -68,8 +69,8 @@ export interface ILocationBase { ScavMaxPlayersInGroup: number; Rules: string; SafeLocation: boolean; - Scene: Scene; - SpawnPointParams: SpawnPointParam[]; + Scene: IScene; + SpawnPointParams: ISpawnPointParam[]; UnixDateTime: number; _Id: string; doors: any[]; @@ -80,12 +81,12 @@ export interface ILocationBase { ForceOnlineRaidInPVE: boolean; exit_count: number; exit_time: number; - exits: Exit[]; + exits: IExit[]; filter_ex: string[]; limits: ILimit[]; matching_min_seconds: number; GenerateLocalLootCache: boolean; - maxItemCountInLocation: MaxItemCountInLocation[]; + maxItemCountInLocation: IMaxItemCountInLocation[]; sav_summon_seconds: number; tmp_location_field_remove_me: number; transits: ITransit[]; @@ -93,7 +94,7 @@ export interface ILocationBase { users_spawn_seconds_n: number; users_spawn_seconds_n2: number; users_summon_seconds: number; - waves: Wave[]; + waves: IWave[]; } export interface ITransit { @@ -118,7 +119,7 @@ export interface ILimit extends MinMax { items: any[]; } -export interface AirdropParameter { +export interface IAirdropParameter { AirdropPointDeactivateDistance: number; MinPlayersCountToSpawnAirdrop: number; PlaneAirdropChance: number; @@ -131,17 +132,17 @@ export interface AirdropParameter { UnsuccessfulTryPenalty: number; } -export interface Banner { +export interface IBanner { id: string; - pic: Pic; + pic: IPic; } -export interface Pic { +export interface IPic { path: string; rcid: string; } -export interface BossLocationSpawn { +export interface IBossLocationSpawn { BossChance: number; BossDifficult: string; BossEscortAmount: string; @@ -159,18 +160,18 @@ export interface BossLocationSpawn { DependKarmaPVE?: boolean; ForceSpawn?: boolean; IgnoreMaxBots?: boolean; - Supports?: BossSupport[]; + Supports?: IBossSupport[]; sptId?: string; spawnMode: string[]; } -export interface BossSupport { +export interface IBossSupport { BossEscortAmount: string; BossEscortDifficult: string[]; BossEscortType: string; } -export interface BotLocationModifier { +export interface IBotLocationModifier { AccuracySpeed: number; AdditionalHostilitySettings: IAdditionalHostilitySettings[]; DistToActivate: number; @@ -208,29 +209,29 @@ export interface IChancedEnemy { Role: string; } -export interface MinMaxBot extends MinMax { +export interface IMinMaxBot extends MinMax { WildSpawnType: WildSpawnType | string; } -export interface MinPlayerWaitTime { +export interface IMinPlayerWaitTime { minPlayers: number; time: number; } -export interface Preview { +export interface IPreview { path: string; rcid: string; } -export interface Scene { +export interface IScene { path: string; rcid: string; } -export interface SpawnPointParam { +export interface ISpawnPointParam { BotZoneName: string; Categories: string[]; - ColliderParams: ColliderParams; + ColliderParams: IColliderParams; CorePointId: number; DelayToCanSpawnSec: number; Id: string; @@ -240,17 +241,17 @@ export interface SpawnPointParam { Sides: string[]; } -export interface ColliderParams { +export interface IColliderParams { _parent: string; - _props: Props; + _props: IProps; } -export interface Props { +export interface IProps { Center: Ixyz; Radius: number; } -export interface Exit { +export interface IExit { /** % Chance out of 100 exit will appear in raid */ Chance: number; ChancePVE: number; @@ -275,12 +276,12 @@ export interface Exit { Side?: string; } -export interface MaxItemCountInLocation { +export interface IMaxItemCountInLocation { TemplateId: string; Value: number; } -export interface Wave { +export interface IWave { BotPreset: string; BotSide: string; SpawnPoints: string; @@ -300,4 +301,6 @@ export enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", PMCBOT = "pmcbot", + BOSSKILLA = "bosskilla", + BOSSKNIGHT = "bossknight", } diff --git a/project/src/models/eft/common/ILocationsSourceDestinationBase.ts b/project/src/models/eft/common/ILocationsSourceDestinationBase.ts index 79234e89..8252cad3 100644 --- a/project/src/models/eft/common/ILocationsSourceDestinationBase.ts +++ b/project/src/models/eft/common/ILocationsSourceDestinationBase.ts @@ -2,10 +2,10 @@ import { ILocations } from "@spt/models/spt/server/ILocations"; export interface ILocationsGenerateAllResponse { locations: ILocations; - paths: Path[]; + paths: IPath[]; } -export interface Path { +export interface IPath { Source: string; Destination: string; } diff --git a/project/src/models/eft/common/ILooseLoot.ts b/project/src/models/eft/common/ILooseLoot.ts index aa04f73c..6abaffe8 100644 --- a/project/src/models/eft/common/ILooseLoot.ts +++ b/project/src/models/eft/common/ILooseLoot.ts @@ -2,23 +2,23 @@ import { Ixyz } from "@spt/models/eft/common/Ixyz"; import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILooseLoot { - spawnpointCount: SpawnpointCount; - spawnpointsForced: SpawnpointsForced[]; - spawnpoints: Spawnpoint[]; + spawnpointCount: ISpawnpointCount; + spawnpointsForced: ISpawnpointsForced[]; + spawnpoints: ISpawnpoint[]; } -export interface SpawnpointCount { +export interface ISpawnpointCount { mean: number; std: number; } -export interface SpawnpointsForced { +export interface ISpawnpointsForced { locationId: string; probability: number; - template: SpawnpointTemplate; + template: ISpawnpointTemplate; } -export interface SpawnpointTemplate { +export interface ISpawnpointTemplate { Id: string; IsContainer: boolean; useGravity: boolean; @@ -27,23 +27,30 @@ export interface SpawnpointTemplate { Rotation: Ixyz; IsAlwaysSpawn: boolean; IsGroupPosition: boolean; - GroupPositions: any[]; + GroupPositions: IGroupPostion[]; Root: string; Items: Item[]; } -export interface Spawnpoint { +export interface IGroupPostion { + Name: string; + Weight: number; + Postion: Ixyz; + Rotation: Ixyz; +} + +export interface ISpawnpoint { locationId: string; probability: number; - template: SpawnpointTemplate; + template: ISpawnpointTemplate; itemDistribution: ItemDistribution[]; } export interface ItemDistribution { - composedKey: ComposedKey; + composedKey: IComposedKey; relativeProbability: number; } -export interface ComposedKey { +export interface IComposedKey { key: string; } diff --git a/project/src/models/eft/common/tables/IBotBase.ts b/project/src/models/eft/common/tables/IBotBase.ts index 314cf980..9282f4d6 100644 --- a/project/src/models/eft/common/tables/IBotBase.ts +++ b/project/src/models/eft/common/tables/IBotBase.ts @@ -14,25 +14,25 @@ export interface IBotBase { sessionId: string; savage?: string; karmaValue: number; - Info: Info; - Customization: Customization; - Health: Health; - Inventory: Inventory; - Skills: Skills; - Stats: Stats; + Info: IInfo; + Customization: ICustomization; + Health: IHealth; + Inventory: IInventory; + Skills: ISkills; + Stats: IStats; Encyclopedia: Record; TaskConditionCounters: Record; InsuredItems: IInsuredItem[]; - Hideout: Hideout; + Hideout: IHideout; Quests: IQuestStatus[]; - TradersInfo: Record; + TradersInfo: Record; UnlockedInfo: IUnlockedInfo; - RagfairInfo: RagfairInfo; + RagfairInfo: IRagfairInfo; /** Achievement id and timestamp */ Achievements: Record; RepeatableQuests: IPmcDataRepeatableQuest[]; - Bonuses: Bonus[]; - Notes: Notes; + Bonuses: IBonus[]; + Notes: INotes; CarExtractCounts: Record; CoopExtractCounts: Record; SurvivorClass: SurvivorClass; @@ -63,7 +63,7 @@ export interface IUnlockedInfo { unlockedProductionRecipe: string[]; } -export interface Info { +export interface IInfo { EntryPoint: string; Nickname: string; LowerNickname: string; @@ -82,19 +82,19 @@ export interface Info { lockedMoveCommands: boolean; SavageLockTime: number; LastTimePlayedAsSavage: number; - Settings: Settings; + Settings: IBotInfoSettings; NicknameChangeDate: number; NeedWipeOptions: any[]; - lastCompletedWipe: LastCompleted; + lastCompletedWipe: ILastCompleted; Bans: IBan[]; BannedState: boolean; BannedUntil: number; IsStreamerModeAvailable: boolean; - lastCompletedEvent?: LastCompleted; + lastCompletedEvent?: ILastCompleted; isMigratedSkills: boolean; } -export interface Settings { +export interface IBotInfoSettings { Role: string; BotDifficulty: string; Experience: number; @@ -117,48 +117,48 @@ export enum BanType { CHANGE_NICKNAME = 6, } -export interface Customization { +export interface ICustomization { Head: string; Body: string; Feet: string; Hands: string; } -export interface Health { - Hydration: CurrentMax; - Energy: CurrentMax; - Temperature: CurrentMax; - BodyParts: BodyPartsHealth; +export interface IHealth { + Hydration: ICurrentMax; + Energy: ICurrentMax; + Temperature: ICurrentMax; + BodyParts: IBodyPartsHealth; UpdateTime: number; Immortal?: boolean; } -export interface BodyPartsHealth { - Head: BodyPartHealth; - Chest: BodyPartHealth; - Stomach: BodyPartHealth; - LeftArm: BodyPartHealth; - RightArm: BodyPartHealth; - LeftLeg: BodyPartHealth; - RightLeg: BodyPartHealth; +export interface IBodyPartsHealth { + Head: IBodyPartHealth; + Chest: IBodyPartHealth; + Stomach: IBodyPartHealth; + LeftArm: IBodyPartHealth; + RightArm: IBodyPartHealth; + LeftLeg: IBodyPartHealth; + RightLeg: IBodyPartHealth; } -export interface BodyPartHealth { - Health: CurrentMax; - Effects?: Record; +export interface IBodyPartHealth { + Health: ICurrentMax; + Effects?: Record; } -export interface BodyPartEffectProperties { +export interface IBodyPartEffectProperties { ExtraData?: any; Time: number; } -export interface CurrentMax { +export interface ICurrentMax { Current: number; Maximum: number; } -export interface Inventory { +export interface IInventory { items: Item[]; equipment: string; stash: string; @@ -173,13 +173,13 @@ export interface Inventory { export interface IBaseJsonSkills { Common: Record; - Mastering: Record; + Mastering: Record; Points: number; } -export interface Skills { +export interface ISkills { Common: Common[]; - Mastering: Mastering[]; + Mastering: IMastering[]; Points: number; } @@ -195,27 +195,27 @@ export interface Common extends IBaseSkill { LastAccess?: number; } -export interface Mastering extends IBaseSkill {} +export interface IMastering extends IBaseSkill {} -export interface Stats { +export interface IStats { Eft?: IEftStats; } export interface IEftStats { CarriedQuestItems: string[]; - Victims: Victim[]; + Victims: IVictim[]; TotalSessionExperience: number; LastSessionDate: number; - SessionCounters: SessionCounters; - OverallCounters: OverallCounters; + SessionCounters: ISessionCounters; + OverallCounters: IOverallCounters; SessionExperienceMult?: number; ExperienceBonusMult?: number; - Aggressor?: Aggressor; + Aggressor?: IAggressor; DroppedItems?: IDroppedItem[]; - FoundInRaidItems?: FoundInRaidItem[]; - DamageHistory?: DamageHistory; - DeathCause?: DeathCause; - LastPlayerState?: LastPlayerState; + FoundInRaidItems?: IFoundInRaidItem[]; + DamageHistory?: IDamageHistory; + DeathCause?: IDeathCause; + LastPlayerState?: ILastPlayerState; TotalInGameTime: number; SurvivorClass?: string; sptLastRaidFenceRepChange?: number; @@ -227,12 +227,12 @@ export interface IDroppedItem { ZoneId: string; } -export interface FoundInRaidItem { +export interface IFoundInRaidItem { QuestId: string; ItemId: string; } -export interface Victim { +export interface IVictim { AccountId: string; ProfileId: string; Name: string; @@ -245,20 +245,20 @@ export interface Victim { Role: string; } -export interface SessionCounters { - Items: CounterKeyValue[]; +export interface ISessionCounters { + Items: ICounterKeyValue[]; } -export interface OverallCounters { - Items: CounterKeyValue[]; +export interface IOverallCounters { + Items: ICounterKeyValue[]; } -export interface CounterKeyValue { +export interface ICounterKeyValue { Key: string[]; Value: number; } -export interface Aggressor { +export interface IAggressor { AccountId: string; ProfileId: string; MainProfileNickname: string; @@ -270,13 +270,13 @@ export interface Aggressor { Category: string; } -export interface DamageHistory { +export interface IDamageHistory { LethalDamagePart: string; - LethalDamage: LethalDamage; - BodyParts: BodyPartsDamageHistory; + LethalDamage: ILethalDamage; + BodyParts: IBodyPartsDamageHistory; } -export interface LethalDamage { +export interface ILethalDamage { Amount: number; Type: string; SourceId: string; @@ -285,18 +285,18 @@ export interface LethalDamage { ImpactsCount: number; } -export interface BodyPartsDamageHistory { - Head: DamageStats[]; - Chest: DamageStats[]; - Stomach: DamageStats[]; - LeftArm: DamageStats[]; - RightArm: DamageStats[]; - LeftLeg: DamageStats[]; - RightLeg: DamageStats[]; - Common: DamageStats[]; +export interface IBodyPartsDamageHistory { + Head: IDamageStats[]; + Chest: IDamageStats[]; + Stomach: IDamageStats[]; + LeftArm: IDamageStats[]; + RightArm: IDamageStats[]; + LeftLeg: IDamageStats[]; + RightLeg: IDamageStats[]; + Common: IDamageStats[]; } -export interface DamageStats { +export interface IDamageStats { Amount: number; Type: string; SourceId: string; @@ -305,27 +305,27 @@ export interface DamageStats { ImpactsCount: number; } -export interface DeathCause { +export interface IDeathCause { DamageType: string; Side: string; Role: string; WeaponId: string; } -export interface LastPlayerState { - Info: LastPlayerStateInfo; +export interface ILastPlayerState { + Info: ILastPlayerStateInfo; Customization: Record; Equipment: any; } -export interface LastPlayerStateInfo { +export interface ILastPlayerStateInfo { Nickname: string; Side: string; Level: number; MemberCategory: MemberCategory; } -export interface BackendCounter { +export interface IBackendCounter { id: string; qid?: string; value: number; @@ -337,9 +337,9 @@ export interface IInsuredItem { itemId: string; } -export interface Hideout { - Production: Record; - Areas: HideoutArea[]; +export interface IHideout { + Production: Record; + Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; Seed: number; @@ -359,8 +359,8 @@ export interface IHideoutImprovement { improveCompleteTimestamp: number; } -export interface Productive { - Products: Product[]; +export interface IProductive { + Products: IProduct[]; /** Seconds passed of production */ Progress?: number; /** Is craft in some state of being worked on by client (crafting/ready to pick up) */ @@ -389,23 +389,23 @@ export interface Productive { sptIsCultistCircle?: boolean; } -export interface Production extends Productive { +export interface IProduction extends IProductive { RecipeId: string; SkipTime: number; ProductionTime: number; } -export interface ScavCase extends Productive { +export interface IScavCase extends IProductive { RecipeId: string; } -export interface Product { +export interface IProduct { _id: string; _tpl: string; upd?: Upd; } -export interface HideoutArea { +export interface IBotHideoutArea { type: HideoutAreas; level: number; active: boolean; @@ -413,28 +413,28 @@ export interface HideoutArea { /** Must be integer */ completeTime: number; constructing: boolean; - slots: HideoutSlot[]; + slots: IHideoutSlot[]; lastRecipe: string; } -export interface HideoutSlot { +export interface IHideoutSlot { /** SPT specific value to keep track of what index this slot is (0,1,2,3 etc) */ locationIndex: number; - item?: HideoutItem[]; + item?: IHideoutItem[]; } -export interface HideoutItem { +export interface IHideoutItem { _id: string; _tpl: string; upd?: Upd; } -export interface LastCompleted { +export interface ILastCompleted { $oid: string; } -export interface Notes { - Notes: Note[]; +export interface INotes { + Notes: INote[]; } export type CarExtractCounts = {}; @@ -457,7 +457,7 @@ export interface IQuestStatus { availableAfter?: number; } -export interface TraderInfo { +export interface ITraderInfo { loyaltyLevel?: number; salesSum: number; standing: number; @@ -466,13 +466,13 @@ export interface TraderInfo { disabled: boolean; } -export interface RagfairInfo { +export interface IRagfairInfo { rating: number; isRatingGrowing: boolean; offers: IRagfairOffer[]; } -export interface Bonus { +export interface IBonus { id?: string; type: BonusType; templateId?: string; @@ -485,7 +485,7 @@ export interface Bonus { skillType?: BonusSkillType; } -export interface Note { +export interface INote { Time: number; Text: string; } diff --git a/project/src/models/eft/common/tables/IBotType.ts b/project/src/models/eft/common/tables/IBotType.ts index 0bed40a8..b0f26c8f 100644 --- a/project/src/models/eft/common/tables/IBotType.ts +++ b/project/src/models/eft/common/tables/IBotType.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { Skills } from "@spt/models/eft/common/tables/IBotBase"; +import { ISkills } from "@spt/models/eft/common/tables/IBotBase"; export interface IBotType { appearance: Appearance; @@ -11,7 +11,7 @@ export interface IBotType { health: Health; inventory: Inventory; lastName: string[]; - skills: Skills; + skills: ISkills; } export interface Appearance { diff --git a/project/src/models/eft/itemEvent/IItemEventRouterBase.ts b/project/src/models/eft/itemEvent/IItemEventRouterBase.ts index e9f125aa..356ddf77 100644 --- a/project/src/models/eft/itemEvent/IItemEventRouterBase.ts +++ b/project/src/models/eft/itemEvent/IItemEventRouterBase.ts @@ -1,4 +1,10 @@ -import { Health, IMoneyTransferLimits, IQuestStatus, Productive, Skills } from "@spt/models/eft/common/tables/IBotBase"; +import { + IHealth, + IMoneyTransferLimits, + IProductive, + IQuestStatus, + ISkills, +} from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IQuest } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -27,11 +33,11 @@ export interface ProfileChange { weaponBuilds: IWeaponBuildChange[]; equipmentBuilds: IEquipmentBuildChange[]; items: ItemChanges; - production: Record; + production: Record; /** Hideout area improvement id */ improvements: Record; - skills: Skills; - health: Health; + skills: ISkills; + health: IHealth; traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; diff --git a/project/src/models/eft/player/IPlayerIncrementSkillLevelRequestData.ts b/project/src/models/eft/player/IPlayerIncrementSkillLevelRequestData.ts index db3df3e0..4c5bbfcc 100644 --- a/project/src/models/eft/player/IPlayerIncrementSkillLevelRequestData.ts +++ b/project/src/models/eft/player/IPlayerIncrementSkillLevelRequestData.ts @@ -1,4 +1,4 @@ -import { Skills } from "@spt/models/eft/common/tables/IBotBase"; +import { ISkills } from "@spt/models/eft/common/tables/IBotBase"; export interface IPlayerIncrementSkillLevelRequestData { _id: string; @@ -8,7 +8,7 @@ export interface IPlayerIncrementSkillLevelRequestData { builds: any[]; items: Items; production: Production; - skills: Skills; + skills: ISkills; traderRelations: TraderRelations; } diff --git a/project/src/models/eft/profile/IGetOtherProfileResponse.ts b/project/src/models/eft/profile/IGetOtherProfileResponse.ts index 54f9727b..611cbc26 100644 --- a/project/src/models/eft/profile/IGetOtherProfileResponse.ts +++ b/project/src/models/eft/profile/IGetOtherProfileResponse.ts @@ -1,4 +1,4 @@ -import { OverallCounters, Skills } from "@spt/models/eft/common/tables/IBotBase"; +import { IOverallCounters, ISkills } from "@spt/models/eft/common/tables/IBotBase"; import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IGetOtherProfileResponse { @@ -6,7 +6,7 @@ export interface IGetOtherProfileResponse { aid: number; info: IOtherProfileInfo; customization: IOtherProfileCustomization; - skills: Skills; + skills: ISkills; equipment: IOtherProfileEquipment; achievements: Record; favoriteItems: Item[]; @@ -42,5 +42,5 @@ export interface IOtherProfileStats { export interface IOtherProfileSubStats { totalInGameTime: number; - overAllCounters: OverallCounters; + overAllCounters: IOverallCounters; } diff --git a/project/src/models/spt/bots/IGenerateEquipmentProperties.ts b/project/src/models/spt/bots/IGenerateEquipmentProperties.ts index 545e7fac..4db574d2 100644 --- a/project/src/models/spt/bots/IGenerateEquipmentProperties.ts +++ b/project/src/models/spt/bots/IGenerateEquipmentProperties.ts @@ -1,4 +1,4 @@ -import { Inventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; +import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { Chances, Mods } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; diff --git a/project/src/models/spt/config/ILocationConfig.ts b/project/src/models/spt/config/ILocationConfig.ts index d6ec94e1..6978980c 100644 --- a/project/src/models/spt/config/ILocationConfig.ts +++ b/project/src/models/spt/config/ILocationConfig.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { BossLocationSpawn, Wave } from "@spt/models/eft/common/ILocationBase"; +import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { @@ -10,10 +10,10 @@ export interface ILocationConfig extends IBaseConfig { rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; - looseLootMultiplier: LootMultiplier; - staticLootMultiplier: LootMultiplier; + looseLootMultiplier: ILootMultiplier; + staticLootMultiplier: ILootMultiplier; /** Custom bot waves to add to a locations base json on game start if addCustomBotWavesToMaps is true */ - customWaves: CustomWaves; + customWaves: ICustomWaves; /** Open zones to add to map */ openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ @@ -68,10 +68,10 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } -export interface CustomWaves { +export interface ICustomWaves { /** Bosses spawn on raid start */ - boss: Record; - normal: Record; + boss: Record; + normal: Record; } export interface IBotTypeLimit extends MinMax { @@ -79,7 +79,7 @@ export interface IBotTypeLimit extends MinMax { } /** Multiplier to apply to the loot count for a given map */ -export interface LootMultiplier { +export interface ILootMultiplier { bigmap: number; develop: number; factory4_day: number; diff --git a/project/src/models/spt/config/ILootConfig.ts b/project/src/models/spt/config/ILootConfig.ts index bfe8f53e..abc7c3fb 100644 --- a/project/src/models/spt/config/ILootConfig.ts +++ b/project/src/models/spt/config/ILootConfig.ts @@ -1,10 +1,10 @@ -import { Spawnpoint } from "@spt/models/eft/common/ILooseLoot"; +import { ISpawnpoint } from "@spt/models/eft/common/ILooseLoot"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILootConfig extends IBaseConfig { kind: "spt-loot"; /** Spawn positions to add into a map, key=mapid */ - looseLoot: Record; + looseLoot: Record; /** Loose loot probability adjustments to apply on game start */ looseLootSpawnPointAdjustments: Record>; } diff --git a/project/src/models/spt/config/ISeasonalEventConfig.ts b/project/src/models/spt/config/ISeasonalEventConfig.ts index c20e7ee8..ed0a339e 100644 --- a/project/src/models/spt/config/ISeasonalEventConfig.ts +++ b/project/src/models/spt/config/ISeasonalEventConfig.ts @@ -1,4 +1,4 @@ -import { BossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; @@ -9,7 +9,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { eventGear: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; - eventBossSpawns: Record>; + eventBossSpawns: Record>; gifterSettings: GifterSetting[]; } diff --git a/project/src/models/spt/generators/IBotGenerator.ts b/project/src/models/spt/generators/IBotGenerator.ts index 3f47e573..beb0893a 100644 --- a/project/src/models/spt/generators/IBotGenerator.ts +++ b/project/src/models/spt/generators/IBotGenerator.ts @@ -1,4 +1,4 @@ -import { Inventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; +import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { Chances, Generation, Inventory } from "@spt/models/eft/common/tables/IBotType"; export interface IBotGenerator { diff --git a/project/src/models/spt/generators/ILocationGenerator.ts b/project/src/models/spt/generators/ILocationGenerator.ts index 5e9a51dd..13117606 100644 --- a/project/src/models/spt/generators/ILocationGenerator.ts +++ b/project/src/models/spt/generators/ILocationGenerator.ts @@ -4,7 +4,7 @@ import { IStaticForcedProps, IStaticLootDetails, } from "@spt/models/eft/common/ILocation"; -import { ILooseLoot, SpawnpointTemplate } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate } from "@spt/models/eft/common/ILooseLoot"; export interface ILocationGenerator { generateContainerLoot( @@ -18,5 +18,5 @@ export interface ILocationGenerator { dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string, - ): SpawnpointTemplate[]; + ): ISpawnpointTemplate[]; } diff --git a/project/src/routers/EventOutputHolder.ts b/project/src/routers/EventOutputHolder.ts index 34cc2794..cb7d6211 100644 --- a/project/src/routers/EventOutputHolder.ts +++ b/project/src/routers/EventOutputHolder.ts @@ -3,8 +3,8 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, - Productive, - TraderInfo, + IProductive, + ITraderInfo, } from "@spt/models/eft/common/tables/IBotBase"; import { ProfileChange, TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -103,7 +103,7 @@ export class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record { + protected constructTraderRelations(traderData: Record): Record { const result: Record = {}; for (const traderId in traderData) { @@ -148,9 +148,9 @@ export class EventOutputHolder { * @returns dictionary of hideout productions */ protected getProductionsFromProfileAndFlagComplete( - productions: Record, + productions: Record, sessionId: string, - ): Record | undefined { + ): Record | undefined { for (const productionKey in productions) { const production = productions[productionKey]; if (!production) { @@ -196,7 +196,7 @@ export class EventOutputHolder { * Required as continuous productions don't reset and stay at 100% completion but client thinks it hasn't started * @param productions Productions in a profile */ - protected cleanUpCompleteCraftsInProfile(productions: Record): void { + protected cleanUpCompleteCraftsInProfile(productions: Record): void { for (const productionKey in productions) { const production = productions[productionKey]; if (production?.sptIsComplete && production?.sptIsContinuous) { diff --git a/project/src/services/CircleOfCultistService.ts b/project/src/services/CircleOfCultistService.ts index c0923f08..33cd49aa 100644 --- a/project/src/services/CircleOfCultistService.ts +++ b/project/src/services/CircleOfCultistService.ts @@ -4,7 +4,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { HideoutArea } from "@spt/models/eft/common/tables/IBotBase"; +import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; @@ -538,7 +538,7 @@ export class CircleOfCultistService { * @param areas Hideout areas to iterate over * @returns Active area array */ - protected getPlayerAccessibleHideoutAreas(areas: HideoutArea[]): HideoutArea[] { + protected getPlayerAccessibleHideoutAreas(areas: IBotHideoutArea[]): IBotHideoutArea[] { return areas.filter((area) => { if (area.type === HideoutAreas.CHRISTMAS_TREE && !this.seasonalEventService.christmasEventEnabled()) { // Christmas tree area and not Christmas, skip diff --git a/project/src/services/CustomLocationWaveService.ts b/project/src/services/CustomLocationWaveService.ts index 48322a52..312d7f96 100644 --- a/project/src/services/CustomLocationWaveService.ts +++ b/project/src/services/CustomLocationWaveService.ts @@ -1,4 +1,4 @@ -import { BossLocationSpawn, Wave } from "@spt/models/eft/common/ILocationBase"; +import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,7 +25,7 @@ export class CustomLocationWaveService { * @param locationId e.g. factory4_day, bigmap * @param waveToAdd Boss wave to add to map */ - public addBossWaveToMap(locationId: string, waveToAdd: BossLocationSpawn): void { + public addBossWaveToMap(locationId: string, waveToAdd: IBossLocationSpawn): void { this.locationConfig.customWaves.boss[locationId].push(waveToAdd); } @@ -34,7 +34,7 @@ export class CustomLocationWaveService { * @param locationId e.g. factory4_day, bigmap * @param waveToAdd Wave to add to map */ - public addNormalWaveToMap(locationId: string, waveToAdd: Wave): void { + public addNormalWaveToMap(locationId: string, waveToAdd: IWave): void { this.locationConfig.customWaves.normal[locationId].push(waveToAdd); } diff --git a/project/src/services/LocationLifecycleService.ts b/project/src/services/LocationLifecycleService.ts index 8a7affb4..6a243dc8 100644 --- a/project/src/services/LocationLifecycleService.ts +++ b/project/src/services/LocationLifecycleService.ts @@ -9,7 +9,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Common, IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; +import { Common, IQuestStatus, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; import { Item } from "@spt/models/eft/common/tables/IItem"; import { IEndLocalRaidRequestData, IEndRaidResult } from "@spt/models/eft/match/IEndLocalRaidRequestData"; import { IStartLocalRaidRequestData } from "@spt/models/eft/match/IStartLocalRaidRequestData"; @@ -661,8 +661,8 @@ export class LocationLifecycleService { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments( - tradersServerProfile: Record, - tradersClientProfile: Record, + tradersServerProfile: Record, + tradersClientProfile: Record, ): void { for (const traderId in tradersClientProfile) { const serverProfileTrader = tradersServerProfile[traderId]; diff --git a/project/src/services/PmcChatResponseService.ts b/project/src/services/PmcChatResponseService.ts index 4314577f..e693b38a 100644 --- a/project/src/services/PmcChatResponseService.ts +++ b/project/src/services/PmcChatResponseService.ts @@ -1,7 +1,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Aggressor, Victim } from "@spt/models/eft/common/tables/IBotBase"; +import { IAggressor, IVictim } from "@spt/models/eft/common/tables/IBotBase"; import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; import { MemberCategory } from "@spt/models/enums/MemberCategory"; @@ -43,7 +43,7 @@ export class PmcChatResponseService { * @param pmcVictims Array of bots killed by player * @param pmcData Player profile */ - public sendVictimResponse(sessionId: string, pmcVictims: Victim[], pmcData: IPmcData): void { + public sendVictimResponse(sessionId: string, pmcVictims: IVictim[], pmcData: IPmcData): void { for (const victim of pmcVictims) { if (!this.randomUtil.getChance100(this.pmcResponsesConfig.victim.responseChancePercent)) { continue; @@ -68,7 +68,7 @@ export class PmcChatResponseService { * @param pmcData Players profile * @param killer The bot who killed the player */ - public sendKillerResponse(sessionId: string, pmcData: IPmcData, killer: Aggressor): void { + public sendKillerResponse(sessionId: string, pmcData: IPmcData, killer: IAggressor): void { if (!killer) { return; } @@ -240,7 +240,7 @@ export class PmcChatResponseService { * @param pmcVictims Possible victims to choose from * @returns IUserDialogInfo */ - protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo { + protected chooseRandomVictim(pmcVictims: IVictim[]): IUserDialogInfo { const randomVictim = this.randomUtil.getArrayValue(pmcVictims); return this.getVictimDetails(randomVictim); @@ -251,7 +251,7 @@ export class PmcChatResponseService { * @param pmcVictim victim to convert * @returns IUserDialogInfo */ - protected getVictimDetails(pmcVictim: Victim): IUserDialogInfo { + protected getVictimDetails(pmcVictim: IVictim): IUserDialogInfo { const categories = [ MemberCategory.UNIQUE_ID, MemberCategory.DEFAULT, diff --git a/project/src/services/ProfileFixerService.ts b/project/src/services/ProfileFixerService.ts index a6e50b4d..6eb03c2a 100644 --- a/project/src/services/ProfileFixerService.ts +++ b/project/src/services/ProfileFixerService.ts @@ -4,7 +4,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Bonus, HideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -328,7 +328,7 @@ export class ProfileFixerService { area.slots = this.addObjectsToArray(emptyItemCount, area.slots); } - protected addObjectsToArray(count: number, slots: HideoutSlot[]): HideoutSlot[] { + protected addObjectsToArray(count: number, slots: IHideoutSlot[]): IHideoutSlot[] { for (let i = 0; i < count; i++) { if (!slots.some((x) => x.locationIndex === i)) { slots.push({ locationIndex: i }); @@ -632,7 +632,7 @@ export class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: Bonus[], bonus: StageBonus): Bonus | undefined { + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined { // match by id first, used by "TextBonus" bonuses if (bonus.id) { return profileBonuses.find((x) => x.id === bonus.id); diff --git a/project/src/services/RaidTimeAdjustmentService.ts b/project/src/services/RaidTimeAdjustmentService.ts index c15fcd96..2fc9abf4 100644 --- a/project/src/services/RaidTimeAdjustmentService.ts +++ b/project/src/services/RaidTimeAdjustmentService.ts @@ -5,7 +5,11 @@ import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { ExtractChange, IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; -import { ILocationConfig, IScavRaidTimeLocationSettings, LootMultiplier } from "@spt/models/spt/config/ILocationConfig"; +import { + ILocationConfig, + ILootMultiplier, + IScavRaidTimeLocationSettings, +} from "@spt/models/spt/config/ILocationConfig"; import { IRaidChanges } from "@spt/models/spt/location/IRaidChanges"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -55,7 +59,7 @@ export class RaidTimeAdjustmentService { * @param mapLootMultiplers Multiplers to adjust * @param loosePercent Percent to change values to */ - protected adjustLootMultipliers(mapLootMultiplers: LootMultiplier, loosePercent: number): void { + protected adjustLootMultipliers(mapLootMultiplers: ILootMultiplier, loosePercent: number): void { for (const key in mapLootMultiplers) { mapLootMultiplers[key] = this.randomUtil.getPercentOfValue(mapLootMultiplers[key], loosePercent); } diff --git a/project/src/services/SeasonalEventService.ts b/project/src/services/SeasonalEventService.ts index 9611156c..1c4b6abf 100644 --- a/project/src/services/SeasonalEventService.ts +++ b/project/src/services/SeasonalEventService.ts @@ -2,7 +2,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; import { ILocation } from "@spt/models/eft/common/ILocation"; -import { BossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; import { Inventory } from "@spt/models/eft/common/tables/IBotType"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; import { ItemTpl } from "@spt/models/enums/ItemTpl"; @@ -390,7 +390,7 @@ export class SeasonalEventService { for (const boss of bossesToAdd) { const locations = this.databaseService.getLocations(); - const mapBosses: BossLocationSpawn[] = locations[mapKey].base.BossLocationSpawn; + const mapBosses: IBossLocationSpawn[] = locations[mapKey].base.BossLocationSpawn; if (!mapBosses.some((bossSpawn) => bossSpawn.BossName === boss.BossName)) { locations[mapKey].base.BossLocationSpawn.push(...bossesToAdd); }