diff --git a/TypeScript/10ScopesAndTypes/README.md b/TypeScript/10ScopesAndTypes/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/10ScopesAndTypes/README.md +++ b/TypeScript/10ScopesAndTypes/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/10ScopesAndTypes/package.json b/TypeScript/10ScopesAndTypes/package.json index b82f6a5..0ac1124 100644 --- a/TypeScript/10ScopesAndTypes/package.json +++ b/TypeScript/10ScopesAndTypes/package.json @@ -1,7 +1,7 @@ { "name": "ScopesAndTypes", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/10ScopesAndTypes/src/MyMod.ts b/TypeScript/10ScopesAndTypes/src/MyMod.ts index 3a96ee8..1d61892 100644 --- a/TypeScript/10ScopesAndTypes/src/MyMod.ts +++ b/TypeScript/10ScopesAndTypes/src/MyMod.ts @@ -1,6 +1,6 @@ import { inject, injectable } from "tsyringe"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { Processing } from "./Processing"; @injectable() diff --git a/TypeScript/10ScopesAndTypes/src/Processing.ts b/TypeScript/10ScopesAndTypes/src/Processing.ts index d42036d..02a761c 100644 --- a/TypeScript/10ScopesAndTypes/src/Processing.ts +++ b/TypeScript/10ScopesAndTypes/src/Processing.ts @@ -1,6 +1,6 @@ import { inject, injectable } from "tsyringe"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @injectable() export class Processing diff --git a/TypeScript/10ScopesAndTypes/src/mod.ts b/TypeScript/10ScopesAndTypes/src/mod.ts index e035ed3..36c9954 100644 --- a/TypeScript/10ScopesAndTypes/src/mod.ts +++ b/TypeScript/10ScopesAndTypes/src/mod.ts @@ -1,15 +1,15 @@ import { DependencyContainer, Lifecycle } from "tsyringe"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; import { MyMod } from "./MyMod"; import { Processing } from "./Processing"; -class Mod implements IPreSptLoadMod, IPostSptLoadMod +class Mod implements IPreAkiLoadMod, IPostAkiLoadMod { // Perform these actions before server fully loads - public preSptLoad(container: DependencyContainer): void { + public preAkiLoad(container: DependencyContainer): void { // This class is registered as a singleton. This means ONE and only ONE bean // of this class will ever exist. container.register("MyMod", MyMod, {lifecycle: Lifecycle.Singleton}); @@ -19,7 +19,7 @@ class Mod implements IPreSptLoadMod, IPostSptLoadMod container.register("Processing", Processing); } - public postSptLoad(container: DependencyContainer): void + public postAkiLoad(container: DependencyContainer): void { // We will run this in a quick 5 loop to show how singletons and transients work for (let i = 0; i < 5; i++) diff --git a/TypeScript/10ScopesAndTypes/tsconfig.json b/TypeScript/10ScopesAndTypes/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/10ScopesAndTypes/tsconfig.json +++ b/TypeScript/10ScopesAndTypes/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocation.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/ModSpawn.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/NotificationEventType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/SkillTypes.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/services/LootRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/10ScopesAndTypes/types/servers/WebSocketServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/WebSocketServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/10ScopesAndTypes/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/10ScopesAndTypes/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/10ScopesAndTypes/types/services/DatabaseService.d.ts b/TypeScript/10ScopesAndTypes/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/10ScopesAndTypes/types/services/DatabaseService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/11BundleLoadingSample/README.md b/TypeScript/11BundleLoadingSample/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/11BundleLoadingSample/README.md +++ b/TypeScript/11BundleLoadingSample/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/11BundleLoadingSample/package.json b/TypeScript/11BundleLoadingSample/package.json index c06a66c..0449c5a 100644 --- a/TypeScript/11BundleLoadingSample/package.json +++ b/TypeScript/11BundleLoadingSample/package.json @@ -1,7 +1,7 @@ { "name": "BundleLoading", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/11BundleLoadingSample/src/mod.ts b/TypeScript/11BundleLoadingSample/src/mod.ts index cabeea2..40d1f9e 100644 --- a/TypeScript/11BundleLoadingSample/src/mod.ts +++ b/TypeScript/11BundleLoadingSample/src/mod.ts @@ -1,14 +1,14 @@ import { DependencyContainer } from "tsyringe"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -class Mod implements IPostSptLoadMod +class Mod implements IPostAkiLoadMod { - public postSptLoad(container: DependencyContainer): void + public postAkiLoad(container: DependencyContainer): void { // get the logger from the server container - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); logger.info("Loading: Bundle Loading Sample"); } diff --git a/TypeScript/11BundleLoadingSample/tsconfig.json b/TypeScript/11BundleLoadingSample/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/11BundleLoadingSample/tsconfig.json +++ b/TypeScript/11BundleLoadingSample/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocation.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/ModSpawn.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/NotificationEventType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/SkillTypes.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/services/LootRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/11BundleLoadingSample/types/servers/WebSocketServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/WebSocketServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/11BundleLoadingSample/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/11BundleLoadingSample/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/11BundleLoadingSample/types/services/DatabaseService.d.ts b/TypeScript/11BundleLoadingSample/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/11BundleLoadingSample/types/services/DatabaseService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/12ClassExtensionOverride/README.md b/TypeScript/12ClassExtensionOverride/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/12ClassExtensionOverride/README.md +++ b/TypeScript/12ClassExtensionOverride/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/12ClassExtensionOverride/package.json b/TypeScript/12ClassExtensionOverride/package.json index 8a78236..8328d91 100644 --- a/TypeScript/12ClassExtensionOverride/package.json +++ b/TypeScript/12ClassExtensionOverride/package.json @@ -1,7 +1,7 @@ { "name": "ClassExtensionOverride", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/12ClassExtensionOverride/src/MyCustomLauncherCallbacks.ts b/TypeScript/12ClassExtensionOverride/src/MyCustomLauncherCallbacks.ts index 2a54cad..34fdbd5 100644 --- a/TypeScript/12ClassExtensionOverride/src/MyCustomLauncherCallbacks.ts +++ b/TypeScript/12ClassExtensionOverride/src/MyCustomLauncherCallbacks.ts @@ -1,12 +1,12 @@ import { inject, injectable } from "tsyringe"; -import { LauncherCallbacks } from "@spt/callbacks/LauncherCallbacks"; -import { LauncherController } from "@spt/controllers/LauncherController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { Watermark } from "@spt/utils/Watermark"; +import { LauncherCallbacks } from "@spt-aki/callbacks/LauncherCallbacks"; +import { LauncherController } from "@spt-aki/controllers/LauncherController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { Watermark } from "@spt-aki/utils/Watermark"; // We need to declare this class as injectable, this will add the container // metadata diff --git a/TypeScript/12ClassExtensionOverride/src/mod.ts b/TypeScript/12ClassExtensionOverride/src/mod.ts index 383ee2f..45aea7a 100644 --- a/TypeScript/12ClassExtensionOverride/src/mod.ts +++ b/TypeScript/12ClassExtensionOverride/src/mod.ts @@ -1,22 +1,22 @@ import { DependencyContainer } from "tsyringe"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod" +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod" import { MyCustomLauncherCallbacks } from "./MyCustomLauncherCallbacks"; -class Mod implements IPreSptLoadMod +class Mod implements IPreAkiLoadMod { // This example will show you how to override and register your own components and use them - // The container will by default register all SPT dependencies, but you can inject into it + // The container will by default register all AKI dependencies, but you can inject into it // you own custom implementations the server will then use. // In this example we will take the LauncherCallbacks class and override the ping() method // for our own custom method that will return "Lets dance" instead of "pong!" // Perform these actions before server fully loads - public preSptLoad(container: DependencyContainer): void { + public preAkiLoad(container: DependencyContainer): void { // Here we register our override for the component and we NEED to use the same // token the server is using to register it. // You can find this tokens here: - // https://dev.sp-tarkov.com/SPT/Server/src/branch/development/project/src/di/Container.ts + // https://dev.sp-tarkov.com/SPT-AKI/Server/src/branch/development/project/src/di/Container.ts // In this scenario we want to override LauncherCallbacks, so we find the proper registry: // // depContainer.register("LauncherCallbacks", { useClass: LauncherCallbacks }); diff --git a/TypeScript/12ClassExtensionOverride/tsconfig.json b/TypeScript/12ClassExtensionOverride/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/12ClassExtensionOverride/tsconfig.json +++ b/TypeScript/12ClassExtensionOverride/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocation.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/ModSpawn.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/NotificationEventType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/SkillTypes.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/12ClassExtensionOverride/types/servers/WebSocketServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/WebSocketServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/12ClassExtensionOverride/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/12ClassExtensionOverride/types/services/DatabaseService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/DatabaseService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/13AddTrader/README.md b/TypeScript/13AddTrader/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/13AddTrader/README.md +++ b/TypeScript/13AddTrader/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/13AddTrader/package.json b/TypeScript/13AddTrader/package.json index c00a540..02720a1 100644 --- a/TypeScript/13AddTrader/package.json +++ b/TypeScript/13AddTrader/package.json @@ -1,7 +1,7 @@ { "name": "13AddTrader", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/13AddTrader/src/fluentTraderAssortCreator.ts b/TypeScript/13AddTrader/src/fluentTraderAssortCreator.ts index 1b8283b..c98fef0 100644 --- a/TypeScript/13AddTrader/src/fluentTraderAssortCreator.ts +++ b/TypeScript/13AddTrader/src/fluentTraderAssortCreator.ts @@ -1,8 +1,8 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme, ITrader } from "@spt/models/eft/common/tables/ITrader"; -import { Money } from "@spt/models/enums/Money"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IBarterScheme, ITrader } from "@spt-aki/models/eft/common/tables/ITrader"; +import { Money } from "@spt-aki/models/enums/Money"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export class FluentAssortConstructor { diff --git a/TypeScript/13AddTrader/src/mod.ts b/TypeScript/13AddTrader/src/mod.ts index 24d8283..279dabc 100644 --- a/TypeScript/13AddTrader/src/mod.ts +++ b/TypeScript/13AddTrader/src/mod.ts @@ -1,28 +1,28 @@ import { DependencyContainer } from "tsyringe"; // SPT types -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { ImageRouter } from "@spt/routers/ImageRouter"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { Money } from "@spt/models/enums/Money"; -import { Traders } from "@spt/models/enums/Traders"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ImageRouter } from "@spt-aki/routers/ImageRouter"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { Money } from "@spt-aki/models/enums/Money"; +import { Traders } from "@spt-aki/models/enums/Traders"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; // New trader settings import * as baseJson from "../db/base.json"; import { TraderHelper } from "./traderHelpers"; import { FluentAssortConstructor as FluentAssortCreator } from "./fluentTraderAssortCreator"; -import { DatabaseService } from "@spt/services/DatabaseService"; -class SampleTrader implements IPreSptLoadMod, IPostDBLoadMod +class SampleTrader implements IPreAkiLoadMod, IPostDBLoadMod { private mod: string; private logger: ILogger; @@ -37,14 +37,14 @@ class SampleTrader implements IPreSptLoadMod, IPostDBLoadMod * Some work needs to be done prior to SPT code being loaded, registering the profile image + setting trader update time inside the trader config json * @param container Dependency container */ - public preSptLoad(container: DependencyContainer): void + public preAkiLoad(container: DependencyContainer): void { // Get a logger - this.logger = container.resolve("PrimaryLogger"); - this.logger.debug(`[${this.mod}] preSpt Loading... `); + this.logger = container.resolve("WinstonLogger"); + this.logger.debug(`[${this.mod}] preAki Loading... `); // Get SPT code/data we need later - const preSptModLoader: PreSptModLoader = container.resolve("PreSptModLoader"); + const preAkiModLoader: PreAkiModLoader = container.resolve("PreAkiModLoader"); const imageRouter: ImageRouter = container.resolve("ImageRouter"); const hashUtil: HashUtil = container.resolve("HashUtil"); const configServer = container.resolve("ConfigServer"); @@ -54,7 +54,7 @@ class SampleTrader implements IPreSptLoadMod, IPostDBLoadMod // Create helper class and use it to register our traders image/icon + set its stock refresh time this.traderHelper = new TraderHelper(); this.fluentAssortCreator = new FluentAssortCreator(hashUtil, this.logger); - this.traderHelper.registerProfileImage(baseJson, this.mod, preSptModLoader, imageRouter, "cat.jpg"); + this.traderHelper.registerProfileImage(baseJson, this.mod, preAkiModLoader, imageRouter, "cat.jpg"); this.traderHelper.setTraderUpdateTime(traderConfig, baseJson, 3600, 4000); // Add trader to trader enum @@ -63,49 +63,48 @@ class SampleTrader implements IPreSptLoadMod, IPostDBLoadMod // Add trader to flea market ragfairConfig.traders[baseJson._id] = true; - this.logger.debug(`[${this.mod}] preSpt Loaded`); + this.logger.debug(`[${this.mod}] preAki Loaded`); } /** - * Majority of trader-related work occurs after the spt database has been loaded but prior to SPT code being run + * Majority of trader-related work occurs after the aki database has been loaded but prior to SPT code being run * @param container Dependency container */ public postDBLoad(container: DependencyContainer): void { this.logger.debug(`[${this.mod}] postDb Loading... `); - // Resolve SPT classes we'll need - const databaseService = container.resolve("DatabaseService"); + // Resolve SPT classes we'll use + const databaseServer: DatabaseServer = container.resolve("DatabaseServer"); + const configServer: ConfigServer = container.resolve("ConfigServer"); const jsonUtil: JsonUtil = container.resolve("JsonUtil"); - // Get references to database data we need - const traders = databaseService.getTraders(); - const globals = databaseService.getGlobals(); - const locales = databaseService.getLocales(); + // Get a reference to the database tables + const tables = databaseServer.getTables(); // Add new trader to the trader dictionary in DatabaseServer - has no assorts (items) yet - this.traderHelper.addTraderToDb(baseJson, traders, jsonUtil); + this.traderHelper.addTraderToDb(baseJson, tables, jsonUtil); // Add milk - const MILK_ID = "575146b724597720a27126d5"; // Can find item ids in: `database\templates\items.json` or with: https://db.sp-tarkov.com/search + const MILK_ID = "575146b724597720a27126d5"; // Can find item ids in `database\templates\items.json` or with https://db.sp-tarkov.com/search this.fluentAssortCreator .createSingleAssortItem(MILK_ID) .addStackCount(200) .addBuyRestriction(10) .addMoneyCost(Money.ROUBLES, 2000) .addLoyaltyLevel(1) - .export(traders[baseJson._id]); + .export(tables.traders[baseJson._id]); // Add 3x bitcoin + salewa for milk barter - const BITCOIN_ID = "59faff1d86f7746c51718c9c"; // Can find item ids in: `database\templates\items.json` or with: https://db.sp-tarkov.com/search - const SALEWA_ID = "544fb45d4bdc2dee738b4568"; // Can find item ids in: `database\templates\items.json` or with: https://db.sp-tarkov.com/search + const BITCOIN_ID = "59faff1d86f7746c51718c9c"; + const SALEWA_ID = "544fb45d4bdc2dee738b4568"; this.fluentAssortCreator .createSingleAssortItem(MILK_ID) .addStackCount(100) .addBarterCost(BITCOIN_ID, 3) .addBarterCost(SALEWA_ID, 1) .addLoyaltyLevel(1) - .export(traders[baseJson._id]); + .export(tables.traders[baseJson._id]); // Add glock as money purchase @@ -115,20 +114,20 @@ class SampleTrader implements IPreSptLoadMod, IPostDBLoadMod .addMoneyCost(Money.ROUBLES, 20000) .addBuyRestriction(3) .addLoyaltyLevel(1) - .export(traders[baseJson._id]); + .export(tables.traders[baseJson._id]); // Add mp133 preset as mayo barter this.fluentAssortCreator - .createComplexAssortItem(globals.ItemPresets["584148f2245977598f1ad387"]._items) + .createComplexAssortItem(tables.globals.ItemPresets["584148f2245977598f1ad387"]._items) .addStackCount(200) .addBarterCost("5bc9b156d4351e00367fbce9", 1) .addBuyRestriction(3) .addLoyaltyLevel(1) - .export(traders[baseJson._id]); + .export(tables.traders[baseJson._id]); // Add trader to locale file, ensures trader text shows properly on screen // WARNING: adds the same text to ALL locales (e.g. chinese/french/english) - this.traderHelper.addTraderToLocales(baseJson, locales, baseJson.name, "Cat", baseJson.nickname, baseJson.location, "This is the cat shop"); + this.traderHelper.addTraderToLocales(baseJson, tables, baseJson.name, "Cat", baseJson.nickname, baseJson.location, "This is the cat shop"); this.logger.debug(`[${this.mod}] postDb Loaded`); } diff --git a/TypeScript/13AddTrader/src/traderHelpers.ts b/TypeScript/13AddTrader/src/traderHelpers.ts index 1829f8e..3f969f4 100644 --- a/TypeScript/13AddTrader/src/traderHelpers.ts +++ b/TypeScript/13AddTrader/src/traderHelpers.ts @@ -1,30 +1,29 @@ -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderBase, ITraderAssort, ITrader } from "@spt/models/eft/common/tables/ITrader"; -import { ITraderConfig, UpdateTime } from "@spt/models/spt/config/ITraderConfig"; -import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables"; -import { ILocaleBase } from "@spt/models/spt/server/ILocaleBase"; -import { ImageRouter } from "@spt/routers/ImageRouter"; -import { JsonUtil } from "@spt/utils/JsonUtil"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderBase, ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ITraderConfig, UpdateTime } from "@spt-aki/models/spt/config/ITraderConfig"; +import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; +import { ImageRouter } from "@spt-aki/routers/ImageRouter"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export class TraderHelper { - /** + /** * Add profile picture to our trader * @param baseJson json file for trader (db/base.json) * @param modName mod folder name - * @param preSptModLoader mod loader class - used to get the mods file path + * @param preAkiModLoader mod loader class - used to get the mods file path * @param imageRouter image router class - used to register the trader image path so we see their image on trader page * @param traderImageName Filename of the trader icon to use */ - public registerProfileImage(baseJson: any, modName: string, preSptModLoader: PreSptModLoader, imageRouter: ImageRouter, traderImageName: string): void - { - // Reference the mod "res" folder - const imageFilepath = `./${preSptModLoader.getModPath(modName)}res`; + public registerProfileImage(baseJson: any, modName: string, preAkiModLoader: PreAkiModLoader, imageRouter: ImageRouter, traderImageName: string): void + { + // Reference the mod "res" folder + const imageFilepath = `./${preAkiModLoader.getModPath(modName)}res`; - // Register a route to point to the profile picture - remember to remove the .jpg from it - imageRouter.addRoute(baseJson.avatar.replace(".jpg", ""), `${imageFilepath}/${traderImageName}`); - } + // Register a route to point to the profile picture - remember to remove the .jpg from it + imageRouter.addRoute(baseJson.avatar.replace(".jpg", ""), `${imageFilepath}/${traderImageName}`); + } /** * Add record to trader config to set the refresh time of trader in seconds (default is 60 minutes) @@ -40,8 +39,8 @@ export class TraderHelper traderId: baseJson._id, seconds: { min: refreshTimeSecondsMin, - max: refreshTimeSecondsMax - } + max: refreshTimeSecondsMax, + }, }; traderConfig.updateTime.push(traderRefreshRecord); @@ -50,21 +49,21 @@ export class TraderHelper /** * Add our new trader to the database * @param traderDetailsToAdd trader details - * @param traders Traders dictionary (key is traderid, value is trader data) + * @param tables database * @param jsonUtil json utility class */ // rome-ignore lint/suspicious/noExplicitAny: traderDetailsToAdd comes from base.json, so no type - public addTraderToDb(traderDetailsToAdd: any, traders: Record, jsonUtil: JsonUtil): void + public addTraderToDb(traderDetailsToAdd: any, tables: IDatabaseTables, jsonUtil: JsonUtil): void { // Add trader to trader table, key is the traders id - traders[traderDetailsToAdd._id] = { + tables.traders[traderDetailsToAdd._id] = { assort: this.createAssortTable(), // assorts are the 'offers' trader sells, can be a single item (e.g. carton of milk) or multiple items as a collection (e.g. a gun) base: jsonUtil.deserialize(jsonUtil.serialize(traderDetailsToAdd)) as ITraderBase, // Deserialise/serialise creates a copy of the json and allows us to cast it as an ITraderBase questassort: { started: {}, success: {}, - fail: {} - } // questassort is empty as trader has no assorts unlocked by quests + fail: {}, + }, // questassort is empty as trader has no assorts unlocked by quests }; } @@ -79,7 +78,7 @@ export class TraderHelper nextResupply: 0, items: [], barter_scheme: {}, - loyal_level_items: {} + loyal_level_items: {}, }; return assortTable; @@ -97,7 +96,7 @@ export class TraderHelper // Add the base first glock.push({ // Add the base weapon first _id: "glockBase", // Ids dont matter, as long as they are unique (can use hashUtil.generate() if you dont want to type every id by hand) - _tpl: "5a7ae0c351dfba0017554310" // This is the weapons tpl, found on: https://db.sp-tarkov.com/search + _tpl: "5a7ae0c351dfba0017554310", // This is the weapons tpl, found on: https://db.sp-tarkov.com/search }); // Add barrel @@ -105,7 +104,7 @@ export class TraderHelper _id: "glockbarrel", _tpl: "5a6b60158dc32e000a31138b", parentId: "glockBase", // This is a sub item, you need to define its parent its attached to / inserted into - slotId: "mod_barrel" // Required for mods, you need to define what 'role' they have + slotId: "mod_barrel", // Required for mods, you need to define what 'role' they have }); // Add reciever @@ -113,15 +112,15 @@ export class TraderHelper _id: "glockReciever", _tpl:"5a9685b1a2750c0032157104", parentId: "glockBase", - slotId: "mod_reciever" + slotId: "mod_reciever", }); - // Add compensator - glock.push({ + // Add compensator + glock.push({ _id: "glockCompensator", _tpl:"5a7b32a2e899ef00135e345a", parentId: "glockReciever", // The parent of this mod is the reciever NOT weapon, be careful to get the correct parent - slotId: "mod_muzzle" + slotId: "mod_muzzle", }); // Add Pistol grip @@ -129,7 +128,7 @@ export class TraderHelper _id: "glockPistolGrip", _tpl:"5a7b4960e899ef197b331a2d", parentId: "glockBase", - slotId: "mod_pistol_grip" + slotId: "mod_pistol_grip", }); // Add front sight @@ -137,7 +136,7 @@ export class TraderHelper _id: "glockRearSight", _tpl: "5a6f5d528dc32e00094b97d9", parentId: "glockReciever", - slotId: "mod_sight_rear" + slotId: "mod_sight_rear", }); // Add rear sight @@ -145,7 +144,7 @@ export class TraderHelper _id: "glockFrontSight", _tpl: "5a6f58f68dc32e000a311390", parentId: "glockReciever", - slotId: "mod_sight_front" + slotId: "mod_sight_front", }); // Add magazine @@ -153,29 +152,28 @@ export class TraderHelper _id: "glockMagazine", _tpl: "630769c4962d0247b029dc60", parentId: "glockBase", - slotId: "mod_magazine" + slotId: "mod_magazine", }); return glock; } - /** + /** * Add traders name/location/description to the locale table - * @param baseJson json file for trader (mod/db/base.json) - * @param localesDb Locale data from database + * @param baseJson json file for trader (db/base.json) + * @param tables database tables * @param fullName Complete name of trader * @param firstName First name of trader * @param nickName Nickname of trader * @param location Location of trader (e.g. "Here in the cat shop") * @param description Description of trader */ - public addTraderToLocales(baseJson: any, localesDb: ILocaleBase, fullName: string, firstName: string, nickName: string, location: string, description: string): void + public addTraderToLocales(baseJson: any, tables: IDatabaseTables, fullName: string, firstName: string, nickName: string, location: string, description: string) { // For each language, add locale for the new trader - const localeValues = Object.values(localesDb.global); + const locales = Object.values(tables.locales.global); - for (const locale of localeValues) - { + for (const locale of locales) { locale[`${baseJson._id} FullName`] = fullName; locale[`${baseJson._id} FirstName`] = firstName; locale[`${baseJson._id} Nickname`] = nickName; diff --git a/TypeScript/13AddTrader/tsconfig.json b/TypeScript/13AddTrader/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/13AddTrader/tsconfig.json +++ b/TypeScript/13AddTrader/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/13AddTrader/types/callbacks/InraidCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/13AddTrader/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/13AddTrader/types/controllers/BotController.d.ts b/TypeScript/13AddTrader/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/13AddTrader/types/controllers/BotController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts b/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/13AddTrader/types/generators/BotInventoryGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/13AddTrader/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts b/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/13AddTrader/types/helpers/PresetHelper.d.ts b/TypeScript/13AddTrader/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/13AddTrader/types/helpers/PresetHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/13AddTrader/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/13AddTrader/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/13AddTrader/types/models/eft/common/ILocation.d.ts b/TypeScript/13AddTrader/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/13AddTrader/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/13AddTrader/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/13AddTrader/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/13AddTrader/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/13AddTrader/types/models/enums/ModSpawn.d.ts b/TypeScript/13AddTrader/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/13AddTrader/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/13AddTrader/types/models/enums/NotificationEventType.d.ts b/TypeScript/13AddTrader/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/13AddTrader/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/13AddTrader/types/models/enums/SkillTypes.d.ts b/TypeScript/13AddTrader/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/13AddTrader/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/13AddTrader/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/13AddTrader/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/13AddTrader/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/13AddTrader/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/13AddTrader/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/13AddTrader/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/13AddTrader/types/models/spt/services/LootRequest.d.ts b/TypeScript/13AddTrader/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/13AddTrader/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/13AddTrader/types/servers/SaveServer.d.ts b/TypeScript/13AddTrader/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/13AddTrader/types/servers/SaveServer.d.ts +++ b/TypeScript/13AddTrader/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/13AddTrader/types/servers/WebSocketServer.d.ts b/TypeScript/13AddTrader/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/13AddTrader/types/servers/WebSocketServer.d.ts +++ b/TypeScript/13AddTrader/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/13AddTrader/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/13AddTrader/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/13AddTrader/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/13AddTrader/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/13AddTrader/types/services/DatabaseService.d.ts b/TypeScript/13AddTrader/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/13AddTrader/types/services/DatabaseService.d.ts +++ b/TypeScript/13AddTrader/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/13AddTrader/types/services/FenceService.d.ts b/TypeScript/13AddTrader/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/13AddTrader/types/services/FenceService.d.ts +++ b/TypeScript/13AddTrader/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/14AfterDBLoadHook/README.md b/TypeScript/14AfterDBLoadHook/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/14AfterDBLoadHook/README.md +++ b/TypeScript/14AfterDBLoadHook/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/14AfterDBLoadHook/package.json b/TypeScript/14AfterDBLoadHook/package.json index 54ee2cf..8152217 100644 --- a/TypeScript/14AfterDBLoadHook/package.json +++ b/TypeScript/14AfterDBLoadHook/package.json @@ -1,7 +1,7 @@ { "name": "AfterDBLoadHook", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/14AfterDBLoadHook/src/mod.ts b/TypeScript/14AfterDBLoadHook/src/mod.ts index a7d13a9..1f4ee95 100644 --- a/TypeScript/14AfterDBLoadHook/src/mod.ts +++ b/TypeScript/14AfterDBLoadHook/src/mod.ts @@ -1,62 +1,49 @@ import { DependencyContainer } from "tsyringe"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; -import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; -import { DatabaseService } from "@spt/services/DatabaseService"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; +import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor"; -class Mod implements IPreSptLoadMod, IPostSptLoadMod, IPostDBLoadMod +class Mod implements IPreAkiLoadMod, IPostAkiLoadMod, IPostDBLoadMod { - public preSptLoad(container: DependencyContainer): void - { + public preAkiLoad(container: DependencyContainer): void { // Database will be empty in here - const databaseService = container.resolve("DatabaseService"); - const logger = container.resolve("PrimaryLogger"); - logger.logWithColor(`Database item table state: ${databaseService.getTemplates()} (<<< should be undefined)`, LogTextColor.RED, LogBackgroundColor.YELLOW); + const databaseServer = container.resolve("DatabaseServer"); + const logger = container.resolve("WinstonLogger"); + logger.logWithColor(`Database item table state: ${databaseServer.getTables().templates} (<<< should be undefined)`, LogTextColor.RED, LogBackgroundColor.YELLOW); } - public postDBLoad(container: DependencyContainer): void - { - // Database will be loaded, this is the fresh state of the DB so NOTHING from the SPT + public postDBLoad(container: DependencyContainer): void { + // Database will be loaded, this is the fresh state of the DB so NOTHING from the AKI // logic has modified anything yet. This is the DB loaded straight from the JSON files - const databaseService = container.resolve("DatabaseService"); - const logger = container.resolve("PrimaryLogger"); - logger.logWithColor(`Database item size: ${Object.entries(databaseService.getItems()).length}`, LogTextColor.RED, LogBackgroundColor.YELLOW); - // lets do a quick modification and see how this reflect later on, on the postSptLoad() + const databaseServer = container.resolve("DatabaseServer"); + const logger = container.resolve("WinstonLogger"); + logger.logWithColor(`Database item size: ${Object.entries(databaseServer.getTables().templates.items).length}`, LogTextColor.RED, LogBackgroundColor.YELLOW); + // lets do a quick modification and see how this reflect later on, on the postAkiLoad() // find the nvgs item by its Id - const nvgs = databaseService.getItems()["5c0558060db834001b735271"]; + const nvgs = databaseServer.getTables().templates.items["5c0558060db834001b735271"]; // Lets log the state before the modification: logger.logWithColor(`NVGs default CanSellOnRagfair: ${nvgs._props.CanSellOnRagfair}`, LogTextColor.RED, LogBackgroundColor.YELLOW); // update one of its properties to be true nvgs._props.CanSellOnRagfair = true; } - public postSptLoad(container: DependencyContainer): void - { - // The modification we made above would have been processed by now by SPT, so any values we changed had - // already been passed through the initial lifecycles (OnLoad) of SPT. - const itemHelper = container.resolve("ItemHelper"); - const logger = container.resolve("PrimaryLogger"); - - // Find the nvgs item again by its Id using ItemHelper class (alternate way of getting items that has more saftey checks) - const nvgs = itemHelper.getItem("5c0558060db834001b735271"); // Returns an array of 2 values, 1st is a bool, true if item is valid, 2nd is the item data - if (nvgs[0]) - { - // item was found in database, hooray - - // Assign a new variable so we can cleanly reference its _props data below - const nvgsData = nvgs[1]; - - // Lets log the state, this value should be true: - logger.logWithColor(`NVGs modified CanSellOnRagfair: ${nvgsData._props.CanSellOnRagfair}`, LogTextColor.RED, LogBackgroundColor.YELLOW); - } + public postAkiLoad(container: DependencyContainer): void { + // The modification we made above would have been processed by now by AKI, so any values we changed had + // already been passed through the initial lifecycles (OnLoad) of AKI. + const databaseServer = container.resolve("DatabaseServer"); + const logger = container.resolve("WinstonLogger"); + // find the nvgs item again by its Id + const nvgs = databaseServer.getTables().templates.items["5c0558060db834001b735271"]; + // Lets log the state, this value should be true: + logger.logWithColor(`NVGs modified CanSellOnRagfair: ${nvgs._props.CanSellOnRagfair}`, LogTextColor.RED, LogBackgroundColor.YELLOW); } } diff --git a/TypeScript/14AfterDBLoadHook/tsconfig.json b/TypeScript/14AfterDBLoadHook/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/14AfterDBLoadHook/tsconfig.json +++ b/TypeScript/14AfterDBLoadHook/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotInventoryGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocation.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/ModSpawn.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/NotificationEventType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/SkillTypes.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/servers/SaveServer.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/SaveServer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/14AfterDBLoadHook/types/servers/WebSocketServer.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/WebSocketServer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/14AfterDBLoadHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/14AfterDBLoadHook/types/services/DatabaseService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/DatabaseService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/15HttpListenerExample/README.md b/TypeScript/15HttpListenerExample/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/15HttpListenerExample/README.md +++ b/TypeScript/15HttpListenerExample/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/15HttpListenerExample/package.json b/TypeScript/15HttpListenerExample/package.json index dd250e7..00b9272 100644 --- a/TypeScript/15HttpListenerExample/package.json +++ b/TypeScript/15HttpListenerExample/package.json @@ -1,7 +1,7 @@ { "name": "HttpListenerExample", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/15HttpListenerExample/src/Type2HttpListener.ts b/TypeScript/15HttpListenerExample/src/Type2HttpListener.ts index aa8d929..d87d66c 100644 --- a/TypeScript/15HttpListenerExample/src/Type2HttpListener.ts +++ b/TypeScript/15HttpListenerExample/src/Type2HttpListener.ts @@ -1,6 +1,6 @@ import { IncomingMessage, ServerResponse } from "node:http"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; +import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; export class Type2HttpListener implements IHttpListener { diff --git a/TypeScript/15HttpListenerExample/src/mod.ts b/TypeScript/15HttpListenerExample/src/mod.ts index 1383f48..3158494 100644 --- a/TypeScript/15HttpListenerExample/src/mod.ts +++ b/TypeScript/15HttpListenerExample/src/mod.ts @@ -1,14 +1,14 @@ import { IncomingMessage, ServerResponse } from "node:http"; import { DependencyContainer } from "tsyringe"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { HttpListenerModService } from "@spt/services/mod/httpListener/HttpListenerModService"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { HttpListenerModService } from "@spt-aki/services/mod/httpListener/HttpListenerModService"; import { Type2HttpListener } from "./Type2HttpListener"; -class Mod implements IPreSptLoadMod +class Mod implements IPreAkiLoadMod { // Code added here will load BEFORE the server has started loading - public preSptLoad(container: DependencyContainer): void + public preAkiLoad(container: DependencyContainer): void { const httpListenerService = container.resolve("HttpListenerModService"); httpListenerService.registerHttpListener("Type1HttpListener", this.canHandleOverride, this.handleOverride) diff --git a/TypeScript/15HttpListenerExample/tsconfig.json b/TypeScript/15HttpListenerExample/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/15HttpListenerExample/tsconfig.json +++ b/TypeScript/15HttpListenerExample/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/15HttpListenerExample/types/generators/BotInventoryGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocation.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/ModSpawn.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/NotificationEventType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/SkillTypes.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/services/LootRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/15HttpListenerExample/types/servers/SaveServer.d.ts b/TypeScript/15HttpListenerExample/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/15HttpListenerExample/types/servers/SaveServer.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/15HttpListenerExample/types/servers/WebSocketServer.d.ts b/TypeScript/15HttpListenerExample/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/15HttpListenerExample/types/servers/WebSocketServer.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/15HttpListenerExample/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/15HttpListenerExample/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/15HttpListenerExample/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/15HttpListenerExample/types/services/DatabaseService.d.ts b/TypeScript/15HttpListenerExample/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/15HttpListenerExample/types/services/DatabaseService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts b/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/16ImporterUtil/README.md b/TypeScript/16ImporterUtil/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/16ImporterUtil/README.md +++ b/TypeScript/16ImporterUtil/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/16ImporterUtil/package.json b/TypeScript/16ImporterUtil/package.json index 001d66a..97dbd0e 100644 --- a/TypeScript/16ImporterUtil/package.json +++ b/TypeScript/16ImporterUtil/package.json @@ -1,7 +1,7 @@ { "name": "ImporterUtil", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/16ImporterUtil/src/mod.ts b/TypeScript/16ImporterUtil/src/mod.ts index cb63d54..651a43b 100644 --- a/TypeScript/16ImporterUtil/src/mod.ts +++ b/TypeScript/16ImporterUtil/src/mod.ts @@ -1,18 +1,18 @@ import { DependencyContainer } from "tsyringe"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ImporterUtil } from "@spt/utils/ImporterUtil"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ImporterUtil } from "@spt-aki/utils/ImporterUtil"; import { ConfigsModelBase } from "./model/ConfigsModel"; -class Mod implements IPreSptLoadMod { - public preSptLoad(container: DependencyContainer): void { +class Mod implements IPreAkiLoadMod { + public preAkiLoad(container: DependencyContainer): void { // get logger - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); const importerUtil = container.resolve("ImporterUtil"); - const modImporter = container.resolve("PreSptModLoader"); + const modImporter = container.resolve("PreAkiModLoader"); const path = modImporter.getModPath("16ImporterUtil"); const configPath = `${path}config/`; diff --git a/TypeScript/16ImporterUtil/tsconfig.json b/TypeScript/16ImporterUtil/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/16ImporterUtil/tsconfig.json +++ b/TypeScript/16ImporterUtil/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts b/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/16ImporterUtil/types/generators/BotInventoryGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/16ImporterUtil/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/ILocation.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/16ImporterUtil/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/16ImporterUtil/types/models/enums/ModSpawn.d.ts b/TypeScript/16ImporterUtil/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/16ImporterUtil/types/models/enums/NotificationEventType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/16ImporterUtil/types/models/enums/SkillTypes.d.ts b/TypeScript/16ImporterUtil/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/16ImporterUtil/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/16ImporterUtil/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/services/LootRequest.d.ts b/TypeScript/16ImporterUtil/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/16ImporterUtil/types/servers/SaveServer.d.ts b/TypeScript/16ImporterUtil/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/16ImporterUtil/types/servers/SaveServer.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/16ImporterUtil/types/servers/WebSocketServer.d.ts b/TypeScript/16ImporterUtil/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/16ImporterUtil/types/servers/WebSocketServer.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/16ImporterUtil/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/16ImporterUtil/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/16ImporterUtil/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/16ImporterUtil/types/services/DatabaseService.d.ts b/TypeScript/16ImporterUtil/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/16ImporterUtil/types/services/DatabaseService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/16ImporterUtil/types/services/FenceService.d.ts b/TypeScript/16ImporterUtil/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/16ImporterUtil/types/services/FenceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/17AsyncImporterWithDependency1/README.md b/TypeScript/17AsyncImporterWithDependency1/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/17AsyncImporterWithDependency1/README.md +++ b/TypeScript/17AsyncImporterWithDependency1/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/17AsyncImporterWithDependency1/package.json b/TypeScript/17AsyncImporterWithDependency1/package.json index 579b4b7..99e2af1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/package.json +++ b/TypeScript/17AsyncImporterWithDependency1/package.json @@ -1,7 +1,7 @@ { "name": "AsyncWithDependency1", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/17AsyncImporterWithDependency1/src/mod.ts b/TypeScript/17AsyncImporterWithDependency1/src/mod.ts index a7e9cd9..a34a004 100644 --- a/TypeScript/17AsyncImporterWithDependency1/src/mod.ts +++ b/TypeScript/17AsyncImporterWithDependency1/src/mod.ts @@ -1,18 +1,18 @@ import { DependencyContainer } from "tsyringe"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IPreSptLoadModAsync } from "@spt/models/external/IPreSptLoadModAsync"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ImporterUtil } from "@spt/utils/ImporterUtil"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { IPreAkiLoadModAsync } from "@spt-aki/models/external/IPreAkiLoadModAsync"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ImporterUtil } from "@spt-aki/utils/ImporterUtil"; import { ConfigsModelBase } from "./model/ConfigsModel"; -class Mod implements IPreSptLoadModAsync { - public async preSptLoadAsync(container: DependencyContainer): Promise { +class Mod implements IPreAkiLoadModAsync { + public async preAkiLoadAsync(container: DependencyContainer): Promise { // get logger - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); const importerUtil = container.resolve("ImporterUtil"); - const modImporter = container.resolve("PreSptModLoader"); + const modImporter = container.resolve("PreAkiModLoader"); const path = modImporter.getModPath("16ImporterUtil"); const configPath = `${path}config/`; diff --git a/TypeScript/17AsyncImporterWithDependency1/tsconfig.json b/TypeScript/17AsyncImporterWithDependency1/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/tsconfig.json +++ b/TypeScript/17AsyncImporterWithDependency1/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotInventoryGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocation.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ModSpawn.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/NotificationEventType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SkillTypes.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/SaveServer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/SaveServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/WebSocketServer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/WebSocketServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/DatabaseService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/DatabaseService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/17AsyncImporterWithDependency2/README.md b/TypeScript/17AsyncImporterWithDependency2/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/17AsyncImporterWithDependency2/README.md +++ b/TypeScript/17AsyncImporterWithDependency2/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/17AsyncImporterWithDependency2/package.json b/TypeScript/17AsyncImporterWithDependency2/package.json index 4598d13..6614a4d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/package.json +++ b/TypeScript/17AsyncImporterWithDependency2/package.json @@ -1,7 +1,7 @@ { "name": "AsyncWithDependency2", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/17AsyncImporterWithDependency2/src/mod.ts b/TypeScript/17AsyncImporterWithDependency2/src/mod.ts index 8c36af0..815a944 100644 --- a/TypeScript/17AsyncImporterWithDependency2/src/mod.ts +++ b/TypeScript/17AsyncImporterWithDependency2/src/mod.ts @@ -1,18 +1,18 @@ import { DependencyContainer } from "tsyringe"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IPreSptLoadModAsync } from "@spt/models/external/IPreSptLoadModAsync"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ImporterUtil } from "@spt/utils/ImporterUtil"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { IPreAkiLoadModAsync } from "@spt-aki/models/external/IPreAkiLoadModAsync"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ImporterUtil } from "@spt-aki/utils/ImporterUtil"; import { ConfigsModelBase } from "./model/ConfigsModel"; -class Mod implements IPreSptLoadModAsync { - public async preSptLoadAsync(container: DependencyContainer): Promise { +class Mod implements IPreAkiLoadModAsync { + public async preAkiLoadAsync(container: DependencyContainer): Promise { // get logger - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); const importerUtil = container.resolve("ImporterUtil"); - const modImporter = container.resolve("PreSptModLoader"); + const modImporter = container.resolve("PreAkiModLoader"); const path = modImporter.getModPath("16ImporterUtil"); const configPath = `${path}config/`; diff --git a/TypeScript/17AsyncImporterWithDependency2/tsconfig.json b/TypeScript/17AsyncImporterWithDependency2/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/tsconfig.json +++ b/TypeScript/17AsyncImporterWithDependency2/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotInventoryGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocation.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ModSpawn.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/NotificationEventType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SkillTypes.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/SaveServer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/SaveServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/WebSocketServer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/WebSocketServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/DatabaseService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/DatabaseService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/18CustomItemService/README.md b/TypeScript/18CustomItemService/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/18CustomItemService/README.md +++ b/TypeScript/18CustomItemService/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/18CustomItemService/package.json b/TypeScript/18CustomItemService/package.json index 568afe5..f9854d3 100644 --- a/TypeScript/18CustomItemService/package.json +++ b/TypeScript/18CustomItemService/package.json @@ -1,7 +1,7 @@ { "name": "CustomItemService", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/18CustomItemService/src/mod.ts b/TypeScript/18CustomItemService/src/mod.ts index 57463ba..100d342 100644 --- a/TypeScript/18CustomItemService/src/mod.ts +++ b/TypeScript/18CustomItemService/src/mod.ts @@ -1,21 +1,21 @@ import { DependencyContainer } from "tsyringe"; -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { CustomItemService } from "@spt/services/mod/CustomItemService"; -import { NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { DatabaseService } from "@spt/services/DatabaseService"; +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { CustomItemService } from "@spt-aki/services/mod/CustomItemService"; +import { NewItemFromCloneDetails } from "@spt-aki/models/spt/mod/NewItemDetails"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -class Mod implements IPostDBLoadMod, IPostSptLoadMod +class Mod implements IPostDBLoadMod, IPostAkiLoadMod { public postDBLoad(container: DependencyContainer): void { - // Resolve the CustomItemService - const customItemService = container.resolve("CustomItemService"); + // Resolve the CustomItemService container + const CustomItem = container.resolve("CustomItemService"); - // Clone the mp-18 and adjust its properties slightly - const exampleCloneItem: NewItemFromCloneDetails = { - itemTplToClone: "61f7c9e189e6fb1a5e3ea78d", // MP-18 id + //Example of adding new item by cloning existing item using createclonedetails + const ExampleCloneItem: NewItemFromCloneDetails = { + itemTplToClone: "61f7c9e189e6fb1a5e3ea78d", //the item we want to clone, in this example i will cloning the MP-18 overrideProperties: { Chambers: [ { @@ -41,42 +41,40 @@ class Mod implements IPostDBLoadMod, IPostSptLoadMod "5d6e68b3a4b9361bca7e50b5", "5d6e6891a4b9361bd473feea", "5d6e689ca4b9361bc8618956", - "5d6e68d1a4b93622fe60e845" - ] - } - ] + "5d6e68d1a4b93622fe60e845", + ], + }, + ], }, _required: false, _mergeSlotWithChildren: false, - _proto: "55d4af244bdc2d962f8b4571" - } - ] - }, // Overried properties basically tell the server on what data inside _props to be modified from the cloned item, in this example i am modifying the ammo used to be 12G - parentId: "5447b6094bdc2dc3278b4567", // ParentId refers to the Node item the gun will be under. For this example we use `Shotgun`, you can check it in https://db.sp-tarkov.com/search - newId: "CustomMP18", // The new id of our cloned item - fleaPriceRoubles: 50000, // Average price of item on flea + _proto: "55d4af244bdc2d962f8b4571", + }, + ], + }, //Overried properties basically tell the server on what data inside _props to be modified from the cloned item, in this example i am modifying the ammo used to be 12G + parentId: "5447b6094bdc2dc3278b4567", //ParentId refers to the Node item the gun will be under, you can check it in https://db.sp-tarkov.com/search + newId: "CustomMP18", //The new id of our cloned item + fleaPriceRoubles: 50000, //Self explanatary handbookPriceRoubles: 42500, - handbookParentId: "5b5f78e986f77447ed5636b1", // Handbook Parent Id refers to the category the gun will be under - // You see those side box tab thing that only select gun under specific icon? Handbook parent can be found in SPT_Data\Server\database\templates. + handbookParentId: "5b5f78e986f77447ed5636b1", //Handbook Parent Id refers to the category the gun will be under + //you see those side box tab thing that only select gun under specific icon? Handbook parent can be found in Aki_Data\Server\database\templates. locales: { en: { name: "MP-18 12g", shortName: "Custom MP18", - description: "A custom MP18 chambered in 12G" - } - } + description: "A custom MP18 chambered in 12G", + }, + }, }; - customItemService.createItemFromClone(exampleCloneItem); // Tell the server to add our Cloned item into the server using custom item service + CustomItem.createItemFromClone(ExampleCloneItem); //Basically calls the function and tell the server to add our Cloned new item into the server } //Check if our item is in the server or not - public postSptLoad(container: DependencyContainer): void - { - const databaseService = container.resolve("DatabaseService"); - const item = databaseService.getItems(); + public postAkiLoad(container: DependencyContainer): void { + const db = container.resolve("DatabaseServer"); + const item = db.getTables().templates.items; - // Log our new guns properties to console console.log(item["CustomMP18"]._props); } } diff --git a/TypeScript/18CustomItemService/tsconfig.json b/TypeScript/18CustomItemService/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/18CustomItemService/tsconfig.json +++ b/TypeScript/18CustomItemService/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts b/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/18CustomItemService/types/generators/BotInventoryGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/18CustomItemService/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/18CustomItemService/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/18CustomItemService/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/ILocation.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/18CustomItemService/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/18CustomItemService/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/18CustomItemService/types/models/enums/ModSpawn.d.ts b/TypeScript/18CustomItemService/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/18CustomItemService/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/18CustomItemService/types/models/enums/NotificationEventType.d.ts b/TypeScript/18CustomItemService/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/18CustomItemService/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/18CustomItemService/types/models/enums/SkillTypes.d.ts b/TypeScript/18CustomItemService/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/18CustomItemService/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/18CustomItemService/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/18CustomItemService/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/services/LootRequest.d.ts b/TypeScript/18CustomItemService/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/18CustomItemService/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/18CustomItemService/types/servers/SaveServer.d.ts b/TypeScript/18CustomItemService/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/18CustomItemService/types/servers/SaveServer.d.ts +++ b/TypeScript/18CustomItemService/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/18CustomItemService/types/servers/WebSocketServer.d.ts b/TypeScript/18CustomItemService/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/18CustomItemService/types/servers/WebSocketServer.d.ts +++ b/TypeScript/18CustomItemService/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/18CustomItemService/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/18CustomItemService/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/18CustomItemService/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/18CustomItemService/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/18CustomItemService/types/services/DatabaseService.d.ts b/TypeScript/18CustomItemService/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/18CustomItemService/types/services/DatabaseService.d.ts +++ b/TypeScript/18CustomItemService/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/18CustomItemService/types/services/FenceService.d.ts b/TypeScript/18CustomItemService/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/18CustomItemService/types/services/FenceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/19UseExternalLibraries/README.md b/TypeScript/19UseExternalLibraries/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/19UseExternalLibraries/README.md +++ b/TypeScript/19UseExternalLibraries/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/19UseExternalLibraries/package.json b/TypeScript/19UseExternalLibraries/package.json index 2c2ee30..4b54b64 100644 --- a/TypeScript/19UseExternalLibraries/package.json +++ b/TypeScript/19UseExternalLibraries/package.json @@ -1,7 +1,7 @@ { "name": "UseExternalLibraries", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/19UseExternalLibraries/src/mod.ts b/TypeScript/19UseExternalLibraries/src/mod.ts index ec798a5..13bd96b 100644 --- a/TypeScript/19UseExternalLibraries/src/mod.ts +++ b/TypeScript/19UseExternalLibraries/src/mod.ts @@ -1,26 +1,26 @@ import path from "node:path"; import { DependencyContainer } from "tsyringe"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { VFS } from "@spt/utils/VFS"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { VFS } from "@spt-aki/utils/VFS"; import { jsonc } from "jsonc"; // Our dynamically imported package (via pnpm) not bundled into the server import ora from "ora-classic"; -class Mod implements IPreSptLoadMod, IPostSptLoadMod { - public preSptLoad(container: DependencyContainer): void { +class Mod implements IPreAkiLoadMod, IPostAkiLoadMod { + public preAkiLoad(container: DependencyContainer): void { const vfs = container.resolve("VFS"); - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); const parsedJsonC = jsonc.parse(vfs.readFile(path.resolve(__dirname, "../test.jsonc"))); logger.success(jsonc.stringify(parsedJsonC, null, "\t")); // you could use the built in JSON api here if you really wanted too aswell, i used jsonc to really drive home the point that it works } - public postSptLoad(container: DependencyContainer): void { + public postAkiLoad(container: DependencyContainer): void { // this first timeout is just to prevent a weird formatting problem on the console, you can ignore it, you don't really need it anyways, it's just so that it looks right on the console setTimeout(() => { const spinner = ora({ diff --git a/TypeScript/19UseExternalLibraries/tsconfig.json b/TypeScript/19UseExternalLibraries/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/19UseExternalLibraries/tsconfig.json +++ b/TypeScript/19UseExternalLibraries/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/InraidCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotInventoryGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/19UseExternalLibraries/types/helpers/PresetHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/PresetHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocation.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/ModSpawn.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/NotificationEventType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/SkillTypes.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/services/LootRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/servers/SaveServer.d.ts b/TypeScript/19UseExternalLibraries/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/SaveServer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/19UseExternalLibraries/types/servers/WebSocketServer.d.ts b/TypeScript/19UseExternalLibraries/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/WebSocketServer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/19UseExternalLibraries/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/19UseExternalLibraries/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/19UseExternalLibraries/types/services/DatabaseService.d.ts b/TypeScript/19UseExternalLibraries/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/19UseExternalLibraries/types/services/DatabaseService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts b/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/1LogToConsole/README.md b/TypeScript/1LogToConsole/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/1LogToConsole/README.md +++ b/TypeScript/1LogToConsole/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/1LogToConsole/package.json b/TypeScript/1LogToConsole/package.json index 7f13aff..642d0d4 100644 --- a/TypeScript/1LogToConsole/package.json +++ b/TypeScript/1LogToConsole/package.json @@ -1,7 +1,7 @@ { "name": "LogToConsole", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/1LogToConsole/src/mod.ts b/TypeScript/1LogToConsole/src/mod.ts index f002128..ccbb988 100644 --- a/TypeScript/1LogToConsole/src/mod.ts +++ b/TypeScript/1LogToConsole/src/mod.ts @@ -1,22 +1,22 @@ import { DependencyContainer } from "tsyringe"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; -import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; +import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor"; -class Mod implements IPreSptLoadMod +class Mod implements IPreAkiLoadMod { // Code added here will load BEFORE the server has started loading - public preSptLoad(container: DependencyContainer): void + public preAkiLoad(container: DependencyContainer): void { // get the logger from the server container - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); logger.info("I am logging info!"); logger.warning("I am logging a warning!"); logger.error("I am logging an error!"); - logger.logWithColor("I am logging with yellow text and a red background!", LogTextColor.YELLOW, LogBackgroundColor.RED); + logger.logWithColor("I am logging with color!", LogTextColor.YELLOW, LogBackgroundColor.RED); } } diff --git a/TypeScript/1LogToConsole/tsconfig.json b/TypeScript/1LogToConsole/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/1LogToConsole/tsconfig.json +++ b/TypeScript/1LogToConsole/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/1LogToConsole/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/1LogToConsole/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/ILocation.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; 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 27ff49d..0753cff 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/1LogToConsole/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/1LogToConsole/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/1LogToConsole/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/1LogToConsole/types/models/enums/ModSpawn.d.ts b/TypeScript/1LogToConsole/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/1LogToConsole/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/1LogToConsole/types/models/enums/NotificationEventType.d.ts b/TypeScript/1LogToConsole/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/1LogToConsole/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/1LogToConsole/types/models/enums/SkillTypes.d.ts b/TypeScript/1LogToConsole/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/1LogToConsole/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/1LogToConsole/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/1LogToConsole/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/1LogToConsole/types/models/spt/services/LootRequest.d.ts b/TypeScript/1LogToConsole/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/1LogToConsole/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts b/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/1LogToConsole/types/servers/WebSocketServer.d.ts b/TypeScript/1LogToConsole/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/1LogToConsole/types/servers/WebSocketServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/1LogToConsole/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/1LogToConsole/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/1LogToConsole/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/1LogToConsole/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/1LogToConsole/types/services/DatabaseService.d.ts b/TypeScript/1LogToConsole/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/1LogToConsole/types/services/DatabaseService.d.ts +++ b/TypeScript/1LogToConsole/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/1LogToConsole/types/services/FenceService.d.ts b/TypeScript/1LogToConsole/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/1LogToConsole/types/services/FenceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/20CustomChatBot/README.md b/TypeScript/20CustomChatBot/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/20CustomChatBot/README.md +++ b/TypeScript/20CustomChatBot/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/20CustomChatBot/package.json b/TypeScript/20CustomChatBot/package.json index 5c83d54..04cb178 100644 --- a/TypeScript/20CustomChatBot/package.json +++ b/TypeScript/20CustomChatBot/package.json @@ -1,7 +1,7 @@ { "name": "CustomChatBot", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/20CustomChatBot/src/CustomChatBot.ts b/TypeScript/20CustomChatBot/src/CustomChatBot.ts index 307bff2..ff40aac 100644 --- a/TypeScript/20CustomChatBot/src/CustomChatBot.ts +++ b/TypeScript/20CustomChatBot/src/CustomChatBot.ts @@ -1,10 +1,10 @@ import { inject, injectable } from "tsyringe"; -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { MailSendService } from "@spt/services/MailSendService"; +import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { MailSendService } from "@spt-aki/services/MailSendService"; // \/ dont forger this annotation here! @injectable() diff --git a/TypeScript/20CustomChatBot/src/mod.ts b/TypeScript/20CustomChatBot/src/mod.ts index cdf3f61..f5ad0bf 100644 --- a/TypeScript/20CustomChatBot/src/mod.ts +++ b/TypeScript/20CustomChatBot/src/mod.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { DialogueController } from "@spt/controllers/DialogueController"; +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { DialogueController } from "@spt-aki/controllers/DialogueController"; import { CustomChatBot } from "./CustomChatBot"; class Mod implements IPostDBLoadMod { diff --git a/TypeScript/20CustomChatBot/tsconfig.json b/TypeScript/20CustomChatBot/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/20CustomChatBot/tsconfig.json +++ b/TypeScript/20CustomChatBot/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/20CustomChatBot/types/callbacks/InraidCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts b/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts b/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/20CustomChatBot/types/controllers/RepeatableQuestController.d.ts b/TypeScript/20CustomChatBot/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/20CustomChatBot/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/20CustomChatBot/types/generators/BotInventoryGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/20CustomChatBot/types/helpers/PresetHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/20CustomChatBot/types/helpers/PresetHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/20CustomChatBot/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/ILocation.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/20CustomChatBot/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/20CustomChatBot/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/20CustomChatBot/types/models/enums/ModSpawn.d.ts b/TypeScript/20CustomChatBot/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/20CustomChatBot/types/models/enums/NotificationEventType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/20CustomChatBot/types/models/enums/SkillTypes.d.ts b/TypeScript/20CustomChatBot/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/20CustomChatBot/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/20CustomChatBot/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/20CustomChatBot/types/models/spt/services/LootRequest.d.ts b/TypeScript/20CustomChatBot/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/20CustomChatBot/types/servers/SaveServer.d.ts b/TypeScript/20CustomChatBot/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/20CustomChatBot/types/servers/SaveServer.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/20CustomChatBot/types/servers/WebSocketServer.d.ts b/TypeScript/20CustomChatBot/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/20CustomChatBot/types/servers/WebSocketServer.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/20CustomChatBot/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/20CustomChatBot/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/20CustomChatBot/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/20CustomChatBot/types/services/DatabaseService.d.ts b/TypeScript/20CustomChatBot/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/20CustomChatBot/types/services/DatabaseService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/20CustomChatBot/types/services/FenceService.d.ts b/TypeScript/20CustomChatBot/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/20CustomChatBot/types/services/FenceService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/21CustomCommandoCommand/README.md b/TypeScript/21CustomCommandoCommand/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/21CustomCommandoCommand/README.md +++ b/TypeScript/21CustomCommandoCommand/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/21CustomCommandoCommand/package.json b/TypeScript/21CustomCommandoCommand/package.json index d56e164..57abc32 100644 --- a/TypeScript/21CustomCommandoCommand/package.json +++ b/TypeScript/21CustomCommandoCommand/package.json @@ -1,7 +1,7 @@ { "name": "CustomCommandoCommand", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/21CustomCommandoCommand/src/CustomCommandoCommand.ts b/TypeScript/21CustomCommandoCommand/src/CustomCommandoCommand.ts index c129b03..beffa2c 100644 --- a/TypeScript/21CustomCommandoCommand/src/CustomCommandoCommand.ts +++ b/TypeScript/21CustomCommandoCommand/src/CustomCommandoCommand.ts @@ -1,10 +1,10 @@ import { inject, injectable } from "tsyringe"; -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { MailSendService } from "@spt/services/MailSendService"; +import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { MailSendService } from "@spt-aki/services/MailSendService"; // \/ dont forger this annotation here! @injectable() diff --git a/TypeScript/21CustomCommandoCommand/src/mod.ts b/TypeScript/21CustomCommandoCommand/src/mod.ts index abb902a..98e3edd 100644 --- a/TypeScript/21CustomCommandoCommand/src/mod.ts +++ b/TypeScript/21CustomCommandoCommand/src/mod.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { CommandoDialogueChatBot } from "@spt/helpers/Dialogue/CommandoDialogueChatBot"; +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { CommandoDialogueChatBot } from "@spt-aki/helpers/Dialogue/CommandoDialogueChatBot"; import { CustomCommandoCommand } from "./CustomCommandoCommand"; class Mod implements IPostDBLoadMod { diff --git a/TypeScript/21CustomCommandoCommand/tsconfig.json b/TypeScript/21CustomCommandoCommand/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/21CustomCommandoCommand/tsconfig.json +++ b/TypeScript/21CustomCommandoCommand/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/InraidCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/RepeatableQuestController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotInventoryGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/PresetHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/PresetHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocation.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/ModSpawn.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/NotificationEventType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/SkillTypes.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/servers/SaveServer.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/SaveServer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/21CustomCommandoCommand/types/servers/WebSocketServer.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/WebSocketServer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/21CustomCommandoCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/21CustomCommandoCommand/types/services/DatabaseService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/DatabaseService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/22CustomSptCommand/.buildignore b/TypeScript/22CustomAkiCommand/.buildignore similarity index 100% rename from TypeScript/22CustomSptCommand/.buildignore rename to TypeScript/22CustomAkiCommand/.buildignore diff --git a/TypeScript/22CustomSptCommand/.eslintignore b/TypeScript/22CustomAkiCommand/.eslintignore similarity index 100% rename from TypeScript/22CustomSptCommand/.eslintignore rename to TypeScript/22CustomAkiCommand/.eslintignore diff --git a/TypeScript/22CustomSptCommand/.eslintrc.json b/TypeScript/22CustomAkiCommand/.eslintrc.json similarity index 100% rename from TypeScript/22CustomSptCommand/.eslintrc.json rename to TypeScript/22CustomAkiCommand/.eslintrc.json diff --git a/TypeScript/22CustomSptCommand/README.md b/TypeScript/22CustomAkiCommand/README.md similarity index 79% rename from TypeScript/22CustomSptCommand/README.md rename to TypeScript/22CustomAkiCommand/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/22CustomSptCommand/README.md +++ b/TypeScript/22CustomAkiCommand/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/22CustomSptCommand/build.mjs b/TypeScript/22CustomAkiCommand/build.mjs similarity index 100% rename from TypeScript/22CustomSptCommand/build.mjs rename to TypeScript/22CustomAkiCommand/build.mjs diff --git a/TypeScript/22CustomSptCommand/mod.code-workspace b/TypeScript/22CustomAkiCommand/mod.code-workspace similarity index 100% rename from TypeScript/22CustomSptCommand/mod.code-workspace rename to TypeScript/22CustomAkiCommand/mod.code-workspace diff --git a/TypeScript/22CustomSptCommand/package.json b/TypeScript/22CustomAkiCommand/package.json similarity index 92% rename from TypeScript/22CustomSptCommand/package.json rename to TypeScript/22CustomAkiCommand/package.json index 7069435..58dee14 100644 --- a/TypeScript/22CustomSptCommand/package.json +++ b/TypeScript/22CustomAkiCommand/package.json @@ -1,7 +1,7 @@ { - "name": "CustomSptCommand", + "name": "CustomAkiCommand", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/22CustomSptCommand/src/CustomSptCommand.ts b/TypeScript/22CustomAkiCommand/src/CustomAkiCommand.ts similarity index 66% rename from TypeScript/22CustomSptCommand/src/CustomSptCommand.ts rename to TypeScript/22CustomAkiCommand/src/CustomAkiCommand.ts index 2e01ae4..7b2fff1 100644 --- a/TypeScript/22CustomSptCommand/src/CustomSptCommand.ts +++ b/TypeScript/22CustomAkiCommand/src/CustomAkiCommand.ts @@ -1,14 +1,14 @@ import { inject, injectable } from "tsyringe"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; // \/ dont forger this annotation here! @injectable() -export class CustomSptCommand implements ISptCommand +export class CustomAkiCommand implements ISptCommand { constructor( @inject("ItemHelper") protected itemHelper: ItemHelper, diff --git a/TypeScript/22CustomAkiCommand/src/mod.ts b/TypeScript/22CustomAkiCommand/src/mod.ts new file mode 100644 index 0000000..fa4c351 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/src/mod.ts @@ -0,0 +1,15 @@ +import { DependencyContainer } from "tsyringe"; + +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { SptCommandoCommands } from "@spt-aki/helpers/Dialogue/Commando/SptCommandoCommands"; +import { CustomAkiCommand } from "./CustomAkiCommand"; + +class Mod implements IPostDBLoadMod { + public postDBLoad(container: DependencyContainer): void { + // We register and re-resolve the dependency so the container takes care of filling in the command dependencies + container.register("CustomAkiCommand", CustomAkiCommand); + container.resolve("SptCommandoCommands").registerSptCommandoCommand(container.resolve("CustomAkiCommand")); + } +} + +export const mod = new Mod(); diff --git a/TypeScript/22CustomSptCommand/tsconfig.json b/TypeScript/22CustomAkiCommand/tsconfig.json similarity index 91% rename from TypeScript/22CustomSptCommand/tsconfig.json rename to TypeScript/22CustomAkiCommand/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/22CustomSptCommand/tsconfig.json +++ b/TypeScript/22CustomAkiCommand/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/22CustomAkiCommand/types/callbacks/InraidCallbacks.d.ts b/TypeScript/22CustomAkiCommand/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/22CustomAkiCommand/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/22CustomAkiCommand/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/22CustomAkiCommand/types/controllers/RepeatableQuestController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/22CustomAkiCommand/types/generators/BotInventoryGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/22CustomAkiCommand/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/22CustomAkiCommand/types/helpers/BotHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/BotHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/22CustomAkiCommand/types/helpers/HealthHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/HealthHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/22CustomAkiCommand/types/helpers/InRaidHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/22CustomAkiCommand/types/helpers/InventoryHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/22CustomAkiCommand/types/helpers/PresetHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/PresetHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/22CustomAkiCommand/types/helpers/QuestHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/22CustomAkiCommand/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocation.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/ModSpawn.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/22CustomAkiCommand/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/NotificationEventType.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/22CustomAkiCommand/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/SkillTypes.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/22CustomAkiCommand/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/config/IBotConfig.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/services/LootRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/22CustomAkiCommand/types/servers/SaveServer.d.ts b/TypeScript/22CustomAkiCommand/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/22CustomAkiCommand/types/servers/SaveServer.d.ts +++ b/TypeScript/22CustomAkiCommand/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/22CustomAkiCommand/types/servers/WebSocketServer.d.ts b/TypeScript/22CustomAkiCommand/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/22CustomAkiCommand/types/servers/WebSocketServer.d.ts +++ b/TypeScript/22CustomAkiCommand/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/22CustomAkiCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/22CustomAkiCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/22CustomAkiCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/22CustomAkiCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/22CustomAkiCommand/types/services/DatabaseService.d.ts b/TypeScript/22CustomAkiCommand/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/22CustomAkiCommand/types/services/DatabaseService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts b/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/22CustomSptCommand/src/mod.ts b/TypeScript/22CustomSptCommand/src/mod.ts deleted file mode 100644 index 001191f..0000000 --- a/TypeScript/22CustomSptCommand/src/mod.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { DependencyContainer } from "tsyringe"; - -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { SptCommandoCommands } from "@spt/helpers/Dialogue/Commando/SptCommandoCommands"; -import { CustomSptCommand } from "./CustomSptCommand"; - -class Mod implements IPostDBLoadMod { - public postDBLoad(container: DependencyContainer): void { - // We register and re-resolve the dependency so the container takes care of filling in the command dependencies - container.register("CustomSptCommand", CustomSptCommand); - container.resolve("SptCommandoCommands").registerSptCommandoCommand(container.resolve("CustomSptCommand")); - } -} - -export const mod = new Mod(); diff --git a/TypeScript/22CustomSptCommand/types/ErrorHandler.d.ts b/TypeScript/22CustomSptCommand/types/ErrorHandler.d.ts deleted file mode 100644 index 33c0de6..0000000 --- a/TypeScript/22CustomSptCommand/types/ErrorHandler.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class ErrorHandler { - private logger; - private readLine; - constructor(); - handleCriticalError(err: Error): void; -} diff --git a/TypeScript/22CustomSptCommand/types/Program.d.ts b/TypeScript/22CustomSptCommand/types/Program.d.ts deleted file mode 100644 index f2b65df..0000000 --- a/TypeScript/22CustomSptCommand/types/Program.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare class Program { - private errorHandler; - constructor(); - start(): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/AchievementCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/AchievementCallbacks.d.ts deleted file mode 100644 index 4fb7125..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/AchievementCallbacks.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { AchievementController } from "@spt/controllers/AchievementController"; -import { ProfileController } from "@spt/controllers/ProfileController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ICompletedAchievementsResponse } from "@spt/models/eft/profile/ICompletedAchievementsResponse"; -import { IGetAchievementsResponse } from "@spt/models/eft/profile/IGetAchievementsResponse"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class AchievementCallbacks { - protected achievementController: AchievementController; - protected profileController: ProfileController; - protected httpResponse: HttpResponseUtil; - constructor(achievementController: AchievementController, profileController: ProfileController, httpResponse: HttpResponseUtil); - /** - * Handle client/achievement/list - */ - getAchievements(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/achievement/statistic - */ - statistic(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/BotCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/BotCallbacks.d.ts deleted file mode 100644 index 43abcfc..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/BotCallbacks.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { BotController } from "@spt/controllers/BotController"; -import { IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { Difficulties } from "@spt/models/eft/common/tables/IBotType"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class BotCallbacks { - protected botController: BotController; - protected httpResponse: HttpResponseUtil; - constructor(botController: BotController, httpResponse: HttpResponseUtil); - /** - * Handle singleplayer/settings/bot/limit - * Is called by client to define each bot roles wave limit - * @returns string - */ - getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; - /** - * Handle singleplayer/settings/bot/difficulty - * @returns string - */ - getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; - /** - * Handle singleplayer/settings/bot/difficulties - * @returns dictionary of every bot and its diffiulty settings - */ - getAllBotDifficulties(url: string, info: IEmptyRequestData, sessionID: string): Record; - /** - * Handle client/game/bot/generate - * @returns IGetBodyResponseData - */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; - /** - * Handle singleplayer/settings/bot/maxCap - * @returns string - */ - getBotCap(): string; - /** - * Handle singleplayer/settings/bot/getBotBehaviours - * @returns string - */ - getBotBehaviours(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/BuildsCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/BuildsCallbacks.d.ts deleted file mode 100644 index 79fee87..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/BuildsCallbacks.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { BuildController } from "@spt/controllers/BuildController"; -import { ISetMagazineRequest } from "@spt/models/eft/builds/ISetMagazineRequest"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IPresetBuildActionRequestData } from "@spt/models/eft/presetBuild/IPresetBuildActionRequestData"; -import { IRemoveBuildRequestData } from "@spt/models/eft/presetBuild/IRemoveBuildRequestData"; -import { IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class BuildsCallbacks { - protected httpResponse: HttpResponseUtil; - protected buildController: BuildController; - constructor(httpResponse: HttpResponseUtil, buildController: BuildController); - /** - * Handle client/builds/list - */ - getBuilds(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/builds/magazine/save - */ - createMagazineTemplate(url: string, request: ISetMagazineRequest, sessionID: string): INullResponseData; - /** - * Handle client/builds/weapon/save - */ - setWeapon(url: string, info: IPresetBuildActionRequestData, sessionID: string): INullResponseData; - /** - * Handle client/builds/equipment/save - */ - setEquipment(url: string, info: IPresetBuildActionRequestData, sessionID: string): INullResponseData; - /** - * Handle client/builds/delete - */ - deleteBuild(url: string, info: IRemoveBuildRequestData, sessionID: string): INullResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/BundleCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/BundleCallbacks.d.ts deleted file mode 100644 index 3e579dc..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/BundleCallbacks.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BundleLoader } from "@spt/loaders/BundleLoader"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class BundleCallbacks { - protected httpResponse: HttpResponseUtil; - protected bundleLoader: BundleLoader; - protected configServer: ConfigServer; - protected httpConfig: IHttpConfig; - constructor(httpResponse: HttpResponseUtil, bundleLoader: BundleLoader, configServer: ConfigServer); - /** - * Handle singleplayer/bundles - */ - getBundles(url: string, info: any, sessionID: string): string; - getBundle(url: string, info: any, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/ClientLogCallbacks.d.ts deleted file mode 100644 index bfeb9a4..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/ClientLogCallbacks.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ClientLogController } from "@spt/controllers/ClientLogController"; -import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IClientLogRequest } from "@spt/models/spt/logging/IClientLogRequest"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -/** Handle client logging related events */ -export declare class ClientLogCallbacks { - protected httpResponse: HttpResponseUtil; - protected clientLogController: ClientLogController; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; - protected modLoadOrder: ModLoadOrder; - constructor(httpResponse: HttpResponseUtil, clientLogController: ClientLogController, configServer: ConfigServer, localisationService: LocalisationService, modLoadOrder: ModLoadOrder); - /** - * Handle /singleplayer/log - */ - clientLog(url: string, info: IClientLogRequest, sessionID: string): INullResponseData; - /** - * Handle /singleplayer/release - */ - releaseNotes(): string; - /** - * Handle /singleplayer/enableBSGlogging - */ - bsgLogging(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/CustomizationCallbacks.d.ts deleted file mode 100644 index 3541343..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/CustomizationCallbacks.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { CustomizationController } from "@spt/controllers/CustomizationController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISuit } from "@spt/models/eft/common/tables/ITrader"; -import { IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData"; -import { IGetSuitsResponse } from "@spt/models/eft/customization/IGetSuitsResponse"; -import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class CustomizationCallbacks { - protected customizationController: CustomizationController; - protected saveServer: SaveServer; - protected httpResponse: HttpResponseUtil; - constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); - /** - * Handle client/trading/customization/storage - * @returns IGetSuitsResponse - */ - getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/trading/customization - * @returns ISuit[] - */ - getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle CustomizationWear event - */ - wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle CustomizationBuy event - */ - buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/DataCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/DataCallbacks.d.ts deleted file mode 100644 index 41a5a41..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/DataCallbacks.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { HideoutController } from "@spt/controllers/HideoutController"; -import { RagfairController } from "@spt/controllers/RagfairController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem"; -import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; -import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -/** - * Handle client requests - */ -export declare class DataCallbacks { - protected httpResponse: HttpResponseUtil; - protected databaseServer: DatabaseServer; - protected ragfairController: RagfairController; - protected hideoutController: HideoutController; - constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController); - /** - * Handle client/settings - * @returns ISettingsBase - */ - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/globals - * @returns IGlobals - */ - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/items - * @returns string - */ - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - /** - * Handle client/handbook/templates - * @returns IHandbookBase - */ - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/customization - * @returns Record>; - /** - * Handle client/account/customization - * @returns string[] - */ - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/hideout/settings - * @returns IHideoutSettingsBase - */ - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/languages - */ - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - /** - * Handle client/menu/locale - */ - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/locale - */ - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; - /** - * Handle client/hideout/qte/list - */ - getQteList(url: string, info: IEmptyRequestData, sessionID: string): string; - /** - * Handle client/items/prices/ - * Called when viewing a traders assorts - * TODO - fully implement this - */ - getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/DialogueCallbacks.d.ts deleted file mode 100644 index f37f487..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/DialogueCallbacks.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { DialogueController } from "@spt/controllers/DialogueController"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt/models/eft/dialog/IAcceptFriendRequestData"; -import { IAddUserGroupMailRequest } from "@spt/models/eft/dialog/IAddUserGroupMailRequest"; -import { IChangeGroupMailOwnerRequest } from "@spt/models/eft/dialog/IChangeGroupMailOwnerRequest"; -import { IChatServer } from "@spt/models/eft/dialog/IChatServer"; -import { IClearMailMessageRequest } from "@spt/models/eft/dialog/IClearMailMessageRequest"; -import { ICreateGroupMailRequest } from "@spt/models/eft/dialog/ICreateGroupMailRequest"; -import { IDeleteFriendRequest } from "@spt/models/eft/dialog/IDeleteFriendRequest"; -import { IFriendRequestData } from "@spt/models/eft/dialog/IFriendRequestData"; -import { IFriendRequestSendResponse } from "@spt/models/eft/dialog/IFriendRequestSendResponse"; -import { IGetAllAttachmentsRequestData } from "@spt/models/eft/dialog/IGetAllAttachmentsRequestData"; -import { IGetAllAttachmentsResponse } from "@spt/models/eft/dialog/IGetAllAttachmentsResponse"; -import { IGetChatServerListRequestData } from "@spt/models/eft/dialog/IGetChatServerListRequestData"; -import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendListDataResponse"; -import { IGetMailDialogInfoRequestData } from "@spt/models/eft/dialog/IGetMailDialogInfoRequestData"; -import { IGetMailDialogListRequestData } from "@spt/models/eft/dialog/IGetMailDialogListRequestData"; -import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; -import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; -import { IPinDialogRequestData } from "@spt/models/eft/dialog/IPinDialogRequestData"; -import { IRemoveDialogRequestData } from "@spt/models/eft/dialog/IRemoveDialogRequestData"; -import { IRemoveMailMessageRequest } from "@spt/models/eft/dialog/IRemoveMailMessageRequest"; -import { IRemoveUserGroupMailRequest } from "@spt/models/eft/dialog/IRemoveUserGroupMailRequest"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class DialogueCallbacks implements OnUpdate { - protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected httpResponse: HttpResponseUtil; - protected dialogueController: DialogueController; - constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); - /** - * Handle client/friend/list - * @returns IGetFriendListDataResponse - */ - getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/chatServer/list - * @returns IChatServer[] - */ - getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/mail/dialog/view */ - getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/mail/dialog/remove */ - removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/mail/dialog/pin */ - pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/mail/dialog/unpin */ - unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/mail/dialog/read */ - setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/mail/dialog/getAllAttachments - * @returns IGetAllAttachmentsResponse - */ - getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/mail/msg/send */ - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; - /** Handle client/friend/request/list/outbox */ - listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/friend/request/list/inbox - */ - listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/friend/request/send - */ - sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/friend/request/accept-all - */ - acceptAllFriendRequests(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; - /** - * Handle client/friend/request/accept - */ - acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/friend/request/decline - */ - declineFriendRequest(url: string, request: IDeclineFriendRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/friend/request/cancel - */ - cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/friend/delete */ - deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - /** Handle client/friend/ignore/set */ - ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; - /** Handle client/friend/ignore/remove */ - unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; - clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; - removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; - createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; - changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; - addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; - removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; - onUpdate(timeSinceLastRun: number): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/GameCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/GameCallbacks.d.ts deleted file mode 100644 index b41454f..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/GameCallbacks.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { GameController } from "@spt/controllers/GameController"; -import { OnLoad } from "@spt/di/OnLoad"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { ICheckVersionResponse } from "@spt/models/eft/game/ICheckVersionResponse"; -import { ICurrentGroupResponse } from "@spt/models/eft/game/ICurrentGroupResponse"; -import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; -import { IGameEmptyCrcRequestData } from "@spt/models/eft/game/IGameEmptyCrcRequestData"; -import { IGameKeepAliveResponse } from "@spt/models/eft/game/IGameKeepAliveResponse"; -import { IGameLogoutResponseData } from "@spt/models/eft/game/IGameLogoutResponseData"; -import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData"; -import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; -import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; -import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; -import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; -import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; -import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { Watermark } from "@spt/utils/Watermark"; -export declare class GameCallbacks implements OnLoad { - protected httpResponse: HttpResponseUtil; - protected watermark: Watermark; - protected saveServer: SaveServer; - protected gameController: GameController; - constructor(httpResponse: HttpResponseUtil, watermark: Watermark, saveServer: SaveServer, gameController: GameController); - onLoad(): Promise; - getRoute(): string; - /** - * Handle client/game/version/validate - * @returns INullResponseData - */ - versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; - /** - * Handle client/game/start - * @returns IGameStartResponse - */ - gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/logout - * Save profiles on game close - * @returns IGameLogoutResponseData - */ - gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/config - * @returns IGameConfigResponse - */ - getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/mode - * @returns IGameModeResponse - */ - getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/server/list - */ - getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/match/group/current - */ - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/checkVersion - */ - validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/keepalive - * @returns IGameKeepAliveResponse - */ - gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle singleplayer/settings/version - * @returns string - */ - getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; - reportNickname(url: string, info: IUIDRequestData, sessionID: string): INullResponseData; - /** - * Handle singleplayer/settings/getRaidTime - * @returns string - */ - getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): IGetRaidTimeResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/HandbookCallbacks.d.ts deleted file mode 100644 index 61819de..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/HandbookCallbacks.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { HandbookController } from "@spt/controllers/HandbookController"; -import { OnLoad } from "@spt/di/OnLoad"; -export declare class HandbookCallbacks implements OnLoad { - protected handbookController: HandbookController; - constructor(handbookController: HandbookController); - onLoad(): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/HealthCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/HealthCallbacks.d.ts deleted file mode 100644 index 840c9b1..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/HealthCallbacks.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { HealthController } from "@spt/controllers/HealthController"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; -import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; -import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class HealthCallbacks { - protected httpResponse: HttpResponseUtil; - protected profileHelper: ProfileHelper; - protected healthController: HealthController; - constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; - /** - * Custom spt server request found in modules/QTEPatch.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - handleWorkoutEffects(url: string, info: IWorkoutData, sessionID: string): IGetBodyResponseData; - /** - * Handle Eat - * @returns IItemEventRouterResponse - */ - offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle Heal - * @returns IItemEventRouterResponse - */ - offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle RestoreHealth - * @returns IItemEventRouterResponse - */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/HideoutCallbacks.d.ts deleted file mode 100644 index fadab9b..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/HideoutCallbacks.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { HideoutController } from "@spt/controllers/HideoutController"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutImproveAreaRequestData } from "@spt/models/eft/hideout/IHideoutImproveAreaRequestData"; -import { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData"; -import { IHideoutScavCaseStartRequestData } from "@spt/models/eft/hideout/IHideoutScavCaseStartRequestData"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; -import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; -import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -export declare class HideoutCallbacks implements OnUpdate { - protected hideoutController: HideoutController; - protected configServer: ConfigServer; - protected hideoutConfig: IHideoutConfig; - constructor(hideoutController: HideoutController, // TODO: delay needed - configServer: ConfigServer); - /** - * Handle HideoutUpgrade event - */ - upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Handle HideoutUpgradeComplete event - */ - upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Handle HideoutPutItemsInAreaSlots - */ - putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutTakeItemsFromAreaSlots event - */ - takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutToggleArea event - */ - toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutSingleProductionStart event - */ - singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutScavCaseProductionStart event - */ - scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutContinuousProductionStart - */ - continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutTakeProduction event - */ - takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutQuickTimeEvent - */ - handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Handle client/game/profile/items/moving - RecordShootingRangePoints - */ - recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Handle client/game/profile/items/moving - RecordShootingRangePoints - */ - improveArea(pmcData: IPmcData, request: IHideoutImproveAreaRequestData, sessionId: string): IItemEventRouterResponse; - /** - * Handle client/game/profile/items/moving - HideoutCancelProductionCommand - */ - cancelProduction(pmcData: IPmcData, request: IHideoutCancelProductionRequestData, sessionId: string): IItemEventRouterResponse; - onUpdate(timeSinceLastRun: number): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/HttpCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/HttpCallbacks.d.ts deleted file mode 100644 index 11b2db5..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/HttpCallbacks.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { HttpServer } from "@spt/servers/HttpServer"; -export declare class HttpCallbacks implements OnLoad { - protected httpServer: HttpServer; - constructor(httpServer: HttpServer); - onLoad(): Promise; - getRoute(): string; - getImage(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/InraidCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/InraidCallbacks.d.ts deleted file mode 100644 index a058b99..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/InraidCallbacks.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { InraidController } from "@spt/controllers/InraidController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IItemDeliveryRequestData } from "@spt/models/eft/inRaid/IItemDeliveryRequestData"; -import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -/** - * Handle client requests - */ -export declare class InraidCallbacks { - protected inraidController: InraidController; - protected httpResponse: HttpResponseUtil; - constructor(inraidController: InraidController, httpResponse: HttpResponseUtil); - /** - * Handle client/location/getLocalloot - * Store active map in profile + applicationContext - * @param url - * @param info register player request - * @param sessionID Session id - * @returns Null http response - */ - registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; - /** - * Handle raid/profile/save - * @param url - * @param info Save progress request - * @param sessionID Session id - * @returns Null http response - */ - saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; - /** - * Handle singleplayer/settings/raid/endstate - * @returns - */ - getRaidEndState(): string; - /** - * Handle singleplayer/settings/raid/menu - * @returns JSON as string - */ - getRaidMenuSettings(): string; - /** - * Handle singleplayer/airdrop/config - * @returns JSON as string - */ - getAirdropConfig(): string; - /** - * Handle singleplayer/btr/config - * @returns JSON as string - */ - getBTRConfig(): string; - /** - * Handle singleplayer/traderServices/getTraderServices - */ - getTraderServices(url: string, info: IEmptyRequestData, sessionId: string): string; - /** - * Handle singleplayer/traderServices/itemDelivery - */ - itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; - getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; - getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/InsuranceCallbacks.d.ts deleted file mode 100644 index 888f128..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/InsuranceCallbacks.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { InsuranceController } from "@spt/controllers/InsuranceController"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsuranceCostRequestData"; -import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; -import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { InsuranceService } from "@spt/services/InsuranceService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class InsuranceCallbacks implements OnUpdate { - protected insuranceController: InsuranceController; - protected insuranceService: InsuranceService; - protected httpResponse: HttpResponseUtil; - protected configServer: ConfigServer; - protected insuranceConfig: IInsuranceConfig; - constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); - /** - * Handle client/insurance/items/list/cost - * @returns IGetInsuranceCostResponseData - */ - getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle Insure event - * @returns IItemEventRouterResponse - */ - insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; - onUpdate(secondsSinceLastRun: number): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/InventoryCallbacks.d.ts deleted file mode 100644 index e0968e6..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/InventoryCallbacks.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { InventoryController } from "@spt/controllers/InventoryController"; -import { QuestController } from "@spt/controllers/QuestController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; -import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; -import { IInventoryDeleteMarkerRequestData } from "@spt/models/eft/inventory/IInventoryDeleteMarkerRequestData"; -import { IInventoryEditMarkerRequestData } from "@spt/models/eft/inventory/IInventoryEditMarkerRequestData"; -import { IInventoryExamineRequestData } from "@spt/models/eft/inventory/IInventoryExamineRequestData"; -import { IInventoryFoldRequestData } from "@spt/models/eft/inventory/IInventoryFoldRequestData"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryReadEncyclopediaRequestData } from "@spt/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySortRequestData } from "@spt/models/eft/inventory/IInventorySortRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventorySwapRequestData } from "@spt/models/eft/inventory/IInventorySwapRequestData"; -import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTagRequestData"; -import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; -import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; -import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; -export declare class InventoryCallbacks { - protected inventoryController: InventoryController; - protected questController: QuestController; - constructor(inventoryController: InventoryController, questController: QuestController); - /** Handle client/game/profile/items/moving Move event */ - moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** Handle Remove event */ - removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** Handle Split event */ - splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - transferItem(pmcData: IPmcData, request: IInventoryTransferRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** Handle Swap */ - swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse; - toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse; - tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - unbindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** Handle ReadEncyclopedia */ - readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse; - /** Handle ApplyInventoryChanges */ - sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** Handle OpenRandomLootContainer */ - openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - setFavoriteItem(pmcData: IPmcData, body: ISetFavoriteItems, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * TODO - MOVE INTO QUEST CODE - * Handle game/profile/items/moving - QuestFail - */ - failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/ItemEventCallbacks.d.ts deleted file mode 100644 index 2d42ae3..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/ItemEventCallbacks.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { Warning } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; -import { IItemEventRouterRequest } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ItemEventRouter } from "@spt/routers/ItemEventRouter"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class ItemEventCallbacks { - protected httpResponse: HttpResponseUtil; - protected itemEventRouter: ItemEventRouter; - constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; - /** - * Return true if the passed in list of warnings contains critical issues - * @param warnings The list of warnings to check for critical errors - * @returns - */ - private isCriticalError; - protected getErrorCode(warnings: Warning[]): number; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/LauncherCallbacks.d.ts deleted file mode 100644 index 46fb3f4..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/LauncherCallbacks.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { LauncherController } from "@spt/controllers/LauncherController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; -import { IRemoveProfileData } from "@spt/models/eft/launcher/IRemoveProfileData"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { Watermark } from "@spt/utils/Watermark"; -export declare class LauncherCallbacks { - protected httpResponse: HttpResponseUtil; - protected launcherController: LauncherController; - protected saveServer: SaveServer; - protected watermark: Watermark; - constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); - connect(): string; - login(url: string, info: ILoginRequestData, sessionID: string): string; - register(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK"; - get(url: string, info: ILoginRequestData, sessionID: string): string; - changeUsername(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK"; - changePassword(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK"; - wipe(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK"; - getServerVersion(): string; - ping(url: string, info: IEmptyRequestData, sessionID: string): string; - removeProfile(url: string, info: IRemoveProfileData, sessionID: string): string; - getCompatibleTarkovVersion(): string; - getLoadedServerMods(): string; - getServerModsProfileUsed(url: string, info: IEmptyRequestData, sessionId: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/LocationCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/LocationCallbacks.d.ts deleted file mode 100644 index 2825050..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/LocationCallbacks.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { LocationController } from "@spt/controllers/LocationController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class LocationCallbacks { - protected httpResponse: HttpResponseUtil; - protected locationController: LocationController; - constructor(httpResponse: HttpResponseUtil, locationController: LocationController); - /** Handle client/locations */ - getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/location/getLocalloot */ - getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/location/getAirdropLoot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/MatchCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/MatchCallbacks.d.ts deleted file mode 100644 index f002178..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/MatchCallbacks.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { MatchController } from "@spt/controllers/MatchController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IEndOfflineRaidRequestData } from "@spt/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { IMatchGroupCurrentResponse } from "@spt/models/eft/match/IMatchGroupCurrentResponse"; -import { IMatchGroupInviteSendRequest } from "@spt/models/eft/match/IMatchGroupInviteSendRequest"; -import { IMatchGroupPlayerRemoveRequest } from "@spt/models/eft/match/IMatchGroupPlayerRemoveRequest"; -import { IMatchGroupStartGameRequest } from "@spt/models/eft/match/IMatchGroupStartGameRequest"; -import { IMatchGroupStatusRequest } from "@spt/models/eft/match/IMatchGroupStatusRequest"; -import { IMatchGroupStatusResponse } from "@spt/models/eft/match/IMatchGroupStatusResponse"; -import { IMatchGroupTransferRequest } from "@spt/models/eft/match/IMatchGroupTransferRequest"; -import { IProfileStatusResponse } from "@spt/models/eft/match/IProfileStatusResponse"; -import { IPutMetricsRequestData } from "@spt/models/eft/match/IPutMetricsRequestData"; -import { IRequestIdRequest } from "@spt/models/eft/match/IRequestIdRequest"; -import { IUpdatePingRequestData } from "@spt/models/eft/match/IUpdatePingRequestData"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -export declare class MatchCallbacks { - protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; - protected matchController: MatchController; - protected databaseServer: DatabaseServer; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); - /** Handle client/match/updatePing */ - updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData; - exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; - /** Handle client/match/group/exit_from_menu */ - exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; - groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; - stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; - /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; - /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; - /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; - /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; - /** Handle client/match/group/transfer */ - transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; - /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; - /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; - /** Handle match/group/start_game */ - joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; - /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; - /** - * Called periodically while in a group - * Handle client/match/group/status - * @returns - */ - getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; - /** Handle client/match/group/delete */ - deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; - /** Handle client/match/offline/end */ - endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; - /** Handle client/raid/configuration */ - getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; - /** Handle client/raid/configuration-by-profile */ - getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; - /** Handle client/match/group/raid/ready */ - raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; - /** Handle client/match/group/raid/not-ready */ - notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/ModCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/ModCallbacks.d.ts deleted file mode 100644 index a0df59f..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/ModCallbacks.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { PostSptModLoader } from "@spt/loaders/PostSptModLoader"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpFileUtil } from "@spt/utils/HttpFileUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class ModCallbacks implements OnLoad { - protected logger: ILogger; - protected httpResponse: HttpResponseUtil; - protected httpFileUtil: HttpFileUtil; - protected postSptModLoader: PostSptModLoader; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected httpConfig: IHttpConfig; - constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postSptModLoader: PostSptModLoader, localisationService: LocalisationService, configServer: ConfigServer); - onLoad(): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/NoteCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/NoteCallbacks.d.ts deleted file mode 100644 index d078171..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/NoteCallbacks.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NoteController } from "@spt/controllers/NoteController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; -export declare class NoteCallbacks { - protected noteController: NoteController; - constructor(noteController: NoteController); - /** Handle AddNote event */ - addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; - /** Handle EditNote event */ - editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; - /** Handle DeleteNote event */ - deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/NotifierCallbacks.d.ts deleted file mode 100644 index 0436e12..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/NotifierCallbacks.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NotifierController } from "@spt/controllers/NotifierController"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INotifierChannel } from "@spt/models/eft/notifier/INotifier"; -import { ISelectProfileResponse } from "@spt/models/eft/notifier/ISelectProfileResponse"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -export declare class NotifierCallbacks { - protected httpServerHelper: HttpServerHelper; - protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; - protected notifierController: NotifierController; - constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, notifierController: NotifierController); - /** - * If we don't have anything to send, it's ok to not send anything back - * because notification requests can be long-polling. In fact, we SHOULD wait - * until we actually have something to send because otherwise we'd spam the client - * and the client would abort the connection due to spam. - */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; - /** Handle push/notifier/get */ - /** Handle push/notifier/getwebsocket */ - getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; - /** Handle client/notifier/channel/create */ - createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/profile/select - * @returns ISelectProfileResponse - */ - selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData; - notify(url: string, info: any, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/PresetCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/PresetCallbacks.d.ts deleted file mode 100644 index 24edfa2..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/PresetCallbacks.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PresetController } from "@spt/controllers/PresetController"; -import { OnLoad } from "@spt/di/OnLoad"; -export declare class PresetCallbacks implements OnLoad { - protected presetController: PresetController; - constructor(presetController: PresetController); - onLoad(): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/ProfileCallbacks.d.ts deleted file mode 100644 index 3db4ed8..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/ProfileCallbacks.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { ProfileController } from "@spt/controllers/ProfileController"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IGetMiniProfileRequestData } from "@spt/models/eft/launcher/IGetMiniProfileRequestData"; -import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData"; -import { ICreateProfileResponse } from "@spt/models/eft/profile/ICreateProfileResponse"; -import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest"; -import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse"; -import { IGetProfileSettingsRequest } from "@spt/models/eft/profile/IGetProfileSettingsRequest"; -import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData"; -import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData"; -import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData"; -import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData"; -import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -/** Handle profile related client events */ -export declare class ProfileCallbacks { - protected httpResponse: HttpResponseUtil; - protected timeUtil: TimeUtil; - protected profileController: ProfileController; - protected profileHelper: ProfileHelper; - constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController, profileHelper: ProfileHelper); - /** - * Handle client/game/profile/create - */ - createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/profile/list - * Get the complete player profile (scav + pmc character) - */ - getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/profile/savage/regenerate - * Handle the creation of a scav profile for player - * Occurs post-raid and when profile first created immediately after character details are confirmed by player - * @param url - * @param info empty - * @param sessionID Session id - * @returns Profile object - */ - regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/profile/voice/change event - */ - changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData; - /** - * Handle client/game/profile/nickname/change event - * Client allows player to adjust their profile name - */ - changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/profile/nickname/validate - */ - validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/profile/nickname/reserved - */ - getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/profile/status - * Called when creating a character when choosing a character face/voice - */ - getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/profile/view - * Called when viewing another players profile - */ - getOtherProfile(url: string, request: IGetOtherProfileRequest, sessionID: string): IGetBodyResponseData; - /** - * Handle client/profile/settings - */ - getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; - /** - * Handle client/game/profile/search - */ - searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle launcher/profile/info - */ - getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - /** - * Handle /launcher/profiles - */ - getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/QuestCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/QuestCallbacks.d.ts deleted file mode 100644 index dec034e..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/QuestCallbacks.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { QuestController } from "@spt/controllers/QuestController"; -import { RepeatableQuestController } from "@spt/controllers/RepeatableQuestController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuest } from "@spt/models/eft/common/tables/IQuest"; -import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; -import { IHandoverQuestRequestData } from "@spt/models/eft/quests/IHandoverQuestRequestData"; -import { IListQuestsRequestData } from "@spt/models/eft/quests/IListQuestsRequestData"; -import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class QuestCallbacks { - protected httpResponse: HttpResponseUtil; - protected questController: QuestController; - protected repeatableQuestController: RepeatableQuestController; - constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); - /** - * Handle RepeatableQuestChange event - */ - changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; - /** - * Handle QuestAccept event - */ - acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle QuestComplete event - */ - completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle QuestHandover event - */ - handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle client/quest/list - */ - listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/repeatalbeQuests/activityPeriods - */ - activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/RagfairCallbacks.d.ts deleted file mode 100644 index 1e92996..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/RagfairCallbacks.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { RagfairController } from "@spt/controllers/RagfairController"; -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAddOfferRequestData } from "@spt/models/eft/ragfair/IAddOfferRequestData"; -import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; -import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; -import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; -import { IGetOffersResult } from "@spt/models/eft/ragfair/IGetOffersResult"; -import { IGetRagfairOfferByIdRequest } from "@spt/models/eft/ragfair/IGetRagfairOfferByIdRequest"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRemoveOfferRequestData } from "@spt/models/eft/ragfair/IRemoveOfferRequestData"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { ISendRagfairReportRequestData } from "@spt/models/eft/ragfair/ISendRagfairReportRequestData"; -import { IStorePlayerOfferTaxAmountRequestData } from "@spt/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { RagfairTaxService } from "@spt/services/RagfairTaxService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -/** - * Handle ragfair related callback events - */ -export declare class RagfairCallbacks implements OnLoad, OnUpdate { - protected httpResponse: HttpResponseUtil; - protected ragfairServer: RagfairServer; - protected ragfairController: RagfairController; - protected ragfairTaxService: RagfairTaxService; - protected configServer: ConfigServer; - protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); - onLoad(): Promise; - getRoute(): string; - onUpdate(timeSinceLastRun: number): Promise; - /** - * Handle client/ragfair/search - * Handle client/ragfair/find - */ - search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/ragfair/itemMarketPrice */ - getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; - /** Handle RagFairAddOffer event */ - addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; - /** Handle RagFairRemoveOffer event */ - removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse; - /** Handle RagFairRenewOffer event */ - extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle /client/items/prices - * Called when clicking an item to list on flea - */ - getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - /** Handle client/reports/ragfair/send */ - sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; - storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData; - /** Handle client/ragfair/offer/findbyid */ - getFleaOfferById(url: string, request: IGetRagfairOfferByIdRequest, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/RepairCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/RepairCallbacks.d.ts deleted file mode 100644 index 930708e..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/RepairCallbacks.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { RepairController } from "@spt/controllers/RepairController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepairActionDataRequest } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; -export declare class RepairCallbacks { - protected repairController: RepairController; - constructor(repairController: RepairController); - /** - * Handle TraderRepair event - * use trader to repair item - * @param pmcData Player profile - * @param traderRepairRequest Request object - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - traderRepair(pmcData: IPmcData, traderRepairRequest: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; - /** - * Handle Repair event - * Use repair kit to repair item - * @param pmcData Player profile - * @param repairRequest Request object - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - repair(pmcData: IPmcData, repairRequest: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/SaveCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/SaveCallbacks.d.ts deleted file mode 100644 index 8f836cb..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/SaveCallbacks.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -export declare class SaveCallbacks implements OnLoad, OnUpdate { - protected saveServer: SaveServer; - protected configServer: ConfigServer; - protected coreConfig: ICoreConfig; - constructor(saveServer: SaveServer, configServer: ConfigServer); - onLoad(): Promise; - getRoute(): string; - onUpdate(secondsSinceLastRun: number): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/TradeCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/TradeCallbacks.d.ts deleted file mode 100644 index 0f8ebe3..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/TradeCallbacks.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { TradeController } from "@spt/controllers/TradeController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -import { IProcessRagfairTradeRequestData } from "@spt/models/eft/trade/IProcessRagfairTradeRequestData"; -import { ISellScavItemsToFenceRequestData } from "@spt/models/eft/trade/ISellScavItemsToFenceRequestData"; -export declare class TradeCallbacks { - protected tradeController: TradeController; - constructor(tradeController: TradeController); - /** - * Handle client/game/profile/items/moving TradingConfirm event - */ - processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; - /** Handle RagFairBuyOffer event */ - processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; - /** Handle SellAllFromSavage event */ - sellAllFromSavage(pmcData: IPmcData, body: ISellScavItemsToFenceRequestData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/TraderCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/TraderCallbacks.d.ts deleted file mode 100644 index c081a9b..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/TraderCallbacks.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { TraderController } from "@spt/controllers/TraderController"; -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class TraderCallbacks implements OnLoad, OnUpdate { - protected httpResponse: HttpResponseUtil; - protected traderController: TraderController; - constructor(httpResponse: HttpResponseUtil, // TODO: delay required - traderController: TraderController); - onLoad(): Promise; - onUpdate(): Promise; - getRoute(): string; - /** Handle client/trading/api/traderSettings */ - getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/trading/api/getTrader */ - getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** Handle client/trading/api/getTraderAssort */ - getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/WeatherCallbacks.d.ts deleted file mode 100644 index 5ba5aab..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/WeatherCallbacks.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { WeatherController } from "@spt/controllers/WeatherController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class WeatherCallbacks { - protected httpResponse: HttpResponseUtil; - protected weatherController: WeatherController; - constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); - /** - * Handle client/weather - * @returns IWeatherData - */ - getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/WishlistCallbacks.d.ts deleted file mode 100644 index f5b500f..0000000 --- a/TypeScript/22CustomSptCommand/types/callbacks/WishlistCallbacks.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { WishlistController } from "@spt/controllers/WishlistController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IWishlistActionData } from "@spt/models/eft/wishlist/IWishlistActionData"; -export declare class WishlistCallbacks { - protected wishlistController: WishlistController; - constructor(wishlistController: WishlistController); - /** Handle AddToWishList event */ - addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; - /** Handle RemoveFromWishList event */ - removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/context/ApplicationContext.d.ts b/TypeScript/22CustomSptCommand/types/context/ApplicationContext.d.ts deleted file mode 100644 index 4818e3a..0000000 --- a/TypeScript/22CustomSptCommand/types/context/ApplicationContext.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ContextVariable } from "@spt/context/ContextVariable"; -import { ContextVariableType } from "@spt/context/ContextVariableType"; -export declare class ApplicationContext { - private variables; - private static holderMaxSize; - /** - * Called like: - * ``` - * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); - * - * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); - * - * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION).getValue(); - * ``` - */ - getLatestValue(type: ContextVariableType): ContextVariable; - getValues(type: ContextVariableType): ContextVariable[]; - addValue(type: ContextVariableType, value: any): void; - clearValues(type: ContextVariableType): void; -} diff --git a/TypeScript/22CustomSptCommand/types/context/ContextVariable.d.ts b/TypeScript/22CustomSptCommand/types/context/ContextVariable.d.ts deleted file mode 100644 index 246be85..0000000 --- a/TypeScript/22CustomSptCommand/types/context/ContextVariable.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ContextVariableType } from "@spt/context/ContextVariableType"; -export declare class ContextVariable { - private value; - private timestamp; - private type; - constructor(value: any, type: ContextVariableType); - getValue(): T; - getTimestamp(): Date; - getType(): ContextVariableType; -} diff --git a/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts b/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts deleted file mode 100644 index 0722a98..0000000 --- a/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare enum ContextVariableType { - /** Logged in users session id */ - SESSION_ID = 0, - /** Currently acive raid information */ - RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ - CLIENT_START_TIMESTAMP = 2, - /** When player is loading into map and loot is requested */ - REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/AchievementController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/AchievementController.d.ts deleted file mode 100644 index 14a32c6..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/AchievementController.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ICompletedAchievementsResponse } from "@spt/models/eft/profile/ICompletedAchievementsResponse"; -import { IGetAchievementsResponse } from "@spt/models/eft/profile/IGetAchievementsResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -/** - * Logic for handling In Raid callbacks - */ -export declare class AchievementController { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Get base achievements - * @param sessionID Session id - */ - getAchievements(sessionID: string): IGetAchievementsResponse; - /** - * Shows % of 'other' players who've completed each achievement - * @param sessionId Session id - * @returns ICompletedAchievementsResponse - */ - getAchievementStatistics(sessionId: string): ICompletedAchievementsResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/BotController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/BotController.d.ts deleted file mode 100644 index 25f7c29..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/BotController.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { BotGenerator } from "@spt/generators/BotGenerator"; -import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { MinMax } from "@spt/models/common/MinMax"; -import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; -import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotGenerationCacheService } from "@spt/services/BotGenerationCacheService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotController { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected botGenerator: BotGenerator; - protected botHelper: BotHelper; - protected botDifficultyHelper: BotDifficultyHelper; - protected botGenerationCacheService: BotGenerationCacheService; - protected matchBotDetailsCacheService: MatchBotDetailsCacheService; - protected localisationService: LocalisationService; - protected seasonalEventService: SeasonalEventService; - protected profileHelper: ProfileHelper; - protected configServer: ConfigServer; - protected applicationContext: ApplicationContext; - protected randomUtil: RandomUtil; - protected cloner: ICloner; - protected botConfig: IBotConfig; - protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); - /** - * Return the number of bot load-out varieties to be generated - * @param type bot Type we want the load-out gen count for - * @returns number of bots to generate - */ - getBotPresetGenerationLimit(type: string): number; - /** - * Handle singleplayer/settings/bot/difficulty - * Get the core.json difficulty settings from database/bots - * @returns IBotCore - */ - getBotCoreDifficulty(): IBotCore; - /** - * Get bot difficulty settings - * Adjust PMC settings to ensure they engage the correct bot types - * @param type what bot the server is requesting settings for - * @param diffLevel difficulty level server requested settings for - * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored - * @returns Difficulty object - */ - getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; - getAllBotDifficulties(): Record; - /** - * Generate bot profiles and store in cache - * @param sessionId Session id - * @param info bot generation request info - * @returns IBotBase array - */ - generate(sessionId: string, info: IGenerateBotsRequestData): Promise; - /** - * On first bot generation bots are generated and stored inside a cache, ready to be used later - * @param request Bot generation request object - * @param pmcProfile Player profile - * @param sessionId Session id - * @returns - */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; - /** - * Create a BotGenerationDetails for the bot generator to use - * @param condition Client data defining bot type and difficulty - * @param pmcProfile Player who is generating bots - * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player - * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within - * @param botCountToGenerate How many bots to generate - * @param generateAsPmc Force bot being generated a PMC - * @returns BotGenerationDetails - */ - protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; - /** - * Get players profile level - * @param pmcProfile Profile to get level from - * @returns Level as number - */ - protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; - /** - * Generate many bots and store then on the cache - * @param condition the condition details to generate the bots with - * @param botGenerationDetails the bot details to generate the bot with - * @param sessionId Session id - * @returns A promise for the bots to be done generating - */ - protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; - /** - * Generate a single bot and store it in the cache - * @param botGenerationDetails the bot details to generate the bot with - * @param sessionId Session id - * @param cacheKey the cache key to store the bot with - * @returns A promise for the bot to be stored - */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; - /** - * Pull a single bot out of cache and return, if cache is empty add bots to it and then return - * @param sessionId Session id - * @param request Bot generation request object - * @returns Single IBotBase object - */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; - /** - * Get the difficulty passed in, if its not "asonline", get selected difficulty from config - * @param requestedDifficulty - * @returns - */ - getPMCDifficulty(requestedDifficulty: string): string; - /** - * Get the max number of bots allowed on a map - * Looks up location player is entering when getting cap value - * @returns cap number - */ - getBotCap(): number; - getAiBotBrainTypes(): any; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/BuildController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/BuildController.d.ts deleted file mode 100644 index 7b8957e..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/BuildController.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ISetMagazineRequest } from "@spt/models/eft/builds/ISetMagazineRequest"; -import { IPresetBuildActionRequestData } from "@spt/models/eft/presetBuild/IPresetBuildActionRequestData"; -import { IRemoveBuildRequestData } from "@spt/models/eft/presetBuild/IRemoveBuildRequestData"; -import { IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class BuildController { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected eventOutputHolder: EventOutputHolder; - protected databaseServer: DatabaseServer; - protected profileHelper: ProfileHelper; - protected localisationService: LocalisationService; - protected itemHelper: ItemHelper; - protected saveServer: SaveServer; - protected cloner: ICloner; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, localisationService: LocalisationService, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); - /** Handle client/handbook/builds/my/list */ - getUserBuilds(sessionID: string): IUserBuilds; - /** Handle client/builds/weapon/save */ - saveWeaponBuild(sessionId: string, body: IPresetBuildActionRequestData): void; - /** Handle client/builds/equipment/save event */ - saveEquipmentBuild(sessionID: string, request: IPresetBuildActionRequestData): void; - /** Handle client/builds/delete */ - removeBuild(sessionID: string, request: IRemoveBuildRequestData): void; - protected removePlayerBuild(idToRemove: string, sessionID: string): void; - /** - * Handle client/builds/magazine/save - */ - createMagazineTemplate(sessionId: string, request: ISetMagazineRequest): void; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/ClientLogController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/ClientLogController.d.ts deleted file mode 100644 index 6356c03..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/ClientLogController.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IClientLogRequest } from "@spt/models/spt/logging/IClientLogRequest"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -export declare class ClientLogController { - protected logger: ILogger; - constructor(logger: ILogger); - /** - * Handle /singleplayer/log - */ - clientLog(logRequest: IClientLogRequest): void; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/CustomizationController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/CustomizationController.d.ts deleted file mode 100644 index 613dac9..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/CustomizationController.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISuit } from "@spt/models/eft/common/tables/ITrader"; -import { ClothingItem, IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData"; -import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -export declare class CustomizationController { - protected logger: ILogger; - protected eventOutputHolder: EventOutputHolder; - protected databaseServer: DatabaseServer; - protected saveServer: SaveServer; - protected localisationService: LocalisationService; - protected profileHelper: ProfileHelper; - protected readonly clothingIds: { - lowerParentId: string; - upperParentId: string; - }; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper); - /** - * Get purchasable clothing items from trader that match players side (usec/bear) - * @param traderID trader to look up clothing for - * @param sessionID Session id - * @returns ISuit array - */ - getTraderSuits(traderID: string, sessionID: string): ISuit[]; - /** - * Handle CustomizationWear event - * Equip one to many clothing items to player - */ - wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle CustomizationBuy event - * Purchase/unlock a clothing item from a trader - * @param pmcData Player profile - * @param buyClothingRequest Request object - * @param sessionId Session id - * @returns IItemEventRouterResponse - */ - buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse; - protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit; - /** - * Has an outfit been purchased by a player - * @param suitId clothing id - * @param sessionID Session id of profile to check for clothing in - * @returns true if already purchased - */ - protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean; - /** - * Update output object and player profile with purchase details - * @param sessionId Session id - * @param pmcData Player profile - * @param clothingItems Clothing purchased - * @param output Client response - */ - protected payForClothingItems(sessionId: string, pmcData: IPmcData, clothingItems: ClothingItem[], output: IItemEventRouterResponse): void; - /** - * Update output object and player profile with purchase details for single piece of clothing - * @param sessionId Session id - * @param pmcData Player profile - * @param clothingItem Clothing item purchased - * @param output Client response - */ - protected payForClothingItem(sessionId: string, pmcData: IPmcData, clothingItem: ClothingItem, output: IItemEventRouterResponse): void; - protected getAllTraderSuits(sessionID: string): ISuit[]; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/DialogueController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/DialogueController.d.ts deleted file mode 100644 index 4a94359..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/DialogueController.d.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { IFriendRequestData } from "@spt/models/eft/dialog/IFriendRequestData"; -import { IFriendRequestSendResponse } from "@spt/models/eft/dialog/IFriendRequestSendResponse"; -import { IGetAllAttachmentsResponse } from "@spt/models/eft/dialog/IGetAllAttachmentsResponse"; -import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendListDataResponse"; -import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; -import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class DialogueController { - protected logger: ILogger; - protected saveServer: SaveServer; - protected timeUtil: TimeUtil; - protected dialogueHelper: DialogueHelper; - protected mailSendService: MailSendService; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected dialogueChatBots: IDialogueChatBot[]; - constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, mailSendService: MailSendService, localisationService: LocalisationService, configServer: ConfigServer, dialogueChatBots: IDialogueChatBot[]); - registerChatBot(chatBot: IDialogueChatBot): void; - /** Handle onUpdate spt event */ - update(): void; - /** - * Handle client/friend/list - * @returns IGetFriendListDataResponse - */ - getFriendList(sessionID: string): IGetFriendListDataResponse; - /** - * Handle client/mail/dialog/list - * Create array holding trader dialogs and mail interactions with player - * Set the content of the dialogue on the list tab. - * @param sessionID Session Id - * @returns array of dialogs - */ - generateDialogueList(sessionID: string): DialogueInfo[]; - /** - * Get the content of a dialogue - * @param dialogueID Dialog id - * @param sessionID Session Id - * @returns DialogueInfo - */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; - /** - * Get the users involved in a dialog (player + other party) - * @param dialog The dialog to check for users - * @param messageType What type of message is being sent - * @param sessionID Player id - * @returns IUserDialogInfo array - */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; - /** - * Handle client/mail/dialog/view - * Handle player clicking 'messenger' and seeing all the messages they've recieved - * Set the content of the dialogue on the details panel, showing all the messages - * for the specified dialogue. - * @param request Get dialog request - * @param sessionId Session id - * @returns IGetMailDialogViewResponseData object - */ - generateDialogueView(request: IGetMailDialogViewRequestData, sessionId: string): IGetMailDialogViewResponseData; - /** - * Get dialog from player profile, create if doesn't exist - * @param profile Player profile - * @param request get dialog request (params used when dialog doesnt exist in profile) - * @returns Dialogue - */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; - /** - * Get the users involved in a mail between two entities - * @param fullProfile Player profile - * @param dialogUsers The participants of the mail - * @returns IUserDialogInfo array - */ - protected getProfilesForMail(fullProfile: ISptProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; - /** - * Get a count of messages with attachments from a particular dialog - * @param sessionID Session id - * @param dialogueID Dialog id - * @returns Count of messages with attachments - */ - protected getUnreadMessagesWithAttachmentsCount(sessionID: string, dialogueID: string): number; - /** - * Does array have messages with uncollected rewards (includes expired rewards) - * @param messages Messages to check - * @returns true if uncollected rewards found - */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - /** - * Handle client/mail/dialog/remove - * Remove an entire dialog with an entity (trader/user) - * @param dialogueId id of the dialog to remove - * @param sessionId Player id - */ - removeDialogue(dialogueId: string, sessionId: string): void; - /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ - setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; - /** - * Handle client/mail/dialog/read - * Set a dialog to be read (no number alert/attachment alert) - * @param dialogueIds Dialog ids to set as read - * @param sessionId Player profile id - */ - setRead(dialogueIds: string[], sessionId: string): void; - /** - * Handle client/mail/dialog/getAllAttachments - * Get all uncollected items attached to mail in a particular dialog - * @param dialogueId Dialog to get mail attachments from - * @param sessionId Session id - * @returns IGetAllAttachmentsResponse - */ - getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; - /** client/mail/msg/send */ - sendMessage(sessionId: string, request: ISendMessageRequest): string; - /** - * Get messages from a specific dialog that have items not expired - * @param sessionId Session id - * @param dialogueId Dialog to get mail attachments from - * @returns Message array - */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; - /** - * Return array of messages with uncollected items (includes expired) - * @param messages Messages to parse - * @returns messages with items to collect - */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; - /** - * Delete expired items from all messages in player profile. triggers when updating traders. - * @param sessionId Session id - */ - protected removeExpiredItemsFromMessages(sessionId: string): void; - /** - * Removes expired items from a message in player profile - * @param sessionId Session id - * @param dialogueId Dialog id - */ - protected removeExpiredItemsFromMessage(sessionId: string, dialogueId: string): void; - /** - * Has a dialog message expired - * @param message Message to check expiry of - * @returns true or false - */ - protected messageHasExpired(message: Message): boolean; - /** Handle client/friend/request/send */ - sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts deleted file mode 100644 index 6325d37..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ICheckVersionResponse } from "@spt/models/eft/game/ICheckVersionResponse"; -import { ICurrentGroupResponse } from "@spt/models/eft/game/ICurrentGroupResponse"; -import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; -import { IGameKeepAliveResponse } from "@spt/models/eft/game/IGameKeepAliveResponse"; -import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData"; -import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; -import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; -import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; -import { GiftService } from "@spt/services/GiftService"; -import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { OpenZoneService } from "@spt/services/OpenZoneService"; -import { ProfileActivityService } from "@spt/services/ProfileActivityService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class GameController { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected timeUtil: TimeUtil; - protected hashUtil: HashUtil; - protected preSptModLoader: PreSptModLoader; - protected httpServerHelper: HttpServerHelper; - protected randomUtil: RandomUtil; - protected hideoutHelper: HideoutHelper; - protected profileHelper: ProfileHelper; - protected profileFixerService: ProfileFixerService; - protected localisationService: LocalisationService; - protected customLocationWaveService: CustomLocationWaveService; - protected openZoneService: OpenZoneService; - protected seasonalEventService: SeasonalEventService; - protected itemBaseClassService: ItemBaseClassService; - protected giftService: GiftService; - protected raidTimeAdjustmentService: RaidTimeAdjustmentService; - protected profileActivityService: ProfileActivityService; - protected applicationContext: ApplicationContext; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected httpConfig: IHttpConfig; - protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; - protected ragfairConfig: IRagfairConfig; - protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; - protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); - load(): void; - /** - * Handle client/game/start - */ - gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected adjustHideoutCraftTimes(): void; - protected adjustHideoutBuildTimes(): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; - /** - * Handle client/game/config - */ - getGameConfig(sessionID: string): IGameConfigResponse; - /** - * Handle client/game/mode - */ - getGameMode(sessionID: string, info: IGameModeRequestData): any; - /** - * Handle client/server/list - */ - getServer(sessionId: string): IServerDetails[]; - /** - * Handle client/match/group/current - */ - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - /** - * Handle client/checkVersion - */ - getValidGameVersion(sessionId: string): ICheckVersionResponse; - /** - * Handle client/game/keepalive - */ - getKeepAlive(sessionId: string): IGameKeepAliveResponse; - /** - * Handle singleplayer/settings/getRaidTime - */ - getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; - /** - * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it - * @param pmcProfile Player profile - */ - protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected flagAllItemsInDbAsSellableOnFlea(): void; - /** - * When player logs in, iterate over all active effects and reduce timer - * @param pmcProfile Profile to adjust values for - */ - protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; - /** - * Send starting gifts to profile after x days - * @param pmcProfile Profile to add gifts to - */ - protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; - /** - * Get a list of installed mods and save their details to the profile being used - * @param fullProfile Profile to add mod details to - */ - protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; - /** - * Add the logged in players name to PMC name pool - * @param pmcProfile Profile of player to get name from - */ - protected addPlayerToPMCNames(pmcProfile: IPmcData): void; - /** - * Check for a dialog with the key 'undefined', and remove it - * @param fullProfile Profile to check for dialog in - */ - protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; - protected logProfileDetails(fullProfile: ISptProfile): void; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/HandbookController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/HandbookController.d.ts deleted file mode 100644 index 0743d30..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/HandbookController.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -export declare class HandbookController { - protected databaseServer: DatabaseServer; - protected handbookHelper: HandbookHelper; - constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); - load(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/HealthController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/HealthController.d.ts deleted file mode 100644 index 5482283..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/HealthController.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { HealthHelper } from "@spt/helpers/HealthHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; -import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; -import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class HealthController { - protected logger: ILogger; - protected eventOutputHolder: EventOutputHolder; - protected itemHelper: ItemHelper; - protected paymentService: PaymentService; - protected inventoryHelper: InventoryHelper; - protected localisationService: LocalisationService; - protected httpResponse: HttpResponseUtil; - protected healthHelper: HealthHelper; - protected cloner: ICloner; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; - /** - * When healing in menu - * @param pmcData Player profile - * @param request Healing request - * @param sessionID Player id - * @returns IItemEventRouterResponse - */ - offraidHeal(pmcData: IPmcData, request: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle Eat event - * Consume food/water outside of a raid - * @param pmcData Player profile - * @param request Eat request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - offraidEat(pmcData: IPmcData, request: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle RestoreHealth event - * Occurs on post-raid healing page - * @param pmcData player profile - * @param healthTreatmentRequest Request data from client - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; - /** - * applies skills from hideout workout. - * @param pmcData Player profile - * @param info Request data - * @param sessionID - */ - applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/HideoutController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/HideoutController.d.ts deleted file mode 100644 index 7d2510d..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/HideoutController.d.ts +++ /dev/null @@ -1,269 +0,0 @@ -import { ScavCaseRewardGenerator } from "@spt/generators/ScavCaseRewardGenerator"; -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -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 } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; -import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutImproveAreaRequestData } from "@spt/models/eft/hideout/IHideoutImproveAreaRequestData"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData"; -import { IHideoutScavCaseStartRequestData } from "@spt/models/eft/hideout/IHideoutScavCaseStartRequestData"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; -import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; -import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { ProfileActivityService } from "@spt/services/ProfileActivityService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class HideoutController { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected databaseServer: DatabaseServer; - protected randomUtil: RandomUtil; - protected inventoryHelper: InventoryHelper; - protected itemHelper: ItemHelper; - protected saveServer: SaveServer; - protected playerService: PlayerService; - protected presetHelper: PresetHelper; - protected paymentHelper: PaymentHelper; - protected eventOutputHolder: EventOutputHolder; - protected httpResponse: HttpResponseUtil; - protected profileHelper: ProfileHelper; - protected hideoutHelper: HideoutHelper; - protected scavCaseRewardGenerator: ScavCaseRewardGenerator; - protected localisationService: LocalisationService; - protected profileActivityService: ProfileActivityService; - protected configServer: ConfigServer; - protected fenceService: FenceService; - protected cloner: ICloner; - /** Key used in TaskConditionCounters array */ - protected static nameTaskConditionCountersCrafting: string; - protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); - /** - * Handle HideoutUpgrade event - * Start a hideout area upgrade - * @param pmcData Player profile - * @param request upgrade start request - * @param sessionID Session id - * @param output Client response - */ - startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Handle HideoutUpgradeComplete event - * Complete a hideout area upgrade - * @param pmcData Player profile - * @param request Completed upgrade request - * @param sessionID Session id - * @param output Client response - */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Upgrade wall status to visible in profile if medstation/water collector are both level 1 - * @param pmcData Player profile - */ - protected checkAndUpgradeWall(pmcData: IPmcData): void; - /** - * @param pmcData Profile to edit - * @param output Object to send back to client - * @param sessionID Session/player id - * @param profileParentHideoutArea Current hideout area for profile - * @param dbHideoutArea Hideout area being upgraded - * @param hideoutStage Stage hideout area is being upgraded to - */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: HideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; - /** - * Add an inventory item to profile from a hideout area stage data - * @param pmcData Profile to update - * @param dbHideoutData Hideout area from db being upgraded - * @param hideoutStage Stage area upgraded to - */ - protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; - /** - * @param output Object to send to client - * @param sessionID Session/player id - * @param areaType Hideout area that had stash added - * @param hideoutDbData Hideout area that caused addition of stash - * @param hideoutStage Hideout area upgraded to this - */ - protected addContainerUpgradeToClientOutput(output: IItemEventRouterResponse, sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage): void; - /** - * Handle HideoutPutItemsInAreaSlots - * Create item in hideout slot item array, remove item from player inventory - * @param pmcData Profile data - * @param addItemToHideoutRequest reqeust from client to place item in area slot - * @param sessionID Session id - * @returns IItemEventRouterResponse object - */ - putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutTakeItemsFromAreaSlots event - * Remove item from hideout area and place into player inventory - * @param pmcData Player profile - * @param request Take item out of area request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - takeItemsFromAreaSlots(pmcData: IPmcData, request: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot - * @param sessionID Session id - * @param pmcData Profile to update - * @param removeResourceRequest client request - * @param output response to send to client - * @param hideoutArea Area fuel is being removed from - * @returns IItemEventRouterResponse response - */ - protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; - /** - * Handle HideoutToggleArea event - * Toggle area on/off - * @param pmcData Player profile - * @param request Toggle area request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - toggleArea(pmcData: IPmcData, request: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutSingleProductionStart event - * Start production for an item from hideout area - * @param pmcData Player profile - * @param body Start prodution of single item request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutScavCaseProductionStart event - * Handles event after clicking 'start' on the scav case hideout page - * @param pmcData player profile - * @param body client request object - * @param sessionID session id - * @returns item event router response - */ - scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Adjust scav case time based on fence standing - * - * @param pmcData Player profile - * @param productionTime Time to complete scav case in seconds - * @returns Adjusted scav case time in seconds - */ - protected getScavCaseTime(pmcData: IPmcData, productionTime: number): number; - /** - * Add generated scav case rewards to player profile - * @param pmcData player profile to add rewards to - * @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; - /** - * Start production of continuously created item - * @param pmcData Player profile - * @param request Continious production request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - continuousProductionStart(pmcData: IPmcData, request: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle HideoutTakeProduction event - * Take completed item out of hideout area and place into player inventory - * @param pmcData Player profile - * @param request Remove production from area request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Take recipe-type production out of hideout area and place into player inventory - * @param sessionID Session id - * @param recipe Completed recipe of item - * @param pmcData Player profile - * @param request Remove production from area request - * @param output Output object to update - */ - protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): void; - /** - * Get the "CounterHoursCrafting" TaskConditionCounter from a profile - * @param pmcData Profile to get counter from - * @param recipe Recipe being crafted - * @returns ITaskConditionCounter - */ - protected getHoursCraftingTaskConditionCounter(pmcData: IPmcData, recipe: IHideoutProduction): ITaskConditionCounter; - /** - * Handles generating case rewards and sending to player inventory - * @param sessionID Session id - * @param pmcData Player profile - * @param request Get rewards from scavcase craft request - * @param output Output object to update - */ - protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): void; - /** - * Get quick time event list for hideout - * // TODO - implement this - * @param sessionId Session id - * @returns IQteData array - */ - getQteList(sessionId: string): IQteData[]; - /** - * Handle HideoutQuickTimeEvent on client/game/profile/items/moving - * Called after completing workout at gym - * @param sessionId Session id - * @param pmcData Profile to adjust - * @param request QTE result object - */ - handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; - /** - * Record a high score from the shooting range into a player profiles overallcounters - * @param sessionId Session id - * @param pmcData Profile to update - * @param request shooting range score request - * @returns IItemEventRouterResponse - */ - recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): void; - /** - * Handle client/game/profile/items/moving - HideoutImproveArea - * @param sessionId Session id - * @param pmcData Profile to improve area in - * @param request Improve area request data - */ - improveArea(sessionId: string, pmcData: IPmcData, request: IHideoutImproveAreaRequestData): IItemEventRouterResponse; - /** - * Handle client/game/profile/items/moving HideoutCancelProductionCommand - * @param sessionId Session id - * @param pmcData Profile with craft to cancel - * @param request Cancel production request data - * @returns IItemEventRouterResponse - */ - cancelProduction(sessionId: string, pmcData: IPmcData, request: IHideoutCancelProductionRequestData): IItemEventRouterResponse; - /** - * Function called every x seconds as part of onUpdate event - */ - update(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/InraidController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/InraidController.d.ts deleted file mode 100644 index f252a7e..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/InraidController.d.ts +++ /dev/null @@ -1,192 +0,0 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; -import { HealthHelper } from "@spt/helpers/HealthHelper"; -import { InRaidHelper } from "@spt/helpers/InRaidHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState"; -import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { IBTRConfig } from "@spt/models/spt/config/IBTRConfig"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { InsuranceService } from "@spt/services/InsuranceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; -import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; -import { TraderServicesService } from "@spt/services/TraderServicesService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -/** - * Logic for handling In Raid callbacks - */ -export declare class InraidController { - protected logger: ILogger; - protected saveServer: SaveServer; - protected timeUtil: TimeUtil; - protected databaseServer: DatabaseServer; - protected pmcChatResponseService: PmcChatResponseService; - protected matchBotDetailsCacheService: MatchBotDetailsCacheService; - protected questHelper: QuestHelper; - protected itemHelper: ItemHelper; - protected profileHelper: ProfileHelper; - protected playerScavGenerator: PlayerScavGenerator; - protected healthHelper: HealthHelper; - protected traderHelper: TraderHelper; - protected traderServicesService: TraderServicesService; - protected localisationService: LocalisationService; - protected insuranceService: InsuranceService; - protected inRaidHelper: InRaidHelper; - protected applicationContext: ApplicationContext; - protected configServer: ConfigServer; - protected mailSendService: MailSendService; - protected randomUtil: RandomUtil; - protected airdropConfig: IAirdropConfig; - protected btrConfig: IBTRConfig; - protected inRaidConfig: IInRaidConfig; - protected traderConfig: ITraderConfig; - protected locationConfig: ILocationConfig; - protected ragfairConfig: IRagfairConfig; - protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); - /** - * Save locationId to active profiles inraid object AND app context - * @param sessionID Session id - * @param info Register player request - */ - addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; - /** - * Handle raid/profile/save - * Save profile state to disk - * Handles pmc/pscav - * @param offraidData post-raid request data - * @param sessionID Session id - */ - savePostRaidProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; - /** - * Handle updating player profile post-pmc raid - * @param sessionID Session id - * @param postRaidRequest Post-raid data - */ - protected savePmcProgress(sessionID: string, postRaidRequest: ISaveProgressRequestData): void; - /** - * Make changes to PMC profile after they've died in raid, - * Alter body part hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest Post-raid save request - * @param pmcData Pmc profile - * @param sessionID Session id - * @returns Updated profile object - */ - protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, sessionID: string): IPmcData; - /** - * Adjust player characters body part hp post-raid - * @param postRaidSaveRequest post raid data - * @param pmcData player profile - */ - protected updatePmcHealthPostRaid(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData): void; - /** - * Reduce body part hp to % of max - * @param pmcData profile to edit - * @param multiplier multiplier to apply to max health - */ - protected reducePmcHealthToPercent(pmcData: IPmcData, multiplier: number): void; - /** - * Handle updating the profile post-pscav raid - * @param sessionID Session id - * @param postRaidRequest Post-raid data of raid - */ - protected savePlayerScavProgress(sessionID: string, postRaidRequest: ISaveProgressRequestData): void; - /** - * merge two dictionaries together - * Prioritise pair that has true as a value - * @param primary main dictionary - * @param secondary Secondary dictionary - */ - protected mergePmcAndScavEncyclopedias(primary: IPmcData, secondary: IPmcData): void; - /** - * Post-scav-raid any charisma increase must be propigated into PMC profile - * @param postRaidServerScavProfile Scav profile after adjustments made from raid - * @param postRaidServerPmcProfile Pmc profile after raid - * @param preRaidScavCharismaProgress charisma progress value pre-raid - */ - protected updatePmcCharismaSkillPostScavRaid(postRaidServerScavProfile: IPmcData, postRaidServerPmcProfile: IPmcData, preRaidScavCharismaProgress: number): void; - /** - * Does provided profile contain any condition counters - * @param profile Profile to check for condition counters - * @returns Profile has condition counters - */ - protected profileHasConditionCounters(profile: IPmcData): boolean; - /** - * Scav quest progress isnt transferred automatically from scav to pmc, we do this manually - * @param scavProfile Scav profile with quest progress post-raid - * @param pmcProfile Server pmc profile to copy scav quest progress into - */ - protected migrateScavQuestProgressToPmcProfile(scavProfile: IPmcData, pmcProfile: IPmcData): void; - /** - * Is the player dead after a raid - dead is anything other than "survived" / "runner" - * @param statusOnExit exit value from offraidData object - * @returns true if dead - */ - protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; - /** - * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them - * @param offraidData Save Progress Request - */ - protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData): void; - /** - * Update profile after player completes scav raid - * @param scavData Scav profile - * @param sessionID Session id - * @param offraidData Post-raid save request - * @param pmcData Pmc profile - * @param isDead Is player dead - */ - protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void; - /** - * Update profile with scav karma values based on in-raid actions - * @param pmcData Pmc profile - * @param offraidData Post-raid save request - * @param scavData Scav profile - */ - protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData): void; - /** - * Get the inraid config from configs/inraid.json - * @returns InRaid Config - */ - getInraidConfig(): IInRaidConfig; - /** - * Get airdrop config from configs/airdrop.json - * @returns Airdrop config - */ - getAirdropConfig(): IAirdropConfig; - /** - * Get BTR config from configs/btr.json - * @returns Airdrop config - */ - getBTRConfig(): IBTRConfig; - /** - * Handle singleplayer/traderServices/getTraderServices - * @returns Trader services data - */ - getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; - /** - * Handle singleplayer/traderServices/itemDelivery - */ - itemDelivery(sessionId: string, traderId: string, items: Item[]): void; - getTraitorScavHostileChance(url: string, sessionID: string): number; - getSandboxMaxPatrolValue(url: string, sessionID: string): number; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts deleted file mode 100644 index cfb05e4..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts +++ /dev/null @@ -1,206 +0,0 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsuranceCostRequestData"; -import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; -import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; -import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { InsuranceService } from "@spt/services/InsuranceService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class InsuranceController { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected mathUtil: MathUtil; - protected hashUtil: HashUtil; - protected eventOutputHolder: EventOutputHolder; - protected timeUtil: TimeUtil; - protected saveServer: SaveServer; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected profileHelper: ProfileHelper; - protected dialogueHelper: DialogueHelper; - protected weightedRandomHelper: WeightedRandomHelper; - protected traderHelper: TraderHelper; - protected paymentService: PaymentService; - protected insuranceService: InsuranceService; - protected mailSendService: MailSendService; - protected ragfairPriceService: RagfairPriceService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected insuranceConfig: IInsuranceConfig; - protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); - /** - * Process insurance items of all profiles prior to being given back to the player through the mail service. - * - * @returns void - */ - processReturn(): void; - /** - * Process insurance items of a single profile prior to being given back to the player through the mail service. - * - * @returns void - */ - processReturnByProfile(sessionID: string): void; - /** - * Get all insured items that are ready to be processed in a specific profile. - * - * @param sessionID Session ID of the profile to check. - * @param time The time to check ready status against. Current time by default. - * @returns All insured items that are ready to be processed. - */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; - /** - * This method orchestrates the processing of insured items in a profile. - * - * @param insuranceDetails The insured items to process. - * @param sessionID The session ID that should receive the processed items. - * @returns void - */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; - /** - * Count all items in all insurance packages. - * @param insurance - * @returns - */ - protected countAllInsuranceItems(insurance: Insurance[]): number; - /** - * Remove an insurance package from a profile using the package's system data information. - * - * @param sessionID The session ID of the profile to remove the package from. - * @param index The array index of the insurance package to remove. - * @returns void - */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; - /** - * Finds the items that should be deleted based on the given Insurance object. - * - * @param rootItemParentID - The ID that should be assigned to all "hideout"/root items. - * @param insured - The insurance object containing the items to evaluate for deletion. - * @returns A Set containing the IDs of items that should be deleted. - */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; - /** - * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this - * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, - * not the backpack that the gun is located in (the gun's parent). - * - * @param rootItemParentID - The ID that should be assigned to all "hideout"/root items. - * @param insured - The insurance object containing the items to evaluate. - * @param itemsMap - A Map object for quick item look-up by item ID. - * @returns A Map object containing parent item IDs to arrays of their attachment items. - */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; - /** - * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments - * remain, the parent is removed from the map as well. - * - * @param parentAttachmentsMap - A Map object containing parent item IDs to arrays of their attachment items. - * @param itemsMap - A Map object for quick item look-up by item ID. - * @returns A Map object containing parent item IDs to arrays of their attachment items which are not moddable in-raid. - */ - protected removeNonModdableAttachments(parentAttachmentsMap: Map, itemsMap: Map): Map; - /** - * Process "regular" insurance items. Any insured item that is not an attached, attachment is considered a "regular" - * item. This method iterates over them, preforming item deletion rolls to see if they should be deleted. If so, - * they (and their attached, attachments, if any) are marked for deletion in the toDelete Set. - * - * @param insured The insurance object containing the items to evaluate. - * @param toDelete A Set to keep track of items marked for deletion. - * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. - * @returns void - */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; - /** - * Process parent items and their attachments, updating the toDelete Set accordingly. - * - * @param mainParentToAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. - * @param itemsMap A Map object for quick item look-up by item ID. - * @param traderId The trader ID from the Insurance object. - * @param toDelete A Set object to keep track of items marked for deletion. - */ - protected processAttachments(mainParentToAttachmentsMap: Map, itemsMap: Map, traderId: string, toDelete: Set): void; - /** - * Takes an array of attachment items that belong to the same main-parent item, sorts them in descending order by - * their maximum price. For each attachment, a roll is made to determine if a deletion should be made. Once the - * number of deletions has been counted, the attachments are added to the toDelete Set, starting with the most - * valuable attachments first. - * - * @param attachments The array of attachment items to sort, filter, and roll. - * @param traderId The ID of the trader to that has ensured these items. - * @param toDelete The array that accumulates the IDs of the items to be deleted. - * @returns void - */ - protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set): void; - protected logAttachmentsBeingRemoved(attachmentIdsToRemove: string[], attachments: Item[], attachmentPrices: Record): void; - protected weightAttachmentsByPrice(attachments: Item[]): Record; - /** - * Get count of items to remove from weapon (take into account trader + price of attachment) - * @param weightedAttachmentByPrice Dict of item Tpls and thier rouble price - * @param traderId Trader attachment insured against - * @returns Attachment count to remove - */ - protected getAttachmentCountToRemove(weightedAttachmentByPrice: Record, traderId: string): number; - /** - * Remove items from the insured items that should not be returned to the player. - * - * @param insured The insured items to process. - * @param toDelete The items that should be deleted. - * @returns void - */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; - /** - * Handle sending the insurance message to the user that potentially contains the valid insurance items. - * - * @param sessionID The session ID that should receive the insurance message. - * @param insurance The context of insurance to use. - * @returns void - */ - protected sendMail(sessionID: string, insurance: Insurance): void; - /** - * Determines whether an insured item should be removed from the player's inventory based on a random roll and - * trader-specific return chance. - * - * @param traderId The ID of the trader who insured the item. - * @param insuredItem Optional. The item to roll for. Only used for logging. - * @returns true if the insured item should be removed from inventory, false otherwise, or null on error. - */ - protected rollForDelete(traderId: string, insuredItem?: Item): boolean | null; - /** - * Handle Insure event - * Add insurance to an item - * - * @param pmcData Player profile - * @param body Insurance request - * @param sessionID Session id - * @returns IItemEventRouterResponse object to send to client - */ - insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle client/insurance/items/list/cost - * Calculate insurance cost - * - * @param request request object - * @param sessionID session id - * @returns IGetInsuranceCostResponseData object to send to client - */ - cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/InventoryController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/InventoryController.d.ts deleted file mode 100644 index 04ddea9..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/InventoryController.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { LootGenerator } from "@spt/generators/LootGenerator"; -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; -import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; -import { IInventoryDeleteMarkerRequestData } from "@spt/models/eft/inventory/IInventoryDeleteMarkerRequestData"; -import { IInventoryEditMarkerRequestData } from "@spt/models/eft/inventory/IInventoryEditMarkerRequestData"; -import { IInventoryExamineRequestData } from "@spt/models/eft/inventory/IInventoryExamineRequestData"; -import { IInventoryFoldRequestData } from "@spt/models/eft/inventory/IInventoryFoldRequestData"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryReadEncyclopediaRequestData } from "@spt/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySortRequestData } from "@spt/models/eft/inventory/IInventorySortRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventorySwapRequestData } from "@spt/models/eft/inventory/IInventorySwapRequestData"; -import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTagRequestData"; -import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; -import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; -import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class InventoryController { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected itemHelper: ItemHelper; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - protected fenceService: FenceService; - protected presetHelper: PresetHelper; - protected inventoryHelper: InventoryHelper; - protected questHelper: QuestHelper; - protected hideoutHelper: HideoutHelper; - protected ragfairOfferService: RagfairOfferService; - protected profileHelper: ProfileHelper; - protected paymentHelper: PaymentHelper; - protected localisationService: LocalisationService; - protected playerService: PlayerService; - protected lootGenerator: LootGenerator; - protected eventOutputHolder: EventOutputHolder; - protected httpResponseUtil: HttpResponseUtil; - protected cloner: ICloner; - constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); - /** - * Move Item - * change location of item with parentId and slotId - * transfers items from one profile to another if fromOwner/toOwner is set in the body. - * otherwise, move is contained within the same profile_f. - * @param pmcData Profile - * @param moveRequest Move request data - * @param sessionID Session id - * @param output Client response - */ - moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Get a event router response with inventory trader message - * @param output Item event router response - * @returns Item event router response - */ - protected appendTraderExploitErrorResponse(output: IItemEventRouterResponse): void; - /** - * Handle Remove event - * Implements functionality "Discard" from Main menu (Stash etc.) - * Removes item from PMC Profile - */ - discardItem(pmcData: IPmcData, request: IInventoryRemoveRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Split Item - * spliting 1 stack into 2 - * @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile) - * @param request Split request - * @param sessionID Session/player id - * @param output Client response - * @returns IItemEventRouterResponse - */ - splitItem(pmcData: IPmcData, request: IInventorySplitRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Fully merge 2 inventory stacks together into one stack (merging where both stacks remain is called 'transfer') - * Deletes item from `body.item` and adding number of stacks into `body.with` - * @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile) - * @param body Merge request - * @param sessionID Player id - * @param output Client response - * @returns IItemEventRouterResponse - */ - mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * TODO: Adds no data to output to send to client, is this by design? - * Transfer items from one stack into another while keeping original stack - * Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload" - * @param pmcData Player profile - * @param body Transfer request - * @param sessionID Session id - * @param output Client response - * @returns IItemEventRouterResponse - */ - transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Swap Item - * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment - * Also used to swap items using quick selection on character screen - */ - swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handles folding of Weapons - */ - foldItem(pmcData: IPmcData, request: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Toggles "Toggleable" items like night vision goggles and face shields. - * @param pmcData player profile - * @param body Toggle request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Add a tag to an inventory item - * @param pmcData profile with item to add tag to - * @param body tag request data - * @param sessionID session id - * @returns client response object - */ - tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Bind an inventory item to the quick access menu at bottom of player screen - * Handle bind event - * @param pmcData Player profile - * @param bindRequest Reqeust object - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): void; - /** - * Unbind an inventory item from quick access menu at bottom of player screen - * Handle unbind event - * @param pmcData Player profile - * @param bindRequest Request object - * @param sessionID Session id - * @param output Client response - */ - unbindItem(pmcData: IPmcData, request: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Handles examining an item - * @param pmcData player profile - * @param body request object - * @param sessionID session id - * @param output Client response - * @returns response - */ - examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Flag an item as seen in profiles encyclopedia + add inspect xp to profile - * @param itemTpls Inspected item tpls - * @param fullProfile Profile to add xp to - */ - protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], fullProfile: ISptProfile): void; - /** - * Get the tplid of an item from the examine request object - * @param request Response request - * @returns tplId - */ - protected getExaminedItemTpl(request: IInventoryExamineRequestData): string; - readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle ApplyInventoryChanges - * Sorts supplied items. - * @param pmcData Player profile - * @param request sort request - * @param sessionID Session id - */ - sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): void; - /** - * Add note to a map - * @param pmcData Player profile - * @param request Add marker request - * @param sessionID Session id - * @param output Client response - * @returns IItemEventRouterResponse - */ - createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Delete a map marker - * @param pmcData Player profile - * @param request Delete marker request - * @param sessionID Session id - * @param output Client response - */ - deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Edit an existing map marker - * @param pmcData Player profile - * @param request Edit marker request - * @param sessionID Session id - * @param output Client response - */ - editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Strip out characters from note string that are not: letter/numbers/unicode/spaces - * @param mapNoteText Marker text to sanitise - * @returns Sanitised map marker text - */ - protected sanitiseMapMarkerText(mapNoteText: string): string; - /** - * Handle OpenRandomLootContainer event - * Handle event fired when a container is unpacked (currently only the halloween pumpkin) - * @param pmcData Profile data - * @param body Open loot container request data - * @param sessionID Session id - * @param output Client response - */ - openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; - redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; - setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/LauncherController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/LauncherController.d.ts deleted file mode 100644 index 58bc7b2..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/LauncherController.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; -import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class LauncherController { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; - protected saveServer: SaveServer; - protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - protected databaseServer: DatabaseServer; - protected localisationService: LocalisationService; - protected preSptModLoader: PreSptModLoader; - protected configServer: ConfigServer; - protected coreConfig: ICoreConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preSptModLoader: PreSptModLoader, configServer: ConfigServer); - connect(): IConnectResponse; - /** - * Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness" - * @returns Dictionary of profile types with related descriptive text - */ - protected getProfileDescriptions(): Record; - find(sessionIdKey: string): Info; - login(info: ILoginRequestData): string; - register(info: IRegisterData): string; - protected createAccount(info: IRegisterData): string; - protected generateProfileId(): string; - protected formatID(timeStamp: number, counter: number): string; - changeUsername(info: IChangeRequestData): string; - changePassword(info: IChangeRequestData): string; - /** - * Handle launcher requesting profile be wiped - * @param info IRegisterData - * @returns Session id - */ - wipe(info: IRegisterData): string; - getCompatibleTarkovVersion(): string; - /** - * Get the mods the server has currently loaded - * @returns Dictionary of mod name and mod details - */ - getLoadedServerMods(): Record; - /** - * Get the mods a profile has ever loaded into game with - * @param sessionId Player id - * @returns Array of mod details - */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/LocationController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/LocationController.d.ts deleted file mode 100644 index f1d5e0c..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/LocationController.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { LocationGenerator } from "@spt/generators/LocationGenerator"; -import { LootGenerator } from "@spt/generators/LootGenerator"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; -import { IAirdropLootResult } from "@spt/models/eft/location/IAirdropLootResult"; -import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; -import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class LocationController { - protected hashUtil: HashUtil; - protected randomUtil: RandomUtil; - protected weightedRandomHelper: WeightedRandomHelper; - protected logger: ILogger; - protected locationGenerator: LocationGenerator; - protected localisationService: LocalisationService; - protected raidTimeAdjustmentService: RaidTimeAdjustmentService; - protected itemFilterService: ItemFilterService; - protected lootGenerator: LootGenerator; - protected databaseServer: DatabaseServer; - protected timeUtil: TimeUtil; - protected configServer: ConfigServer; - protected applicationContext: ApplicationContext; - protected cloner: ICloner; - protected airdropConfig: IAirdropConfig; - protected locationConfig: ILocationConfig; - constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); - /** - * Handle client/location/getLocalloot - * Get a location (map) with generated loot data - * @param sessionId Player id - * @param request Map request to generate - * @returns ILocationBase - */ - get(sessionId: string, request: IGetLocationRequestData): ILocationBase; - /** - * Generate a maps base location with loot - * @param name Map name - * @returns ILocationBase - */ - protected generate(name: string): ILocationBase; - /** - * Handle client/locations - * Get all maps base location properties without loot data - * @param sessionId Players Id - * @returns ILocationsGenerateAllResponse - */ - generateAll(sessionId: string): ILocationsGenerateAllResponse; - /** - * Handle client/location/getAirdropLoot - * Get loot for an airdrop container - * Generates it randomly based on config/airdrop.json values - * @returns Array of LootItem objects - */ - getAirdropLoot(): IAirdropLootResult; - /** - * Randomly pick a type of airdrop loot using weighted values from config - * @returns airdrop type value - */ - protected chooseAirdropType(): AirdropTypeEnum; - /** - * Get the configuration for a specific type of airdrop - * @param airdropType Type of airdrop to get settings for - * @returns LootRequest - */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/MatchController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/MatchController.d.ts deleted file mode 100644 index c08ebb0..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/MatchController.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { LootGenerator } from "@spt/generators/LootGenerator"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IEndOfflineRaidRequestData } from "@spt/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { IMatchGroupStartGameRequest } from "@spt/models/eft/match/IMatchGroupStartGameRequest"; -import { IMatchGroupStatusRequest } from "@spt/models/eft/match/IMatchGroupStatusRequest"; -import { IMatchGroupStatusResponse } from "@spt/models/eft/match/IMatchGroupStatusResponse"; -import { IProfileStatusResponse } from "@spt/models/eft/match/IProfileStatusResponse"; -import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig"; -import { IMatchConfig } from "@spt/models/spt/config/IMatchConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { BotGenerationCacheService } from "@spt/services/BotGenerationCacheService"; -import { BotLootCacheService } from "@spt/services/BotLootCacheService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class MatchController { - protected logger: ILogger; - protected saveServer: SaveServer; - protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; - protected hashUtil: HashUtil; - protected profileHelper: ProfileHelper; - protected matchLocationService: MatchLocationService; - protected traderHelper: TraderHelper; - protected botLootCacheService: BotLootCacheService; - protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; - protected botGenerationCacheService: BotGenerationCacheService; - protected mailSendService: MailSendService; - protected lootGenerator: LootGenerator; - protected applicationContext: ApplicationContext; - protected matchConfig: IMatchConfig; - protected inRaidConfig: IInRaidConfig; - protected traderConfig: ITraderConfig; - protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); - getEnabled(): boolean; - /** Handle client/match/group/delete */ - deleteGroup(info: any): void; - /** Handle match/group/start_game */ - joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; - /** Handle client/match/group/status */ - getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; - /** - * Handle /client/raid/configuration - * @param request Raid config request - * @param sessionID Session id - */ - startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void; - /** - * Convert a difficulty value from pre-raid screen to a bot difficulty - * @param botDifficulty dropdown difficulty value - * @returns bot difficulty - */ - protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; - /** Handle client/match/offline/end */ - endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; - /** - * Did player take a COOP extract - * @param extractName Name of extract player took - * @returns True if coop extract - */ - protected extractWasViaCoop(extractName: string): boolean; - protected sendCoopTakenFenceMessage(sessionId: string): void; - /** - * Handle when a player extracts using a coop extract - add rep to fence - * @param sessionId Session/player id - * @param pmcData Profile - * @param extractName Name of extract taken - */ - protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; - /** - * Was extract by car - * @param extractName name of extract - * @returns true if car extract - */ - protected extractWasViaCar(extractName: string): boolean; - /** - * Handle when a player extracts using a car - Add rep to fence - * @param extractName name of the extract used - * @param pmcData Player profile - * @param sessionId Session id - */ - protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; - /** - * Get the fence rep gain from using a car or coop extract - * @param pmcData Profile - * @param baseGain amount gained for the first extract - * @param extractCount Number of times extract was taken - * @returns Fence standing after taking extract - */ - protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/NoteController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/NoteController.d.ts deleted file mode 100644 index a46a0aa..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/NoteController.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -export declare class NoteController { - protected eventOutputHolder: EventOutputHolder; - constructor(eventOutputHolder: EventOutputHolder); - addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; - editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; - deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/NotifierController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/NotifierController.d.ts deleted file mode 100644 index 8939bee..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/NotifierController.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { NotifierHelper } from "@spt/helpers/NotifierHelper"; -import { INotifierChannel } from "@spt/models/eft/notifier/INotifier"; -import { NotificationService } from "@spt/services/NotificationService"; -export declare class NotifierController { - protected notifierHelper: NotifierHelper; - protected httpServerHelper: HttpServerHelper; - protected notificationService: NotificationService; - protected pollInterval: number; - protected timeout: number; - constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); - /** - * Resolve an array of session notifications. - * - * If no notifications are currently queued then intermittently check for new notifications until either - * one or more appear or when a timeout expires. - * If no notifications are available after the timeout, use a default message. - */ - notifyAsync(sessionID: string): Promise; - getServer(sessionID: string): string; - /** Handle client/notifier/channel/create */ - getChannel(sessionID: string): INotifierChannel; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/PresetController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/PresetController.d.ts deleted file mode 100644 index 0098a41..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/PresetController.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -export declare class PresetController { - protected logger: ILogger; - protected presetHelper: PresetHelper; - protected databaseServer: DatabaseServer; - constructor(logger: ILogger, presetHelper: PresetHelper, databaseServer: DatabaseServer); - initialize(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/ProfileController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/ProfileController.d.ts deleted file mode 100644 index e39a632..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/ProfileController.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IMiniProfile } from "@spt/models/eft/launcher/IMiniProfile"; -import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData"; -import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest"; -import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse"; -import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData"; -import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData"; -import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData"; -import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData"; -import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class ProfileController { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected saveServer: SaveServer; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected profileFixerService: ProfileFixerService; - protected localisationService: LocalisationService; - protected seasonalEventService: SeasonalEventService; - protected mailSendService: MailSendService; - protected playerScavGenerator: PlayerScavGenerator; - protected eventOutputHolder: EventOutputHolder; - protected traderHelper: TraderHelper; - protected dialogueHelper: DialogueHelper; - protected questHelper: QuestHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper); - /** - * Handle /launcher/profiles - */ - getMiniProfiles(): IMiniProfile[]; - /** - * Handle launcher/profile/info - */ - getMiniProfile(sessionID: string): any; - /** - * Handle client/game/profile/list - */ - getCompleteProfile(sessionID: string): IPmcData[]; - /** - * Handle client/game/profile/create - * @param info Client reqeust object - * @param sessionID Player id - * @returns Profiles _id value - */ - createProfile(info: IProfileCreateRequestData, sessionID: string): string; - /** - * make profiles pmcData.Inventory.equipment unique - * @param pmcData Profile to update - */ - protected updateInventoryEquipmentId(pmcData: IPmcData): void; - /** - * Delete a profile - * @param sessionID Id of profile to delete - */ - protected deleteProfileBySessionId(sessionID: string): void; - /** - * Iterate over all quests in player profile, inspect rewards for the quests current state (accepted/completed) - * and send rewards to them in mail - * @param profileDetails Player profile - * @param sessionID Session id - * @param response Event router response - */ - protected givePlayerStartingQuestRewards(profileDetails: ISptProfile, sessionID: string, response: IItemEventRouterResponse): void; - /** - * For each trader reset their state to what a level 1 player would see - * @param sessionID Session id of profile to reset - */ - protected resetAllTradersInProfile(sessionID: string): void; - /** - * Generate a player scav object - * PMC profile MUST exist first before pscav can be generated - * @param sessionID - * @returns IPmcData object - */ - generatePlayerScav(sessionID: string): IPmcData; - /** - * Handle client/game/profile/nickname/validate - */ - validateNickname(info: IValidateNicknameRequestData, sessionID: string): string; - /** - * Handle client/game/profile/nickname/change event - * Client allows player to adjust their profile name - */ - changeNickname(info: IProfileChangeNicknameRequestData, sessionID: string): string; - /** - * Handle client/game/profile/voice/change event - */ - changeVoice(info: IProfileChangeVoiceRequestData, sessionID: string): void; - /** - * Handle client/game/profile/search - */ - getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[]; - /** - * Handle client/profile/status - */ - getProfileStatus(sessionId: string): GetProfileStatusResponseData; - getOtherProfile(sessionId: string, request: IGetOtherProfileRequest): IGetOtherProfileResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/QuestController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/QuestController.d.ts deleted file mode 100644 index 0a32b05..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/QuestController.d.ts +++ /dev/null @@ -1,195 +0,0 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; -import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; -import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; -import { IHandoverQuestRequestData } from "@spt/models/eft/quests/IHandoverQuestRequestData"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class QuestController { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected httpResponseUtil: HttpResponseUtil; - protected eventOutputHolder: EventOutputHolder; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected dialogueHelper: DialogueHelper; - protected mailSendService: MailSendService; - protected profileHelper: ProfileHelper; - protected traderHelper: TraderHelper; - protected questHelper: QuestHelper; - protected questConditionHelper: QuestConditionHelper; - protected playerService: PlayerService; - protected localeService: LocaleService; - protected seasonalEventService: SeasonalEventService; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); - /** - * Handle client/quest/list - * Get all quests visible to player - * Exclude quests with incomplete preconditions (level/loyalty) - * @param sessionID session id - * @returns array of IQuest - */ - getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; - /** - * Should a quest be shown to the player in trader quest screen - * @param questId Quest to check - * @returns true = show to player - */ - protected showEventQuestToPlayer(questId: string): boolean; - /** - * Handle QuestAccept event - * Handle the client accepting a quest and starting it - * Send starting rewards if any to player and - * Send start notification if any to player - * @param pmcData Profile to update - * @param acceptedQuest Quest accepted - * @param sessionID Session id - * @returns Client response - */ - acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Handle the client accepting a repeatable quest and starting it - * Send starting rewards if any to player and - * Send start notification if any to player - * @param pmcData Profile to update with new quest - * @param acceptedQuest Quest being accepted - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Look for an accepted quest inside player profile, return matching - * @param pmcData Profile to search through - * @param acceptedQuest Quest to search for - * @returns IRepeatableQuest - */ - protected getRepeatableQuestFromProfile(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData): IRepeatableQuest; - /** - * Handle QuestComplete event - * Update completed quest in profile - * Add newly unlocked quests to profile - * Also recalculate their level due to exp rewards - * @param pmcData Player profile - * @param body Completed quest request - * @param sessionID Session id - * @returns ItemEvent client response - */ - completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[]; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Item[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; - /** - * Handle QuestHandover event - * @param pmcData Player profile - * @param handoverQuestRequest handover item request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Show warning to user and write to log that repeatable quest failed a condition check - * @param handoverQuestRequest Quest request - * @param output Response to send to user - * @returns IItemEventRouterResponse - */ - protected showRepeatableQuestInvalidConditionError(handoverQuestRequest: IHandoverQuestRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Show warning to user and write to log quest item handed over did not match what is required - * @param handoverQuestRequest Quest request - * @param itemHandedOver Non-matching item found - * @param handoverRequirements Quest handover requirements - * @param output Response to send to user - * @returns IItemEventRouterResponse - */ - protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: IQuestCondition, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Increment a backend counter stored value by an amount, - * Create counter if it does not exist - * @param pmcData Profile to find backend counter in - * @param conditionId backend counter id to update - * @param questId quest id counter is associated with - * @param counterValue value to increment the backend counter with - */ - protected updateProfileTaskConditionCounterValue(pmcData: IPmcData, conditionId: string, questId: string, counterValue: number): void; - /** - * Handle /client/game/profile/items/moving - QuestFail - * @param pmcData Pmc profile - * @param request Fail qeust request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/RagfairController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/RagfairController.d.ts deleted file mode 100644 index 9567d62..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/RagfairController.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -import { RagfairOfferGenerator } from "@spt/generators/RagfairOfferGenerator"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RagfairHelper } from "@spt/helpers/RagfairHelper"; -import { RagfairOfferHelper } from "@spt/helpers/RagfairOfferHelper"; -import { RagfairSellHelper } from "@spt/helpers/RagfairSellHelper"; -import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; -import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; -import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; -import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; -import { IGetOffersResult } from "@spt/models/eft/ragfair/IGetOffersResult"; -import { IGetRagfairOfferByIdRequest } from "@spt/models/eft/ragfair/IGetRagfairOfferByIdRequest"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRemoveOfferRequestData } from "@spt/models/eft/ragfair/IRemoveOfferRequestData"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; -import { RagfairTaxService } from "@spt/services/RagfairTaxService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -/** - * Handle RagfairCallback events - */ -export declare class RagfairController { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected httpResponse: HttpResponseUtil; - protected eventOutputHolder: EventOutputHolder; - protected ragfairServer: RagfairServer; - protected ragfairPriceService: RagfairPriceService; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected saveServer: SaveServer; - protected ragfairSellHelper: RagfairSellHelper; - protected ragfairTaxService: RagfairTaxService; - protected ragfairSortHelper: RagfairSortHelper; - protected ragfairOfferHelper: RagfairOfferHelper; - protected profileHelper: ProfileHelper; - protected paymentService: PaymentService; - protected handbookHelper: HandbookHelper; - protected paymentHelper: PaymentHelper; - protected inventoryHelper: InventoryHelper; - protected traderHelper: TraderHelper; - protected ragfairHelper: RagfairHelper; - protected ragfairOfferService: RagfairOfferService; - protected ragfairRequiredItemsService: RagfairRequiredItemsService; - protected ragfairOfferGenerator: RagfairOfferGenerator; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Handles client/ragfair/find - * Returns flea offers that match required search parameters - * @param sessionID Player id - * @param searchRequest Search request data - * @returns IGetOffersResult - */ - getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; - /** - * Handle client/ragfair/offer/findbyid - * Occurs when searching for `#x` on flea - * @param sessionId Player id - * @param request Request data - * @returns IRagfairOffer - */ - getOfferById(sessionId: string, request: IGetRagfairOfferByIdRequest): IRagfairOffer; - /** - * Get offers for the client based on type of search being performed - * @param searchRequest Client search request data - * @param itemsToAdd Comes from ragfairHelper.filterCategories() - * @param traderAssorts Trader assorts - * @param pmcProfile Player profile - * @returns array of offers - */ - protected getOffersForSearchType(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; - /** - * Get categories for the type of search being performed, linked/required/all - * @param searchRequest Client search request data - * @param offers Ragfair offers to get categories for - * @returns record with templates + counts - */ - protected getSpecificCategories(pmcProfile: IPmcData, searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record; - /** - * Add index to all offers passed in (0-indexed) - * @param offers Offers to add index value to - */ - protected addIndexValueToOffers(offers: IRagfairOffer[]): void; - /** - * Update a trader flea offer with buy restrictions stored in the traders assort - * @param offer Flea offer to update - * @param fullProfile Players full profile - */ - protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, fullProfile: ISptProfile): void; - /** - * Adjust ragfair offer stack count to match same value as traders assort stack count - * @param offer Flea offer to adjust stack size of - */ - protected setTraderOfferStackSize(offer: IRagfairOffer): void; - /** - * Is the flea search being performed a 'linked' search type - * @param info Search request - * @returns True if it is a 'linked' search type - */ - protected isLinkedSearch(info: ISearchRequestData): boolean; - /** - * Is the flea search being performed a 'required' search type - * @param info Search request - * @returns True if it is a 'required' search type - */ - protected isRequiredSearch(info: ISearchRequestData): boolean; - /** - * Check all profiles and sell player offers / send player money for listing if it sold - */ - update(): void; - /** - * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest - * @returns min/avg/max values for an item based on flea offers available - */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; - /** - * List item(s) on flea for sale - * @param pmcData Player profile - * @param offerRequest Flea list creation offer - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - addPlayerOffer(pmcData: IPmcData, offerRequest: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Charge player a listing fee for using flea, pulls charge from data previously sent by client - * @param sessionID Player id - * @param rootItem Base item being listed (used when client tax cost not found and must be done on server) - * @param pmcData Player profile - * @param requirementsPriceInRub Rouble cost player chose for listing (used when client tax cost not found and must be done on server) - * @param itemStackCount How many items were listed in player (used when client tax cost not found and must be done on server) - * @param offerRequest Add offer request object from client - * @param output IItemEventRouterResponse - * @returns True if charging tax to player failed - */ - protected chargePlayerTaxFee(sessionID: string, rootItem: Item, pmcData: IPmcData, requirementsPriceInRub: number, itemStackCount: number, offerRequest: IAddOfferRequestData, output: IItemEventRouterResponse): boolean; - /** - * Is the item to be listed on the flea valid - * @param offerRequest Client offer request - * @param errorMessage message to show to player when offer is invalid - * @returns Is offer valid - */ - protected isValidPlayerOfferRequest(offerRequest: IAddOfferRequestData, errorMessage: string): boolean; - /** - * Get the handbook price in roubles for the items being listed - * @param requirements - * @returns Rouble price - */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; - /** - * Using item ids from flea offer request, find corresponding items from player inventory and return as array - * @param pmcData Player profile - * @param itemIdsFromFleaOfferRequest Ids from request - * @returns Array of items from player inventory - */ - protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[]): { - items: Item[] | null; - errorMessage: string | null; - }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: Item[], sellInOnePiece: boolean): IRagfairOffer; - getAllFleaPrices(): Record; - getStaticPrices(): Record; - /** - * User requested removal of the offer, actually reduces the time to 71 seconds, - * allowing for the possibility of extending the auction before it's end time - * @param removeRequest Remove offer request - * @param sessionId Players id - * @returns IItemEventRouterResponse - */ - removeOffer(removeRequest: IRemoveOfferRequestData, sessionId: string): IItemEventRouterResponse; - /** - * Extend a ragfair offers listing time - * @param extendRequest Extend offer request - * @param sessionId Players id - * @returns IItemEventRouterResponse - */ - extendOffer(extendRequest: IExtendOfferRequestData, sessionId: string): IItemEventRouterResponse; - /** - * Create a basic trader request object with price and currency type - * @param currency What currency: RUB, EURO, USD - * @param value Amount of currency - * @returns IProcessBuyTradeRequestData - */ - protected createBuyTradeRequestObject(currency: string, value: number): IProcessBuyTradeRequestData; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/RepairController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/RepairController.d.ts deleted file mode 100644 index 61726ef..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/RepairController.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { RepairHelper } from "@spt/helpers/RepairHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepairActionDataRequest } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; -import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RepairService } from "@spt/services/RepairService"; -export declare class RepairController { - protected logger: ILogger; - protected eventOutputHolder: EventOutputHolder; - protected databaseServer: DatabaseServer; - protected questHelper: QuestHelper; - protected traderHelper: TraderHelper; - protected paymentService: PaymentService; - protected repairHelper: RepairHelper; - protected repairService: RepairService; - protected profileHelper: ProfileHelper; - protected repairConfig: IRepairConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService, profileHelper: ProfileHelper); - /** - * Handle TraderRepair event - * Repair with trader - * @param sessionID session id - * @param body endpoint request data - * @param pmcData player profile - * @returns item event router action - */ - traderRepair(sessionID: string, body: ITraderRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse; - /** - * Handle Repair event - * Repair with repair kit - * @param sessionID session id - * @param body endpoint request data - * @param pmcData player profile - * @returns item event router action - */ - repairWithKit(sessionID: string, body: IRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/RepeatableQuestController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/RepeatableQuestController.d.ts deleted file mode 100644 index e0f3753..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/RepeatableQuestController.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { RepeatableQuestGenerator } from "@spt/generators/RepeatableQuestGenerator"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; -import { ELocationName } from "@spt/models/enums/ELocationName"; -import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { PaymentService } from "@spt/services/PaymentService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class RepeatableQuestController { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; - protected httpResponse: HttpResponseUtil; - protected profileHelper: ProfileHelper; - protected profileFixerService: ProfileFixerService; - protected eventOutputHolder: EventOutputHolder; - protected paymentService: PaymentService; - protected objectId: ObjectId; - protected repeatableQuestGenerator: RepeatableQuestGenerator; - protected repeatableQuestHelper: RepeatableQuestHelper; - protected questHelper: QuestHelper; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); - /** - * Handle client/repeatalbeQuests/activityPeriods - * Returns an array of objects in the format of repeatable quests to the client. - * repeatableQuestObject = { - * id: Unique Id, - * name: "Daily", - * endTime: the time when the quests expire - * activeQuests: currently available quests in an array. Each element of quest type format (see assets/database/templates/repeatableQuests.json). - * inactiveQuests: the quests which were previously active (required by client to fail them if they are not completed) - * } - * - * The method checks if the player level requirement for repeatable quests (e.g. daily lvl5, weekly lvl15) is met and if the previously active quests - * are still valid. This ischecked by endTime persisted in profile accordning to the resetTime configured for each repeatable kind (daily, weekly) - * in QuestCondig.js - * - * If the condition is met, new repeatableQuests are created, old quests (which are persisted in the profile.RepeatableQuests[i].activeQuests) are - * moved to profile.RepeatableQuests[i].inactiveQuests. This memory is required to get rid of old repeatable quest data in the profile, otherwise - * they'll litter the profile's Quests field. - * (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards) - * The new quests generated are again persisted in profile.RepeatableQuests - * - * @param {string} _info Request from client - * @param {string} sessionID Player's session id - * - * @returns {array} Array of "repeatableQuestObjects" as described above - */ - getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[]; - /** - * Get the number of quests to generate - takes into account charisma state of player - * @param repeatableConfig Config - * @param pmcData Player profile - * @returns Quest count - */ - protected getQuestCount(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): number; - /** - * Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists - * @param repeatableConfig daily/weekly config - * @param pmcData Profile to search - * @returns IPmcDataRepeatableQuest - */ - protected getRepeatableQuestSubTypeFromProfile(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): IPmcDataRepeatableQuest; - /** - * Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps - */ - generateDebugDailies(dailiesPool: any, factory: any, number: number): any; - /** - * Used to create a quest pool during each cycle of repeatable quest generation. The pool will be subsequently - * narrowed down during quest generation to avoid duplicate quests. Like duplicate extractions or elimination quests - * where you have to e.g. kill scavs in same locations. - * @param repeatableConfig main repeatable quest config - * @param pmcLevel level of pmc generating quest pool - * @returns IQuestTypePool - */ - protected generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): IQuestTypePool; - protected createBaseQuestPool(repeatableConfig: IRepeatableQuestConfig): IQuestTypePool; - /** - * Return the locations this PMC is allowed to get daily quests for based on their level - * @param locations The original list of locations - * @param pmcLevel The level of the player PMC - * @returns A filtered list of locations that allow the player PMC level to access it - */ - protected getAllowedLocations(locations: Record, pmcLevel: number): Partial>; - /** - * Return true if the given pmcLevel is allowed on the given location - * @param location The location name to check - * @param pmcLevel The level of the pmc - * @returns True if the given pmc level is allowed to access the given location - */ - protected isPmcLevelAllowedOnLocation(location: string, pmcLevel: number): boolean; - debugLogRepeatableQuestIds(pmcData: IPmcData): void; - /** - * Handle RepeatableQuestChange event - */ - changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; - protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/TradeController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/TradeController.d.ts deleted file mode 100644 index 9daed8c..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/TradeController.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TradeHelper } from "@spt/helpers/TradeHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -import { IOfferRequest, IProcessRagfairTradeRequestData } from "@spt/models/eft/trade/IProcessRagfairTradeRequestData"; -import { ISellScavItemsToFenceRequestData } from "@spt/models/eft/trade/ISellScavItemsToFenceRequestData"; -import { Traders } from "@spt/models/enums/Traders"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class TradeController { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected eventOutputHolder: EventOutputHolder; - protected tradeHelper: TradeHelper; - protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; - protected hashUtil: HashUtil; - protected itemHelper: ItemHelper; - protected profileHelper: ProfileHelper; - protected traderHelper: TraderHelper; - protected ragfairServer: RagfairServer; - protected httpResponse: HttpResponseUtil; - protected localisationService: LocalisationService; - protected ragfairPriceService: RagfairPriceService; - protected mailSendService: MailSendService; - protected configServer: ConfigServer; - protected roubleTpl: string; - protected ragfairConfig: IRagfairConfig; - protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); - /** Handle TradingConfirm event */ - confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; - /** Handle RagFairBuyOffer event */ - confirmRagfairTrading(pmcData: IPmcData, request: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Buy an item off the flea sold by a trader - * @param sessionId Session id - * @param pmcData Player profile - * @param fleaOffer Offer being purchased - * @param requestOffer request data from client - * @param output Output to send back to client - */ - protected buyTraderItemFromRagfair(sessionId: string, pmcData: IPmcData, fleaOffer: IRagfairOffer, requestOffer: IOfferRequest, output: IItemEventRouterResponse): void; - /** - * Buy an item off the flea sold by a PMC - * @param sessionId Session id - * @param pmcData Player profile - * @param fleaOffer Offer being purchased - * @param requestOffer Request data from client - * @param output Output to send back to client - */ - protected buyPmcItemFromRagfair(sessionId: string, pmcData: IPmcData, fleaOffer: IRagfairOffer, requestOffer: IOfferRequest, output: IItemEventRouterResponse): void; - /** - * Does Player have necessary trader loyalty to purchase flea offer - * @param sellerIsTrader is seller trader - * @param fleaOffer FLea offer being bought - * @param pmcData Player profile - * @returns True if player can buy offer - */ - protected playerLacksTraderLoyaltyLevelToBuyOffer(fleaOffer: IRagfairOffer, pmcData: IPmcData): boolean; - /** Handle SellAllFromSavage event */ - sellScavItemsToFence(pmcData: IPmcData, request: ISellScavItemsToFenceRequestData, sessionId: string): IItemEventRouterResponse; - /** - * Send the specified rouble total to player as mail - * @param sessionId Session id - * @param trader Trader to sell items to - * @param output IItemEventRouterResponse - */ - protected mailMoneyToPlayer(sessionId: string, roublesToSend: number, trader: Traders): void; - /** - * Looks up an items children and gets total handbook price for them - * @param parentItemId parent item that has children we want to sum price of - * @param items All items (parent + children) - * @param handbookPrices Prices of items from handbook - * @param traderDetails Trader being sold to to perform buy category check against - * @returns Rouble price - */ - protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record, traderDetails: ITraderBase): number; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/TraderController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/TraderController.d.ts deleted file mode 100644 index 9a85203..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/TraderController.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { FenceBaseAssortGenerator } from "@spt/generators/FenceBaseAssortGenerator"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { TraderAssortService } from "@spt/services/TraderAssortService"; -import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class TraderController { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected databaseServer: DatabaseServer; - protected traderAssortHelper: TraderAssortHelper; - protected profileHelper: ProfileHelper; - protected traderHelper: TraderHelper; - protected traderAssortService: TraderAssortService; - protected traderPurchasePersisterService: TraderPurchasePersisterService; - protected fenceService: FenceService; - protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); - /** - * Runs when onLoad event is fired - * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService - * Store timestamp of next assort refresh in nextResupply property of traders .base object - */ - load(): void; - /** - * Runs when onUpdate is fired - * If current time is > nextResupply(expire) time of trader, refresh traders assorts and - * Fence is handled slightly differently - * @returns has run - */ - update(): boolean; - /** - * Handle client/trading/api/traderSettings - * Return an array of all traders - * @param sessionID Session id - * @returns array if ITraderBase objects - */ - getAllTraders(sessionID: string): ITraderBase[]; - /** - * Order traders by their traderId (Ttid) - * @param traderA First trader to compare - * @param traderB Second trader to compare - * @returns 1,-1 or 0 - */ - protected sortByTraderId(traderA: ITraderBase, traderB: ITraderBase): number; - /** Handle client/trading/api/getTrader */ - getTrader(sessionID: string, traderID: string): ITraderBase; - /** Handle client/trading/api/getTraderAssort */ - getAssort(sessionId: string, traderId: string): ITraderAssort; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts deleted file mode 100644 index 7d24954..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; -import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -export declare class WeatherController { - protected weatherGenerator: WeatherGenerator; - protected logger: ILogger; - protected configServer: ConfigServer; - protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer); - /** Handle client/weather */ - generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; -} diff --git a/TypeScript/22CustomSptCommand/types/controllers/WishlistController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/WishlistController.d.ts deleted file mode 100644 index ee4d970..0000000 --- a/TypeScript/22CustomSptCommand/types/controllers/WishlistController.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IWishlistActionData } from "@spt/models/eft/wishlist/IWishlistActionData"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -export declare class WishlistController { - protected eventOutputHolder: EventOutputHolder; - constructor(eventOutputHolder: EventOutputHolder); - /** Handle AddToWishList */ - addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; - /** Handle RemoveFromWishList event */ - removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/di/Container.d.ts b/TypeScript/22CustomSptCommand/types/di/Container.d.ts deleted file mode 100644 index e339a3b..0000000 --- a/TypeScript/22CustomSptCommand/types/di/Container.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -/** - * Handle the registration of classes to be used by the Dependency Injection code - */ -export declare class Container { - static registerPostLoadTypes(container: DependencyContainer, childContainer: DependencyContainer): void; - static registerTypes(depContainer: DependencyContainer): void; - static registerListTypes(depContainer: DependencyContainer): void; - private static registerUtils; - private static registerRouters; - private static registerGenerators; - private static registerHelpers; - private static registerLoaders; - private static registerCallbacks; - private static registerServices; - private static registerServers; - private static registerControllers; -} diff --git a/TypeScript/22CustomSptCommand/types/di/OnLoad.d.ts b/TypeScript/22CustomSptCommand/types/di/OnLoad.d.ts deleted file mode 100644 index a5cdea3..0000000 --- a/TypeScript/22CustomSptCommand/types/di/OnLoad.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface OnLoad { - onLoad(): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/di/OnUpdate.d.ts b/TypeScript/22CustomSptCommand/types/di/OnUpdate.d.ts deleted file mode 100644 index e1ce375..0000000 --- a/TypeScript/22CustomSptCommand/types/di/OnUpdate.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface OnUpdate { - onUpdate(timeSinceLastRun: number): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/di/Router.d.ts b/TypeScript/22CustomSptCommand/types/di/Router.d.ts deleted file mode 100644 index 01ca547..0000000 --- a/TypeScript/22CustomSptCommand/types/di/Router.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -export declare class Router { - protected handledRoutes: HandledRoute[]; - getTopLevelRoute(): string; - protected getHandledRoutes(): HandledRoute[]; - protected getInternalHandledRoutes(): HandledRoute[]; - canHandle(url: string, partialMatch?: boolean): boolean; -} -export declare class StaticRouter extends Router { - private routes; - constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): Promise; - getHandledRoutes(): HandledRoute[]; -} -export declare class DynamicRouter extends Router { - private routes; - constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; - getHandledRoutes(): HandledRoute[]; -} -export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; -} -export declare class SaveLoadRouter extends Router { - handleLoad(profile: ISptProfile): ISptProfile; -} -export declare class HandledRoute { - route: string; - dynamic: boolean; - constructor(route: string, dynamic: boolean); -} -export declare class RouteAction { - url: string; - action: (url: string, info: any, sessionID: string, output: string) => Promise; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); -} diff --git a/TypeScript/22CustomSptCommand/types/di/Serializer.d.ts b/TypeScript/22CustomSptCommand/types/di/Serializer.d.ts deleted file mode 100644 index b760b8b..0000000 --- a/TypeScript/22CustomSptCommand/types/di/Serializer.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; - canHandle(something: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts deleted file mode 100644 index a74010c..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts +++ /dev/null @@ -1,249 +0,0 @@ -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProbabilityHelper } from "@spt/helpers/ProbabilityHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Mods, ModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ModSpawn } from "@spt/models/enums/ModSpawn"; -import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; -import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; -import { BotModLimits, BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; -import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; -export declare class BotEquipmentModGenerator { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected randomUtil: RandomUtil; - protected probabilityHelper: ProbabilityHelper; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected botEquipmentFilterService: BotEquipmentFilterService; - protected itemFilterService: ItemFilterService; - protected profileHelper: ProfileHelper; - protected botWeaponModLimitService: BotWeaponModLimitService; - protected botHelper: BotHelper; - protected botGeneratorHelper: BotGeneratorHelper; - protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; - protected weightedRandomHelper: WeightedRandomHelper; - protected presetHelper: PresetHelper; - protected localisationService: LocalisationService; - protected botEquipmentModPoolService: BotEquipmentModPoolService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); - /** - * Check mods are compatible and add to array - * @param equipment Equipment item to add mods to - * @param modPool Mod list to choose frm - * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to - * @param forceSpawn should this mod be forced to spawn - * @returns Item + compatible mods as an array - */ - generateModsForEquipment(equipment: Item[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): Item[]; - /** - * Filter a bots plate pool based on its current level - * @param settings Bot equipment generation settings - * @param modSlot Armor slot being filtered - * @param existingPlateTplPool Plates tpls to choose from - * @param armorItem - * @returns Array of plate tpls to choose from - */ - protected filterPlateModsForSlotByLevel(settings: IGenerateEquipmentProperties, modSlot: string, existingPlateTplPool: string[], armorItem: ITemplateItem): IFilterPlateModsForSlotByLevelResult; - /** - * Add mods to a weapon using the provided mod pool - * @param sessionId session id - * @param weapon Weapon to add mods to - * @param modPool Pool of compatible mods to attach to weapon - * @param weaponId parentId of weapon - * @param parentTemplate Weapon which mods will be generated on - * @param modSpawnChances Mod spawn chances - * @param ammoTpl Ammo tpl to use when generating magazines/cartridges - * @param botRole Role of bot weapon is generated for - * @param botLevel Level of the bot weapon is being generated for - * @param modLimits limits placed on certain mod types per gun - * @param botEquipmentRole role of bot when accessing bot.json equipment config settings - * @returns Weapon + mods array - */ - generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number, modLimits: BotModLimits, botEquipmentRole: string): Item[]; - /** - * Is this modslot a front or rear sight - * @param modSlot Slot to check - * @returns true if it's a front/rear sight - */ - protected modIsFrontOrRearSight(modSlot: string, tpl: string): boolean; - /** - * Does the provided mod details show the mod can hold a scope - * @param modSlot e.g. mod_scope, mod_mount - * @param modsParentId Parent id of mod item - * @returns true if it can hold a scope - */ - protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean; - /** - * Set mod spawn chances to defined amount - * @param modSpawnChances Chance dictionary to update - */ - protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; - /** - * Get a Slot property for an item (chamber/cartridge/slot) - * @param modSlot e.g patron_in_weapon - * @param parentTemplate item template - * @returns Slot item - */ - protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): Slot; - /** - * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in - * @param modSpawnChances Chances for various mod spawns - * @param botEquipConfig Various config settings for generating this type of bot - * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped - */ - protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances, botEquipConfig: EquipmentFilters): ModSpawn; - /** - * @param modSlot Slot mod will fit into - * @param isRandomisableSlot Will generate a randomised mod pool if true - * @param modsParent Parent slot the item will be a part of - * @param botEquipBlacklist Blacklist to prevent mods from being picked - * @param itemModPool Pool of items to pick from - * @param weapon array with only weapon tpl in it, ready for mods to be added - * @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine) - * @param parentTemplate Parent item the mod will go into - * @returns itemHelper.getItem() result - */ - protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem, modSpawnResult: ModSpawn): [boolean, ITemplateItem]; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; - /** - * Filter mod pool down based on various criteria: - * Is slot flagged as randomisable - * Is slot required - * Is slot flagged as default mod only - * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added - * @param parentTemplate Mods parent - * @param weaponTemplate Mods root parent (weapon/equipment) - * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns - */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; - /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl - * @returns Default preset found - */ - protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; - /** - * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon - * @param modTpl Mod to check compatibility with weapon - * @returns True if incompatible - */ - protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; - /** - * Create a mod item with parameters as properties - * @param modId _id - * @param modTpl _tpl - * @param parentId parentId - * @param modSlot slotId - * @param modTemplate Used to add additional properties in the upd object - * @returns Item object - */ - protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; - /** - * Get a list of containers that hold ammo - * e.g. mod_magazine / patron_in_weapon_000 - * @returns string array - */ - protected getAmmoContainers(): string[]; - /** - * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items - * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl - */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; - /** - * Check if mod exists in db + is for a required slot - * @param modToAdd Db template of mod to check - * @param slotAddedToTemplate Slot object the item will be placed as child into - * @param modSlot Slot the mod will fill - * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid - */ - protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; - /** - * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) - * @param modTemplate db object for modItem we get compatible mods from - * @param modPool Pool of mods we are adding to - */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; - /** - * Get the possible items that fit a slot - * @param parentItemId item tpl to get compatible items for - * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot - */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; - /** - * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to - * @returns Filtered array of mod tpls - */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; - /** - * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. - * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. - * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. - * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" - * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template - */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; - /** - * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources - */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; - /** - * Filter out non-whitelisted weapon scopes - * Controlled by bot.json weaponSightWhitelist - * e.g. filter out rifle scopes from SMGs - * @param weapon Weapon scopes will be added to - * @param scopes Full scope pool - * @param botWeaponSightWhitelist Whitelist of scope types by weapon base type - * @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type - */ - protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record): string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts deleted file mode 100644 index 49eb70c..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; -import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; -import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; -import { Appearance, Health, IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class BotGenerator { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected randomUtil: RandomUtil; - protected timeUtil: TimeUtil; - protected profileHelper: ProfileHelper; - protected databaseServer: DatabaseServer; - protected botInventoryGenerator: BotInventoryGenerator; - protected botLevelGenerator: BotLevelGenerator; - protected botEquipmentFilterService: BotEquipmentFilterService; - protected weightedRandomHelper: WeightedRandomHelper; - protected botHelper: BotHelper; - protected botDifficultyHelper: BotDifficultyHelper; - protected seasonalEventService: SeasonalEventService; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected botConfig: IBotConfig; - protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); - /** - * Generate a player scav bot object - * @param role e.g. assault / pmcbot - * @param difficulty easy/normal/hard/impossible - * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns - */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; - /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails - * @param sessionId Session id - * @param botGenerationDetails details on how to generate bots - * @returns constructed bot - */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; - /** - * Get a clone of the database\bots\base.json file - * @returns IBotBase object - */ - protected getCloneOfBotBase(): IBotBase; - /** - * Create a IBotBase object with equipment/loot/exp etc - * @param sessionId Session id - * @param bot bots base file - * @param botJsonTemplate Bot template from db/bots/x.json - * @param botGenerationDetails details on how to generate the bot - * @returns IBotBase object - */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; - /** - * Choose various appearance settings for a bot using weights - * @param bot Bot to adjust - * @param appearance Appearance settings to choose from - * @param botGenerationDetails Generation details - */ - protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; - /** - * Create a bot nickname - * @param botJsonTemplate x.json from database - * @param botGenerationDetails - * @param botRole role of bot e.g. assault - * @param sessionId profile session id - * @returns Nickname for bot - */ - protected generateBotNickname(botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails, botRole: string, sessionId?: string): string; - /** - * Log the number of PMCs generated to the debug console - * @param output Generated bot array, ready to send to client - */ - protected logPmcGeneratedCount(output: IBotBase[]): void; - /** - * Converts health object to the required format - * @param healthObj health object from bot json - * @param playerScav Is a pscav bot being generated - * @returns PmcHealth object - */ - protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; - /** - * Get a bots skills with randomsied progress value between the min and max values - * @param botSkills Skills that should have their progress value randomised - * @returns - */ - protected generateSkills(botSkills: IBaseJsonSkills): botSkills; - /** - * Randomise the progress value of passed in skills based on the min/max value - * @param skills Skills to randomise - * @param isCommonSkills Are the skills 'common' skills - * @returns Skills with randomised progress values as an array - */ - protected getSkillsWithRandomisedProgressValue(skills: Record, isCommonSkills: boolean): IBaseSkill[]; - /** - * Generate a random Id for a bot and apply to bots _id and aid value - * @param bot bot to update - * @returns updated IBotBase object - */ - protected generateId(bot: IBotBase): void; - protected generateInventoryID(profile: IBotBase): void; - /** - * Randomise a bots game version and account category - * Chooses from all the game versions (standard, eod etc) - * Chooses account type (default, Sherpa, etc) - * @param botInfo bot info object to update - */ - protected getRandomisedGameVersionAndCategory(botInfo: Info): void; - /** - * Add a side-specific (usec/bear) dogtag item to a bots inventory - * @param bot bot to add dogtag to - * @returns Bot with dogtag added - */ - protected addDogtagToBot(bot: IBotBase): void; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/BotInventoryGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotInventoryGenerator.d.ts deleted file mode 100644 index aa9c6cf..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/BotInventoryGenerator.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; -import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; -import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; -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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotInventoryGenerator { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - protected botWeaponGenerator: BotWeaponGenerator; - protected botLootGenerator: BotLootGenerator; - protected botGeneratorHelper: BotGeneratorHelper; - protected botHelper: BotHelper; - protected weightedRandomHelper: WeightedRandomHelper; - protected itemHelper: ItemHelper; - protected localisationService: LocalisationService; - protected botEquipmentModPoolService: BotEquipmentModPoolService; - protected botEquipmentModGenerator: BotEquipmentModGenerator; - protected configServer: ConfigServer; - protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); - /** - * Add equipment/weapons/loot to bot - * @param sessionId Session id - * @param botJsonTemplate Base json db file for the bot having its loot generated - * @param botRole Role bot has (assault/pmcBot) - * @param isPmc Is bot being converted into a pmc - * @param botLevel Level of bot being generated - * @returns PmcInventory object with equipment/weapons/loot - */ - generateInventory(sessionId: string, botJsonTemplate: IBotType, botRole: string, isPmc: boolean, botLevel: number): PmcInventory; - /** - * Create a pmcInventory object with all the base/generic items needed - * @returns PmcInventory object - */ - protected generateInventoryBase(): PmcInventory; - /** - * Add equipment to a bot - * @param templateInventory bot/x.json data from db - * @param wornItemChances Chances items will be added to bot - * @param botRole Role bot has (assault/pmcBot) - * @param botInventory Inventory to add equipment to - * @param botLevel Level of bot - */ - protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number): void; - /** - * Remove non-armored rigs from parameter data - * @param templateInventory - */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; - /** - * Remove armored rigs from parameter data - * @param templateInventory - */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; - /** - * Add a piece of equipment with mods to inventory from the provided pools - * @param settings Values to adjust how item is chosen and added to bot - * @returns true when item added - */ - protected generateEquipment(settings: IGenerateEquipmentProperties): boolean; - /** - * Get all possible mods for item and filter down based on equipment blacklist from bot.json config - * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with - * @returns Filtered pool of mods - */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; - /** - * Work out what weapons bot should have equipped and add them to bot inventory - * @param templateInventory bot/x.json data from db - * @param equipmentChances Chances bot can have equipment equipped - * @param sessionId Session id - * @param botInventory Inventory to add weapons to - * @param botRole assault/pmcBot/bossTagilla etc - * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated - * @param itemGenerationLimitsMinMax Limits for items the bot can have - */ - protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; - /** - * Calculate if the bot should have weapons in Primary/Secondary/Holster slots - * @param equipmentChances Chances bot has certain equipment - * @returns What slots bot should have weapons generated for - */ - protected getDesiredWeaponsForBot(equipmentChances: Chances): { - slot: EquipmentSlots; - shouldSpawn: boolean; - }[]; - /** - * Add weapon + spare mags/ammo to bots inventory - * @param sessionId Session id - * @param weaponSlot Weapon slot being generated - * @param templateInventory bot/x.json data from db - * @param botInventory Inventory to add weapon+mags/ammo to - * @param equipmentChances Chances bot can have equipment equipped - * @param botRole assault/pmcBot/bossTagilla etc - * @param isPmc Is the bot being generated as a pmc - * @param itemGenerationWeights - */ - protected addWeaponAndMagazinesToInventory(sessionId: string, weaponSlot: { - slot: EquipmentSlots; - shouldSpawn: boolean; - }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; -} -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts deleted file mode 100644 index 71fad1f..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotLevelGenerator { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); - /** - * Return a randomised bot level and exp value - * @param levelDetails Min and max of level for bot - * @param botGenerationDetails Details to help generate a bot - * @param bot Bot the level is being generated for - * @returns IRandomisedBotLevelResult object - */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; - /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxlevel Max level allowed - * @returns Lowest level possible for bot - */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/BotLootGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotLootGenerator.d.ts deleted file mode 100644 index 4301cea..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/BotLootGenerator.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -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 { 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"; -import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { IItemSpawnLimitSettings } from "@spt/models/spt/bots/IItemSpawnLimitSettings"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotLootCacheService } from "@spt/services/BotLootCacheService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotLootGenerator { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected randomUtil: RandomUtil; - protected itemHelper: ItemHelper; - protected inventoryHelper: InventoryHelper; - protected databaseServer: DatabaseServer; - protected handbookHelper: HandbookHelper; - protected botGeneratorHelper: BotGeneratorHelper; - protected botWeaponGenerator: BotWeaponGenerator; - protected weightedRandomHelper: WeightedRandomHelper; - protected botHelper: BotHelper; - protected botLootCacheService: BotLootCacheService; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected botConfig: IBotConfig; - protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); - protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; - /** - * Add loot to bots containers - * @param sessionId Session id - * @param botJsonTemplate Base json db file for the bot having its loot generated - * @param isPmc Will bot be a pmc - * @param botRole Role of bot, e.g. asssult - * @param botInventory Inventory to add loot to - * @param botLevel Level of bot - */ - generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; - /** - * Get an array of the containers a bot has on them (pockets/backpack/vest) - * @param botInventory Bot to check - * @returns Array of available slots - */ - protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; - /** - * Force healing items onto bot to ensure they can heal in-raid - * @param botInventory Inventory to add items to - * @param botRole Role of bot (sptBear/sptUsec) - */ - protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; - /** - * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached - * @param pool Pool of items to pick from with weight - * @param equipmentSlots What equipment slot will the loot items be added to - * @param totalItemCount Max count of items to add - * @param inventoryToAddItemsTo Bot inventory loot will be added to - * @param botRole Role of the bot loot is being generated for (assault/pmcbot) - * @param itemSpawnLimits Item spawn limits the bot must adhere to - * @param totalValueLimitRub Total value of loot allowed in roubles - * @param isPmc Is bot being generated for a pmc - */ - protected addLootFromPool(pool: Record, equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, itemSpawnLimits?: IItemSpawnLimitSettings, totalValueLimitRub?: number, isPmc?: boolean, containersIdFull?: Set): void; - protected createWalletLoot(walletId: string): Item[][]; - /** - * Some items need child items to function, add them to the itemToAddChildrenTo array - * @param itemToAddTemplate Db template of item to check - * @param itemToAddChildrenTo Item to add children to - * @param isPmc Is the item being generated for a pmc (affects money/ammo stack sizes) - * @param botRole role bot has that owns item - */ - protected addRequiredChildItemsToParent(itemToAddTemplate: ITemplateItem, itemToAddChildrenTo: Item[], isPmc: boolean, botRole: string): void; - /** - * Add generated weapons to inventory as loot - * @param botInventory inventory to add preset to - * @param equipmentSlot slot to place the preset in (backpack) - * @param templateInventory bots template, assault.json - * @param modChances chances for mods to spawn on weapon - * @param botRole bots role .e.g. pmcBot - * @param isPmc are we generating for a pmc - */ - protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number, containersIdFull?: Set): void; - /** - * Hydrate item limit array to contain items that have a limit for a specific bot type - * All values are set to 0 - * @param botRole Role the bot has - * @param limitCount - */ - protected initItemLimitArray(botRole: string, limitCount: Record): void; - /** - * Check if an item has reached its bot-specific spawn limit - * @param itemTemplate Item we check to see if its reached spawn limit - * @param botRole Bot type - * @param itemSpawnLimits - * @returns true if item has reached spawn limit - */ - protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, itemSpawnLimits: IItemSpawnLimitSettings): boolean; - /** - * Randomise the stack size of a money object, uses different values for pmc or scavs - * @param botRole Role bot has that has money stack - * @param itemTemplate item details from db - * @param moneyItem Money item to randomise - */ - protected randomiseMoneyStackSize(botRole: string, itemTemplate: ITemplateItem, moneyItem: Item): void; - /** - * Randomise the size of an ammo stack - * @param isPmc Is ammo on a PMC bot - * @param itemTemplate item details from db - * @param ammoItem Ammo item to randomise - */ - protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void; - /** - * Get spawn limits for a specific bot type from bot.json config - * If no limit found for a non pmc bot, fall back to defaults - * @param botRole what role does the bot have - * @returns Dictionary of tplIds and limit - */ - protected getItemSpawnLimitsForBotType(botRole: string): Record; - /** - * Get the parentId or tplId of item inside spawnLimits object if it exists - * @param itemTemplate item we want to look for in spawn limits - * @param spawnLimits Limits to check for item - * @returns id as string, otherwise undefined - */ - protected getMatchingIdFromSpawnLimits(itemTemplate: ITemplateItem, spawnLimits: Record): string; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/BotWeaponGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotWeaponGenerator.d.ts deleted file mode 100644 index 42618e1..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/BotWeaponGenerator.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { Inventory 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"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RepairService } from "@spt/services/RepairService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotWeaponGenerator { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected weightedRandomHelper: WeightedRandomHelper; - protected botGeneratorHelper: BotGeneratorHelper; - protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; - protected botWeaponModLimitService: BotWeaponModLimitService; - protected botEquipmentModGenerator: BotEquipmentModGenerator; - protected localisationService: LocalisationService; - protected repairService: RepairService; - protected inventoryMagGenComponents: IInventoryMagGen[]; - protected cloner: ICloner; - protected readonly modMagazineSlotId = "mod_magazine"; - protected botConfig: IBotConfig; - protected pmcConfig: IPmcConfig; - protected repairConfig: IRepairConfig; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); - /** - * Pick a random weapon based on weightings and generate a functional weapon - * @param equipmentSlot Primary/secondary/holster - * @param botTemplateInventory e.g. assault.json - * @param weaponParentId - * @param modChances - * @param botRole role of bot, e.g. assault/followerBully - * @param isPmc Is weapon generated for a pmc - * @returns GenerateWeaponResult object - */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; - /** - * Get a random weighted weapon from a bots pool of weapons - * @param equipmentSlot Primary/secondary/holster - * @param botTemplateInventory e.g. assault.json - * @returns weapon tpl - */ - pickWeightedWeaponTplFromPool(equipmentSlot: string, botTemplateInventory: Inventory): string; - /** - * Generated a weapon based on the supplied weapon tpl - * @param weaponTpl weapon tpl to generate (use pickWeightedWeaponTplFromPool()) - * @param equipmentSlot slot to fit into, primary/secondary/holster - * @param botTemplateInventory e.g. assault.json - * @param weaponParentId ParentId of the weapon being generated - * @param modChances Dictionary of item types and % chance weapon will have that mod - * @param botRole e.g. assault/exusec - * @param isPmc Is weapon being generated for a pmc - * @returns GenerateWeaponResult object - */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; - /** - * Insert a cartridge(s) into a weapon - * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc - * @param weaponWithModsArray Weapon and mods - * @param ammoTpl Cartridge to add to weapon - * @param chamberSlotIds name of slots to create or add ammo to - */ - protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, chamberSlotIds: string[]): void; - /** - * Create array with weapon base as only element and - * add additional properties based on weapon type - * @param weaponTpl Weapon tpl to create item with - * @param weaponParentId Weapons parent id - * @param equipmentSlot e.g. primary/secondary/holster - * @param weaponItemTemplate db template for weapon - * @param botRole for durability values - * @returns Base weapon item in array - */ - protected constructWeaponBaseArray(weaponTpl: string, weaponParentId: string, equipmentSlot: string, weaponItemTemplate: ITemplateItem, botRole: string): Item[]; - /** - * Get the mods necessary to kit out a weapon to its preset level - * @param weaponTpl weapon to find preset for - * @param equipmentSlot the slot the weapon will be placed in - * @param weaponParentId Value used for the parentid - * @returns array of weapon mods - */ - protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; - /** - * Checks if all required slots are occupied on a weapon and all it's mods - * @param weaponItemArray Weapon + mods - * @param botRole role of bot weapon is for - * @returns true if valid - */ - protected isWeaponValid(weaponItemArray: Item[], botRole: string): boolean; - /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * @param generatedWeaponResult object with properties for generated weapon (weapon mods pool / weapon template / ammo tpl) - * @param magWeights Magazine weights for count to add to inventory - * @param inventory Inventory to add magazines to - * @param botRole The bot type we're getting generating extra mags for - */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: GenerationData, inventory: PmcInventory, botRole: string): void; - /** - * Add Grendaes for UBGL to bots vest and secure container - * @param weaponMods Weapon array with mods - * @param generatedWeaponResult result of weapon generation - * @param inventory bot inventory to add grenades to - */ - protected addUbglGrenadesToBotInventory(weaponMods: Item[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; - /** - * Add ammo to the secure container - * @param stackCount How many stacks of ammo to add - * @param ammoTpl Ammo type to add - * @param stackSize Size of the ammo stack to add - * @param inventory Player inventory - */ - protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; - /** - * Get a weapons magazine tpl from a weapon template - * @param weaponMods mods from a weapon template - * @param weaponTemplate Weapon to get magazine tpl for - * @param botRole the bot type we are getting the magazine for - * @returns magazine tpl string - */ - protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem, botRole: string): string; - /** - * Finds and return a compatible ammo tpl based on the bots ammo weightings (x.json/inventory/equipment/ammo) - * @param ammo a list of ammo tpls the weapon can use - * @param weaponTemplate the weapon we want to pick ammo for - * @returns an ammo tpl that works with the desired gun - */ - protected getWeightedCompatibleAmmo(ammo: Record>, weaponTemplate: ITemplateItem): string; - /** - * Get a weapons compatible cartridge caliber - * @param weaponTemplate Weapon to look up caliber of - * @returns caliber as string - */ - protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; - /** - * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods Weapon with children - * @param magazine Magazine item - * @param cartridgeTpl Cartridge to insert into magazine - */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; - /** - * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods Weapon with children - * @param ubglMod UBGL item - * @param ubglAmmoTpl Grenade ammo tpl - */ - protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; - /** - * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponWithMods Weapon items array to amend - * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmoTpl cartridge to put into the magazine - * @param newStackSize how many cartridges should go into the magazine - * @param magazineTemplate magazines db template - */ - protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; - /** - * Fill each Camora with a bullet - * @param weaponMods Weapon mods to find and update camora mod(s) from - * @param magazineId magazine id to find and add to - * @param ammoTpl ammo template id to hydate with - */ - protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/FenceBaseAssortGenerator.d.ts deleted file mode 100644 index b8c9266..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/FenceBaseAssortGenerator.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class FenceBaseAssortGenerator { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected databaseServer: DatabaseServer; - protected handbookHelper: HandbookHelper; - protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; - protected itemFilterService: ItemFilterService; - protected seasonalEventService: SeasonalEventService; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected fenceService: FenceService; - protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, fenceService: FenceService); - /** - * Create base fence assorts dynamically and store in memory - */ - generateFenceBaseAssorts(): void; - /** - * Check ammo in boxes + loose ammos has a penetration value above the configured value in trader.json / ammoMaxPenLimit - * @param rootItemDb Ammo box or ammo item from items.db - * @returns True if penetration value is above limit set in config - */ - protected isAmmoAbovePenetrationLimit(rootItemDb: ITemplateItem): boolean; - /** - * Get the penetration power value of an ammo, works with ammo boxes and raw ammos - * @param rootItemDb Ammo box or ammo item from items.db - * @returns Penetration power of passed in item, null if it doesnt have a power - */ - protected getAmmoPenetrationPower(rootItemDb: ITemplateItem): number; - /** - * Add soft inserts + armor plates to an armor - * @param armor Armor item array to add mods into - * @param itemDbDetails Armor items db template - */ - protected addChildrenToArmorModSlots(armor: Item[], itemDbDetails: ITemplateItem): void; - /** - * Check if item is valid for being added to fence assorts - * @param item Item to check - * @returns true if valid fence item - */ - protected isValidFenceItem(item: ITemplateItem): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/IFilterPlateModsForSlotByLevelResult.d.ts b/TypeScript/22CustomSptCommand/types/generators/IFilterPlateModsForSlotByLevelResult.d.ts deleted file mode 100644 index 7e1dbfd..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/IFilterPlateModsForSlotByLevelResult.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface IFilterPlateModsForSlotByLevelResult { - result: Result; - plateModTpls: string[]; -} -export declare enum Result { - UNKNOWN_FAILURE = -1, - SUCCESS = 1, - NO_DEFAULT_FILTER = 2, - NOT_PLATE_HOLDING_SLOT = 3, - LACKS_PLATE_WEIGHTS = 4 -} diff --git a/TypeScript/22CustomSptCommand/types/generators/LocationGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/LocationGenerator.d.ts deleted file mode 100644 index 7571e14..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/LocationGenerator.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { ContainerHelper } from "@spt/helpers/ContainerHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, 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 { Item } from "@spt/models/eft/common/tables/IItem"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil"; -export interface IContainerItem { - items: Item[]; - width: number; - height: number; -} -export interface IContainerGroupCount { - /** Containers this group has + probabilty to spawn */ - containerIdsWithProbability: Record; - /** How many containers the map should spawn with this group id */ - chosenCount: number; -} -export declare class LocationGenerator { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected objectId: ObjectId; - protected randomUtil: RandomUtil; - protected itemHelper: ItemHelper; - protected mathUtil: MathUtil; - protected seasonalEventService: SeasonalEventService; - protected containerHelper: ContainerHelper; - protected presetHelper: PresetHelper; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); - /** - * Create an array of container objects with randomised loot - * @param locationBase Map base to generate containers for - * @param staticAmmoDist Static ammo distribution - database.loot.staticAmmo - * @returns Array of container objects - */ - generateStaticContainers(locationBase: ILocationBase, staticAmmoDist: Record): SpawnpointTemplate[]; - /** - * Get containers with a non-100% chance to spawn OR are NOT on the container type randomistion blacklist - * @param staticContainers - * @returns IStaticContainerData array - */ - protected getRandomisableContainersOnMap(staticContainers: IStaticContainerData[]): IStaticContainerData[]; - /** - * Get containers with 100% spawn rate or have a type on the randomistion ignore list - * @param staticContainersOnMap - * @returns IStaticContainerData array - */ - protected getGuaranteedContainers(staticContainersOnMap: IStaticContainerData[]): IStaticContainerData[]; - /** - * Choose a number of containers based on their probabilty value to fulfil the desired count in containerData.chosenCount - * @param groupId Name of the group the containers are being collected for - * @param containerData Containers and probability values for a groupId - * @returns List of chosen container Ids - */ - protected getContainersByProbabilty(groupId: string, containerData: IContainerGroupCount): string[]; - /** - * Get a mapping of each groupid and the containers in that group + count of containers to spawn on map - * @param containersGroups Container group values - * @returns dictionary keyed by groupId - */ - protected getGroupIdToContainerMappings(staticContainerGroupData: IStaticContainer | Record, staticContainersOnMap: IStaticContainerData[]): Record; - /** - * Choose loot to put into a static container based on weighting - * Handle forced items + seasonal item removal when not in season - * @param staticContainer The container itself we will add loot to - * @param staticForced Loot we need to force into the container - * @param staticLootDist staticLoot.json - * @param staticAmmoDist staticAmmo.json - * @param locationName Name of the map to generate static loot for - * @returns IStaticContainerProps - */ - protected addLootToContainer(staticContainer: IStaticContainerData, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerData; - /** - * Get a 2d grid of a containers item slots - * @param containerTpl Tpl id of the container - * @returns number[][] - */ - protected getContainerMapping(containerTpl: string): number[][]; - /** - * Look up a containers itemcountDistribution data and choose an item count based on the found weights - * @param containerTypeId Container to get item count for - * @param staticLootDist staticLoot.json - * @param locationName Map name (to get per-map multiplier for from config) - * @returns item count - */ - protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; - /** - * Get all possible loot items that can be placed into a container - * Do not add seasonal items if found + current date is inside seasonal event - * @param containerTypeId Contianer to get possible loot for - * @param staticLootDist staticLoot.json - * @returns ProbabilityObjectArray of item tpls + probabilty - */ - protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; - protected getLooseLootMultiplerForLocation(location: string): number; - protected getStaticLootMultiplerForLocation(location: string): number; - /** - * Create array of loose + forced loot using probability system - * @param dynamicLootDist - * @param staticAmmoDist - * @param locationName Location to generate loot for - * @returns Array of spawn points with loot in them - */ - generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - /** - * Add forced spawn point loot into loot parameter array - * @param lootLocationTemplates array to add forced loot spawn locations to - * @param forcedSpawnPoints forced Forced loot locations that must be added - * @param locationName Name of map currently having force loot created for - */ - protected addForcedLoot(lootLocationTemplates: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - /** - * Create array of item (with child items) and return - * @param chosenComposedKey Key we want to look up items for - * @param spawnPoint Dynamic spawn point item we want will be placed in - * @param staticAmmoDist ammo distributions - * @returns IContainerItem - */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint, staticAmmoDist: Record): IContainerItem; - /** - * Replace the _id value for base item + all children items parentid value - * @param itemWithChildren Item with mods to update - * @param newId new id to add on chidren of base item - */ - protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; - /** - * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon - * @param items Items array to search - * @param chosenTpl Tpl we want to get item with - * @returns Item object - */ - protected getItemInArray(items: Item[], chosenTpl: string): Item; - protected createStaticLootItem(chosenTpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/LootGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/LootGenerator.d.ts deleted file mode 100644 index 79b8183..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/LootGenerator.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootItem } from "@spt/models/spt/services/LootItem"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -type ItemLimit = { - current: number; - max: number; -}; -export declare class LootGenerator { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected databaseServer: DatabaseServer; - protected randomUtil: RandomUtil; - protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; - protected inventoryHelper: InventoryHelper; - protected weightedRandomHelper: WeightedRandomHelper; - protected localisationService: LocalisationService; - protected ragfairLinkedItemService: RagfairLinkedItemService; - protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); - /** - * Generate a list of items based on configuration options parameter - * @param options parameters to adjust how loot is generated - * @returns An array of loot items - */ - createRandomLoot(options: LootRequest): LootItem[]; - /** - * Filter armor items by their front plates protection level - top if its a helmet - * @param armor Armor preset to check - * @param options Loot request options - armor level etc - * @returns True if item has desired armor level - */ - protected armorIsDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; - /** - * Construct item limit record to hold max and current item count for each item type - * @param limits limits as defined in config - * @returns record, key: item tplId, value: current/max item count allowed - */ - protected initItemLimitCounter(limits: Record): Record; - /** - * Find a random item in items.json and add to result array - * @param items items to choose from - * @param itemTypeCounts item limit counts - * @param options item filters - * @param result array to add found item to - * @returns true if item was valid and added to pool - */ - protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: LootItem[]): boolean; - /** - * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values - * @param item item to get stack count of - * @param options loot options - * @returns stack count - */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; - /** - * Find a random item in items.json and add to result array - * @param presetPool Presets to choose from - * @param itemTypeCounts Item limit counts - * @param itemBlacklist Items to skip - * @param result Array to add chosen preset to - * @returns true if preset was valid and added to pool - */ - protected findAndAddRandomPresetToLoot(presetPool: IPreset[], itemTypeCounts: Record, itemBlacklist: string[], result: LootItem[]): boolean; - /** - * Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds) - * @param containerSettings sealed weapon container settings - * @returns Array of item with children arrays - */ - getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): Item[][]; - /** - * Get non-weapon mod rewards for a sealed container - * @param containerSettings Sealed weapon container settings - * @param weaponDetailsDb Details for the weapon to reward player - * @returns Array of item with children arrays - */ - protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): Item[][]; - /** - * Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player - * @param containerSettings Sealed weapon container settings - * @param linkedItemsToWeapon All items that can be attached/inserted into weapon - * @param chosenWeaponPreset The weapon preset given to player as reward - * @returns Array of item with children arrays - */ - protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: IPreset): Item[][]; - /** - * Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards - * @param rewardContainerDetails - * @returns Array of item with children arrays - */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): Item[][]; -} -export {}; diff --git a/TypeScript/22CustomSptCommand/types/generators/PMCLootGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/PMCLootGenerator.d.ts deleted file mode 100644 index 9f6bcdc..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/PMCLootGenerator.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -/** - * Handle the generation of dynamic PMC loot in pockets and backpacks - * and the removal of blacklisted items - */ -export declare class PMCLootGenerator { - protected itemHelper: ItemHelper; - protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected itemFilterService: ItemFilterService; - protected ragfairPriceService: RagfairPriceService; - protected seasonalEventService: SeasonalEventService; - protected weightedRandomHelper: WeightedRandomHelper; - protected pocketLootPool: Record; - protected vestLootPool: Record; - protected backpackLootPool: Record; - protected pmcConfig: IPmcConfig; - protected roubleTpl: string; - constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper); - /** - * Create an array of loot items a PMC can have in their pockets - * @returns string array of tpls - */ - generatePMCPocketLootPool(botRole: string): Record; - /** - * Create an array of loot items a PMC can have in their vests - * @returns string array of tpls - */ - generatePMCVestLootPool(botRole: string): Record; - /** - * Check if item has a width/height that lets it fit into a 2x2 slot - * 1x1 / 1x2 / 2x1 / 2x2 - * @param item Item to check size of - * @returns true if it fits - */ - protected itemFitsInto2By2Slot(item: ITemplateItem): boolean; - /** - * Create an array of loot items a PMC can have in their backpack - * @returns string array of tpls - */ - generatePMCBackpackLootPool(botRole: string): Record; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/PlayerScavGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/PlayerScavGenerator.d.ts deleted file mode 100644 index da874fc..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/PlayerScavGenerator.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { BotGenerator } from "@spt/generators/BotGenerator"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -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, Skills, Stats } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { BotLootCacheService } from "@spt/services/BotLootCacheService"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class PlayerScavGenerator { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - protected hashUtil: HashUtil; - protected itemHelper: ItemHelper; - protected botGeneratorHelper: BotGeneratorHelper; - protected saveServer: SaveServer; - protected profileHelper: ProfileHelper; - protected botHelper: BotHelper; - protected fenceService: FenceService; - protected botLootCacheService: BotLootCacheService; - protected localisationService: LocalisationService; - protected botGenerator: BotGenerator; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); - /** - * Update a player profile to include a new player scav profile - * @param sessionID session id to specify what profile is updated - * @returns profile object - */ - generate(sessionID: string): IPmcData; - /** - * Add items picked from `playerscav.lootItemsToAddChancePercent` - * @param possibleItemsToAdd dict of tpl + % chance to be added - * @param scavData - * @param containersToAddTo Possible slotIds to add loot to - */ - protected addAdditionalLootToPlayerScavContainers(possibleItemsToAdd: Record, scavData: IBotBase, containersToAddTo: string[]): void; - /** - * Get the scav karama level for a profile - * Is also the fence trader rep level - * @param pmcData pmc profile - * @returns karma level - */ - protected getScavKarmaLevel(pmcData: IPmcData): number; - /** - * Get a baseBot template - * If the parameter doesnt match "assault", take parts from the loot type and apply to the return bot template - * @param botTypeForLoot bot type to use for inventory/chances - * @returns IBotType object - */ - protected constructBotBaseTemplate(botTypeForLoot: string): IBotType; - /** - * Adjust equipment/mod/item generation values based on scav karma levels - * @param karmaSettings Values to modify the bot template with - * @param baseBotNode bot template to modify according to karama level settings - */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; - protected getScavSkills(scavProfile: IPmcData): Skills; - protected getDefaultScavSkills(): Skills; - protected getScavStats(scavProfile: IPmcData): Stats; - protected getScavLevel(scavProfile: IPmcData): number; - protected getScavExperience(scavProfile: IPmcData): number; - /** - * Set cooldown till pscav is playable - * take into account scav cooldown bonus - * @param scavData scav profile - * @param pmcData pmc profile - * @returns - */ - protected setScavCooldownTimer(scavData: IPmcData, pmcData: IPmcData): IPmcData; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/RagfairAssortGenerator.d.ts deleted file mode 100644 index 4c6cf1c..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/RagfairAssortGenerator.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class RagfairAssortGenerator { - protected hashUtil: HashUtil; - protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; - protected databaseServer: DatabaseServer; - protected seasonalEventService: SeasonalEventService; - protected configServer: ConfigServer; - protected generatedAssortItems: Item[][]; - protected ragfairConfig: IRagfairConfig; - protected ragfairItemInvalidBaseTypes: string[]; - constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); - /** - * Get an array of arrays that can be sold on the flea - * Each sub array contains item + children (if any) - * @returns array of arrays - */ - getAssortItems(): Item[][]; - /** - * Check internal generatedAssortItems array has objects - * @returns true if array has objects - */ - protected assortsAreGenerated(): boolean; - /** - * Generate an array of arrays (item + children) the flea can sell - * @returns array of arrays (item + children) - */ - protected generateRagfairAssortItems(): Item[][]; - /** - * Get presets from globals to add to flea - * ragfairConfig.dynamic.showDefaultPresetsOnly decides if its all presets or just defaults - * @returns IPreset array - */ - protected getPresetsToAdd(): IPreset[]; - /** - * Create a base assort item and return it with populated values + 999999 stack count + unlimited count = true - * @param tplId tplid to add to item - * @param id id to add to item - * @returns Hydrated Item object - */ - protected createRagfairAssortRootItem(tplId: string, id?: string): Item; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts deleted file mode 100644 index e0dd09f..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts +++ /dev/null @@ -1,214 +0,0 @@ -import { RagfairAssortGenerator } from "@spt/generators/RagfairAssortGenerator"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class RagfairOfferGenerator { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected randomUtil: RandomUtil; - protected timeUtil: TimeUtil; - protected databaseServer: DatabaseServer; - protected ragfairServerHelper: RagfairServerHelper; - protected handbookHelper: HandbookHelper; - protected saveServer: SaveServer; - protected presetHelper: PresetHelper; - protected ragfairAssortGenerator: RagfairAssortGenerator; - protected ragfairOfferService: RagfairOfferService; - protected ragfairPriceService: RagfairPriceService; - protected localisationService: LocalisationService; - protected paymentHelper: PaymentHelper; - protected fenceService: FenceService; - protected itemHelper: ItemHelper; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected ragfairConfig: IRagfairConfig; - protected allowedFleaPriceItemsForBarter: { - tpl: string; - price: number; - }[]; - /** Internal counter to ensure each offer created has a unique value for its intId property */ - protected offerCounter: number; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID Owner of the offer - * @param time Time offer is listed at - * @param items Items in the offer - * @param barterScheme Cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param sellInOnePiece Flags sellInOnePiece to be true - * @returns IRagfairOffer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, sellInOnePiece?: boolean): IRagfairOffer; - /** - * Create an offer object ready to send to ragfairOfferService.addOffer() - * @param userID Owner of the offer - * @param time Time offer is listed at - * @param items Items in the offer - * @param barterScheme Cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param sellInOnePiece Set StackObjectsCount to 1 - * @returns IRagfairOffer - */ - protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, sellInOnePiece?: boolean): IRagfairOffer; - /** - * Calculate the offer price that's listed on the flea listing - * @param offerRequirements barter requirements for offer - * @returns rouble cost of offer - */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; - /** - * Get avatar url from trader table in db - * @param isTrader Is user we're getting avatar for a trader - * @param userId persons id to get avatar of - * @returns url of avatar - */ - protected getAvatarUrl(isTrader: boolean, userId: string): string; - /** - * Convert a count of currency into roubles - * @param currencyCount amount of currency to convert into roubles - * @param currencyType Type of currency (euro/dollar/rouble) - * @returns count of roubles - */ - protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - /** - * Check userId, if its a player, return their pmc _id, otherwise return userId parameter - * @param userId Users Id to check - * @returns Users Id - */ - protected getTraderId(userId: string): string; - /** - * Get a flea trading rating for the passed in user - * @param userId User to get flea rating of - * @returns Flea rating value - */ - protected getRating(userId: string): number; - /** - * Is the offers user rating growing - * @param userID user to check rating of - * @returns true if its growing - */ - protected getRatingGrowing(userID: string): boolean; - /** - * Get number of section until offer should expire - * @param userID Id of the offer owner - * @param time Time the offer is posted - * @returns number of seconds until offer expires - */ - protected getOfferEndTime(userID: string, time: number): number; - /** - * Create multiple offers for items by using a unique list of items we've generated previously - * @param expiredOffers optional, expired offers to regenerate - */ - generateDynamicOffers(expiredOffers?: Item[][]): Promise; - /** - * @param assortItemWithChildren Item with its children to process into offers - * @param isExpiredOffer is an expired offer - * @param config Ragfair dynamic config - */ - protected createOffersFromAssort(assortItemWithChildren: Item[], isExpiredOffer: boolean, config: Dynamic): Promise; - /** - * iterate over an items chidren and look for plates above desired level and remove them - * @param presetWithChildren preset to check for plates - * @param plateSettings Settings - * @returns True if plate removed - */ - protected removeBannedPlatesFromPreset(presetWithChildren: Item[], plateSettings: IArmorPlateBlacklistSettings): boolean; - /** - * Create one flea offer for a specific item - * @param itemWithChildren Item to create offer for - * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details - * @returns Item array - */ - protected createSingleOfferForItem(itemWithChildren: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; - /** - * Generate trader offers on flea using the traders assort data - * @param traderID Trader to generate offers for - */ - generateFleaOffersForTrader(traderID: string): void; - /** - * Get array of an item with its mods + condition properties (e.g durability) - * Apply randomisation adjustments to condition if item base is found in ragfair.json/dynamic/condition - * @param userID id of owner of item - * @param itemWithMods Item and mods, get condition of first item (only first array item is modified) - * @param itemDetails db details of first item - */ - protected randomiseOfferItemUpdProperties(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): void; - /** - * Get the relevant condition id if item tpl matches in ragfair.json/condition - * @param tpl Item to look for matching condition object - * @returns condition id - */ - protected getDynamicConditionIdForTpl(tpl: string): string; - /** - * Alter an items condition based on its item base type - * @param conditionSettingsId also the parentId of item being altered - * @param itemWithMods Item to adjust condition details of - * @param itemDetails db item details of first item in array - */ - protected randomiseItemCondition(conditionSettingsId: string, itemWithMods: Item[], itemDetails: ITemplateItem): void; - /** - * Adjust an items durability/maxDurability value - * @param item item (weapon/armor) to Adjust - * @param itemDbDetails Weapon details from db - * @param maxMultiplier Value to multiply max durability by - * @param currentMultiplier Value to multiply current durability by - */ - protected randomiseWeaponDurability(item: Item, itemDbDetails: ITemplateItem, maxMultiplier: number, currentMultiplier: number): void; - /** - * Randomise the durabiltiy values for an armors plates and soft inserts - * @param armorWithMods Armor item with its child mods - * @param currentMultiplier Chosen multipler to use for current durability value - * @param maxMultiplier Chosen multipler to use for max durability value - */ - protected randomiseArmorDurabilityValues(armorWithMods: Item[], currentMultiplier: number, maxMultiplier: number): void; - /** - * Add missing conditions to an item if needed - * Durabiltiy for repairable items - * HpResource for medical items - * @param item item to add conditions to - */ - protected addMissingConditions(item: Item): void; - /** - * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based - * @param offerItems Items for sale in offer - * @returns Barter scheme - */ - protected createBarterBarterScheme(offerItems: Item[]): IBarterScheme[]; - /** - * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` - * @returns array with tpl/price values - */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; - /** - * Create a random currency-based barter scheme for an array of items - * @param offerWithChildren Items on offer - * @param isPackOffer Is the barter scheme being created for a pack offer - * @param multipler What to multiply the resulting price by - * @returns Barter scheme for offer - */ - protected createCurrencyBarterScheme(offerWithChildren: Item[], isPackOffer: boolean, multipler?: number): IBarterScheme[]; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestGenerator.d.ts deleted file mode 100644 index 2b68eef..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestGenerator.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -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 { IQuestCondition, IQuestConditionCounterCondition } from "@spt/models/eft/common/tables/IQuest"; -import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil"; -export declare class RepeatableQuestGenerator { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected mathUtil: MathUtil; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected localisationService: LocalisationService; - protected objectId: ObjectId; - protected repeatableQuestHelper: RepeatableQuestHelper; - protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); - /** - * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). - * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest - * @param pmcLevel Player's level for requested items and reward generation - * @param pmcTraderInfo Players traper standing/rep levels - * @param questTypePool Possible quest types pool - * @param repeatableConfig Repeatable quest config - * @returns IRepeatableQuest - */ - generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; - /** - * Generate a randomised Elimination quest - * @param pmcLevel Player's level for requested items and reward generation - * @param traderId Trader from which the quest will be provided - * @param questTypePool Pools for quests (used to avoid redundant quests) - * @param repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest - * @returns Object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json) - */ - protected generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; - /** - * Get a number of kills neded to complete elimination quest - * @param targetKey Target type desired e.g. anyPmc/bossBully/Savage - * @param targetsConfig Config - * @param eliminationConfig Config - * @returns Number of AI to kill - */ - protected getEliminationKillCount(targetKey: string, targetsConfig: ProbabilityObjectArray, eliminationConfig: IEliminationConfig): number; - /** - * A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json) - * This is a helper method for GenerateEliminationQuest to create a location condition. - * - * @param {string} location the location on which to fulfill the elimination quest - * @returns {IEliminationCondition} object of "Elimination"-location-subcondition - */ - protected generateEliminationLocation(location: string[]): IQuestConditionCounterCondition; - /** - * Create kill condition for an elimination quest - * @param target Bot type target of elimination quest e.g. "AnyPmc", "Savage" - * @param targetedBodyParts Body parts player must hit - * @param distance Distance from which to kill (currently only >= supported - * @param allowedWeapon What weapon must be used - undefined = any - * @param allowedWeaponCategory What category of weapon must be used - undefined = any - * @returns IEliminationCondition object - */ - protected generateEliminationCondition(target: string, targetedBodyParts: string[], distance: number, allowedWeapon: string, allowedWeaponCategory: string): IQuestConditionCounterCondition; - /** - * Generates a valid Completion quest - * - * @param {integer} pmcLevel player's level for requested items and reward generation - * @param {string} traderId trader from which the quest will be provided - * @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest - * @returns {object} object of quest type format for "Completion" (see assets/database/templates/repeatableQuests.json) - */ - protected generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; - /** - * A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json) - * This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many) - * - * @param {string} itemTpl id of the item to request - * @param {integer} value amount of items of this specific type to request - * @returns {object} object of "Completion"-condition - */ - protected generateCompletionAvailableForFinish(itemTpl: string, value: number): IQuestCondition; - /** - * Generates a valid Exploration quest - * - * @param {integer} pmcLevel player's level for reward generation - * @param {string} traderId trader from which the quest will be provided - * @param {object} questTypePool Pools for quests (used to avoid redundant quests) - * @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest - * @returns {object} object of quest type format for "Exploration" (see assets/database/templates/repeatableQuests.json) - */ - protected generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; - /** - * Filter a maps exits to just those for the desired side - * @param locationKey Map id (e.g. factory4_day) - * @param playerSide Scav/Pmc - * @returns Array of Exit objects - */ - protected getLocationExitsForSide(locationKey: string, playerSide: string): Exit[]; - protected generatePickupQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; - /** - * Convert a location into an quest code can read (e.g. factory4_day into 55f2d3fd4bdc2d5f408b4567) - * @param locationKey e.g factory4_day - * @returns guid - */ - protected getQuestLocationByMapId(locationKey: string): string; - /** - * Exploration repeatable quests can specify a required extraction point. - * This method creates the according object which will be appended to the conditions array - * - * @param {string} exit The exit name to generate the condition for - * @returns {object} Exit condition - */ - protected generateExplorationExitCondition(exit: Exit): IQuestConditionCounterCondition; - /** - * Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json - * The templates include Elimination, Completion and Extraction quest types - * - * @param {string} type Quest type: "Elimination", "Completion" or "Extraction" - * @param {string} traderId Trader from which the quest will be provided - * @param {string} side Scav daily or pmc daily/weekly quest - * @returns {object} Object which contains the base elements for repeatable quests of the requests type - * (needs to be filled with reward and conditions by called to make a valid quest) - */ - protected generateRepeatableTemplate(type: string, traderId: string, side: string): IRepeatableQuest; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestRewardGenerator.d.ts deleted file mode 100644 index ea750dd..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestRewardGenerator.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IQuestReward, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class RepeatableQuestRewardGenerator { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected mathUtil: MathUtil; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; - protected handbookHelper: HandbookHelper; - protected localisationService: LocalisationService; - protected objectId: ObjectId; - protected itemFilterService: ItemFilterService; - protected seasonalEventService: SeasonalEventService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); - /** - * Generate the reward for a mission. A reward can consist of - * - Experience - * - Money - * - Items - * - Trader Reputation - * - * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to - * experience / money / items / trader reputation can be defined in QuestConfig.js - * - * There's also a random variation of the reward the spread of which can be also defined in the config. - * - * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission - */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; - /** - * @param rewardItems List of reward items to filter - * @param roublesBudget The budget remaining for rewards - * @param minPrice The minimum priced item to include - * @returns True if any items remain in `rewardItems`, false otherwise - */ - protected filterRewardPoolWithinBudget(rewardItems: ITemplateItem[], roublesBudget: number, minPrice: number): ITemplateItem[]; - /** - * Get a randomised number a reward items stack size should be based on its handbook price - * @param item Reward item to get stack size for - * @returns Stack size value - */ - protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number; - /** - * Should reward item have stack size increased (25% chance) - * @param item Item to possibly increase stack size of - * @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking - * @returns True if it should - */ - protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean; - protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): number; - /** - * Select a number of items that have a colelctive value of the passed in parameter - * @param repeatableConfig Config - * @param roublesBudget Total value of items to return - * @returns Array of reward items that fit budget - */ - protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; - /** - * Helper to create a reward item structured as required by the client - * - * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give - * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index - * @returns {object} Object of "Reward"-item-type - */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; - /** - * Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable) - * @param repeatableQuestConfig Config file - * @returns List of rewardable items [[_tpl, itemTemplate],...] - */ - getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][]; - /** - * Checks if an id is a valid item. Valid meaning that it's an item that may be a reward - * or content of bot loot. Items that are tested as valid may be in a player backpack or stash. - * @param {string} tpl template id of item to check - * @returns True if item is valid reward - */ - protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean; - protected addMoneyReward(traderId: string, rewards: IQuestRewards, rewardRoubles: number, rewardIndex: number): void; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts deleted file mode 100644 index f22dcfc..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -/** - * Handle the creation of randomised scav case rewards - */ -export declare class ScavCaseRewardGenerator { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected hashUtil: HashUtil; - protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected seasonalEventService: SeasonalEventService; - protected itemFilterService: ItemFilterService; - protected configServer: ConfigServer; - protected scavCaseConfig: IScavCaseConfig; - protected dbItemsCache: ITemplateItem[]; - protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); - /** - * Create an array of rewards that will be given to the player upon completing their scav case build - * @param recipeId recipe of the scav case craft - * @returns Product array - */ - generate(recipeId: string): Item[][]; - /** - * Get all db items that are not blacklisted in scavcase config or global blacklist - * Store in class field - */ - protected cacheDbItems(): void; - /** - * Pick a number of items to be rewards, the count is defined by the values in `itemFilters` param - * @param items item pool to pick rewards from - * @param itemFilters how the rewards should be filtered down (by item count) - * @returns - */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; - /** - * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig - * @returns true if reward should be money - */ - protected rewardShouldBeMoney(): boolean; - /** - * Choose if ammo should be a reward based on the ammoRewardChancePercent config chance in scavCaseConfig - * @returns true if reward should be ammo - */ - protected rewardShouldBeAmmo(): boolean; - /** - * Choose from rouble/dollar/euro at random - */ - protected getRandomMoney(): ITemplateItem; - /** - * Get a random ammo from items.json that is not in the ammo blacklist AND inside the price rage defined in scavcase.json config - * @param rarity The rarity this ammo reward is for - * @returns random ammo item from items.json - */ - protected getRandomAmmo(rarity: string): ITemplateItem; - /** - * Take all the rewards picked create the Product object array ready to return to calling code - * Also add a stack count to ammo and money - * @param rewardItems items to convert - * @returns Product array - */ - protected randomiseContainerItemRewards(rewardItems: ITemplateItem[], rarity: string): Item[][]; - /** - * @param dbItems all items from the items.json - * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) - * @returns filtered dbItems array - */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; - /** - * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values - * @returns ScavCaseRewardCountsAndPrices object - */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; - /** - * Randomises the size of ammo and money stacks - * @param itemToCalculate ammo or money item - * @param rarity rarity (common/rare/superrare) - * @returns value to set stack count to - */ - protected getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem, rarity: string): number; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts deleted file mode 100644 index c9ca02a..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; -import { WindDirection } from "@spt/models/enums/WindDirection"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class WeatherGenerator { - protected weightedRandomHelper: WeightedRandomHelper; - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected timeUtil: TimeUtil; - protected seasonalEventService: SeasonalEventService; - protected applicationContext: ApplicationContext; - protected configServer: ConfigServer; - protected weatherConfig: IWeatherConfig; - private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); - /** - * Get current + raid datetime and format into correct BSG format and return - * @param data Weather data - * @returns IWeatherData - */ - calculateGameTime(data: IWeatherData): IWeatherData; - /** - * Get server uptime seconds multiplied by a multiplier and add to current time as seconds - * Format to BSGs requirements - * @param currentDate current date - * @returns formatted time - */ - protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; - /** - * Get current time formatted to fit BSGs requirement - * @param date date to format into bsg style - * @returns Time formatted in BSG format - */ - protected getBSGFormattedTime(date: Date): string; - /** - * Return randomised Weather data with help of config/weather.json - * @returns Randomised weather data - */ - generateWeather(): IWeather; - /** - * Set IWeather date/time/timestamp values to now - * @param weather Object to update - */ - protected setCurrentDateTime(weather: IWeather): void; - protected getWeightedWindDirection(): WindDirection; - protected getWeightedClouds(): number; - protected getWeightedWindSpeed(): number; - protected getWeightedFog(): number; - protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/weapongen/IInventoryMagGen.d.ts b/TypeScript/22CustomSptCommand/types/generators/weapongen/IInventoryMagGen.d.ts deleted file mode 100644 index 07bef8e..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/weapongen/IInventoryMagGen.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -export interface IInventoryMagGen { - getPriority(): number; - canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean; - process(inventoryMagGen: InventoryMagGen): void; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/weapongen/InventoryMagGen.d.ts b/TypeScript/22CustomSptCommand/types/generators/weapongen/InventoryMagGen.d.ts deleted file mode 100644 index 1db9915..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/weapongen/InventoryMagGen.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Inventory } 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"; -export declare class InventoryMagGen { - private magCounts; - private magazineTemplate; - private weaponTemplate; - private ammoTemplate; - private pmcInventory; - constructor(magCounts: GenerationData, magazineTemplate: ITemplateItem, weaponTemplate: ITemplateItem, ammoTemplate: ITemplateItem, pmcInventory: Inventory); - getMagCount(): GenerationData; - getMagazineTemplate(): ITemplateItem; - getWeaponTemplate(): ITemplateItem; - getAmmoTemplate(): ITemplateItem; - getPmcInventory(): Inventory; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts b/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts deleted file mode 100644 index caa4d13..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BarrelInventoryMagGen implements IInventoryMagGen { - protected randomUtil: RandomUtil; - protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; - constructor(randomUtil: RandomUtil, botWeaponGeneratorHelper: BotWeaponGeneratorHelper); - getPriority(): number; - canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean; - process(inventoryMagGen: InventoryMagGen): void; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts b/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts deleted file mode 100644 index c2b496f..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class ExternalInventoryMagGen implements IInventoryMagGen { - protected logger: ILogger; - protected itemHelper: ItemHelper; - protected localisationService: LocalisationService; - protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; - protected botGeneratorHelper: BotGeneratorHelper; - protected randomUtil: RandomUtil; - constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - getPriority(): number; - canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean; - process(inventoryMagGen: InventoryMagGen): void; - /** - * Get a random compatible external magazine for a weapon, exclude internal magazines from possible pool - * @param weaponTpl Weapon to get mag for - * @returns tpl of magazine - */ - protected getRandomExternalMagazineForInternalMagazineGun(weaponTpl: string, magazineBlacklist: string[]): ITemplateItem; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts b/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts deleted file mode 100644 index 5ae7415..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -export declare class InternalMagazineInventoryMagGen implements IInventoryMagGen { - protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; - constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper); - getPriority(): number; - canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean; - process(inventoryMagGen: InventoryMagGen): void; -} diff --git a/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts b/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts deleted file mode 100644 index 69d0c49..0000000 --- a/TypeScript/22CustomSptCommand/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -export declare class UbglExternalMagGen implements IInventoryMagGen { - protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; - constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper); - getPriority(): number; - canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean; - process(inventoryMagGen: InventoryMagGen): void; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/AssortHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/AssortHelper.d.ts deleted file mode 100644 index 72d1600..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/AssortHelper.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -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, localisationService: LocalisationService, questHelper: QuestHelper); - /** - * Remove assorts from a trader that have not been unlocked yet (via player completing corresponding quest) - * @param pmcProfile Player profile - * @param traderId Traders id the assort belongs to - * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) - * @returns Assort items minus locked quest assorts - */ - stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; - /** - * Get a quest id + the statuses quest can be in to unlock assort - * @param mergedQuestAssorts quest assorts to search for assort id - * @param assortId Assort to look for linked quest id - * @returns quest id + array of quest status the assort should show for - */ - protected getQuestIdAndStatusThatShowAssort(mergedQuestAssorts: Record>, assortId: string): { - questId: string; - status: QuestStatus[]; - }; - /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id - * @param assort traders assorts - * @returns traders assorts minus locked loyalty assorts - */ - stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; - /** - * Remove an item from an assort - * @param assort assort to modify - * @param itemID item id to remove from asort - * @returns Modified assort - */ - removeItemFromAssort(assort: ITraderAssort, itemID: string, flea?: boolean): ITraderAssort; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/BotDifficultyHelper.d.ts deleted file mode 100644 index db6145e..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/BotDifficultyHelper.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotDifficultyHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected randomUtil: RandomUtil; - protected localisationService: LocalisationService; - protected botHelper: BotHelper; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); - getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; - /** - * Get difficulty settings for desired bot type, if not found use assault bot types - * @param type bot type to retrieve difficulty of - * @param difficulty difficulty to get settings for (easy/normal etc) - * @returns Difficulty object - */ - getBotDifficultySettings(type: string, difficulty: string): Difficulty; - /** - * Get difficulty settings for a PMC - * @param type "usec" / "bear" - * @param difficulty what difficulty to retrieve - * @returns Difficulty object - */ - protected getDifficultySettings(type: string, difficulty: string): Difficulty; - /** - * Translate chosen value from pre-raid difficulty dropdown into bot difficulty value - * @param dropDownDifficulty Dropdown difficulty value to convert - * @returns bot difficulty - */ - convertBotDifficultyDropdownToBotDifficulty(dropDownDifficulty: string): string; - /** - * Choose a random difficulty from - easy/normal/hard/impossible - * @returns random difficulty - */ - chooseRandomDifficulty(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/BotGeneratorHelper.d.ts deleted file mode 100644 index bb3526f..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/BotGeneratorHelper.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -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 { Item, Repairable, Upd } from "@spt/models/eft/common/tables/IItem"; -import { Grid, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ItemAddedResult } from "@spt/models/enums/ItemAddedResult"; -import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; -import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotGeneratorHelper { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - protected durabilityLimitsHelper: DurabilityLimitsHelper; - protected itemHelper: ItemHelper; - protected inventoryHelper: InventoryHelper; - protected containerHelper: ContainerHelper; - protected applicationContext: ApplicationContext; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected botConfig: IBotConfig; - protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Adds properties to an item - * e.g. Repairable / HasHinge / Foldable / MaxDurability - * @param itemTemplate Item extra properties are being generated for - * @param botRole Used by weapons to randomize the durability values. Null for non-equipped items - * @returns Item Upd object with extra properties - */ - generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { - upd?: Upd; - }; - /** - * Randomize the HpResource for bots e.g (245/400 resources) - * @param maxResource Max resource value of medical items - * @param randomizationValues Value provided from config - * @returns Randomized value from maxHpResource - */ - protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number; - /** - * Get the chance for the weapon attachment or helmet equipment to be set as activated - * @param botRole role of bot with weapon/helmet - * @param setting the setting of the weapon attachment/helmet equipment to be activated - * @param defaultValue default value for the chance of activation if the botrole or bot equipment role is null - * @returns Percent chance to be active - */ - protected getBotEquipmentSettingFromConfig(botRole: string, setting: keyof EquipmentFilters, defaultValue: number): number; - /** - * Create a repairable object for a weapon that containers durability + max durability properties - * @param itemTemplate weapon object being generated for - * @param botRole type of bot being generated for - * @returns Repairable object - */ - protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; - /** - * Create a repairable object for an armor that containers durability + max durability properties - * @param itemTemplate weapon object being generated for - * @param botRole type of bot being generated for - * @returns Repairable object - */ - protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; - isWeaponModIncompatibleWithCurrentMods(itemsEquipped: Item[], tplToCheck: string, modSlot: string): IChooseRandomCompatibleModResult; - /** - * Can item be added to another item without conflict - * @param itemsEquipped Items to check compatibilities with - * @param tplToCheck Tpl of the item to check for incompatibilities - * @param equipmentSlot Slot the item will be placed into - * @returns false if no incompatibilities, also has incompatibility reason - */ - isItemIncompatibleWithCurrentItems(itemsEquipped: Item[], tplToCheck: string, equipmentSlot: string): IChooseRandomCompatibleModResult; - /** - * Convert a bots role to the equipment role used in config/bot.json - * @param botRole Role to convert - * @returns Equipment role (e.g. pmc / assault / bossTagilla) - */ - getBotEquipmentRole(botRole: string): string; - /** - * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots Slot to add item+children into - * @param rootItemId Root item id to use as mod items parentid - * @param rootItemTplId Root itms tpl id - * @param itemWithChildren Item to add - * @param inventory Inventory to add item+children into - * @returns ItemAddedResult result object - */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], rootItemId: string, rootItemTplId: string, itemWithChildren: Item[], inventory: Inventory, containersIdFull?: Set): ItemAddedResult; - /** - * Is the provided item allowed inside a container - * @param slotGrid Items sub-grid we want to place item inside - * @param itemTpl Item tpl being placed - * @returns True if allowed - */ - protected itemAllowedInContainer(slotGrid: Grid, itemTpl: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/BotHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/BotHelper.d.ts deleted file mode 100644 index 5e03638..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/BotHelper.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Difficulty, IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected randomUtil: RandomUtil; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected botConfig: IBotConfig; - protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Get a template object for the specified botRole from bots.types db - * @param role botRole to get template for - * @returns IBotType object - */ - getBotTemplate(role: string): IBotType; - /** - * Randomize the chance the PMC will attack their own side - * Look up value in bot.json/chanceSameSideIsHostilePercent - * @param difficultySettings pmc difficulty settings - */ - randomizePmcHostility(difficultySettings: Difficulty): void; - /** - * Is the passed in bot role a PMC (usec/bear/pmc) - * @param botRole bot role to check - * @returns true if is pmc - */ - isBotPmc(botRole: string): boolean; - isBotBoss(botRole: string): boolean; - isBotFollower(botRole: string): boolean; - /** - * Add a bot to the FRIENDLY_BOT_TYPES array - * @param difficultySettings bot settings to alter - * @param typeToAdd bot type to add to friendly list - */ - addBotToFriendlyList(difficultySettings: Difficulty, typeToAdd: string): void; - /** - * Add a bot to the ENEMY_BOT_TYPES array, do not add itself if its on the enemy list - * @param difficultySettings bot settings to alter - * @param typesToAdd bot type to add to enemy list - */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; - /** - * Add a bot to the REVENGE_BOT_TYPES array - * @param difficultySettings bot settings to alter - * @param typesToAdd bot type to add to revenge list - */ - addBotToRevengeList(difficultySettings: Difficulty, typesToAdd: string[]): void; - /** - * Choose if a bot should become a PMC by checking if bot type is allowed to become a Pmc in botConfig.convertFromChances and doing a random int check - * @param botRole the bot role to check if should be a pmc - * @returns true if should be a pmc - */ - shouldBotBePmc(botRole: string): boolean; - rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; - botRoleIsPmc(botRole: string): boolean; - /** - * Get randomization settings for bot from config/bot.json - * @param botLevel level of bot - * @param botEquipConfig bot equipment json - * @returns RandomisationDetails - */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails; - /** - * Choose between sptBear and sptUsec at random based on the % defined in pmcConfig.isUsec - * @returns pmc role - */ - getRandomizedPmcRole(): string; - /** - * Get the corresponding side when sptBear or sptUsec is passed in - * @param botRole role to get side for - * @returns side (usec/bear) - */ - getPmcSideByRole(botRole: string): string; - /** - * Get a randomized PMC side based on bot config value 'isUsec' - * @returns pmc side as string - */ - protected getRandomizedPmcSide(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/BotWeaponGeneratorHelper.d.ts deleted file mode 100644 index 5ab4e59..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/BotWeaponGeneratorHelper.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -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 { 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"; -import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotWeaponGeneratorHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected randomUtil: RandomUtil; - protected hashUtil: HashUtil; - protected weightedRandomHelper: WeightedRandomHelper; - protected botGeneratorHelper: BotGeneratorHelper; - protected localisationService: LocalisationService; - constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, localisationService: LocalisationService); - /** - * Get a randomized number of bullets for a specific magazine - * @param magCounts Weights of magazines - * @param magTemplate magazine to generate bullet count for - * @returns bullet count number - */ - getRandomizedBulletCount(magCounts: GenerationData, magTemplate: ITemplateItem): number; - /** - * Get a randomized count of magazines - * @param magCounts min and max value returned value can be between - * @returns numerical value of magazine count - */ - getRandomizedMagazineCount(magCounts: GenerationData): number; - /** - * Is this magazine cylinder related (revolvers and grenade launchers) - * @param magazineParentName the name of the magazines parent - * @returns true if it is cylinder related - */ - magazineIsCylinderRelated(magazineParentName: string): boolean; - /** - * Create a magazine using the parameters given - * @param magazineTpl Tpl of the magazine to create - * @param ammoTpl Ammo to add to magazine - * @param magTemplate template object of magazine - * @returns Item array - */ - createMagazineWithAmmo(magazineTpl: string, ammoTpl: string, magTemplate: ITemplateItem): Item[]; - /** - * Add a specific number of cartridges to a bots inventory (defaults to vest and pockets) - * @param ammoTpl Ammo tpl to add to vest/pockets - * @param cartridgeCount number of cartridges to add to vest/pockets - * @param inventory bot inventory to add cartridges to - * @param equipmentSlotsToAddTo what equipment slots should bullets be added into - */ - addAmmoIntoEquipmentSlots(ammoTpl: string, cartridgeCount: number, inventory: Inventory, equipmentSlotsToAddTo?: EquipmentSlots[]): void; - /** - * Get a weapons default magazine template id - * @param weaponTemplate weapon to get default magazine for - * @returns tpl of magazine - */ - getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/ContainerHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/ContainerHelper.d.ts deleted file mode 100644 index 37aef05..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/ContainerHelper.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export declare class FindSlotResult { - success: boolean; - x: any; - y: any; - rotation: boolean; - constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); -} -export declare class ContainerHelper { - /** - * Finds a slot for an item in a given 2D container map - * @param container2D Array of container with slots filled/free - * @param itemWidth Width of item - * @param itemHeight Height of item - * @returns Location to place item in container - */ - findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - /** - * Find a slot inside a container an item can be placed in - * @param container2D Container to find space in - * @param containerX Container x size - * @param containerY Container y size - * @param x ??? - * @param y ??? - * @param itemW Items width - * @param itemH Items height - * @returns True - slot found - */ - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; - /** - * Find a free slot for an item to be placed at - * @param container2D Container to place item in - * @param x Container x size - * @param y Container y size - * @param itemW Items width - * @param itemH Items height - * @param rotate is item rotated - */ - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): void; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts deleted file mode 100644 index 9817c5b..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { IChatCommand, ICommandoCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { MailSendService } from "@spt/services/MailSendService"; -export declare abstract class AbstractDialogueChatBot implements IDialogueChatBot { - protected logger: ILogger; - protected mailSendService: MailSendService; - protected chatCommands: IChatCommand[] | ICommandoCommand[]; - constructor(logger: ILogger, mailSendService: MailSendService, chatCommands: IChatCommand[] | ICommandoCommand[]); - /** - * @deprecated As of v3.7.6. Use registerChatCommand. - */ - registerCommandoCommand(chatCommand: IChatCommand | ICommandoCommand): void; - registerChatCommand(chatCommand: IChatCommand | ICommandoCommand): void; - abstract getChatBot(): IUserDialogInfo; - protected abstract getUnrecognizedCommandMessage(): string; - handleMessage(sessionId: string, request: ISendMessageRequest): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/IChatCommand.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/IChatCommand.d.ts deleted file mode 100644 index 754fd08..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/IChatCommand.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -/** - * @deprecated As of v3.7.6. Use IChatCommand. Will be removed in v3.9.0. - */ -export type ICommandoCommand = IChatCommand; -export interface IChatCommand { - getCommandPrefix(): string; - getCommandHelp(command: string): string; - getCommands(): Set; - handle(command: string, commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts deleted file mode 100644 index bcd2bee..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -export declare class SptCommandoCommands implements IChatCommand { - protected configServer: ConfigServer; - protected sptCommands: ISptCommand[]; - constructor(configServer: ConfigServer, sptCommands: ISptCommand[]); - registerSptCommandoCommand(command: ISptCommand): void; - getCommandHelp(command: string): string; - getCommandPrefix(): string; - getCommands(): Set; - handle(command: string, commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts deleted file mode 100644 index a7491b5..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { SavedCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class GiveSptCommand implements ISptCommand { - protected logger: ILogger; - protected itemHelper: ItemHelper; - protected hashUtil: HashUtil; - protected presetHelper: PresetHelper; - protected mailSendService: MailSendService; - protected localeService: LocaleService; - protected databaseServer: DatabaseServer; - protected itemFilterService: ItemFilterService; - protected cloner: ICloner; - /** - * Regex to account for all these cases: - * spt give "item name" 5 - * spt give templateId 5 - * spt give en "item name in english" 5 - * spt give es "nombre en español" 5 - * spt give 5 <== this is the reply when the algo isn't sure about an item - */ - private static commandRegex; - private static acceptableConfidence; - private static excludedPresetItems; - protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); - getCommand(): string; - getCommandHelp(): string; - performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; - /** - * A "simple" function that checks if an item is supposed to be given to a player or not - * @param templateItem the template item to check - * @returns true if its obtainable, false if its not - */ - protected isItemAllowed(templateItem: ITemplateItem): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts deleted file mode 100644 index 3c55b8e..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -export interface ISptCommand { - getCommand(): string; - getCommandHelp(): string; - performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts deleted file mode 100644 index 7d3547a..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { SavedCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class ProfileSptCommand implements ISptCommand { - protected logger: ILogger; - protected itemHelper: ItemHelper; - protected hashUtil: HashUtil; - protected presetHelper: PresetHelper; - protected mailSendService: MailSendService; - protected localeService: LocaleService; - protected databaseServer: DatabaseServer; - protected profileHelper: ProfileHelper; - /** - * Regex to account for all these cases: - * spt profile level 20 - * spt profile skill metabolism 10 - */ - private static commandRegex; - protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); - getCommand(): string; - getCommandHelp(): string; - performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; - protected handleSkillCommand(skill: string, level: number): IProfileChangeEvent; - protected handleLevelCommand(level: number): IProfileChangeEvent; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts deleted file mode 100644 index 3cfc7bd..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { SavedCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class TraderSptCommand implements ISptCommand { - protected logger: ILogger; - protected itemHelper: ItemHelper; - protected hashUtil: HashUtil; - protected presetHelper: PresetHelper; - protected mailSendService: MailSendService; - protected localeService: LocaleService; - protected databaseServer: DatabaseServer; - /** - * Regex to account for all these cases: - * spt trader prapor rep 100 - * spt trader mechanic spend 1000000 - */ - private static commandRegex; - protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); - getCommand(): string; - getCommandHelp(): string; - performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts deleted file mode 100644 index a87bec1..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { AbstractDialogueChatBot } from "@spt/helpers/Dialogue/AbstractDialogueChatBot"; -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { MailSendService } from "@spt/services/MailSendService"; -export declare class CommandoDialogueChatBot extends AbstractDialogueChatBot { - constructor(logger: ILogger, mailSendService: MailSendService, chatCommands: IChatCommand[]); - getChatBot(): IUserDialogInfo; - protected getUnrecognizedCommandMessage(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/IDialogueChatBot.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/IDialogueChatBot.d.ts deleted file mode 100644 index 0c72041..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/IDialogueChatBot.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -export interface IDialogueChatBot { - getChatBot(): IUserDialogInfo; - handleMessage(sessionId: string, request: ISendMessageRequest): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts deleted file mode 100644 index 8d3aa97..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { GiftService } from "@spt/services/GiftService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class SptDialogueChatBot implements IDialogueChatBot { - protected profileHelper: ProfileHelper; - protected randomUtil: RandomUtil; - protected mailSendService: MailSendService; - protected giftService: GiftService; - protected configServer: ConfigServer; - protected coreConfig: ICoreConfig; - protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); - getChatBot(): IUserDialogInfo; - /** - * Send responses back to player when they communicate with SPT friend on friends list - * @param sessionId Session Id - * @param request send message request - */ - handleMessage(sessionId: string, request: ISendMessageRequest): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/DialogueHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/DialogueHelper.d.ts deleted file mode 100644 index febe696..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/DialogueHelper.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; -import { NotifierHelper } from "@spt/helpers/NotifierHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class DialogueHelper { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected saveServer: SaveServer; - protected databaseServer: DatabaseServer; - protected notifierHelper: NotifierHelper; - protected notificationSendHelper: NotificationSendHelper; - protected localisationService: LocalisationService; - protected itemHelper: ItemHelper; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); - /** - * Get the preview contents of the last message in a dialogue. - * @param dialogue - * @returns MessagePreview - */ - getMessagePreview(dialogue: Dialogue): MessagePreview; - /** - * Get the item contents for a particular message. - * @param messageID - * @param sessionID - * @param itemId Item being moved to inventory - * @returns - */ - getMessageItemContents(messageID: string, sessionID: string, itemId: string): Item[]; - /** - * Get the dialogs dictionary for a profile, create if doesnt exist - * @param sessionId Session/player id - * @returns Dialog dictionary - */ - getDialogsForProfile(sessionId: string): Record; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/DurabilityLimitsHelper.d.ts deleted file mode 100644 index 4cbac6b..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/DurabilityLimitsHelper.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class DurabilityLimitsHelper { - protected randomUtil: RandomUtil; - protected botHelper: BotHelper; - protected configServer: ConfigServer; - protected botConfig: IBotConfig; - constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); - /** - * Get max durability for a weapon based on bot role - * @param itemTemplate UNUSED - Item to get durability for - * @param botRole Role of bot to get max durability for - * @returns Max durability of weapon - */ - getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; - /** - * Get max durability value for armor based on bot role - * @param itemTemplate Item to get max durability for - * @param botRole Role of bot to get max durability for - * @returns max durability - */ - getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; - /** - * Get randomised current weapon durability by bot role - * @param itemTemplate Unused - Item to get current durability of - * @param botRole Role of bot to get current durability for - * @param maxDurability Max durability of weapon - * @returns Current weapon durability - */ - getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - /** - * Get randomised current armor durability by bot role - * @param itemTemplate Unused - Item to get current durability of - * @param botRole Role of bot to get current durability for - * @param maxDurability Max durability of armor - * @returns Current armor durability - */ - getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - protected generateMaxWeaponDurability(botRole: string): number; - protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; - protected getLowestMaxWeaponFromConfig(botRole: string): number; - protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; - protected generateWeaponDurability(botRole: string, maxDurability: number): number; - protected generateArmorDurability(botRole: string, maxDurability: number): number; - protected getMinWeaponDeltaFromConfig(botRole: string): number; - protected getMaxWeaponDeltaFromConfig(botRole: string): number; - protected getMinArmorDeltaFromConfig(botRole: string): number; - protected getMaxArmorDeltaFromConfig(botRole: string): number; - protected getMinArmorLimitPercentFromConfig(botRole: string): number; - protected getMinWeaponLimitPercentFromConfig(botRole: string): number; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/GameEventHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/GameEventHelper.d.ts deleted file mode 100644 index b15a15d..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/GameEventHelper.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -export declare class GameEventHelper { - protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected seasonalEventConfig: ISeasonalEventConfig; - constructor(databaseServer: DatabaseServer, configServer: ConfigServer); -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/HandbookHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/HandbookHelper.d.ts deleted file mode 100644 index 6836875..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/HandbookHelper.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Category } from "@spt/models/eft/common/tables/IHandbookBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IItemConfig } from "@spt/models/spt/config/IItemConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -declare class LookupItem { - readonly byId: Map; - readonly byParent: Map; - constructor(); -} -export declare class LookupCollection { - readonly items: LookupItem; - readonly categories: LookupItem; - constructor(); -} -export declare class HandbookHelper { - protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected itemConfig: IItemConfig; - protected lookupCacheGenerated: boolean; - protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); - /** - * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class - */ - hydrateLookup(): void; - /** - * Get price from internal cache, if cache empty look up price directly in handbook (expensive) - * If no values found, return 0 - * @param tpl item tpl to look up price for - * @returns price in roubles - */ - getTemplatePrice(tpl: string): number; - getTemplatePriceForItems(items: Item[]): number; - /** - * Get all items in template with the given parent category - * @param parentId - * @returns string array - */ - templatesWithParent(parentId: string): string[]; - /** - * Does category exist in handbook cache - * @param category - * @returns true if exists in cache - */ - isCategory(category: string): boolean; - /** - * Get all items associated with a categories parent - * @param categoryParent - * @returns string array - */ - childrenCategories(categoryParent: string): string[]; - /** - * Convert non-roubles into roubles - * @param nonRoubleCurrencyCount Currency count to convert - * @param currencyTypeFrom What current currency is - * @returns Count in roubles - */ - inRUB(nonRoubleCurrencyCount: number, currencyTypeFrom: string): number; - /** - * Convert roubles into another currency - * @param roubleCurrencyCount roubles to convert - * @param currencyTypeTo Currency to convert roubles into - * @returns currency count in desired type - */ - fromRUB(roubleCurrencyCount: number, currencyTypeTo: string): number; - getCategoryById(handbookId: string): Category; -} -export {}; diff --git a/TypeScript/22CustomSptCommand/types/helpers/HealthHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/HealthHelper.d.ts deleted file mode 100644 index 7fb646c..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/HealthHelper.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class HealthHelper { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected saveServer: SaveServer; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected healthConfig: IHealthConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); - /** - * Resets the profiles vitality/health and vitality/effects properties to their defaults - * @param sessionID Session Id - * @returns updated profile - */ - resetVitality(sessionID: string): ISptProfile; - /** - * Update player profile with changes from request object - * @param pmcData Player profile - * @param request Heal request - * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; - /** - * Adjust hydration/energy/temperate and body part hp values in player profile to values in profile.vitality - * @param pmcData Profile to update - * @param sessionId Session id - */ - protected saveHealth(pmcData: IPmcData, sessionID: string): void; - /** - * Save effects to profile - * Works by removing all effects and adding them back from profile - * Removes empty 'Effects' objects if found - * @param pmcData Player profile - * @param sessionId Session id - * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile - * @param addEffects Should effects be added back to profile - */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; - /** - * Add effect to body part in profile - * @param pmcData Player profile - * @param effectBodyPart body part to edit - * @param effectType Effect to add to body part - * @param duration How long the effect has left in seconds (-1 by default, no duration). - */ - protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string, duration?: number): void; - protected isEmpty(map: Record): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/HideoutHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/HideoutHelper.d.ts deleted file mode 100644 index 33a9729..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/HideoutHelper.d.ts +++ /dev/null @@ -1,292 +0,0 @@ -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 { Item, Upd } from "@spt/models/eft/common/tables/IItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class HideoutHelper { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected databaseServer: DatabaseServer; - protected eventOutputHolder: EventOutputHolder; - protected httpResponse: HttpResponseUtil; - protected profileHelper: ProfileHelper; - protected inventoryHelper: InventoryHelper; - protected playerService: PlayerService; - protected localisationService: LocalisationService; - protected itemHelper: ItemHelper; - protected configServer: ConfigServer; - protected cloner: ICloner; - static bitcoinFarm: string; - static bitcoinProductionId: string; - static waterCollector: string; - static bitcoinTpl: string; - static expeditionaryFuelTank: string; - static maxSkillPoint: number; - protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); - /** - * Add production to profiles' Hideout.Production array - * @param pmcData Profile to add production to - * @param body Production request - * @param sessionID Session id - * @returns client response - */ - registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; - /** - * This convenience function initializes new Production Object - * with all the constants. - */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): Production; - /** - * Is the provided object a Production type - * @param productive - * @returns - */ - isProductionType(productive: Productive): productive is Production; - /** - * Apply bonus to player profile given after completing hideout upgrades - * @param pmcData Profile to add bonus to - * @param bonus Bonus to add to profile - */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - /** - * Process a players hideout, update areas that use resources + increment production timers - * @param sessionID Session id - */ - updatePlayerHideout(sessionID: string): void; - /** - * Get various properties that will be passed to hideout update-related functions - * @param pmcData Player profile - * @returns Properties - */ - protected getHideoutProperties(pmcData: IPmcData): { - btcFarmCGs: number; - isGeneratorOn: boolean; - waterCollectorHasFilter: boolean; - }; - protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; - /** - * Iterate over productions and update their progress timers - * @param pmcData Profile to check for productions and update - * @param hideoutProperties Hideout properties - */ - protected updateProductionTimers(pmcData: IPmcData, hideoutProperties: { - btcFarmCGs: number; - isGeneratorOn: boolean; - waterCollectorHasFilter: boolean; - }): void; - /** - * Update progress timer for water collector - * @param pmcData profile to update - * @param productionId id of water collection production to update - * @param hideoutProperties Hideout properties - */ - protected updateWaterCollectorProductionTimer(pmcData: IPmcData, productionId: string, hideoutProperties: { - btcFarmCGs?: number; - isGeneratorOn: boolean; - waterCollectorHasFilter: boolean; - }): void; - /** - * Update a productions progress value based on the amount of time that has passed - * @param pmcData Player profile - * @param prodId Production id being crafted - * @param recipe Recipe data being crafted - * @param hideoutProperties - */ - protected updateProductionProgress(pmcData: IPmcData, prodId: string, recipe: IHideoutProduction, hideoutProperties: { - btcFarmCGs?: number; - isGeneratorOn: boolean; - waterCollectorHasFilter?: boolean; - }): void; - /** - * Check if a productions progress value matches its corresponding recipes production time value - * @param pmcData Player profile - * @param prodId Production id - * @param recipe Recipe being crafted - * @returns progress matches productionTime from recipe - */ - protected doesProgressMatchProductionTime(pmcData: IPmcData, prodId: string): boolean; - /** - * Update progress timer for scav case - * @param pmcData Profile to update - * @param productionId Id of scav case production to update - */ - protected updateScavCaseProductionTimer(pmcData: IPmcData, productionId: string): void; - /** - * Iterate over hideout areas that use resources (fuel/filters etc) and update associated values - * @param sessionID Session id - * @param pmcData Profile to update areas of - * @param hideoutProperties hideout properties - */ - protected updateAreasWithResources(sessionID: string, pmcData: IPmcData, hideoutProperties: { - btcFarmCGs: number; - isGeneratorOn: boolean; - waterCollectorHasFilter: boolean; - }): void; - /** - * Decrease fuel from generator slots based on amount of time since last time this occured - * @param generatorArea Hideout area - * @param pmcData Player profile - * @param isGeneratorOn Is the generator turned on since last update - */ - protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void; - protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, hideoutProperties: { - btcFarmCGs: number; - isGeneratorOn: boolean; - waterCollectorHasFilter: boolean; - }): void; - /** - * Get craft time and make adjustments to account for dev profile + crafting skill level - * @param pmcData Player profile making craft - * @param recipeId Recipe being crafted - * @param applyHideoutManagementBonus should the hideout mgmt bonus be appled to the calculation - * @returns Items craft time with bonuses subtracted - */ - getAdjustedCraftTimeWithSkills(pmcData: IPmcData, recipeId: string, applyHideoutManagementBonus?: boolean): number; - /** - * Adjust water filter objects resourceValue or delete when they reach 0 resource - * @param waterFilterArea water filter area to update - * @param production production object - * @param isGeneratorOn is generator enabled - * @param pmcData Player profile - */ - protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): void; - /** - * Get an adjusted water filter drain rate based on time elapsed since last run, - * handle edge case when craft time has gone on longer than total production time - * @param secondsSinceServerTick Time passed - * @param totalProductionTime Total time collecting water - * @param productionProgress how far water collector has progressed - * @param baseFilterDrainRate Base drain rate - * @returns drain rate (adjusted) - */ - protected getTimeAdjustedWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number; - /** - * Get the water filter drain rate based on hideout bonues player has - * @param pmcData Player profile - * @returns Drain rate - */ - protected getWaterFilterDrainRate(pmcData: IPmcData): number; - /** - * Get the production time in seconds for the desired production - * @param prodId Id, e.g. Water collector id - * @returns seconds to produce item - */ - protected getTotalProductionTimeSeconds(prodId: string): number; - /** - * Create a upd object using passed in parameters - * @param stackCount - * @param resourceValue - * @param resourceUnitsConsumed - * @returns Upd - */ - protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number, isFoundInRaid: boolean): Upd; - protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void; - protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; - /** - * Add bitcoin object to btc production products array and set progress time - * @param btcProd Bitcoin production object - * @param coinCraftTimeSeconds Time to craft a bitcoin - */ - protected addBtcToProduction(btcProd: Production, coinCraftTimeSeconds: number): void; - /** - * Get number of ticks that have passed since hideout areas were last processed, reduced when generator is off - * @param pmcData Player profile - * @param isGeneratorOn Is the generator on for the duration of elapsed time - * @param recipe Hideout production recipe being crafted we need the ticks for - * @returns Amount of time elapsed in seconds - */ - protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean, recipe?: IHideoutProduction): number; - /** - * Get a count of how many possible BTC can be gathered by the profile - * @param pmcData Profile to look up - * @returns Coin slot count - */ - protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of how many additional bitcoins player hideout can hold with elite skill - */ - protected getEliteSkillAdditionalBitcoinSlotCount(): number; - /** - * HideoutManagement skill gives a consumption bonus the higher the level - * 0.5% per level per 1-51, (25.5% at max) - * @param pmcData Profile to get hideout consumption level level from - * @returns consumption bonus - */ - protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get a multipler based on players skill level and value per level - * @param pmcData Player profile - * @param skill Player skill from profile - * @param valuePerLevel Value from globals.config.SkillsSettings - `PerLevel` - * @returns Multipler from 0 to 1 - */ - protected getSkillBonusMultipliedBySkillLevel(pmcData: IPmcData, skill: SkillTypes, valuePerLevel: number): number; - /** - * @param pmcData Player profile - * @param productionTime Time to complete hideout craft in seconds - * @param skill Skill bonus to get reduction from - * @param amountPerLevel Skill bonus amount to apply - * @returns Seconds to reduce craft time by - */ - getSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number, skill: SkillTypes, amountPerLevel: number): number; - isProduction(productive: Productive): productive is Production; - /** - * Gather crafted BTC from hideout area and add to inventory - * Reset production start timestamp if hideout area at full coin capacity - * @param pmcData Player profile - * @param request Take production request - * @param sessionId Session id - * @param output Output object to update - */ - getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string, output: IItemEventRouterResponse): void; - /** - * Upgrade hideout wall from starting level to interactable level if necessary stations have been upgraded - * @param pmcProfile Profile to upgrade wall in - */ - unlockHideoutWallInProfile(pmcProfile: IPmcData): void; - /** - * Hideout improvement is flagged as complete - * @param improvement hideout improvement object - * @returns true if complete - */ - protected hideoutImprovementIsComplete(improvement: IHideoutImprovement): boolean; - /** - * Iterate over hideout improvements not completed and check if they need to be adjusted - * @param pmcProfile Profile to adjust - */ - setHideoutImprovementsToCompleted(pmcProfile: IPmcData): void; - /** - * Add/remove bonus combat skill based on number of dogtags in place of fame hideout area - * @param pmcData Player profile - */ - applyPlaceOfFameDogtagBonus(pmcData: IPmcData): void; - /** - * Calculate the raw dogtag combat skill bonus for place of fame based on number of dogtags - * Reverse engineered from client code - * @param pmcData Player profile - * @param activeDogtags Active dogtags in place of fame dogtag slots - * @returns combat bonus - */ - protected getDogtagCombatSkillBonusPercent(pmcData: IPmcData, activeDogtags: Item[]): number; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/HttpServerHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/HttpServerHelper.d.ts deleted file mode 100644 index 9d5e6df..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/HttpServerHelper.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -export declare class HttpServerHelper { - protected configServer: ConfigServer; - protected httpConfig: IHttpConfig; - protected mime: { - css: string; - bin: string; - html: string; - jpg: string; - js: string; - json: string; - png: string; - svg: string; - txt: string; - }; - constructor(configServer: ConfigServer); - getMimeText(key: string): string; - /** - * Combine ip and port into address - * @returns url - */ - buildUrl(): string; - /** - * Prepend http to the url:port - * @returns URI - */ - getBackendUrl(): string; - /** Get websocket url + port */ - getWebsocketUrl(): string; - sendTextJson(resp: any, output: any): void; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts deleted file mode 100644 index 45cb9c1..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig"; -import { ILostOnDeathConfig } from "@spt/models/spt/config/ILostOnDeathConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; -export declare class InRaidHelper { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected saveServer: SaveServer; - protected itemHelper: ItemHelper; - protected databaseServer: DatabaseServer; - protected inventoryHelper: InventoryHelper; - protected profileHelper: ProfileHelper; - protected questHelper: QuestHelper; - protected paymentHelper: PaymentHelper; - protected localisationService: LocalisationService; - protected profileFixerService: ProfileFixerService; - protected configServer: ConfigServer; - protected randomUtil: RandomUtil; - protected cloner: ICloner; - protected lostOnDeathConfig: ILostOnDeathConfig; - protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); - /** - * Lookup quest item loss from lostOnDeath config - * @returns True if items should be removed from inventory - */ - removeQuestItemsOnDeath(): boolean; - /** - * Check items array and add an upd object to money with a stack count of 1 - * Single stack money items have no upd object and thus no StackObjectsCount, causing issues - * @param items Items array to check - */ - addUpdToMoneyFromRaid(items: Item[]): void; - /** - * Reset a profile to a baseline, used post-raid - * Reset points earned during session property - * Increment exp - * @param profileData Profile to update - * @param saveProgressRequest post raid save data request data - * @param sessionID Session id - * @returns Reset profile object - */ - updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): void; - /** - * Reset the skill points earned in a raid to 0, ready for next raid - * @param profile Profile to update - */ - protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; - /** Check counters are correct in profile */ - protected validateTaskConditionCounters(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; - /** - * Update various serverPMC profile values; quests/limb hp/trader standing with values post-raic - * @param pmcData Server PMC profile - * @param saveProgressRequest Post-raid request data - * @param sessionId Session id - */ - updatePmcProfileDataPostRaid(pmcData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionId: string): void; - /** - * Update scav quest values on server profile with updated values post-raid - * @param scavData Server scav profile - * @param saveProgressRequest Post-raid request data - * @param sessionId Session id - */ - updateScavProfileDataPostRaid(scavData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionId: string): void; - /** - * Look for quests with a status different from what it began the raid with - * @param sessionId Player id - * @param pmcData Player profile - * @param preRaidQuests Quests prior to starting raid - * @param postRaidProfile Profile sent by client with post-raid quests - */ - protected processAlteredQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: IQuestStatus[], postRaidProfile: IPostRaidPmcData): void; - /** - * Take body part effects from client profile and apply to server profile - * @param saveProgressRequest post-raid request - * @param profileData player profile on server - */ - protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; - /** - * Adjust server trader settings if they differ from data sent by client - * @param tradersServerProfile Server - * @param tradersClientProfile Client - */ - protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Transfer client achievements into profile - * @param profile Player pmc profile - * @param clientAchievements Achievements from client - */ - protected updateProfileAchievements(profile: IPmcData, clientAchievements: Record): void; - /** - * Set the SPT inraid location Profile property to 'none' - * @param sessionID Session id - */ - protected setPlayerInRaidLocationStatusToNone(sessionID: string): void; - /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed - */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPostRaidPmcData): IPostRaidPmcData; - /** - * Update a players inventory post-raid - * Remove equipped items from pre-raid - * Add new items found in raid to profile - * Store insurance items in profile - * @param sessionID Session id - * @param serverProfile Profile to update - * @param postRaidProfile Profile returned by client after a raid - */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData): void; - /** - * Clear PMC inventory of all items except those that are exempt - * Used post-raid to remove items after death - * @param pmcData Player profile - * @param sessionId Session id - */ - deleteInventory(pmcData: IPmcData, sessionId: string): void; - /** - * Get an array of items from a profile that will be lost on death - * @param pmcProfile Profile to get items from - * @returns Array of items lost on death - */ - protected getInventoryItemsLostOnDeath(pmcProfile: IPmcData): Item[]; - /** - * Get items in vest/pocket/backpack inventory containers (excluding children) - * @param pmcData Player profile - * @returns Item array - */ - protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; - /** - * Does the provided items slotId mean its kept on the player after death - * @pmcData Player profile - * @itemToCheck Item to check should be kept - * @returns true if item is kept after death - */ - protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; - /** - * Return the equipped items from a players inventory - * @param items Players inventory to search through - * @returns an array of equipped items - */ - getPlayerGear(items: Item[]): Item[]; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/InventoryHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/InventoryHelper.d.ts deleted file mode 100644 index 48431a8..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/InventoryHelper.d.ts +++ /dev/null @@ -1,273 +0,0 @@ -import { ContainerHelper } from "@spt/helpers/ContainerHelper"; -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -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 { Item, Upd } from "@spt/models/eft/common/tables/IItem"; -import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; -import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export interface IOwnerInventoryItems { - /** Inventory items from source */ - from: Item[]; - /** Inventory items at destination */ - to: Item[]; - sameInventory: boolean; - isMail: boolean; -} -export declare class InventoryHelper { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected httpResponse: HttpResponseUtil; - protected fenceService: FenceService; - protected databaseServer: DatabaseServer; - protected paymentHelper: PaymentHelper; - protected traderAssortHelper: TraderAssortHelper; - protected dialogueHelper: DialogueHelper; - protected itemHelper: ItemHelper; - protected containerHelper: ContainerHelper; - protected profileHelper: ProfileHelper; - protected presetHelper: PresetHelper; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); - /** - * Add multiple items to player stash (assuming they all fit) - * @param sessionId Session id - * @param request IAddItemsDirectRequest request - * @param pmcData Player profile - * @param output Client response object - */ - addItemsToStash(sessionId: string, request: IAddItemsDirectRequest, pmcData: IPmcData, output: IItemEventRouterResponse): void; - /** - * Add whatever is passed in `request.itemWithModsToAdd` into player inventory (if it fits) - * @param sessionId Session id - * @param request addItemDirect request - * @param pmcData Player profile - * @param output Client response object - */ - addItemToStash(sessionId: string, request: IAddItemDirectRequest, pmcData: IPmcData, output: IItemEventRouterResponse): void; - /** - * Set FiR status for an item + its children - * @param itemWithChildren An item - * @param foundInRaid Item was found in raid - */ - protected setFindInRaidStatusForItem(itemWithChildren: Item[], foundInRaid: boolean): void; - /** - * Remove properties from a Upd object used by a trader/ragfair that are unnecessary to a player - * @param upd Object to update - */ - protected removeTraderRagfairRelatedUpdProperties(upd: Upd): void; - /** - * Can all probided items be added into player inventory - * @param sessionId Player id - * @param itemsWithChildren array of items with children to try and fit - * @returns True all items fit - */ - canPlaceItemsInInventory(sessionId: string, itemsWithChildren: Item[][]): boolean; - /** - * Do the provided items all fit into the grid - * @param containerFS2D Container grid to fit items into - * @param itemsWithChildren items to try and fit into grid - * @returns True all fit - */ - canPlaceItemsInContainer(containerFS2D: number[][], itemsWithChildren: Item[][]): boolean; - /** - * Does an item fit into a container grid - * @param containerFS2D Container grid - * @param itemWithChildren item to check fits - * @returns True it fits - */ - canPlaceItemInContainer(containerFS2D: number[][], itemWithChildren: Item[]): boolean; - /** - * Find a free location inside a container to fit the item - * @param containerFS2D Container grid to add item to - * @param itemWithChildren Item to add to grid - * @param containerId Id of the container we're fitting item into - * @param desiredSlotId slot id value to use, default is "hideout" - */ - placeItemInContainer(containerFS2D: number[][], itemWithChildren: Item[], containerId: string, desiredSlotId?: string): void; - /** - * Find a location to place an item into inventory and place it - * @param stashFS2D 2-dimensional representation of the container slots - * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory - * @param useSortingTable Should sorting table to be used if main stash has no space - * @param output output to send back to client - */ - protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; - /** - * Handle Remove event - * Remove item from player inventory + insured items array - * Also deletes child items - * @param profile Profile to remove item from (pmc or scav) - * @param itemId Items id to remove - * @param sessionID Session id - * @param output OPTIONAL - IItemEventRouterResponse - */ - removeItem(profile: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): void; - /** - * Delete desired item from a player profiles mail - * @param sessionId Session id - * @param removeRequest Remove request - * @param output OPTIONAL - IItemEventRouterResponse - */ - removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output?: IItemEventRouterResponse): void; - /** - * Find item by id in player inventory and remove x of its count - * @param pmcData player profile - * @param itemId Item id to decrement StackObjectsCount of - * @param countToRemove Number of item to remove - * @param sessionID Session id - * @param output IItemEventRouterResponse - * @returns IItemEventRouterResponse - */ - removeItemByCount(pmcData: IPmcData, itemId: string, countToRemove: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Get the height and width of an item - can have children that alter size - * @param itemTpl Item to get size of - * @param itemID Items id to get size of - * @param inventoryItems - * @returns [width, height] - */ - getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; - protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; - /** - * Get a blank two-dimentional representation of a container - * @param containerH Horizontal size of container - * @param containerY Vertical size of container - * @returns Two-dimensional representation of container - */ - protected getBlankContainerMap(containerH: number, containerY: number): number[][]; - /** - * @param containerH Horizontal size of container - * @param containerV Vertical size of container - * @param itemList - * @param containerId Id of the container - * @returns Two-dimensional representation of container - */ - getContainerMap(containerH: number, containerV: number, itemList: Item[], containerId: string): number[][]; - protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; - /** - * Return the inventory that needs to be modified (scav/pmc etc) - * Changes made to result apply to character inventory - * Based on the item action, determine whose inventories we should be looking at for from and to. - * @param request Item interaction request - * @param sessionId Session id / playerid - * @returns OwnerInventoryItems with inventory of player/scav to adjust - */ - getOwnerInventoryItems(request: IInventoryMoveRequestData | IInventorySplitRequestData | IInventoryMergeRequestData | IInventoryTransferRequestData, sessionId: string): IOwnerInventoryItems; - /** - * Get a two dimensional array to represent stash slots - * 0 value = free, 1 = taken - * @param pmcData Player profile - * @param sessionID session id - * @returns 2-dimensional array - */ - protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - /** - * Get a blank two-dimensional array representation of a container - * @param containerTpl Container to get data for - * @returns blank two-dimensional array - */ - getContainerSlotMap(containerTpl: string): number[][]; - /** - * Get a two-dimensional array representation of the players sorting table - * @param pmcData Player profile - * @returns two-dimensional array - */ - protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; - /** - * Get Players Stash Size - * @param sessionID Players id - * @returns Array of 2 values, horizontal and vertical stash size - */ - protected getPlayerStashSize(sessionID: string): Record; - /** - * Get the players stash items tpl - * @param sessionID Player id - * @returns Stash tpl - */ - protected getStashType(sessionID: string): string; - /** - * Internal helper function to transfer an item from one profile to another. - * @param fromItems Inventory of the source (can be non-player) - * @param toItems Inventory of the destination - * @param body Move request - */ - moveItemToProfile(fromItems: Item[], toItems: Item[], body: IInventoryMoveRequestData): void; - /** - * Internal helper function to move item within the same profile_f. - * @param pmcData profile to edit - * @param inventoryItems - * @param moveRequest - * @returns True if move was successful - */ - moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): { - success: boolean; - errorMessage?: string; - }; - /** - * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access - * @param pmcData Player profile - * @param itemBeingMoved item being moved - */ - protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; - /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ - protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; - /** - * Get details for how a random loot container should be handled, max rewards, possible reward tpls - * @param itemTpl Container being opened - * @returns Reward details - */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; - getInventoryConfig(): IInventoryConfig; - /** - * Recursively checks if the given item is - * inside the stash, that is it has the stash as - * ancestor with slotId=hideout - * @param pmcData Player profile - * @param itemToCheck Item to look for - * @returns True if item exists inside stash - */ - isItemInStash(pmcData: IPmcData, itemToCheck: Item): boolean; -} -declare namespace InventoryHelper { - interface InventoryItemHash { - byItemId: Record; - byParentId: Record; - } -} -export {}; diff --git a/TypeScript/22CustomSptCommand/types/helpers/ItemHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/ItemHelper.d.ts deleted file mode 100644 index 718dcdd..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/ItemHelper.d.ts +++ /dev/null @@ -1,495 +0,0 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { IStaticAmmoDetails } from "@spt/models/eft/common/ILocation"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { InsuredItem } from "@spt/models/eft/common/tables/IBotBase"; -import { Item, Repairable, Upd } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { CompareUtil } from "@spt/utils/CompareUtil"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class ItemHelper { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; - protected randomUtil: RandomUtil; - protected objectId: ObjectId; - protected mathUtil: MathUtil; - protected databaseServer: DatabaseServer; - protected handbookHelper: HandbookHelper; - protected itemBaseClassService: ItemBaseClassService; - protected itemFilterService: ItemFilterService; - protected localisationService: LocalisationService; - protected localeService: LocaleService; - protected compareUtil: CompareUtil; - protected cloner: ICloner; - protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); - /** - * This method will compare two items (with all its children) and see if the are equivalent. - * This method will NOT compare IDs on the items - * @param item1 first item with all its children to compare - * @param item2 second item with all its children to compare - * @param compareUpdProperties Upd properties to compare between the items - * @returns true if they are the same, false if they arent - */ - isSameItems(item1: Item[], item2: Item[], compareUpdProperties?: Set): boolean; - /** - * This method will compare two items and see if the are equivalent. - * This method will NOT compare IDs on the items - * @param item1 first item to compare - * @param item2 second item to compare - * @param compareUpdProperties Upd properties to compare between the items - * @returns true if they are the same, false if they arent - */ - isSameItem(item1: Item, item2: Item, compareUpdProperties?: Set): boolean; - /** - * Helper method to generate a Upd based on a template - * @param itemTemplate the item template to generate a Upd for - * @returns A Upd with all the default properties set - */ - generateUpdForItem(itemTemplate: ITemplateItem): Upd; - /** - * Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash - * @param {string} tpl the template id / tpl - * @returns boolean; true for items that may be in player possession and not quest items - */ - isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean; - /** - * Check if the tpl / template Id provided is a descendent of the baseclass - * - * @param {string} tpl the item template id to check - * @param {string} baseClassTpl the baseclass to check for - * @return {boolean} is the tpl a descendent? - */ - isOfBaseclass(tpl: string, baseClassTpl: string): boolean; - /** - * Check if item has any of the supplied base classes - * @param tpl Item to check base classes of - * @param baseClassTpls base classes to check for - * @returns true if any supplied base classes match - */ - isOfBaseclasses(tpl: string, baseClassTpls: string[]): boolean; - /** - * Does the provided item have the chance to require soft armor inserts - * Only applies to helmets/vest/armors. - * Not all head gear needs them - * @param itemTpl item to check - * @returns Does item have the possibility ot need soft inserts - */ - armorItemCanHoldMods(itemTpl: string): boolean; - /** - * Does the provided item tpl need soft/removable inserts to function - * @param itemTpl Armor item - * @returns True if item needs some kind of insert - */ - armorItemHasRemovableOrSoftInsertSlots(itemTpl: string): boolean; - /** - * Does the pased in tpl have ability to hold removable plate items - * @param itemTpl item tpl to check for plate support - * @returns True when armor can hold plates - */ - armorItemHasRemovablePlateSlots(itemTpl: string): boolean; - /** - * Does the provided item tpl require soft inserts to become a valid armor item - * @param itemTpl Item tpl to check - * @returns True if it needs armor inserts - */ - itemRequiresSoftInserts(itemTpl: string): boolean; - /** - * Get all soft insert slot ids - * @returns An array of soft insert ids (e.g. soft_armor_back, helmet_top) - */ - getSoftInsertSlotIds(): string[]; - /** - * Returns the items total price based on the handbook or as a fallback from the prices.json if the item is not - * found in the handbook. If the price can't be found at all return 0 - * @param tpls item tpls to look up the price of - * @returns Total price in roubles - */ - getItemAndChildrenPrice(tpls: string[]): number; - /** - * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not - * found in the handbook. If the price can't be found at all return 0 - * @param tpl Item to look price up of - * @returns Price in roubles - */ - getItemPrice(tpl: string): number; - /** - * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not - * found in the handbook. If the price can't be found at all return 0 - * @param tpl Item to look price up of - * @returns Price in roubles - */ - getItemMaxPrice(tpl: string): number; - /** - * Get the static (handbook) price in roubles for an item by tpl - * @param tpl Items tpl id to look up price - * @returns Price in roubles (0 if not found) - */ - getStaticItemPrice(tpl: string): number; - /** - * Get the dynamic (flea) price in roubles for an item by tpl - * @param tpl Items tpl id to look up price - * @returns Price in roubles (undefined if not found) - */ - getDynamicItemPrice(tpl: string): number; - /** - * Update items upd.StackObjectsCount to be 1 if its upd is missing or StackObjectsCount is undefined - * @param item Item to update - * @returns Fixed item - */ - fixItemStackCount(item: Item): Item; - /** - * Get cloned copy of all item data from items.json - * @returns array of ITemplateItem objects - */ - getItems(): ITemplateItem[]; - /** - * Gets item data from items.json - * @param tpl items template id to look up - * @returns bool - is valid + template item object as array - */ - getItem(tpl: string): [boolean, ITemplateItem]; - itemHasSlots(itemTpl: string): boolean; - isItemInDb(tpl: string): boolean; - /** - * Calcualte the average quality of an item and its children - * @param items An offers item to process - * @returns % quality modifer between 0 and 1 - */ - getItemQualityModifierForOfferItems(items: Item[]): number; - /** - * get normalized value (0-1) based on item condition - * @param item - * @returns number between 0 and 1 - */ - getItemQualityModifier(item: Item): number; - /** - * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability - * @param itemDetails Db details for item we want quality value for - * @param repairable Repairable properties - * @param item Item quality value is for - * @returns A number between 0 and 1 - */ - protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number; - /** - * Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results - * @param items Array of items (item + possible children) - * @param baseItemId Parent items id - * @returns an array of strings - */ - findAndReturnChildrenByItems(items: Item[], baseItemId: string): string[]; - /** - * A variant of findAndReturnChildren where the output is list of item objects instead of their ids. - * @param items Array of items (item + possible children) - * @param baseItemId Parent items id - * @param modsOnly Include only mod items, exclude items stored inside root item - * @returns An array of Item objects - */ - findAndReturnChildrenAsItems(items: Item[], baseItemId: string, modsOnly?: boolean): Item[]; - /** - * Find children of the item in a given assort (weapons parts for example, need recursive loop function) - * @param itemIdToFind Template id of item to check for - * @param assort Array of items to check in - * @returns Array of children of requested item - */ - findAndReturnChildrenByAssort(itemIdToFind: string, assort: Item[]): Item[]; - /** - * Check if the passed in item has buy count restrictions - * @param itemToCheck Item to check - * @returns true if it has buy restrictions - */ - hasBuyRestrictions(itemToCheck: Item): boolean; - /** - * is the passed in template id a dog tag - * @param tpl Template id to check - * @returns true if it is a dogtag - */ - isDogtag(tpl: string): boolean; - /** - * Gets the identifier for a child using slotId, locationX and locationY. - * @param item - * @returns "slotId OR slotid,locationX,locationY" - */ - getChildId(item: Item): string; - /** - * Can the passed in item be stacked - * @param tpl item to check - * @returns true if it can be stacked - */ - isItemTplStackable(tpl: string): boolean; - /** - * Split item stack if it exceeds its items StackMaxSize property into child items of passed in parent - * @param itemToSplit Item to split into smaller stacks - * @returns Array of root item + children - */ - splitStack(itemToSplit: Item): Item[]; - /** - * Turn items like money into separate stacks that adhere to max stack size - * @param itemToSplit Item to split into smaller stacks - * @returns - */ - splitStackIntoSeparateItems(itemToSplit: Item): Item[][]; - /** - * Find Barter items from array of items - * @param {string} by tpl or id - * @param {Item[]} itemsToSearch Array of items to iterate over - * @param {string} desiredBarterItemIds - * @returns Array of Item objects - */ - findBarterItems(by: "tpl" | "id", itemsToSearch: Item[], desiredBarterItemIds: string | string[]): Item[]; - /** - * Regenerate all GUIDs with new IDs, for the exception of special item types (e.g. quest, sorting table, etc.) This - * function will not mutate the original items array, but will return a new array with new GUIDs. - * - * @param originalItems Items to adjust the IDs of - * @param pmcData Player profile - * @param insuredItems Insured items that should not have their IDs replaced - * @param fastPanel Quick slot panel - * @returns Item[] - */ - replaceIDs(originalItems: Item[], pmcData?: IPmcData | null, insuredItems?: InsuredItem[] | null, fastPanel?: any): Item[]; - /** - * Mark the passed in array of items as found in raid. - * Modifies passed in items - * @param items The list of items to mark as FiR - */ - setFoundInRaid(items: Item[]): void; - /** - * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl Items tpl to check parents of - * @param {Array} tplsToCheck Tpl values to check if parents of item match - * @returns boolean Match found - */ - doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; - /** - * Check if item is quest item - * @param tpl Items tpl to check quest status of - * @returns true if item is flagged as quest item - */ - isQuestItem(tpl: string): boolean; - /** - * Checks to see if the item is *actually* moddable in-raid. Checks include the items existence in the database, the - * parent items existence in the database, the existence (and value) of the items RaidModdable property, and that - * the parents slot-required property exists, matches that of the item, and it's value. - * - * Note: this function does not preform any checks to see if the item and parent are *actually* related. - * - * @param item The item to be checked - * @param parent The parent of the item to be checked - * @returns True if the item is actually moddable, false if it is not, and null if the check cannot be performed. - */ - isRaidModdable(item: Item, parent: Item): boolean | null; - /** - * Retrieves the main parent item for a given attachment item. - * - * This method traverses up the hierarchy of items starting from a given `itemId`, until it finds the main parent - * item that is not an attached attachment itself. In other words, if you pass it an item id of a suppressor, it - * will traverse up the muzzle brake, barrel, upper receiver, and return the gun that the suppressor is ultimately - * attached to, even if that gun is located within multiple containers. - * - * It's important to note that traversal is expensive, so this method requires that you pass it a Map of the items - * to traverse, where the keys are the item IDs and the values are the corresponding Item objects. This alleviates - * some of the performance concerns, as it allows for quick lookups of items by ID. - * - * @param itemId - The unique identifier of the item for which to find the main parent. - * @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup. - * @returns The Item object representing the top-most parent of the given item, or `null` if no such parent exists. - */ - getAttachmentMainParent(itemId: string, itemsMap: Map): Item | null; - /** - * Determines if an item is an attachment that is currently attached to it's parent item. - * - * @param item The item to check. - * @returns true if the item is attached attachment, otherwise false. - */ - isAttachmentAttached(item: Item): boolean; - /** - * Retrieves the equipment parent item for a given item. - * - * This method traverses up the hierarchy of items starting from a given `itemId`, until it finds the equipment - * parent item. In other words, if you pass it an item id of a suppressor, it will traverse up the muzzle brake, - * barrel, upper receiver, gun, nested backpack, and finally return the backpack Item that is equipped. - * - * It's important to note that traversal is expensive, so this method requires that you pass it a Map of the items - * to traverse, where the keys are the item IDs and the values are the corresponding Item objects. This alleviates - * some of the performance concerns, as it allows for quick lookups of items by ID. - * - * @param itemId - The unique identifier of the item for which to find the equipment parent. - * @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup. - * @returns The Item object representing the equipment parent of the given item, or `null` if no such parent exists. - */ - getEquipmentParent(itemId: string, itemsMap: Map): Item | null; - /** - * Get the inventory size of an item - * @param items Item with children - * @param rootItemId - * @returns ItemSize object (width and height) - */ - getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; - /** - * Get a random cartridge from an items Filter property - * @param item Db item template to look up Cartridge filter values from - * @returns Caliber of cartridge - */ - getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string | null; - /** - * Add cartridges to the ammo box with correct max stack sizes - * @param ammoBox Box to add cartridges to - * @param ammoBoxDetails Item template from items db - */ - addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; - /** - * Add a single stack of cartridges to the ammo box - * @param ammoBox Box to add cartridges to - * @param ammoBoxDetails Item template from items db - */ - addSingleStackCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; - /** - * Check if item is stored inside of a container - * @param item Item to check is inside of container - * @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack - * @param items Inventory with child parent items to check - * @returns True when item is in container - */ - itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean; - /** - * Add child items (cartridges) to a magazine - * @param magazine Magazine to add child items to - * @param magTemplate Db template of magazine - * @param staticAmmoDist Cartridge distribution - * @param caliber Caliber of cartridge to add to magazine - * @param minSizePercent % the magazine must be filled to - * @param defaultCartridgeTpl Cartridge to use when none found - * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) - */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; - /** - * Add child items to a magazine of a specific cartridge - * @param magazineWithChildCartridges Magazine to add child items to - * @param magTemplate Db template of magazine - * @param cartridgeTpl Cartridge to add to magazine - * @param minSizePercent % the magazine must be filled to - */ - fillMagazineWithCartridge(magazineWithChildCartridges: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; - /** - * Choose a random bullet type from the list of possible a magazine has - * @param magTemplate Magazine template from Db - * @returns Tpl of cartridge - */ - protected getRandomValidCaliber(magTemplate: ITemplateItem): string; - /** - * Chose a randomly weighted cartridge that fits - * @param caliber Desired caliber - * @param staticAmmoDist Cartridges and thier weights - * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead - * @param cartridgeWhitelist OPTIONAL whitelist for cartridges - * @returns Tpl of cartridge - */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; - /** - * Create a basic cartrige object - * @param parentId container cartridges will be placed in - * @param ammoTpl Cartridge to insert - * @param stackCount Count of cartridges inside parent - * @param location Location inside parent (e.g. 0, 1) - * @param foundInRaid OPTIONAL - Are cartridges found in raid (SpawnedInSession) - * @returns Item - */ - createCartridges(parentId: string, ammoTpl: string, stackCount: number, location: number, foundInRaid?: boolean): Item; - /** - * Get the size of a stack, return 1 if no stack object count property found - * @param item Item to get stack size of - * @returns size of stack - */ - getItemStackSize(item: Item): number; - /** - * Get the name of an item from the locale file using the item tpl - * @param itemTpl Tpl of item to get name of - * @returns Name of item - */ - getItemName(itemTpl: string): string; - getItemTplsOfBaseType(desiredBaseType: string): string[]; - /** - * Add child slot items to an item, chooses random child item if multiple choices exist - * @param itemToAdd array with single object (root item) - * @param itemToAddTemplate Db tempalte for root item - * @param modSpawnChanceDict Optional dictionary of mod name + % chance mod will be included in item (e.g. front_plate: 100) - * @param requiredOnly Only add required mods - * @returns Item with children - */ - addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; - /** - * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomly choose from - * @param incompatibleModTpls Incompatible tpls to not allow - * @returns Chosen tpl or null - */ - getCompatibleTplFromArray(possibleTpls: string[], incompatibleModTpls: Set): string; - /** - * Is the provided item._props.Slots._name property a plate slot - * @param slotName Name of slot (_name) of Items Slot array - * @returns True if its a slot that holds a removable palte - */ - isRemovablePlateSlot(slotName: string): boolean; - /** - * Get a list of slot names that hold removable plates - * @returns Array of slot ids (e.g. front_plate) - */ - getRemovablePlateSlotIds(): string[]; - /** - * Generate new unique ids for child items while preserving hierarchy - * @param rootItem Base/primary item - * @param itemWithChildren Primary item + children of primary item - * @returns Item array with updated IDs - */ - reparentItemAndChildren(rootItem: Item, itemWithChildren: Item[]): Item[]; - /** - * Update a root items _id property value to be unique - * @param itemWithChildren Item to update root items _id property - * @param newId Optional: new id to use - * @returns New root id - */ - remapRootItemId(itemWithChildren: Item[], newId?: string): string; - /** - * Adopts orphaned items by resetting them as root "hideout" items. Helpful in situations where a parent has been - * deleted from a group of items and there are children still referencing the missing parent. This method will - * remove the reference from the children to the parent and set item properties to root values. - * - * @param rootId The ID of the "root" of the container. - * @param items Array of Items that should be adjusted. - * @returns Array of Items that have been adopted. - */ - adoptOrphanedItems(rootId: string, items: Item[]): Item[]; - /** - * Populate a Map object of items for quick lookup using their ID. - * - * @param items An array of Items that should be added to a Map. - * @returns A Map where the keys are the item IDs and the values are the corresponding Item objects. - */ - generateItemsMap(items: Item[]): Map; - /** - * Add a blank upd object to passed in item if it does not exist already - * @param item item to add upd to - * @param warningMessageWhenMissing text to write to log when upd object was not found - * @returns True when upd object was added - */ - addUpdObjectToItem(item: Item, warningMessageWhenMissing?: string): boolean; -} -declare namespace ItemHelper { - interface ItemSize { - width: number; - height: number; - } -} -export {}; diff --git a/TypeScript/22CustomSptCommand/types/helpers/NotificationSendHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/NotificationSendHelper.d.ts deleted file mode 100644 index 3a74563..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/NotificationSendHelper.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { SptWebSocketConnectionHandler } from "@spt/servers/ws/SptWebSocketConnectionHandler"; -import { NotificationService } from "@spt/services/NotificationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class NotificationSendHelper { - protected sptWebSocketConnection: SptWebSocketConnectionHandler; - protected hashUtil: HashUtil; - protected saveServer: SaveServer; - protected notificationService: NotificationService; - constructor(sptWebSocketConnection: SptWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); - /** - * Send notification message to the appropriate channel - * @param sessionID - * @param notificationMessage - */ - sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; - /** - * Send a message directly to the player - * @param sessionId Session id - * @param senderDetails Who is sendin the message to player - * @param messageText Text to send player - * @param messageType Underlying type of message being sent - */ - sendMessageToPlayer(sessionId: string, senderDetails: IUserDialogInfo, messageText: string, messageType: MessageType): void; - /** - * Helper function for sendMessageToPlayer(), get new dialog for storage in profile or find existing by sender id - * @param sessionId Session id - * @param messageType Type of message to generate - * @param senderDetails Who is sending the message - * @returns Dialogue - */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/NotifierHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/NotifierHelper.d.ts deleted file mode 100644 index b947f1b..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/NotifierHelper.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; -import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; -export declare class NotifierHelper { - protected httpServerHelper: HttpServerHelper; - /** - * The default notification sent when waiting times out. - */ - protected defaultNotification: IWsNotificationEvent; - constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): IWsNotificationEvent; - /** - * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside - * @param dialogueMessage Message from dialog that was sent - * @param ragfairData Ragfair data to attach to notification - * @returns - */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; - /** - * Create a new notification with the specified dialogueMessage object - * @param dialogueMessage - * @returns - */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; - getWebSocketServer(sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/PaymentHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/PaymentHelper.d.ts deleted file mode 100644 index 6971547..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/PaymentHelper.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -export declare class PaymentHelper { - protected configServer: ConfigServer; - protected inventoryConfig: IInventoryConfig; - constructor(configServer: ConfigServer); - /** - * Is the passed in tpl money (also checks custom currencies in inventoryConfig.customMoneyTpls) - * @param {string} tpl - * @returns void - */ - isMoneyTpl(tpl: string): boolean; - /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ - getCurrency(currency: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/PresetHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/PresetHelper.d.ts deleted file mode 100644 index 937e225..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/PresetHelper.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { BaseClasses } from "@spt/models/enums/BaseClasses"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; -export declare class PresetHelper { - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected cloner: ICloner; - protected lookup: Record; - protected defaultEquipmentPresets: Record; - protected defaultWeaponPresets: Record; - constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); - hydratePresetStore(input: Record): void; - /** - * Get default weapon and equipment presets - * @returns Dictionary - */ - getDefaultPresets(): Record; - /** - * Get default weapon presets - * @returns Dictionary - */ - getDefaultWeaponPresets(): Record; - /** - * Get default equipment presets - * @returns Dictionary - */ - getDefaultEquipmentPresets(): Record; - isPreset(id: string): boolean; - /** - * Checks to see if the preset is of the given base class. - * @param id The id of the preset - * @param baseClass The BaseClasses enum to check against - * @returns True if the preset is of the given base class, false otherwise - */ - isPresetBaseClass(id: string, baseClass: BaseClasses): boolean; - hasPreset(templateId: string): boolean; - getPreset(id: string): IPreset; - getAllPresets(): IPreset[]; - getPresets(templateId: string): IPreset[]; - /** - * Get the default preset for passed in item id - * @param templateId Item id to get preset for - * @returns Null if no default preset, otherwise IPreset - */ - getDefaultPreset(templateId: string): IPreset; - getBaseItemTpl(presetId: string): string; - /** - * Return the price of the preset for the given item tpl, or for the tpl itself if no preset exists - * @param tpl The item template to get the price of - * @returns The price of the given item preset, or base item if no preset exists - */ - getDefaultPresetOrItemPrice(tpl: string): number; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/ProbabilityHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/ProbabilityHelper.d.ts deleted file mode 100644 index fa12125..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/ProbabilityHelper.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class ProbabilityHelper { - protected logger: ILogger; - protected randomUtil: RandomUtil; - constructor(logger: ILogger, randomUtil: RandomUtil); - /** - * Chance to roll a number out of 100 - * @param chance Percentage chance roll should success - * @param scale scale of chance to allow support of numbers > 1-100 - * @returns true if success - */ - rollChance(chance: number, scale?: number): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/ProfileHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/ProfileHelper.d.ts deleted file mode 100644 index 298ec55..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/ProfileHelper.d.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Common, CounterKeyValue, Stats } from "@spt/models/eft/common/tables/IBotBase"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { Watermark } from "@spt/utils/Watermark"; -export declare class ProfileHelper { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected watermark: Watermark; - protected timeUtil: TimeUtil; - protected saveServer: SaveServer; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); - /** - * Remove/reset a completed quest condtion from players profile quest data - * @param sessionID Session id - * @param questConditionId Quest with condition to remove - */ - removeQuestConditionFromProfile(pmcData: IPmcData, questConditionId: Record): void; - /** - * Get all profiles from server - * @returns Dictionary of profiles - */ - getProfiles(): Record; - /** - * Get the pmc and scav profiles as an array by profile id - * @param sessionID - * @returns Array of IPmcData objects - */ - getCompleteProfile(sessionID: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[]; - /** - * Check if a nickname is used by another profile loaded by the server - * @param nicknameRequest nickname request object - * @param sessionID Session id - * @returns True if already used - */ - isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean; - protected profileHasInfoProperty(profile: ISptProfile): boolean; - protected stringsMatch(stringA: string, stringB: string): boolean; - /** - * Add experience to a PMC inside the players profile - * @param sessionID Session id - * @param experienceToAdd Experience to add to PMC character - */ - addExperienceToPmc(sessionID: string, experienceToAdd: number): void; - /** - * Iterate all profiles and find matching pmc profile by provided id - * @param pmcId Profile id to find - * @returns IPmcData - */ - getProfileByPmcId(pmcId: string): IPmcData; - /** - * Get the experiecne for the given level - * @param level level to get xp for - * @returns Number of xp points for level - */ - getExperience(level: number): number; - /** - * Get the max level a player can be - * @returns Max level - */ - getMaxLevel(): number; - getDefaultSptDataObject(): any; - /** - * Get full representation of a players profile json - * @param sessionID Profile id to get - * @returns ISptProfile object - */ - getFullProfile(sessionID: string): ISptProfile; - /** - * Get a PMC profile by its session id - * @param sessionID Profile id to return - * @returns IPmcData object - */ - getPmcProfile(sessionID: string): IPmcData; - /** - * Get a full profiles scav-specific sub-profile - * @param sessionID Profiles id - * @returns IPmcData object - */ - getScavProfile(sessionID: string): IPmcData; - /** - * Get baseline counter values for a fresh profile - * @returns Default profile Stats object - */ - getDefaultCounters(): Stats; - /** - * is this profile flagged for data removal - * @param sessionID Profile id - * @returns True if profile is to be wiped of data/progress - */ - protected isWiped(sessionID: string): boolean; - protected getServerVersion(): string; - /** - * Iterate over player profile inventory items and find the secure container and remove it - * @param profile Profile to remove secure container from - * @returns profile without secure container - */ - removeSecureContainer(profile: IPmcData): IPmcData; - /** - * Flag a profile as having received a gift - * Store giftid in profile spt object - * @param playerId Player to add gift flag to - * @param giftId Gift player received - */ - addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; - /** - * Check if profile has recieved a gift by id - * @param playerId Player profile to check for gift - * @param giftId Gift to check for - * @returns True if player has recieved gift previously - */ - playerHasRecievedGift(playerId: string, giftId: string): boolean; - /** - * Find Stat in profile counters and increment by one - * @param counters Counters to search for key - * @param keyToIncrement Key - */ - incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; - /** - * Check if player has a skill at elite level - * @param skillType Skill to check - * @param pmcProfile Profile to find skill in - * @returns True if player has skill at elite level - */ - hasEliteSkillLevel(skillType: SkillTypes, pmcProfile: IPmcData): boolean; - /** - * Add points to a specific skill in player profile - * @param skill Skill to add points to - * @param pointsToAdd Points to add - * @param pmcProfile Player profile with skill - * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code - * @returns - */ - addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void; - /** - * Get a speciic common skill from supplied profile - * @param pmcData Player profile - * @param skill Skill to look up and return value from - * @returns Common skill object from desired profile - */ - getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common; - /** - * Is the provided session id for a developer account - * @param sessionID Profile id ot check - * @returns True if account is developer - */ - isDeveloperAccount(sessionID: string): boolean; - /** - * Add stash row bonus to profile or increments rows given count if it already exists - * @param sessionId Profile id to give rows to - * @param rowsToAdd How many rows to give profile - */ - addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/QuestConditionHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/QuestConditionHelper.d.ts deleted file mode 100644 index c50a9c3..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/QuestConditionHelper.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; -export declare class QuestConditionHelper { - getQuestConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; - getLevelConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; - getLoyaltyConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; - getStandingConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; - protected filterConditions(q: IQuestCondition[], questType: string, furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts deleted file mode 100644 index 39ba2a9..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts +++ /dev/null @@ -1,281 +0,0 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class QuestHelper { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected hashUtil: HashUtil; - protected itemHelper: ItemHelper; - protected questConditionHelper: QuestConditionHelper; - protected eventOutputHolder: EventOutputHolder; - protected databaseServer: DatabaseServer; - protected localeService: LocaleService; - protected ragfairServerHelper: RagfairServerHelper; - protected dialogueHelper: DialogueHelper; - protected profileHelper: ProfileHelper; - protected paymentHelper: PaymentHelper; - protected localisationService: LocalisationService; - protected traderHelper: TraderHelper; - protected presetHelper: PresetHelper; - protected mailSendService: MailSendService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); - /** - * Get status of a quest in player profile by its id - * @param pmcData Profile to search - * @param questId Quest id to look up - * @returns QuestStatus enum - */ - getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus; - /** - * returns true is the level condition is satisfied - * @param playerLevel Players level - * @param condition Quest condition - * @returns true if player level is greater than or equal to quest - */ - doesPlayerLevelFulfilCondition(playerLevel: number, condition: IQuestCondition): boolean; - /** - * Get the quests found in both arrays (inner join) - * @param before Array of quests #1 - * @param after Array of quests #2 - * @returns Reduction of cartesian product between two quest arrays - */ - getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; - /** - * Adjust skill experience for low skill levels, mimicing the official client - * @param profileSkill the skill experience is being added to - * @param progressAmount the amount of experience being added to the skill - * @returns the adjusted skill progress gain - */ - adjustSkillExpForLowLevels(profileSkill: Common, progressAmount: number): number; - /** - * Get quest name by quest id - * @param questId id to get - * @returns - */ - getQuestNameFromLocale(questId: string): string; - /** - * Check if trader has sufficient loyalty to fulfill quest requirement - * @param questProperties Quest props - * @param profile Player profile - * @returns true if loyalty is high enough to fulfill quest requirement - */ - traderLoyaltyLevelRequirementCheck(questProperties: IQuestCondition, profile: IPmcData): boolean; - /** - * Check if trader has sufficient standing to fulfill quest requirement - * @param questProperties Quest props - * @param profile Player profile - * @returns true if standing is high enough to fulfill quest requirement - */ - traderStandingRequirementCheck(questProperties: IQuestCondition, profile: IPmcData): boolean; - protected compareAvailableForValues(current: number, required: number, compareMethod: string): boolean; - /** - * Take reward item from quest and set FiR status + fix stack sizes + fix mod Ids - * @param questReward Reward item to fix - * @returns Fixed rewards - */ - protected processReward(questReward: IQuestReward): Item[]; - /** - * Add missing mod items to a quest armor reward - * @param originalRewardRootItem Original armor reward item from IQuestReward.items object - * @param questReward Armor reward from quest - */ - protected generateArmorRewardChildSlots(originalRewardRootItem: Item, questReward: IQuestReward): void; - /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) - * @param quest quest to get rewards for - * @param status Quest status that holds the items (Started, Success, Fail) - * @returns array of items with the correct maxStack - */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): Item[]; - /** - * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile - * @param pmcData Player profile - * @param newState State the new quest should be in when returned - * @param acceptedQuest Details of accepted quest from client - */ - getQuestReadyForProfile(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): IQuestStatus; - /** - * Get quests that can be shown to player after starting a quest - * @param startedQuestId Quest started by player - * @param sessionID Session id - * @returns Quests accessible to player incuding newly unlocked quests now quest (startedQuestId) was started - */ - getNewlyAccessibleQuestsWhenStartingQuest(startedQuestId: string, sessionID: string): IQuest[]; - /** - * Is the quest for the opposite side the player is on - * @param playerSide Player side (usec/bear) - * @param questId QuestId to check - */ - questIsForOtherSide(playerSide: string, questId: string): boolean; - /** - * Get quests that can be shown to player after failing a quest - * @param failedQuestId Id of the quest failed by player - * @param sessionId Session id - * @returns IQuest array - */ - failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; - /** - * Adjust quest money rewards by passed in multiplier - * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by - * @param questStatus Status of quest to apply money boost to rewards of - * @returns Updated quest - */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; - /** - * Sets the item stack to new value, or delete the item if value <= 0 - * // TODO maybe merge this function and the one from customization - * @param pmcData Profile - * @param itemId id of item to adjust stack size of - * @param newStackSize Stack size to adjust to - * @param sessionID Session id - * @param output ItemEvent router response - */ - changeItemStack(pmcData: IPmcData, itemId: string, newStackSize: number, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Add item stack change object into output route event response - * @param output Response to add item change event into - * @param sessionId Session id - * @param item Item that was adjusted - */ - protected addItemStackSizeChangeIntoEventResponse(output: IItemEventRouterResponse, sessionId: string, item: Item): void; - /** - * Get quests, strip all requirement conditions except level - * @param quests quests to process - * @returns quest array without conditions - */ - protected getQuestsWithOnlyLevelRequirementStartCondition(quests: IQuest[]): IQuest[]; - /** - * Remove all quest conditions except for level requirement - * @param quest quest to clean - * @returns reset IQuest object - */ - getQuestWithOnlyLevelRequirementStartCondition(quest: IQuest): IQuest; - /** - * Fail a quest in a player profile - * @param pmcData Player profile - * @param failRequest Fail quest request data - * @param sessionID Session id - * @param output Client output - */ - failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string, output?: IItemEventRouterResponse): void; - /** - * Get List of All Quests from db - * NOT CLONED - * @returns Array of IQuest objects - */ - getQuestsFromDb(): IQuest[]; - /** - * Get quest by id from database (repeatables are stored in profile, check there if questId not found) - * @param questId Id of quest to find - * @param pmcData Player profile - * @returns IQuest object - */ - getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; - /** - * Get a quests startedMessageText key from db, if no startedMessageText key found, use description key instead - * @param startedMessageTextId startedMessageText property from IQuest - * @param questDescriptionId description property from IQuest - * @returns message id - */ - getMessageIdForQuestStart(startedMessageTextId: string, questDescriptionId: string): string; - /** - * Get the locale Id from locale db for a quest message - * @param questMessageId Quest message id to look up - * @returns Locale Id from locale db - */ - getQuestLocaleIdFromDb(questMessageId: string): string; - /** - * Alter a quests state + Add a record to its status timers object - * @param pmcData Profile to update - * @param newQuestState New state the quest should be in - * @param questId Id of the quest to alter the status of - */ - updateQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void; - /** - * Resets a quests values back to its chosen state - * @param pmcData Profile to update - * @param newQuestState New state the quest should be in - * @param questId Id of the quest to alter the status of - */ - resetQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void; - /** - * Give player quest rewards - Skills/exp/trader standing/items/assort unlocks - Returns reward items player earned - * @param profileData Player profile (scav or pmc) - * @param questId questId of quest to get rewards for - * @param state State of the quest to get rewards for - * @param sessionId Session id - * @param questResponse Response to send back to client - * @returns Array of reward objects - */ - applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): Item[]; - /** - * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile - * also update client response recipeUnlocked array with craft id - * @param pmcData Player profile - * @param craftUnlockReward Reward item from quest with craft unlock details - * @param questDetails Quest with craft unlock reward - * @param sessionID Session id - * @param response Response to send back to client - */ - protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; - /** - * Get players money reward bonus from profile - * @param pmcData player profile - * @returns bonus as a percent - */ - protected getQuestMoneyRewardBonus(pmcData: IPmcData): number; - /** - * Find quest with 'findItem' condition that needs the item tpl be handed in - * @param itemTpl item tpl to look for - * @param questIds Quests to search through for the findItem condition - * @returns quest id with 'FindItem' condition id - */ - getFindItemConditionByQuestItem(itemTpl: string, questIds: string[], allQuests: IQuest[]): Record; - /** - * Add all quests to a profile with the provided statuses - * @param pmcProfile profile to update - * @param statuses statuses quests should have - */ - addAllQuestsToProfile(pmcProfile: IPmcData, statuses: QuestStatus[]): void; - findAndRemoveQuestFromArrayIfExists(questId: string, quests: IQuestStatus[]): void; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; - /** - * Get the hours a mails items can be collected for by profile type - * @param pmcData Profile to get hours for - * @returns Hours item will be available for - */ - getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/RagfairHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RagfairHelper.d.ts deleted file mode 100644 index cab2148..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/RagfairHelper.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { UtilityHelper } from "@spt/helpers/UtilityHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class RagfairHelper { - protected logger: ILogger; - protected traderAssortHelper: TraderAssortHelper; - protected databaseServer: DatabaseServer; - protected handbookHelper: HandbookHelper; - protected itemHelper: ItemHelper; - protected ragfairLinkedItemService: RagfairLinkedItemService; - protected utilityHelper: UtilityHelper; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); - /** - * Gets currency TAG from TPL - * @param {string} currency - * @returns string - */ - getCurrencyTag(currency: string): string; - filterCategories(sessionID: string, request: ISearchRequestData): string[]; - getDisplayableAssorts(sessionID: string): Record; - protected getCategoryList(handbookId: string): string[]; - /** - * Merges Root Items - * Ragfair allows abnormally large stacks. - */ - mergeStackable(items: Item[]): Item[]; - /** - * Return the symbol for a currency - * e.g. 5449016a4bdc2d6f028b456f return ₽ - * @param currencyTpl currency to get symbol for - * @returns symbol of currency - */ - getCurrencySymbol(currencyTpl: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts deleted file mode 100644 index f8f7661..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RagfairHelper } from "@spt/helpers/RagfairHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; -export declare class RagfairOfferHelper { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected hashUtil: HashUtil; - protected eventOutputHolder: EventOutputHolder; - protected databaseServer: DatabaseServer; - protected traderHelper: TraderHelper; - protected saveServer: SaveServer; - protected itemHelper: ItemHelper; - protected paymentHelper: PaymentHelper; - protected presetHelper: PresetHelper; - protected profileHelper: ProfileHelper; - protected questHelper: QuestHelper; - protected ragfairServerHelper: RagfairServerHelper; - protected ragfairSortHelper: RagfairSortHelper; - protected ragfairHelper: RagfairHelper; - protected ragfairOfferService: RagfairOfferService; - protected ragfairRequiredItemsService: RagfairRequiredItemsService; - protected localeService: LocaleService; - protected localisationService: LocalisationService; - protected mailSendService: MailSendService; - protected configServer: ConfigServer; - protected static goodSoldTemplate: string; - protected ragfairConfig: IRagfairConfig; - protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); - /** - * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see - * @param searchRequest Data from client - * @param itemsToAdd ragfairHelper.filterCategories() - * @param traderAssorts Trader assorts - * @param pmcData Player profile - * @returns Offers the player should see - */ - getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - /** - * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level - * @param searchRequest Search request from client - * @param pmcDataPlayer profile - * @returns Matching IRagfairOffer objects - */ - getOffersThatRequireItem(searchRequest: ISearchRequestData, pmcData: IPmcData): IRagfairOffer[]; - /** - * Get offers from flea/traders specifically when building weapon preset - * @param searchRequest Search request data - * @param itemsToAdd string array of item tpls to search for - * @param traderAssorts All trader assorts player can access/buy - * @param pmcData Player profile - * @returns IRagfairOffer array - */ - getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - /** - * Check if offer is from trader standing the player does not have - * @param offer Offer to check - * @param pmcProfile Player profile - * @returns True if item is locked, false if item is purchaseable - */ - protected traderOfferLockedBehindLoyaltyLevel(offer: IRagfairOffer, pmcProfile: IPmcData): boolean; - /** - * Check if offer item is quest locked for current player by looking at sptQuestLocked property in traders barter_scheme - * @param offer Offer to check is quest locked - * @param traderAssorts all trader assorts for player - * @returns true if quest locked - */ - traderOfferItemQuestLocked(offer: IRagfairOffer, traderAssorts: Record): boolean; - /** - * Has a traders offer ran out of stock to sell to player - * @param offer Offer to check stock of - * @returns true if out of stock - */ - protected traderOutOfStock(offer: IRagfairOffer): boolean; - /** - * Check if trader offers' BuyRestrictionMax value has been reached - * @param offer offer to check restriction properties of - * @returns true if restriction reached, false if no restrictions/not reached - */ - protected traderBuyRestrictionReached(offer: IRagfairOffer): boolean; - /** - * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level - * @param offers Offers to check - * @param pmcProfile Players profile with trader loyalty levels - * @returns array of offer ids player cannot see - */ - protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; - /** - * Process all player-listed flea offers for a desired profile - * @param sessionID Session id to process offers for - * @returns true = complete - */ - processOffersOnProfile(sessionID: string): boolean; - /** - * Add amount to players ragfair rating - * @param sessionId Profile to update - * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) - */ - increaseProfileRagfairRating(profile: ISptProfile, amountToIncrementBy: number): void; - /** - * Return all offers a player has listed on a desired profile - * @param sessionID Session id - * @returns Array of ragfair offers - */ - protected getProfileOffers(sessionID: string): IRagfairOffer[]; - /** - * Delete an offer from a desired profile and from ragfair offers - * @param sessionID Session id of profile to delete offer from - * @param offerId Id of offer to delete - */ - protected deleteOfferById(sessionID: string, offerId: string): void; - /** - * Complete the selling of players' offer - * @param sessionID Session id - * @param offer Sold offer details - * @param boughtAmount Amount item was purchased for - * @returns IItemEventRouterResponse - */ - protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; - /** - * Get a localised message for when players offer has sold on flea - * @param itemTpl Item sold - * @param boughtAmount How many were purchased - * @returns Localised message text - */ - protected getLocalisedOfferSoldMessage(itemTpl: string, boughtAmount: number): string; - /** - * Check an offer passes the various search criteria the player requested - * @param searchRequest - * @param offer - * @param pmcData - * @returns True - */ - protected passesSearchFilterCriteria(searchRequest: ISearchRequestData, offer: IRagfairOffer, pmcData: IPmcData): boolean; - /** - * Check that the passed in offer item is functional - * @param offerRootItem The root item of the offer - * @param offer The flea offer - * @returns True if the given item is functional - */ - isItemFunctional(offerRootItem: Item, offer: IRagfairOffer): boolean; - /** - * Should a ragfair offer be visible to the player - * @param searchRequest Search request - * @param itemsToAdd ? - * @param traderAssorts Trader assort items - * @param offer The flea offer - * @param pmcProfile Player profile - * @returns True = should be shown to player - */ - isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; - isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean; - /** - * Does the passed in item have a condition property - * @param item Item to check - * @returns True if has condition - */ - protected isConditionItem(item: Item): boolean; - /** - * Is items quality value within desired range - * @param item Item to check quality of - * @param min Desired minimum quality - * @param max Desired maximum quality - * @returns True if in range - */ - protected itemQualityInRange(item: Item, min: number, max: number): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/RagfairSellHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RagfairSellHelper.d.ts deleted file mode 100644 index d694d6a..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/RagfairSellHelper.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { SellResult } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class RagfairSellHelper { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected timeUtil: TimeUtil; - protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - /** - * Get the percent chance to sell an item based on its average listed price vs player chosen listing price - * @param averageOfferPriceRub Price of average offer in roubles - * @param playerListedPriceRub Price player listed item for in roubles - * @param qualityMultiplier Quality multipler of item being sold - * @returns percent value - */ - calculateSellChance(averageOfferPriceRub: number, playerListedPriceRub: number, qualityMultiplier: number): number; - /** - * Get array of item count and sell time (empty array = no sell) - * @param sellChancePercent chance item will sell - * @param itemSellCount count of items to sell - * @returns Array of purchases of item(s) listed - */ - rollForSale(sellChancePercent: number, itemSellCount: number): SellResult[]; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/RagfairServerHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RagfairServerHelper.d.ts deleted file mode 100644 index a8133a6..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/RagfairServerHelper.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -/** - * Helper class for common ragfair server actions - */ -export declare class RagfairServerHelper { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected saveServer: SaveServer; - protected databaseServer: DatabaseServer; - protected profileHelper: ProfileHelper; - protected itemHelper: ItemHelper; - protected localeService: LocaleService; - protected dialogueHelper: DialogueHelper; - protected traderHelper: TraderHelper; - protected mailSendService: MailSendService; - protected itemFilterService: ItemFilterService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected ragfairConfig: IRagfairConfig; - protected questConfig: IQuestConfig; - protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); - /** - * Is item valid / on blacklist / quest item - * @param itemDetails - * @returns boolean - */ - isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - /** - * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic - * @param itemTemplateId Item tpl to check is blacklisted - * @returns True if its blacklsited - */ - protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; - /** - * Is supplied parent id on the ragfair custom item category blacklist - * @param parentId Parent Id to check is blacklisted - * @returns true if blacklisted - */ - protected isItemCategoryOnCustomFleaBlacklist(itemParentId: string): boolean; - /** - * is supplied id a trader - * @param traderId - * @returns True if id was a trader - */ - isTrader(traderId: string): boolean; - /** - * Is this user id the logged in player - * @param userId Id to test - * @returns True is the current player - */ - isPlayer(userId: string): boolean; - /** - * Send items back to player - * @param sessionID Player to send items to - * @param returnedItems Items to send to player - */ - returnItems(sessionID: string, returnedItems: Item[]): void; - calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; - /** - * Choose a currency at random with bias - * @returns currency tpl - */ - getDynamicOfferCurrency(): string; - getMemberType(userID: string): MemberCategory; - /** - * Get a player or traders nickname from their profile by their user id - * @param userID Sessionid/userid - * @returns Nickname of individual - */ - getNickname(userID: string): string; - /** - * Given a preset id from globals.json, return an array of items[] with unique ids - * @param item Preset item - * @returns Array of weapon and its children - */ - getPresetItems(item: Item): Item[]; - /** - * Possible bug, returns all items associated with an items tpl, could be multiple presets from globals.json - * @param item Preset item - * @returns - */ - getPresetItemsByTpl(item: Item): Item[]; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/RagfairSortHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RagfairSortHelper.d.ts deleted file mode 100644 index 2de0045..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/RagfairSortHelper.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { RagfairSort } from "@spt/models/enums/RagfairSort"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -export declare class RagfairSortHelper { - protected databaseServer: DatabaseServer; - protected localeService: LocaleService; - constructor(databaseServer: DatabaseServer, localeService: LocaleService); - /** - * Sort a list of ragfair offers by something (id/rating/offer name/price/expiry time) - * @param offers Offers to sort - * @param type How to sort it - * @param direction Ascending/descending - * @returns Sorted offers - */ - sortOffers(offers: IRagfairOffer[], type: RagfairSort, direction?: number): IRagfairOffer[]; - protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; - protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; - protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; - /** - * Order two offers by rouble price value - * @param a Offer a - * @param b Offer b - * @returns - */ - protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; - protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/RepairHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RepairHelper.d.ts deleted file mode 100644 index 4bd0577..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/RepairHelper.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class RepairHelper { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected repairConfig: IRepairConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); - /** - * Alter an items durability after a repair by trader/repair kit - * @param itemToRepair item to update durability details - * @param itemToRepairDetails db details of item to repair - * @param isArmor Is item being repaired a piece of armor - * @param amountToRepair how many unit of durability to repair - * @param useRepairKit Is item being repaired with a repair kit - * @param traderQualityMultipler Trader quality value from traders base json - * @param applyMaxDurabilityDegradation should item have max durability reduced - */ - updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit: boolean, traderQualityMultipler: number, applyMaxDurabilityDegradation?: boolean): void; - /** - * Repairing armor reduces the total durability value slightly, get a randomised (to 2dp) amount based on armor material - * @param armorMaterial What material is the armor being repaired made of - * @param isRepairKit Was a repair kit used - * @param armorMax Max amount of durability item can have - * @param traderQualityMultipler Different traders produce different loss values - * @returns Amount to reduce max durability by - */ - protected getRandomisedArmorRepairDegradationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number; - /** - * Repairing weapons reduces the total durability value slightly, get a randomised (to 2dp) amount - * @param itemProps Weapon properties - * @param isRepairKit Was a repair kit used - * @param weaponMax ax amount of durability item can have - * @param traderQualityMultipler Different traders produce different loss values - * @returns Amount to reduce max durability by - */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RepeatableQuestHelper.d.ts deleted file mode 100644 index d92657e..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/RepeatableQuestHelper.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ProbabilityObject, ProbabilityObjectArray } from "@spt/utils/RandomUtil"; -export declare class RepeatableQuestHelper { - protected mathUtil: MathUtil; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); - /** - * Get the relevant elimination config based on the current players PMC level - * @param pmcLevel Level of PMC character - * @param repeatableConfig Main repeatable config - * @returns IEliminationConfig - */ - getEliminationConfigByPmcLevel(pmcLevel: number, repeatableConfig: IRepeatableQuestConfig): IEliminationConfig; - probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/SecureContainerHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/SecureContainerHelper.d.ts deleted file mode 100644 index b6bcffe..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/SecureContainerHelper.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -export interface OwnerInventoryItems { - from: Item[]; - to: Item[]; - sameInventory: boolean; - isMail: boolean; -} -export declare class SecureContainerHelper { - protected itemHelper: ItemHelper; - constructor(itemHelper: ItemHelper); - /** - * Get an array of the item IDs (NOT tpls) inside a secure container - * @param items Inventory items to look for secure container in - * @returns Array of ids - */ - getSecureContainerItems(items: Item[]): string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/TradeHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/TradeHelper.d.ts deleted file mode 100644 index 7bb999c..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/TradeHelper.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; -import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; -import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class TradeHelper { - protected logger: ILogger; - protected eventOutputHolder: EventOutputHolder; - protected traderHelper: TraderHelper; - protected itemHelper: ItemHelper; - protected paymentService: PaymentService; - protected fenceService: FenceService; - protected localisationService: LocalisationService; - protected httpResponse: HttpResponseUtil; - protected inventoryHelper: InventoryHelper; - protected ragfairServer: RagfairServer; - protected traderAssortHelper: TraderAssortHelper; - protected traderPurchasePersisterService: TraderPurchasePersisterService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected traderConfig: ITraderConfig; - protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); - /** - * Buy item from flea or trader - * @param pmcData Player profile - * @param buyRequestData data from client - * @param sessionID Session id - * @param foundInRaid Should item be found in raid - * @param output IItemEventRouterResponse - * @returns IItemEventRouterResponse - */ - buyItem(pmcData: IPmcData, buyRequestData: IProcessBuyTradeRequestData, sessionID: string, foundInRaid: boolean, output: IItemEventRouterResponse): void; - /** - * Sell item to trader - * @param profileWithItemsToSell Profile to remove items from - * @param profileToReceiveMoney Profile to accept the money for selling item - * @param sellRequest Request data - * @param sessionID Session id - * @param output IItemEventRouterResponse - */ - sellItem(profileWithItemsToSell: IPmcData, profileToReceiveMoney: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Traders allow a limited number of purchases per refresh cycle (default 60 mins) - * @param sessionId Session id - * @param traderId Trader assort is purchased from - * @param assortBeingPurchased the item from trader being bought - * @param assortId Id of assort being purchased - * @param count How many of the item are being bought - */ - protected checkPurchaseIsWithinTraderItemLimit(sessionId: string, traderId: string, assortBeingPurchased: Item, assortId: string, count: number): void; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/TraderAssortHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/TraderAssortHelper.d.ts deleted file mode 100644 index 50f6933..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/TraderAssortHelper.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { RagfairAssortGenerator } from "@spt/generators/RagfairAssortGenerator"; -import { RagfairOfferGenerator } from "@spt/generators/RagfairOfferGenerator"; -import { AssortHelper } from "@spt/helpers/AssortHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITrader, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { TraderAssortService } from "@spt/services/TraderAssortService"; -import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class TraderAssortHelper { - protected logger: ILogger; - protected mathUtil: MathUtil; - protected timeUtil: TimeUtil; - protected databaseServer: DatabaseServer; - protected profileHelper: ProfileHelper; - protected assortHelper: AssortHelper; - protected paymentHelper: PaymentHelper; - protected ragfairAssortGenerator: RagfairAssortGenerator; - protected ragfairOfferGenerator: RagfairOfferGenerator; - protected traderAssortService: TraderAssortService; - protected localisationService: LocalisationService; - protected traderPurchasePersisterService: TraderPurchasePersisterService; - protected traderHelper: TraderHelper; - protected fenceService: FenceService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected traderConfig: ITraderConfig; - protected mergedQuestAssorts: Record>; - protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); - /** - * Get a traders assorts - * Can be used for returning ragfair / fence assorts - * Filter out assorts not unlocked due to level OR quest completion - * @param sessionId session id - * @param traderId traders id - * @param flea Should assorts player hasn't unlocked be returned - default false - * @returns a traders' assorts - */ - getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort; - /** - * Reset every traders root item `BuyRestrictionCurrent` property to 0 - * @param assortItems Items to adjust - */ - protected resetBuyRestrictionCurrentValue(assortItems: Item[]): void; - /** - * Create a dict of all assort id = quest id mappings used to work out what items should be shown to player based on the quests they've started/completed/failed - */ - protected hydrateMergedQuestAssorts(): void; - /** - * Reset a traders assorts and move nextResupply value to future - * Flag trader as needing a flea offer reset to be picked up by flea update() function - * @param trader trader details to alter - */ - resetExpiredTrader(trader: ITrader): void; - /** - * Does the supplied trader need its assorts refreshed - * @param traderID Trader to check - * @returns true they need refreshing - */ - traderAssortsHaveExpired(traderID: string): boolean; - /** - * Iterate over all assorts barter_scheme values, find barters selling for money and multiply by multipler in config - * @param traderAssort Assorts to multiple price of - */ - protected multiplyItemPricesByConfigMultiplier(traderAssort: ITraderAssort): void; - /** - * Get an array of pristine trader items prior to any alteration by player (as they were on server start) - * @param traderId trader id - * @returns array of Items - */ - protected getPristineTraderAssorts(traderId: string): Item[]; - /** - * Returns generated ragfair offers in a trader assort format - * @returns Trader assort object - */ - protected getRagfairDataAsTraderAssort(): ITraderAssort; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/TraderHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/TraderHelper.d.ts deleted file mode 100644 index aca9d87..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/TraderHelper.d.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ProfileTraderTemplate } from "@spt/models/eft/common/tables/IProfileTemplate"; -import { ITraderAssort, ITraderBase, LoyaltyLevel } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class TraderHelper { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected saveServer: SaveServer; - protected profileHelper: ProfileHelper; - protected handbookHelper: HandbookHelper; - protected itemHelper: ItemHelper; - protected playerService: PlayerService; - protected localisationService: LocalisationService; - protected fenceService: FenceService; - protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected traderConfig: ITraderConfig; - /** Dictionary of item tpl and the highest trader sell rouble price */ - protected highestTraderPriceItems: Record; - /** Dictionary of item tpl and the highest trader buy back rouble price */ - protected highestTraderBuyPriceItems: Record; - constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer); - /** - * Get a trader base object, update profile to reflect players current standing in profile - * when trader not found in profile - * @param traderID Traders Id to get - * @param sessionID Players id - * @returns Trader base - */ - getTrader(traderID: string, sessionID: string): ITraderBase; - /** - * Get all assort data for a particular trader - * @param traderId Trader to get assorts for - * @returns ITraderAssort - */ - getTraderAssortsByTraderId(traderId: string): ITraderAssort; - /** - * Retrieve the Item from a traders assort data by its id - * @param traderId Trader to get assorts for - * @param assortId Id of assort to find - * @returns Item object - */ - getTraderAssortItemByAssortId(traderId: string, assortId: string): Item; - /** - * Reset a profiles trader data back to its initial state as seen by a level 1 player - * Does NOT take into account different profile levels - * @param sessionID session id of player - * @param traderID trader id to reset - */ - resetTrader(sessionID: string, traderID: string): void; - /** - * Get the starting standing of a trader based on the current profiles type (e.g. EoD, Standard etc) - * @param traderId Trader id to get standing for - * @param rawProfileTemplate Raw profile from profiles.json to look up standing from - * @returns Standing value - */ - protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number; - /** - * Alter a traders unlocked status - * @param traderId Trader to alter - * @param status New status to use - * @param sessionId Session id of player - */ - setTraderUnlockedState(traderId: string, status: boolean, sessionId: string): void; - /** - * Add standing to a trader and level them up if exp goes over level threshold - * @param sessionId Session id of player - * @param traderId Traders id to add standing to - * @param standingToAdd Standing value to add to trader - */ - addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void; - /** - * Add standing to current standing and clamp value if it goes too low - * @param currentStanding current trader standing - * @param standingToAdd stansding to add to trader standing - * @returns current standing + added standing (clamped if needed) - */ - protected addStandingValuesTogether(currentStanding: number, standingToAdd: number): number; - /** - * Calculate traders level based on exp amount and increments level if over threshold - * @param traderID trader to check standing of - * @param pmcData profile to update trader in - */ - lvlUp(traderID: string, pmcData: IPmcData): void; - /** - * Get the next update timestamp for a trader - * @param traderID Trader to look up update value for - * @returns future timestamp - */ - getNextUpdateTimestamp(traderID: string): number; - /** - * Get the reset time between trader assort refreshes in seconds - * @param traderId Trader to look up - * @returns Time in seconds - */ - getTraderUpdateSeconds(traderId: string): number; - getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; - /** - * Store the purchase of an assort from a trader in the player profile - * @param sessionID Session id - * @param newPurchaseDetails New item assort id + count - */ - addTraderPurchasesToPlayerProfile(sessionID: string, newPurchaseDetails: { - items: { - itemId: string; - count: number; - }[]; - traderId: string; - }, itemPurchased: Item): void; - /** - * Get the highest rouble price for an item from traders - * UNUSED - * @param tpl Item to look up highest pride for - * @returns highest rouble cost for item - */ - getHighestTraderPriceRouble(tpl: string): number; - /** - * Get the highest price item can be sold to trader for (roubles) - * @param tpl Item to look up best trader sell-to price - * @returns Rouble price - */ - getHighestSellToTraderPrice(tpl: string): number; - /** - * Get a trader enum key by its value - * @param traderId Traders id - * @returns Traders key - */ - getTraderById(traderId: string): Traders; - /** - * Validates that the provided traderEnumValue exists in the Traders enum. If the value is valid, it returns the - * same enum value, effectively serving as a trader ID; otherwise, it logs an error and returns an empty string. - * This method provides a runtime check to prevent undefined behavior when using the enum as a dictionary key. - * - * For example, instead of this: - * `const traderId = Traders[Traders.PRAPOR];` - * - * You can use safely use this: - * `const traderId = this.traderHelper.getValidTraderIdByEnumValue(Traders.PRAPOR);` - * - * @param traderEnumValue The trader enum value to validate - * @returns The validated trader enum value as a string, or an empty string if invalid - */ - getValidTraderIdByEnumValue(traderEnumValue: Traders): string; - /** - * Does the 'Traders' enum has a value that matches the passed in parameter - * @param key Value to check for - * @returns True, values exists in Traders enum as a value - */ - traderEnumHasKey(key: string): boolean; - /** - * Accepts a trader id - * @param traderId Trader id - * @returns Ttrue if Traders enum has the param as a value - */ - traderEnumHasValue(traderId: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/UtilityHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/UtilityHelper.d.ts deleted file mode 100644 index 5d9f482..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/UtilityHelper.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare class UtilityHelper { - arrayIntersect(a: T[], b: T[]): T[]; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/WeightedRandomHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/WeightedRandomHelper.d.ts deleted file mode 100644 index f3a34f3..0000000 --- a/TypeScript/22CustomSptCommand/types/helpers/WeightedRandomHelper.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export declare class WeightedRandomHelper { - /** - * @deprecated USE getWeightedValue() WHERE POSSIBLE - * Gets a tplId from a weighted dictionary - * @param {tplId: weighting[]} itemArray - * @returns tplId - */ - getWeightedInventoryItem(itemArray: { - [tplId: string]: unknown; - } | ArrayLike): string; - /** - * Choos an item from the passed in array based on the weightings of each - * @param itemArray Items and weights to use - * @returns Chosen item from array - */ - getWeightedValue(itemArray: { - [key: string]: unknown; - } | ArrayLike): T; - /** - * Picks the random item based on its weight. - * The items with higher weight will be picked more often (with a higher probability). - * - * For example: - * - items = ['banana', 'orange', 'apple'] - * - weights = [0, 0.2, 0.8] - * - weightedRandom(items, weights) in 80% of cases will return 'apple', in 20% of cases will return - * 'orange' and it will never return 'banana' (because probability of picking the banana is 0%) - * - * @param {any[]} items - * @param {number[]} weights - * @returns {{item: any, index: number}} - */ - weightedRandom(items: any[], weights: any[]): { - item: any; - index: number; - }; - /** - * Find the greated common divisor of all weights and use it on the passed in dictionary - * @param weightedDict values to reduce - */ - reduceWeightValues(weightedDict: Record): void; - protected commonDivisor(numbers: number[]): number; - protected gcd(a: number, b: number): number; -} diff --git a/TypeScript/22CustomSptCommand/types/ide/BleedingEdgeEntry.d.ts b/TypeScript/22CustomSptCommand/types/ide/BleedingEdgeEntry.d.ts deleted file mode 100644 index 62f714e..0000000 --- a/TypeScript/22CustomSptCommand/types/ide/BleedingEdgeEntry.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "reflect-metadata"; -import "source-map-support/register"; diff --git a/TypeScript/22CustomSptCommand/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/22CustomSptCommand/types/ide/BleedingEdgeModsEntry.d.ts deleted file mode 100644 index 62f714e..0000000 --- a/TypeScript/22CustomSptCommand/types/ide/BleedingEdgeModsEntry.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "reflect-metadata"; -import "source-map-support/register"; diff --git a/TypeScript/22CustomSptCommand/types/ide/DebugEntry.d.ts b/TypeScript/22CustomSptCommand/types/ide/DebugEntry.d.ts deleted file mode 100644 index 62f714e..0000000 --- a/TypeScript/22CustomSptCommand/types/ide/DebugEntry.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "reflect-metadata"; -import "source-map-support/register"; diff --git a/TypeScript/22CustomSptCommand/types/ide/ReleaseEntry.d.ts b/TypeScript/22CustomSptCommand/types/ide/ReleaseEntry.d.ts deleted file mode 100644 index 62f714e..0000000 --- a/TypeScript/22CustomSptCommand/types/ide/ReleaseEntry.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "reflect-metadata"; -import "source-map-support/register"; diff --git a/TypeScript/22CustomSptCommand/types/ide/TestEntry.d.ts b/TypeScript/22CustomSptCommand/types/ide/TestEntry.d.ts deleted file mode 100644 index 62f714e..0000000 --- a/TypeScript/22CustomSptCommand/types/ide/TestEntry.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "reflect-metadata"; -import "source-map-support/register"; diff --git a/TypeScript/22CustomSptCommand/types/loaders/BundleLoader.d.ts b/TypeScript/22CustomSptCommand/types/loaders/BundleLoader.d.ts deleted file mode 100644 index e270988..0000000 --- a/TypeScript/22CustomSptCommand/types/loaders/BundleLoader.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { BundleHashCacheService } from "@spt/services/cache/BundleHashCacheService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class BundleInfo { - modpath: string; - filename: string; - crc: number; - dependencies: string[]; - constructor(modpath: string, bundle: BundleManifestEntry, bundleHash: number); -} -export declare class BundleLoader { - protected httpServerHelper: HttpServerHelper; - protected vfs: VFS; - protected jsonUtil: JsonUtil; - protected bundleHashCacheService: BundleHashCacheService; - protected cloner: ICloner; - protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); - /** - * Handle singleplayer/bundles - */ - getBundles(): BundleInfo[]; - getBundle(key: string): BundleInfo; - addBundles(modpath: string): void; - addBundle(key: string, b: BundleInfo): void; -} -export interface BundleManifest { - manifest: BundleManifestEntry[]; -} -export interface BundleManifestEntry { - key: string; - dependencyKeys: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/loaders/ModLoadOrder.d.ts b/TypeScript/22CustomSptCommand/types/loaders/ModLoadOrder.d.ts deleted file mode 100644 index 039f648..0000000 --- a/TypeScript/22CustomSptCommand/types/loaders/ModLoadOrder.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -export declare class ModLoadOrder { - protected logger: ILogger; - protected localisationService: LocalisationService; - protected mods: Map; - protected modsAvailable: Map; - protected loadOrder: Set; - constructor(logger: ILogger, localisationService: LocalisationService); - setModList(mods: Record): void; - getLoadOrder(): string[]; - getModsOnLoadBefore(mod: string): Set; - getModsOnLoadAfter(mod: string): Set; - protected invertLoadBefore(mod: string): void; - protected getLoadOrderRecursive(mod: string, visited: Set): void; -} diff --git a/TypeScript/22CustomSptCommand/types/loaders/ModTypeCheck.d.ts b/TypeScript/22CustomSptCommand/types/loaders/ModTypeCheck.d.ts deleted file mode 100644 index f66ec45..0000000 --- a/TypeScript/22CustomSptCommand/types/loaders/ModTypeCheck.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { IPostDBLoadModAsync } from "@spt/models/external/IPostDBLoadModAsync"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { IPostSptLoadModAsync } from "@spt/models/external/IPostSptLoadModAsync"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { IPreSptLoadModAsync } from "@spt/models/external/IPreSptLoadModAsync"; -export declare class ModTypeCheck { - /** - * Use defined safe guard to check if the mod is a IPreSptLoadMod - * @returns boolean - */ - isPreSptLoad(mod: any): mod is IPreSptLoadMod; - /** - * Use defined safe guard to check if the mod is a IPostSptLoadMod - * @returns boolean - */ - isPostSptLoad(mod: any): mod is IPostSptLoadMod; - /** - * Use defined safe guard to check if the mod is a IPostDBLoadMod - * @returns boolean - */ - isPostDBLoad(mod: any): mod is IPostDBLoadMod; - /** - * Use defined safe guard to check if the mod is a IPreSptLoadModAsync - * @returns boolean - */ - isPreSptLoadAsync(mod: any): mod is IPreSptLoadModAsync; - /** - * Use defined safe guard to check if the mod is a IPostSptLoadModAsync - * @returns boolean - */ - isPostSptLoadAsync(mod: any): mod is IPostSptLoadModAsync; - /** - * Use defined safe guard to check if the mod is a IPostDBLoadModAsync - * @returns boolean - */ - isPostDBLoadAsync(mod: any): mod is IPostDBLoadModAsync; - /** - * Checks for mod to be compatible with 3.X+ - * @returns boolean - */ - isPostV3Compatible(mod: any): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/loaders/PostDBModLoader.d.ts b/TypeScript/22CustomSptCommand/types/loaders/PostDBModLoader.d.ts deleted file mode 100644 index b0c4bf4..0000000 --- a/TypeScript/22CustomSptCommand/types/loaders/PostDBModLoader.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -import { OnLoad } from "@spt/di/OnLoad"; -import { BundleLoader } from "@spt/loaders/BundleLoader"; -import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -export declare class PostDBModLoader implements OnLoad { - protected logger: ILogger; - protected bundleLoader: BundleLoader; - protected preSptModLoader: PreSptModLoader; - protected localisationService: LocalisationService; - protected modTypeCheck: ModTypeCheck; - protected container: DependencyContainer; - constructor(logger: ILogger, bundleLoader: BundleLoader, preSptModLoader: PreSptModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); - onLoad(): Promise; - getRoute(): string; - getModPath(mod: string): string; - protected executeModsAsync(): Promise; - protected addBundles(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/loaders/PostSptModLoader.d.ts b/TypeScript/22CustomSptCommand/types/loaders/PostSptModLoader.d.ts deleted file mode 100644 index fb54579..0000000 --- a/TypeScript/22CustomSptCommand/types/loaders/PostSptModLoader.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IModLoader } from "@spt/models/spt/mod/IModLoader"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -export declare class PostSptModLoader implements IModLoader { - protected logger: ILogger; - protected preSptModLoader: PreSptModLoader; - protected localisationService: LocalisationService; - protected modTypeCheck: ModTypeCheck; - protected container: DependencyContainer; - constructor(logger: ILogger, preSptModLoader: PreSptModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); - getModPath(mod: string): string; - load(): Promise; - protected executeModsAsync(): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/models/common/MinMax.d.ts b/TypeScript/22CustomSptCommand/types/models/common/MinMax.d.ts deleted file mode 100644 index bc118a8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/common/MinMax.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface MinMax { - max: number; - min: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/bot/IGenerateBotsRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/bot/IGenerateBotsRequestData.d.ts deleted file mode 100644 index f1f7013..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/bot/IGenerateBotsRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IGenerateBotsRequestData { - conditions: Condition[]; -} -export interface Condition { - /** e.g. assault/pmcBot/bossKilla */ - Role: string; - Limit: number; - Difficulty: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/bot/IRandomisedBotLevelResult.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/bot/IRandomisedBotLevelResult.d.ts deleted file mode 100644 index 75bd936..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/bot/IRandomisedBotLevelResult.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IRandomisedBotLevelResult { - level: number; - exp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/builds/ISetMagazineRequest.d.ts deleted file mode 100644 index 87dab41..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/builds/ISetMagazineRequest.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; -export interface ISetMagazineRequest { - Id: string; - Name: string; - Caliber: string; - Items: IMagazineTemplateAmmoItem[]; - TopCount: number; - BottomCount: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/IEmptyRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/IEmptyRequestData.d.ts deleted file mode 100644 index 284d16e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/IEmptyRequestData.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IEmptyRequestData { -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/IGlobals.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/IGlobals.d.ts deleted file mode 100644 index 2209415..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/IGlobals.d.ts +++ /dev/null @@ -1,1532 +0,0 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -export interface IGlobals { - time: number; - config: IConfig; - bot_presets: IBotPreset[]; - AudioSettings: IAudioSettings; - EnvironmentSettings: IEnvironmentSettings; - BotWeaponScatterings: IBotWeaponScattering[]; - ItemPresets: Record; -} -export interface IConfig { - content: IContent; - AimPunchMagnitude: number; - WeaponSkillProgressRate: number; - SkillAtrophy: boolean; - exp: IExp; - t_base_looting: number; - t_base_lockpicking: number; - armor: IArmor; - SessionsToShowHotKeys: number; - MaxBotsAliveOnMap: number; - MaxBotsAliveOnMapPvE: number; - SavagePlayCooldown: number; - SavagePlayCooldownNdaFree: number; - MarksmanAccuracy: number; - SavagePlayCooldownDevelop: number; - TODSkyDate: string; - Mastering: IMastering[]; - GlobalItemPriceModifier: number; - TradingUnlimitedItems: boolean; - MaxLoyaltyLevelForAll: boolean; - GlobalLootChanceModifier: number; - GlobalLootChanceModifierPvE: number; - GraphicSettings: IGraphicSettings; - TimeBeforeDeploy: number; - TimeBeforeDeployLocal: number; - TradingSetting: number; - TradingSettings: ITradingSettings; - ItemsCommonSettings: IItemsCommonSettings; - LoadTimeSpeedProgress: number; - BaseLoadTime: number; - BaseUnloadTime: number; - BaseCheckTime: number; - BluntDamageReduceFromSoftArmorMod: number; - BodyPartColliderSettings: IBodyPartColliderSettings; - Customization: ICustomization; - UncheckOnShot: boolean; - BotsEnabled: boolean; - BufferZone: IBufferZone; - ArmorMaterials: IArmorMaterials; - LegsOverdamage: number; - HandsOverdamage: number; - StomachOverdamage: number; - Health: IHealth; - rating: IRating; - tournament: ITournament; - QuestSettings: IQuestSettings; - RagFair: IRagFair; - handbook: IHandbook; - FractureCausedByFalling: IProbability; - FractureCausedByBulletHit: IProbability; - WAVE_COEF_LOW: number; - WAVE_COEF_MID: number; - WAVE_COEF_HIGH: number; - WAVE_COEF_HORDE: number; - Stamina: IStamina; - StaminaRestoration: IStaminaRestoration; - StaminaDrain: IStaminaDrain; - RequirementReferences: IRequirementReferences; - RestrictionsInRaid: IRestrictionsInRaid[]; - SkillMinEffectiveness: number; - SkillFatiguePerPoint: number; - SkillFreshEffectiveness: number; - SkillFreshPoints: number; - SkillPointsBeforeFatigue: number; - SkillFatigueReset: number; - DiscardLimitsEnabled: boolean; - EventSettings: IEventSettings; - FavoriteItemsSettings: IFavoriteItemsSettings; - VaultingSettings: IVaultingSettings; - BTRSettings: IBTRSettings; - EventType: string[]; - WalkSpeed: Ixyz; - SprintSpeed: Ixyz; - SquadSettings: ISquadSettings; - SkillEnduranceWeightThreshold: number; - TeamSearchingTimeout: number; - Insurance: IInsurance; - SkillExpPerLevel: number; - GameSearchingTimeout: number; - WallContusionAbsorption: Ixyz; - WeaponFastDrawSettings: IWeaponFastDrawSettings; - SkillsSettings: ISkillsSettings; - AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: IAiming; - Malfunction: IMalfunction; - Overheat: IOverheat; - FenceSettings: IFenceSettings; - TestValue: number; - Inertia: IInertia; - Ballistic: IBallistic; - RepairSettings: IRepairSettings; -} -export interface IBodyPartColliderSettings { - BackHead: IBodyPartColliderPart; - Ears: IBodyPartColliderPart; - Eyes: IBodyPartColliderPart; - HeadCommon: IBodyPartColliderPart; - Jaw: IBodyPartColliderPart; - LeftCalf: IBodyPartColliderPart; - LeftForearm: IBodyPartColliderPart; - LeftSideChestDown: IBodyPartColliderPart; - LeftSideChestUp: IBodyPartColliderPart; - LeftThigh: IBodyPartColliderPart; - LeftUpperArm: IBodyPartColliderPart; - NeckBack: IBodyPartColliderPart; - NeckFront: IBodyPartColliderPart; - ParietalHead: IBodyPartColliderPart; - Pelvis: IBodyPartColliderPart; - PelvisBack: IBodyPartColliderPart; - RibcageLow: IBodyPartColliderPart; - RibcageUp: IBodyPartColliderPart; - RightCalf: IBodyPartColliderPart; - RightForearm: IBodyPartColliderPart; - RightSideChestDown: IBodyPartColliderPart; - RightSideChestUp: IBodyPartColliderPart; - RightThigh: IBodyPartColliderPart; - RightUpperArm: IBodyPartColliderPart; - SpineDown: IBodyPartColliderPart; - SpineTop: IBodyPartColliderPart; -} -export interface IBodyPartColliderPart { - PenetrationChance: number; - PenetrationDamageMod: number; - PenetrationLevel: number; -} -export interface IWeaponFastDrawSettings { - HandShakeCurveFrequency: number; - HandShakeCurveIntensity: number; - HandShakeMaxDuration: number; - HandShakeTremorIntensity: number; - WeaponFastSwitchMaxSpeedMult: number; - WeaponFastSwitchMinSpeedMult: number; - WeaponPistolFastSwitchMaxSpeedMult: number; - WeaponPistolFastSwitchMinSpeedMult: number; -} -export interface IEventSettings { - EventActive: boolean; - EventTime: number; - EventWeather: IEventWeather; - ExitTimeMultiplier: number; - StaminaMultiplier: number; - SummonFailedWeather: IEventWeather; - SummonSuccessWeather: IEventWeather; - WeatherChangeTime: number; -} -export interface IEventWeather { - Cloudness: number; - Hour: number; - Minute: number; - Rain: number; - RainRandomness: number; - ScaterringFogDensity: number; - TopWindDirection: Ixyz; - Wind: number; - WindDirection: number; -} -export interface IGraphicSettings { - ExperimentalFogInCity: boolean; -} -export interface IBufferZone { - CustomerAccessTime: number; - CustomerCriticalTimeStart: number; - CustomerKickNotifTime: number; -} -export interface IItemsCommonSettings { - ItemRemoveAfterInterruptionTime: number; -} -export interface ITradingSettings { - BuyoutRestrictions: IBuyoutRestrictions; -} -export interface IBuyoutRestrictions { - MinDurability: number; - MinFoodDrinkResource: number; - MinMedsResource: number; -} -export interface IContent { - ip: string; - port: number; - root: string; -} -export interface IExp { - heal: IHeal; - match_end: IMatchEnd; - kill: IKill; - level: ILevel; - loot_attempts: ILootAttempt[]; - expForLevelOneDogtag: number; - expForLockedDoorOpen: number; - expForLockedDoorBreach: number; - triggerMult: number; -} -export interface IHeal { - expForHeal: number; - expForHydration: number; - expForEnergy: number; -} -export interface IMatchEnd { - README: string; - survived_exp_requirement: number; - survived_seconds_requirement: number; - survived_exp_reward: number; - mia_exp_reward: number; - runner_exp_reward: number; - leftMult: number; - miaMult: number; - survivedMult: number; - runnerMult: number; - killedMult: number; -} -export interface IKill { - combo: ICombo[]; - victimLevelExp: number; - headShotMult: number; - expOnDamageAllHealth: number; - longShotDistance: number; - bloodLossToLitre: number; - botExpOnDamageAllHealth: number; - botHeadShotMult: number; - victimBotLevelExp: number; - pmcExpOnDamageAllHealth: number; - pmcHeadShotMult: number; -} -export interface ICombo { - percent: number; -} -export interface ILevel { - exp_table: IExpTable[]; - trade_level: number; - savage_level: number; - clan_level: number; - mastering1: number; - mastering2: number; -} -export interface IExpTable { - exp: number; -} -export interface ILootAttempt { - k_exp: number; -} -export interface IArmor { - class: IClass[]; -} -export interface IClass { - resistance: number; -} -export interface IMastering { - Name: string; - Templates: string[]; - Level2: number; - Level3: number; -} -export interface ICustomization { - SavageHead: ISavageHead; - SavageBody: ISavageBody; - SavageFeet: ISavageFeet; - CustomizationVoice: ICustomizationVoice[]; - BodyParts: IBodyParts; -} -export interface ISavageHead { - wild_head_1: IWildHead; - wild_head_2: IWildHead; - wild_head_3: IWildHead; - Wild_Dealmaker_head: IWildHead; - Wild_Killa_head: IWildHead; - bear_head: IWildHead; - bear_head_1: IWildHead; - usec_head_1: IWildHead; - Head_BOSS_Glukhar: IWildHead; - Wild_Head_nonMesh: IWildHead; - Head_BOSS_Sanitar: IWildHead; - wild_head_drozd: IWildHead; - wild_head_misha: IWildHead; - head_cultist_01: IWildHead; - head_cultist_02: IWildHead; - head_cultist_03: IWildHead; - DefaultUsecHead: IWildHead; - usec_head_3: IWildHead; - usec_head_4: IWildHead; - usec_head_5: IWildHead; -} -export interface IWildHead { - head: string; - isNotRandom: boolean; - NotRandom: boolean; -} -export interface ISavageBody { - wild_body: IWildBody; - wild_body_1: IWildBody; - wild_body_2: IWildBody; - wild_body_3: IWildBody; - Wild_Dealmaker_body: IWildBody; - wild_security_body_1: IWildBody; - wild_security_body_2: IWildBody; - wild_Killa_body: IWildBody; - wild_pmcBot_body: IWildBody; - wild_Shturman_body: IWildBody; - wild_Gluhar_body: IWildBody; - Tshirt_security_TshirtTatu_01: IWildBody; - Tshirt_security_TshirtTatu_02: IWildBody; - Top_security_Husky: IWildBody; - Top_security_Gorka4: IWildBody; - scav_kit_upper_meteor: IWildBody; - wild_body_russia1: IWildBody; - Top_BOSS_Sanitar: IWildBody; - wild_body_motocross: IWildBody; - top_cultist_01: IWildBody; - top_cultist_02: IWildBody; - wild_body_rainparka: IWildBody; - wild_body_underarmour: IWildBody; - top_boss_tagilla: IWildBody; - DefaultUsecBody: IWildBody; - usec_upper_acu: IWildBody; - usec_upper_commando: IWildBody; - usec_upper_aggressor: IWildBody; - usec_upper_hoody: IWildBody; - usec_upper_pcuironsight: IWildBody; - usec_top_beltstaff: IWildBody; - usec_upper_flexion: IWildBody; - usec_upper_tier3: IWildBody; - usec_upper_pcsmulticam: IWildBody; - usec_upper_tier_2: IWildBody; - usec_upper_infiltrator: IWildBody; - user_upper_NightPatrol: IWildBody; - wild_body_bomber: IWildBody; - wild_top_yellowcoat: IWildBody; -} -export interface IWildBody { - body: string; - hands: string; - isNotRandom: boolean; -} -export interface ISavageFeet { - wild_feet: IWildFeet; - wild_feet_1: IWildFeet; - wild_feet_2: IWildFeet; - Wild_Dealmaker_feet: IWildFeet; - wild_security_feet_1: IWildFeet; - Wild_Killa_feet: IWildFeet; - wild_pmcBot_feet: IWildFeet; - Pants_BOSS_Glukhar: IWildFeet; - Pants_BOSS_Shturman: IWildFeet; - Pants_security_Gorka4: IWildFeet; - Pants_security_Flora: IWildFeet; - scav_kit_lower_sklon: IWildFeet; - Pants_BOSS_Sanitar: IWildFeet; - wild_feet_sweatpants: IWildFeet; - wild_feet_wasatch: IWildFeet; - wild_feet_slimPants: IWildFeet; - pants_cultist_01: IWildFeet; - pants_cultist_02: IWildFeet; - wild_feet_scavelite_taclite: IWildFeet; - pants_boss_tagilla: IWildFeet; - wild_feet_bomber: IWildFeet; - wild_pants_yellowcoat: IWildFeet; -} -export interface IWildFeet { - feet: string; - isNotRandom: boolean; - NotRandom: boolean; -} -export interface ICustomizationVoice { - voice: string; - side: string[]; - isNotRandom: boolean; -} -export interface IBodyParts { - Head: string; - Body: string; - Feet: string; - Hands: string; -} -export interface IArmorMaterials { - UHMWPE: IArmorType; - Aramid: IArmorType; - Combined: IArmorType; - Titan: IArmorType; - Aluminium: IArmorType; - ArmoredSteel: IArmorType; - Ceramic: IArmorType; - Glass: IArmorType; -} -export interface IArmorType { - Destructibility: number; - MinRepairDegradation: number; - MaxRepairDegradation: number; - ExplosionDestructibility: number; - MinRepairKitDegradation: number; - MaxRepairKitDegradation: number; -} -export interface IHealth { - Falling: IFalling; - Effects: IEffects; - HealPrice: IHealPrice; - ProfileHealthSettings: IProfileHealthSettings; -} -export interface IFalling { - DamagePerMeter: number; - SafeHeight: number; -} -export interface IEffects { - Existence: IExistence; - Dehydration: IDehydration; - BreakPart: IBreakPart; - Contusion: IContusion; - Disorientation: IDisorientation; - Exhaustion: IExhaustion; - LowEdgeHealth: ILowEdgeHealth; - RadExposure: IRadExposure; - Stun: IStun; - Intoxication: Intoxication; - Regeneration: IRegeneration; - Wound: IWound; - Berserk: IBerserk; - Flash: IFlash; - MedEffect: IMedEffect; - Pain: IPain; - PainKiller: IPainKiller; - SandingScreen: ISandingScreen; - MildMusclePain: IMusclePainEffect; - SevereMusclePain: IMusclePainEffect; - Stimulator: IStimulator; - Tremor: ITremor; - ChronicStaminaFatigue: IChronicStaminaFatigue; - Fracture: IFracture; - HeavyBleeding: IHeavyBleeding; - LightBleeding: ILightBleeding; - BodyTemperature: IBodyTemperature; -} -export interface IExistence { - EnergyLoopTime: number; - HydrationLoopTime: number; - EnergyDamage: number; - HydrationDamage: number; - DestroyedStomachEnergyTimeFactor: number; - DestroyedStomachHydrationTimeFactor: number; -} -export interface IDehydration { - DefaultDelay: number; - DefaultResidueTime: number; - BleedingHealth: number; - BleedingLoopTime: number; - BleedingLifeTime: number; - DamageOnStrongDehydration: number; - StrongDehydrationLoopTime: number; -} -export interface IBreakPart { - DefaultDelay: number; - DefaultResidueTime: number; - HealExperience: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovePrice: number; - RemovedAfterDeath: boolean; - BulletHitProbability: IProbability; - FallingProbability: IProbability; -} -export interface IContusion { - Dummy: number; -} -export interface IDisorientation { - Dummy: number; -} -export interface IExhaustion { - DefaultDelay: number; - DefaultResidueTime: number; - Damage: number; - DamageLoopTime: number; -} -export interface ILowEdgeHealth { - DefaultDelay: number; - DefaultResidueTime: number; - StartCommonHealth: number; -} -export interface IRadExposure { - Damage: number; - DamageLoopTime: number; -} -export interface IStun { - Dummy: number; -} -export interface Intoxication { - DefaultDelay: number; - DefaultResidueTime: number; - DamageHealth: number; - HealthLoopTime: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovedAfterDeath: boolean; - HealExperience: number; - RemovePrice: number; -} -export interface IRegeneration { - LoopTime: number; - MinimumHealthPercentage: number; - Energy: number; - Hydration: number; - BodyHealth: IBodyHealth; - Influences: IInfluences; -} -export interface IBodyHealth { - Head: IBodyHealthValue; - Chest: IBodyHealthValue; - Stomach: IBodyHealthValue; - LeftArm: IBodyHealthValue; - RightArm: IBodyHealthValue; - LeftLeg: IBodyHealthValue; - RightLeg: IBodyHealthValue; -} -export interface IBodyHealthValue { - Value: number; -} -export interface IInfluences { - LightBleeding: IInfluence; - HeavyBleeding: IInfluence; - Fracture: IInfluence; - RadExposure: IInfluence; - Intoxication: IInfluence; -} -export interface IInfluence { - HealthSlowDownPercentage: number; - EnergySlowDownPercentage: number; - HydrationSlowDownPercentage: number; -} -export interface IWound { - WorkingTime: number; - ThresholdMin: number; - ThresholdMax: number; -} -export interface IBerserk { - DefaultDelay: number; - WorkingTime: number; - DefaultResidueTime: number; -} -export interface IFlash { - Dummy: number; -} -export interface IMedEffect { - LoopTime: number; - StartDelay: number; - DrinkStartDelay: number; - FoodStartDelay: number; - DrugsStartDelay: number; - MedKitStartDelay: number; - MedicalStartDelay: number; - StimulatorStartDelay: number; -} -export interface IPain { - TremorDelay: number; - HealExperience: number; -} -export interface IPainKiller { - Dummy: number; -} -export interface ISandingScreen { - Dummy: number; -} -export interface IMusclePainEffect { - GymEffectivity: number; - OfflineDurationMax: number; - OfflineDurationMin: number; - TraumaChance: number; -} -export interface IStimulator { - BuffLoopTime: number; - Buffs: IBuffs; -} -export interface IBuffs { - BuffsSJ1TGLabs: IBuff[]; - BuffsSJ6TGLabs: IBuff[]; - BuffsPropital: IBuff[]; - BuffsZagustin: IBuff[]; - BuffseTGchange: IBuff[]; - BuffsAdrenaline: IBuff[]; - BuffsGoldenStarBalm: IBuff[]; - Buffs_drink_aquamari: IBuff[]; - Buffs_drink_maxenergy: IBuff[]; - Buffs_drink_milk: IBuff[]; - Buffs_drink_tarcola: IBuff[]; - Buffs_drink_hotrod: IBuff[]; - Buffs_drink_juice_army: IBuff[]; - Buffs_drink_water: IBuff[]; - Buffs_food_borodinskiye: IBuff[]; - Buffs_food_condensed_milk: IBuff[]; - Buffs_food_emelya: IBuff[]; - Buffs_food_mayonez: IBuff[]; - Buffs_food_mre: IBuff[]; - Buffs_food_sugar: IBuff[]; - Buffs_drink_vodka: IBuff[]; - Buffs_drink_jack: IBuff[]; - Buffs_drink_moonshine: IBuff[]; - Buffs_drink_purewater: IBuff[]; - Buffs_3bTG: IBuff[]; - Buffs_AHF1M: IBuff[]; - Buffs_L1: IBuff[]; - Buffs_MULE: IBuff[]; - Buffs_Meldonin: IBuff[]; - Buffs_Obdolbos: IBuff[]; - Buffs_P22: IBuff[]; - Buffs_KultistsToxin: IBuff[]; - Buffs_BodyTemperature: IBuff[]; - Buffs_Antidote: IBuff[]; - Buffs_melee_bleed: IBuff[]; - Buffs_melee_blunt: IBuff[]; - Buffs_hultafors: IBuff[]; - Buffs_drink_vodka_BAD: IBuff[]; - Buffs_food_alyonka: IBuff[]; - Buffs_food_slippers: IBuff[]; - Buffs_knife: IBuff[]; - Buffs_EndOfWinterBonfire: IBuff[]; -} -export interface IBuff { - BuffType: string; - Chance: number; - Delay: number; - Duration: number; - Value: number; - AbsoluteValue: boolean; - SkillName: string; -} -export interface ITremor { - DefaultDelay: number; - DefaultResidueTime: number; -} -export interface IChronicStaminaFatigue { - EnergyRate: number; - WorkingTime: number; - TicksEvery: number; - EnergyRatePerStack: number; -} -export interface IFracture { - DefaultDelay: number; - DefaultResidueTime: number; - HealExperience: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovePrice: number; - RemovedAfterDeath: boolean; - BulletHitProbability: IProbability; - FallingProbability: IProbability; -} -export interface IHeavyBleeding { - DefaultDelay: number; - DefaultResidueTime: number; - DamageEnergy: number; - DamageHealth: number; - EnergyLoopTime: number; - HealthLoopTime: number; - DamageHealthDehydrated: number; - HealthLoopTimeDehydrated: number; - LifeTimeDehydrated: number; - EliteVitalityDuration: number; - HealExperience: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovePrice: number; - RemovedAfterDeath: boolean; - Probability: IProbability; -} -export interface IProbability { - FunctionType: string; - K: number; - B: number; - Threshold: number; -} -export interface ILightBleeding { - DefaultDelay: number; - DefaultResidueTime: number; - DamageEnergy: number; - DamageHealth: number; - EnergyLoopTime: number; - HealthLoopTime: number; - DamageHealthDehydrated: number; - HealthLoopTimeDehydrated: number; - LifeTimeDehydrated: number; - EliteVitalityDuration: number; - HealExperience: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovePrice: number; - RemovedAfterDeath: boolean; - Probability: IProbability; -} -export interface IBodyTemperature { - DefaultBuildUpTime: number; - DefaultResidueTime: number; - LoopTime: number; -} -export interface IHealPrice { - HealthPointPrice: number; - HydrationPointPrice: number; - EnergyPointPrice: number; - TrialLevels: number; - TrialRaids: number; -} -export interface IProfileHealthSettings { - BodyPartsSettings: IBodyPartsSettings; - HealthFactorsSettings: IHealthFactorsSettings; - DefaultStimulatorBuff: string; -} -export interface IBodyPartsSettings { - Head: IBodyPartsSetting; - Chest: IBodyPartsSetting; - Stomach: IBodyPartsSetting; - LeftArm: IBodyPartsSetting; - RightArm: IBodyPartsSetting; - LeftLeg: IBodyPartsSetting; - RightLeg: IBodyPartsSetting; -} -export interface IBodyPartsSetting { - Minimum: number; - Maximum: number; - Default: number; - EnvironmentDamageMultiplier: number; - OverDamageReceivedMultiplier: number; -} -export interface IHealthFactorsSettings { - Energy: IHealthFactorSetting; - Hydration: IHealthFactorSetting; - Temperature: IHealthFactorSetting; - Poisoning: IHealthFactorSetting; - Radiation: IHealthFactorSetting; -} -export interface IHealthFactorSetting { - Minimum: number; - Maximum: number; - Default: number; -} -export interface IRating { - levelRequired: number; - limit: number; - categories: ICategories; -} -export interface ICategories { - experience: boolean; - kd: boolean; - surviveRatio: boolean; - avgEarnings: boolean; - pmcKills: boolean; - raidCount: boolean; - longestShot: boolean; - timeOnline: boolean; - inventoryFullCost: boolean; - ragFairStanding: boolean; -} -export interface ITournament { - categories: ITournamentCategories; - limit: number; - levelRequired: number; -} -export interface ITournamentCategories { - dogtags: boolean; -} -export interface IRagFair { - enabled: boolean; - priceStabilizerEnabled: boolean; - includePveTraderSales: boolean; - priceStabilizerStartIntervalInHours: number; - minUserLevel: number; - communityTax: number; - communityItemTax: number; - communityRequirementTax: number; - offerPriorityCost: number; - offerDurationTimeInHour: number; - offerDurationTimeInHourAfterRemove: number; - priorityTimeModifier: number; - maxRenewOfferTimeInHour: number; - renewPricePerHour: number; - maxActiveOfferCount: IMaxActiveOfferCount[]; - balancerRemovePriceCoefficient: number; - balancerMinPriceCount: number; - balancerAveragePriceCoefficient: number; - delaySinceOfferAdd: number; - uniqueBuyerTimeoutInDays: number; - ratingSumForIncrease: number; - ratingIncreaseCount: number; - ratingSumForDecrease: number; - ratingDecreaseCount: number; - maxSumForIncreaseRatingPerOneSale: number; - maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: IMaxSumForRarity; - ChangePriceCoef: number; - balancerUserItemSaleCooldownEnabled: boolean; - balancerUserItemSaleCooldown: number; - youSellOfferMaxStorageTimeInHour: number; - yourOfferDidNotSellMaxStorageTimeInHour: number; - isOnlyFoundInRaidAllowed: boolean; - sellInOnePiece: number; -} -export interface IMaxActiveOfferCount { - from: number; - to: number; - count: number; - countForSpecialEditions: number; -} -export interface IMaxSumForRarity { - Common: IRarityMaxSum; - Rare: IRarityMaxSum; - Superrare: IRarityMaxSum; - Not_exist: IRarityMaxSum; -} -export interface IRarityMaxSum { - value: number; -} -export interface IHandbook { - defaultCategory: string; -} -export interface IStamina { - Capacity: number; - SprintDrainRate: number; - BaseRestorationRate: number; - JumpConsumption: number; - GrenadeHighThrow: number; - GrenadeLowThrow: number; - AimDrainRate: number; - AimRangeFinderDrainRate: number; - OxygenCapacity: number; - OxygenRestoration: number; - WalkOverweightLimits: Ixyz; - BaseOverweightLimits: Ixyz; - SprintOverweightLimits: Ixyz; - WalkSpeedOverweightLimits: Ixyz; - CrouchConsumption: Ixyz; - WalkConsumption: Ixyz; - StandupConsumption: Ixyz; - TransitionSpeed: Ixyz; - SprintAccelerationLowerLimit: number; - SprintSpeedLowerLimit: number; - SprintSensitivityLowerLimit: number; - AimConsumptionByPose: Ixyz; - RestorationMultiplierByPose: Ixyz; - OverweightConsumptionByPose: Ixyz; - AimingSpeedMultiplier: number; - WalkVisualEffectMultiplier: number; - WeaponFastSwitchConsumption: number; - HandsCapacity: number; - HandsRestoration: number; - ProneConsumption: number; - BaseHoldBreathConsumption: number; - SoundRadius: Ixyz; - ExhaustedMeleeSpeed: number; - FatigueRestorationRate: number; - FatigueAmountToCreateEffect: number; - ExhaustedMeleeDamageMultiplier: number; - FallDamageMultiplier: number; - SafeHeightOverweight: number; - SitToStandConsumption: number; - StaminaExhaustionCausesJiggle: boolean; - StaminaExhaustionStartsBreathSound: boolean; - StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: Ixyz; - PoseLevelIncreaseSpeed: Ixyz; - PoseLevelDecreaseSpeed: Ixyz; - PoseLevelConsumptionPerNotch: Ixyz; -} -export interface IStaminaRestoration { - LowerLeftPoint: number; - LowerRightPoint: number; - LeftPlatoPoint: number; - RightPlatoPoint: number; - RightLimit: number; - ZeroValue: number; -} -export interface IStaminaDrain { - LowerLeftPoint: number; - LowerRightPoint: number; - LeftPlatoPoint: number; - RightPlatoPoint: number; - RightLimit: number; - ZeroValue: number; -} -export interface IRequirementReferences { - Alpinist: IAlpinist[]; -} -export interface IAlpinist { - Requirement: string; - Id: string; - Count: number; - RequiredSlot: string; - RequirementTip: string; -} -export interface IRestrictionsInRaid { - TemplateId: string; - Value: number; -} -export interface IFavoriteItemsSettings { - WeaponStandMaxItemsCount: number; - PlaceOfFameMaxItemsCount: number; -} -export interface IVaultingSettings { - IsActive: boolean; - VaultingInputTime: number; - GridSettings: IVaultingGridSettings; - MovesSettings: IVaultingMovesSettings; -} -export interface IVaultingGridSettings { - GridSizeX: number; - GridSizeY: number; - GridSizeZ: number; - SteppingLengthX: number; - SteppingLengthY: number; - SteppingLengthZ: number; - GridOffsetX: number; - GridOffsetY: number; - GridOffsetZ: number; - OffsetFactor: number; -} -export interface IVaultingMovesSettings { - VaultSettings: IVaultingSubMoveSettings; - ClimbSettings: IVaultingSubMoveSettings; -} -export interface IVaultingSubMoveSettings { - IsActive: boolean; - MaxWithoutHandHeight: number; - SpeedRange: Ixyz; - MoveRestrictions: IMoveRestrictions; - AutoMoveRestrictions: IMoveRestrictions; -} -export interface IMoveRestrictions { - IsActive: boolean; - MinDistantToInteract: number; - MinHeight: number; - MaxHeight: number; - MinLength: number; - MaxLength: number; -} -export interface IBTRSettings { - LocationsWithBTR: string[]; - BasePriceTaxi: number; - AddPriceTaxi: number; - CleanUpPrice: number; - DeliveryPrice: number; - ModDeliveryCost: number; - BearPriceMod: number; - UsecPriceMod: number; - ScavPriceMod: number; - CoefficientDiscountCharisma: number; - DeliveryMinPrice: number; - TaxiMinPrice: number; - BotCoverMinPrice: number; - MapsConfigs: Record; - DiameterWheel: number; - HeightWheel: number; - HeightWheelMaxPosLimit: number; - HeightWheelMinPosLimit: number; - SnapToSurfaceWheelsSpeed: number; - CheckSurfaceForWheelsTimer: number; - HeightWheelOffset: number; -} -export interface IBtrMapConfig { - BtrSkin: string; - CheckSurfaceForWheelsTimer: number; - DiameterWheel: number; - HeightWheel: number; - HeightWheelMaxPosLimit: number; - HeightWheelMinPosLimit: number; - HeightWheelOffset: number; - SnapToSurfaceWheelsSpeed: number; - SuspensionDamperStiffness: number; - SuspensionRestLength: number; - SuspensionSpringStiffness: number; - SuspensionTravel: number; - SuspensionWheelRadius: number; - mapID: string; - pathsConfigurations: IPathConfig[]; -} -export interface IPathConfig { - active: boolean; - id: string; - enterPoint: string; - exitPoint: string; - pathPoints: string[]; - once: boolean; - circle: boolean; - circleCount: number; -} -export interface ISquadSettings { - CountOfRequestsToOnePlayer: number; - SecondsForExpiredRequest: number; - SendRequestDelaySeconds: number; -} -export interface IInsurance { - MaxStorageTimeInHour: number; - CoefOfSendingMessageTime: number; - CoefOfHavingMarkOfUnknown: number; -} -export interface ISkillsSettings { - SkillProgressRate: number; - WeaponSkillProgressRate: number; - WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: IHideoutManagement; - Crafting: ICrafting; - Metabolism: IMetabolism; - Immunity: Immunity; - Endurance: IEndurance; - Strength: IStrength; - Vitality: IVitality; - Health: IHealthSkillProgress; - StressResistance: IStressResistance; - Throwing: IThrowing; - RecoilControl: IRecoilControl; - Pistol: IWeaponSkills; - Revolver: IWeaponSkills; - SMG: any[]; - Assault: IWeaponSkills; - Shotgun: IWeaponSkills; - Sniper: IWeaponSkills; - LMG: any[]; - HMG: any[]; - Launcher: any[]; - AttachedLauncher: any[]; - Melee: IMeleeSkill; - DMR: IWeaponSkills; - BearAssaultoperations: any[]; - BearAuthority: any[]; - BearAksystems: any[]; - BearHeavycaliber: any[]; - BearRawpower: any[]; - UsecArsystems: any[]; - UsecDeepweaponmodding_Settings: any[]; - UsecLongrangeoptics_Settings: any[]; - UsecNegotiations: any[]; - UsecTactics: any[]; - BotReload: any[]; - CovertMovement: ICovertMovement; - FieldMedicine: any[]; - Search: ISearch; - Sniping: any[]; - ProneMovement: any[]; - FirstAid: any[]; - LightVests: IArmorSkills; - HeavyVests: IArmorSkills; - WeaponModding: any[]; - AdvancedModding: any[]; - NightOps: any[]; - SilentOps: any[]; - Lockpicking: any[]; - WeaponTreatment: IWeaponTreatment; - MagDrills: IMagDrills; - Freetrading: any[]; - Auctions: any[]; - Cleanoperations: any[]; - Barter: any[]; - Shadowconnections: any[]; - Taskperformance: any[]; - Perception: IPerception; - Intellect: Intellect; - Attention: IAttention; - Charisma: ICharisma; - Memory: IMemory; - Surgery: ISurgery; - AimDrills: IAimDrills; - BotSound: any[]; - TroubleShooting: ITroubleShooting; -} -export interface IMeleeSkill { - BuffSettings: IBuffSettings; -} -export interface IArmorSkills { - BuffMaxCount: number; - BuffSettings: IBuffSettings; - Counters: IArmorCounters; - MoveSpeedPenaltyReductionHVestsReducePerLevel: number; - RicochetChanceHVestsCurrentDurabilityThreshold: number; - RicochetChanceHVestsEliteLevel: number; - RicochetChanceHVestsMaxDurabilityThreshold: number; - MeleeDamageLVestsReducePerLevel: number; - MoveSpeedPenaltyReductionLVestsReducePerLevel: number; - WearAmountRepairLVestsReducePerLevel: number; - WearChanceRepairLVestsReduceEliteLevel: number; -} -export interface IArmorCounters { - armorDurability: ISkillCounter; -} -export interface IHideoutManagement { - SkillPointsPerAreaUpgrade: number; - SkillPointsPerCraft: number; - ConsumptionReductionPerLevel: number; - SkillBoostPercent: number; - SkillPointsRate: ISkillPointsRate; - EliteSlots: IEliteSlots; -} -export interface ISkillPointsRate { - Generator: ISkillPointRate; - AirFilteringUnit: ISkillPointRate; - WaterCollector: ISkillPointRate; - SolarPower: ISkillPointRate; -} -export interface ISkillPointRate { - ResourceSpent: number; - PointsGained: number; -} -export interface IEliteSlots { - Generator: IEliteSlot; - AirFilteringUnit: IEliteSlot; - WaterCollector: IEliteSlot; - BitcoinFarm: IEliteSlot; -} -export interface IEliteSlot { - Slots: number; - Container: number; -} -export interface ICrafting { - PointsPerCraftingCycle: number; - CraftingCycleHours: number; - PointsPerUniqueCraftCycle: number; - UniqueCraftsPerCycle: number; - CraftTimeReductionPerLevel: number; - ProductionTimeReductionPerLevel: number; - EliteExtraProductions: number; - CraftingPointsToInteligence: number; -} -export interface IMetabolism { - HydrationRecoveryRate: number; - EnergyRecoveryRate: number; - IncreasePositiveEffectDurationRate: number; - DecreaseNegativeEffectDurationRate: number; - DecreasePoisonDurationRate: number; -} -export interface Immunity { - ImmunityMiscEffects: number; - ImmunityPoisonBuff: number; - ImmunityPainKiller: number; - HealthNegativeEffect: number; - StimulatorNegativeBuff: number; -} -export interface IEndurance { - MovementAction: number; - SprintAction: number; - GainPerFatigueStack: number; - DependentSkillRatios: IDependentSkillRatio[]; - QTELevelMultipliers: Record>; -} -export interface IStrength { - DependentSkillRatios: IDependentSkillRatio[]; - SprintActionMin: number; - SprintActionMax: number; - MovementActionMin: number; - MovementActionMax: number; - PushUpMin: number; - PushUpMax: number; - QTELevelMultipliers: IQTELevelMultiplier[]; - FistfightAction: number; - ThrowAction: number; -} -export interface IDependentSkillRatio { - Ratio: number; - SkillId: string; -} -export interface IQTELevelMultiplier { - Level: number; - Multiplier: number; -} -export interface IVitality { - DamageTakenAction: number; - HealthNegativeEffect: number; -} -export interface IHealthSkillProgress { - SkillProgress: number; -} -export interface IStressResistance { - HealthNegativeEffect: number; - LowHPDuration: number; -} -export interface IThrowing { - ThrowAction: number; -} -export interface IRecoilControl { - RecoilAction: number; - RecoilBonusPerLevel: number; -} -export interface IWeaponSkills { - WeaponReloadAction: number; - WeaponShotAction: number; - WeaponFixAction: number; - WeaponChamberAction: number; -} -export interface ICovertMovement { - MovementAction: number; -} -export interface ISearch { - SearchAction: number; - FindAction: number; -} -export interface IWeaponTreatment { - BuffMaxCount: number; - BuffSettings: IBuffSettings; - Counters: IWeaponTreatmentCounters; - DurLossReducePerLevel: number; - SkillPointsPerRepair: number; - Filter: any[]; - WearAmountRepairGunsReducePerLevel: number; - WearChanceRepairGunsReduceEliteLevel: number; -} -export interface IWeaponTreatmentCounters { - firearmsDurability: ISkillCounter; -} -export interface IBuffSettings { - CommonBuffChanceLevelBonus: number; - CommonBuffMinChanceValue: number; - CurrentDurabilityLossToRemoveBuff?: number; - MaxDurabilityLossToRemoveBuff?: number; - RareBuffChanceCoff: number; - ReceivedDurabilityMaxPercent: number; -} -export interface IMagDrills { - RaidLoadedAmmoAction: number; - RaidUnloadedAmmoAction: number; - MagazineCheckAction: number; -} -export interface IPerception { - DependentSkillRatios: ISkillRatio[]; - OnlineAction: number; - UniqueLoot: number; -} -export interface ISkillRatio { - Ratio: number; - SkillId: string; -} -export interface Intellect { - Counters: IIntellectCounters; - ExamineAction: number; - SkillProgress: number; - RepairAction: number; - WearAmountReducePerLevel: number; - WearChanceReduceEliteLevel: number; - RepairPointsCostReduction: number; -} -export interface IIntellectCounters { - armorDurability: ISkillCounter; - firearmsDurability: ISkillCounter; - meleeWeaponDurability: ISkillCounter; -} -export interface ISkillCounter { - divisor: number; - points: number; -} -export interface IAttention { - DependentSkillRatios: ISkillRatio[]; - ExamineWithInstruction: number; - FindActionFalse: number; - FindActionTrue: number; -} -export interface ICharisma { - BonusSettings: IBonusSettings; - Counters: ICharismaSkillCounters; - SkillProgressInt: number; - SkillProgressAtn: number; - SkillProgressPer: number; -} -export interface ICharismaSkillCounters { - insuranceCost: ISkillCounter; - repairCost: ISkillCounter; - repeatableQuestCompleteCount: ISkillCounter; - restoredHealthCost: ISkillCounter; - scavCaseCost: ISkillCounter; -} -export interface IBonusSettings { - EliteBonusSettings: IEliteBonusSettings; - LevelBonusSettings: ILevelBonusSettings; -} -export interface IEliteBonusSettings { - FenceStandingLossDiscount: number; - RepeatableQuestExtraCount: number; - ScavCaseDiscount: number; -} -export interface ILevelBonusSettings { - HealthRestoreDiscount: number; - HealthRestoreTraderDiscount: number; - InsuranceDiscount: number; - InsuranceTraderDiscount: number; - PaidExitDiscount: number; - RepeatableQuestChangeDiscount: number; -} -export interface IMemory { - AnySkillUp: number; - SkillProgress: number; -} -export interface ISurgery { - SurgeryAction: number; - SkillProgress: number; -} -export interface IAimDrills { - WeaponShotAction: number; -} -export interface ITroubleShooting { - MalfRepairSpeedBonusPerLevel: number; - SkillPointsPerMalfFix: number; - EliteDurabilityChanceReduceMult: number; - EliteAmmoChanceReduceMult: number; - EliteMagChanceReduceMult: number; -} -export interface IAiming { - ProceduralIntensityByPose: Ixyz; - AimProceduralIntensity: number; - HeavyWeight: number; - LightWeight: number; - MaxTimeHeavy: number; - MinTimeHeavy: number; - MaxTimeLight: number; - MinTimeLight: number; - RecoilScaling: number; - RecoilDamping: number; - CameraSnapGlobalMult: number; - RecoilXIntensityByPose: Ixyz; - RecoilYIntensityByPose: Ixyz; - RecoilZIntensityByPose: Ixyz; - RecoilCrank: boolean; - RecoilHandDamping: number; - RecoilConvergenceMult: number; - RecoilVertBonus: number; - RecoilBackBonus: number; -} -export interface IMalfunction { - AmmoMalfChanceMult: number; - MagazineMalfChanceMult: number; - MalfRepairHardSlideMult: number; - MalfRepairOneHandBrokenMult: number; - MalfRepairTwoHandsBrokenMult: number; - AllowMalfForBots: boolean; - ShowGlowAttemptsCount: number; - OutToIdleSpeedMultForPistol: number; - IdleToOutSpeedMultOnMalf: number; - TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: Ixyz; - DurFeedWt: number; - DurMisfireWt: number; - DurJamWt: number; - DurSoftSlideWt: number; - DurHardSlideMinWt: number; - DurHardSlideMaxWt: number; - AmmoMisfireWt: number; - AmmoFeedWt: number; - AmmoJamWt: number; - OverheatFeedWt: number; - OverheatJamWt: number; - OverheatSoftSlideWt: number; - OverheatHardSlideMinWt: number; - OverheatHardSlideMaxWt: number; -} -export interface IOverheat { - MinOverheat: number; - MaxOverheat: number; - OverheatProblemsStart: number; - ModHeatFactor: number; - ModCoolFactor: number; - MinWearOnOverheat: number; - MaxWearOnOverheat: number; - MinWearOnMaxOverheat: number; - MaxWearOnMaxOverheat: number; - OverheatWearLimit: number; - MaxCOIIncreaseMult: number; - MinMalfChance: number; - MaxMalfChance: number; - DurReduceMinMult: number; - DurReduceMaxMult: number; - BarrelMoveRndDuration: number; - BarrelMoveMaxMult: number; - FireratePitchMult: number; - FirerateReduceMinMult: number; - FirerateReduceMaxMult: number; - FirerateOverheatBorder: number; - EnableSlideOnMaxOverheat: boolean; - StartSlideOverheat: number; - FixSlideOverheat: number; - AutoshotMinOverheat: number; - AutoshotChance: number; - AutoshotPossibilityDuration: number; - MaxOverheatCoolCoef: number; -} -export interface IFenceSettings { - FenceId: string; - Levels: Record; - paidExitStandingNumerator: number; -} -export interface IFenceLevel { - ReachOnMarkOnUnknowns: boolean; - SavageCooldownModifier: number; - ScavCaseTimeModifier: number; - PaidExitCostModifier: number; - BotFollowChance: number; - ScavEquipmentSpawnChanceModifier: number; - PriceModifier: number; - HostileBosses: boolean; - HostileScavs: boolean; - ScavAttackSupport: boolean; - ExfiltrationPriceModifier: number; - AvailableExits: number; - BotApplySilenceChance: number; - BotGetInCoverChance: number; - BotHelpChance: number; - BotSpreadoutChance: number; - BotStopChance: number; - PriceModTaxi: number; - PriceModDelivery: number; - PriceModCleanUp: number; - DeliveryGridSize: Ixyz; - CanInteractWithBtr: boolean; -} -export interface IInertia { - InertiaLimits: Ixyz; - InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: Ixyz; - WalkInertia: Ixyz; - FallThreshold: number; - SpeedLimitAfterFallMin: Ixyz; - SpeedLimitAfterFallMax: Ixyz; - SpeedLimitDurationMin: Ixyz; - SpeedLimitDurationMax: Ixyz; - SpeedInertiaAfterJump: Ixyz; - BaseJumpPenaltyDuration: number; - DurationPower: number; - BaseJumpPenalty: number; - PenaltyPower: number; - InertiaTiltCurveMin: Ixyz; - InertiaTiltCurveMax: Ixyz; - InertiaBackwardCoef: Ixyz; - TiltInertiaMaxSpeed: Ixyz; - TiltStartSideBackSpeed: Ixyz; - TiltMaxSideBackSpeed: Ixyz; - TiltAcceleration: Ixyz; - AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: Ixyz; - SprintSpeedInertiaCurveMax: Ixyz; - SprintBrakeInertia: Ixyz; - SprintTransitionMotionPreservation: Ixyz; - WeaponFlipSpeed: Ixyz; - PreSprintAccelerationLimits: Ixyz; - SprintAccelerationLimits: Ixyz; - SideTime: Ixyz; - DiagonalTime: Ixyz; - MaxTimeWithoutInput: Ixyz; - MinDirectionBlendTime: number; - MoveTimeRange: Ixyz; - ProneDirectionAccelerationRange: Ixyz; - ProneSpeedAccelerationRange: Ixyz; - MinMovementAccelerationRangeRight: Ixyz; - MaxMovementAccelerationRangeRight: Ixyz; -} -export interface IBallistic { - GlobalDamageDegradationCoefficient: number; -} -export interface IRepairSettings { - ItemEnhancementSettings: IItemEnhancementSettings; - MinimumLevelToApplyBuff: number; - RepairStrategies: IRepairStrategies; - armorClassDivisor: number; - durabilityPointCostArmor: number; - durabilityPointCostGuns: number; -} -export interface IItemEnhancementSettings { - DamageReduction: IPriceModifier; - MalfunctionProtections: IPriceModifier; - WeaponSpread: IPriceModifier; -} -export interface IPriceModifier { - PriceModifier: number; -} -export interface IRepairStrategies { - Armor: IRepairStrategy; - Firearms: IRepairStrategy; -} -export interface IRepairStrategy { - BuffTypes: string[]; - Filter: string[]; -} -export interface IBotPreset { - UseThis: boolean; - Role: string; - BotDifficulty: string; - VisibleAngle: number; - VisibleDistance: number; - ScatteringPerMeter: number; - HearingSense: number; - SCATTERING_DIST_MODIF: number; - MAX_AIMING_UPGRADE_BY_TIME: number; - FIRST_CONTACT_ADD_SEC: number; - COEF_IF_MOVE: number; -} -export interface IAudioSettings { - AudioGroupPresets: IAudioGroupPreset[]; -} -export interface IAudioGroupPreset { - AngleToAllowBinaural: number; - DisabledBinauralByDistance: boolean; - DistanceToAllowBinaural: number; - GroupType: number; - HeightToAllowBinaural: number; - Name: string; - OcclusionEnabled: boolean; - OcclusionIntensity: number; - OverallVolume: number; -} -export interface IEnvironmentSettings { - SnowStepsVolumeMultiplier: number; - SurfaceMultipliers: ISurfaceMultiplier[]; -} -export interface ISurfaceMultiplier { - SurfaceType: string; - VolumeMult: number; -} -export interface IBotWeaponScattering { - Name: string; - PriorityScatter1meter: number; - PriorityScatter10meter: number; - PriorityScatter100meter: number; -} -export interface IPreset { - _id: string; - _type: string; - _changeWeaponName: boolean; - _name: string; - _parent: string; - _items: Item[]; - /** Default presets have this property */ - _encyclopedia?: string; -} -export interface IQuestSettings { - GlobalRewardRepModifierDailyQuestPvE: number; - GlobalRewardRepModifierQuestPvE: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationBase.d.ts deleted file mode 100644 index 65931f8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationBase.d.ts +++ /dev/null @@ -1,236 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Ixyz } from "@spt/models/eft/common/Ixyz"; -export interface ILocationBase { - AccessKeys: string[]; - AirdropParameters: AirdropParameter[]; - Area: number; - AveragePlayTime: number; - AveragePlayerLevel: number; - Banners: Banner[]; - BossLocationSpawn: BossLocationSpawn[]; - BotAssault: number; - BotEasy: number; - BotHard: number; - BotImpossible: number; - BotLocationModifier: BotLocationModifier; - BotMarksman: number; - BotMax: number; - BotMaxPlayer: number; - BotMaxTimePlayer: number; - BotMaxPvE: number; - BotNormal: number; - BotSpawnCountStep: number; - BotSpawnPeriodCheck: number; - BotSpawnTimeOffMax: number; - BotSpawnTimeOffMin: number; - BotSpawnTimeOnMax: number; - BotSpawnTimeOnMin: number; - BotStart: number; - BotStop: number; - Description: string; - DisabledForScav: boolean; - DisabledScavExits: string; - Enabled: boolean; - EnableCoop: boolean; - GlobalLootChanceModifier: number; - GlobalLootChanceModifierPvE: number; - GlobalContainerChanceModifier: number; - IconX: number; - IconY: number; - Id: string; - Insurance: boolean; - IsSecret: boolean; - Locked: boolean; - Loot: any[]; - MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; - MaxBotPerZone: number; - MaxDistToFreePoint: number; - MaxPlayers: number; - MinDistToExitPoint: number; - MinDistToFreePoint: number; - MinMaxBots: MinMaxBot[]; - MinPlayers: number; - MaxCoopGroup: number; - Name: string; - NonWaveGroupScenario: INonWaveGroupScenario; - NewSpawn: boolean; - OcculsionCullingEnabled: boolean; - OldSpawn: boolean; - OpenZones: string; - Preview: Preview; - PlayersRequestCount: number; - RequiredPlayerLevel?: number; - RequiredPlayerLevelMin?: number; - RequiredPlayerLevelMax?: number; - MinPlayerLvlAccessKeys: number; - PmcMaxPlayersInGroup: number; - ScavMaxPlayersInGroup: number; - Rules: string; - SafeLocation: boolean; - Scene: Scene; - SpawnPointParams: SpawnPointParam[]; - UnixDateTime: number; - _Id: string; - doors: any[]; - EscapeTimeLimit: number; - EscapeTimeLimitCoop: number; - EscapeTimeLimitPVE: number; - exit_access_time: number; - exit_count: number; - exit_time: number; - exits: Exit[]; - filter_ex: string[]; - limits: ILimit[]; - matching_min_seconds: number; - GenerateLocalLootCache: boolean; - maxItemCountInLocation: MaxItemCountInLocation[]; - sav_summon_seconds: number; - tmp_location_field_remove_me: number; - users_gather_seconds: number; - users_spawn_seconds_n: number; - users_spawn_seconds_n2: number; - users_summon_seconds: number; - waves: Wave[]; -} -export interface INonWaveGroupScenario { - Chance: number; - Enabled: boolean; - MaxToBeGroup: number; - MinToBeGroup: number; -} -export interface ILimit extends MinMax { - items: any[]; -} -export interface AirdropParameter { - AirdropPointDeactivateDistance: number; - MinPlayersCountToSpawnAirdrop: number; - PlaneAirdropChance: number; - PlaneAirdropCooldownMax: number; - PlaneAirdropCooldownMin: number; - PlaneAirdropEnd: number; - PlaneAirdropMax: number; - PlaneAirdropStartMax: number; - PlaneAirdropStartMin: number; - UnsuccessfulTryPenalty: number; -} -export interface Banner { - id: string; - pic: Pic; -} -export interface Pic { - path: string; - rcid: string; -} -export interface BossLocationSpawn { - BossChance: number; - BossDifficult: string; - BossEscortAmount: string; - BossEscortDifficult: string; - BossEscortType: string; - BossName: string; - BossPlayer: boolean; - BossZone: string; - RandomTimeSpawn: boolean; - Time: number; - TriggerId: string; - TriggerName: string; - Delay?: number; - ForceSpawn?: boolean; - IgnoreMaxBots?: boolean; - Supports?: BossSupport[]; - sptId?: string; - spawnMode: string[]; -} -export interface BossSupport { - BossEscortAmount: string; - BossEscortDifficult: string[]; - BossEscortType: string; -} -export interface BotLocationModifier { - AccuracySpeed: number; - DistToActivate: number; - DistToPersueAxemanCoef: number; - DistToSleep: number; - GainSight: number; - KhorovodChance: number; - MagnetPower: number; - MarksmanAccuratyCoef: number; - Scattering: number; - VisibleDistance: number; -} -export interface MinMaxBot extends MinMax { - WildSpawnType: WildSpawnType | string; -} -export interface MinPlayerWaitTime { - minPlayers: number; - time: number; -} -export interface Preview { - path: string; - rcid: string; -} -export interface Scene { - path: string; - rcid: string; -} -export interface SpawnPointParam { - BotZoneName: string; - Categories: string[]; - ColliderParams: ColliderParams; - CorePointId: number; - DelayToCanSpawnSec: number; - Id: string; - Infiltration: string; - Position: Ixyz; - Rotation: number; - Sides: string[]; -} -export interface ColliderParams { - _parent: string; - _props: Props; -} -export interface Props { - Center: Ixyz; - Radius: number; -} -export interface Exit { - /** % Chance out of 100 exit will appear in raid */ - Chance: number; - Count: number; - EntryPoints: string; - EventAvailable: boolean; - ExfiltrationTime: number; - ExfiltrationType: string; - RequiredSlot?: string; - Id: string; - MaxTime: number; - MinTime: number; - Name: string; - PassageRequirement: string; - PlayersCount: number; - RequirementTip: string; - Side?: string; -} -export interface MaxItemCountInLocation { - TemplateId: string; - Value: number; -} -export interface Wave { - BotPreset: string; - BotSide: string; - SpawnPoints: string; - WildSpawnType: WildSpawnType; - isPlayers: boolean; - number: number; - slots_max: number; - slots_min: number; - time_max: number; - time_min: number; - sptId?: string; - ChanceGroup?: number; -} -export declare enum WildSpawnType { - ASSAULT = "assault", - MARKSMAN = "marksman", - PMCBOT = "pmcbot" -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationsSourceDestinationBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationsSourceDestinationBase.d.ts deleted file mode 100644 index e6bc8ee..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationsSourceDestinationBase.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ILocations } from "@spt/models/spt/server/ILocations"; -export interface ILocationsGenerateAllResponse { - locations: ILocations; - paths: Path[]; -} -export interface Path { - Source: string; - Destination: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/ILooseLoot.d.ts deleted file mode 100644 index b5b538c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/ILooseLoot.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -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[]; -} -export interface SpawnpointCount { - mean: number; - std: number; -} -export interface SpawnpointsForced { - locationId: string; - probability: number; - template: SpawnpointTemplate; -} -export interface SpawnpointTemplate { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsAlwaysSpawn: boolean; - IsGroupPosition: boolean; - GroupPositions: any[]; - Root: string; - Items: Item[]; -} -export interface Spawnpoint { - locationId: string; - probability: number; - template: SpawnpointTemplate; - itemDistribution: ItemDistribution[]; -} -export interface ItemDistribution { - composedKey: ComposedKey; - relativeProbability: number; -} -export interface ComposedKey { - key: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/IMetricsTableData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/IMetricsTableData.d.ts deleted file mode 100644 index 873ef82..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/IMetricsTableData.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface IMetricsTableData { - Keys: number[]; - NetProcessingBins: number[]; - RenderBins: number[]; - GameUpdateBins: number[]; - MemoryMeasureInterval: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/IPmcData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/IPmcData.d.ts deleted file mode 100644 index 313a92c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/IPmcData.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { IBotBase, IEftStats } from "@spt/models/eft/common/tables/IBotBase"; -export interface IPmcData extends IBotBase { -} -export interface IPostRaidPmcData extends IBotBase { - Stats: IPostRaidStats; -} -export interface IPostRaidStats { - Eft: IEftStats; - /** Only found in profile we get from client post raid */ - Arena: IEftStats; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/Ixyz.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/Ixyz.d.ts deleted file mode 100644 index 612dae1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/Ixyz.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface Ixyz { - x: number; - y: number; - z: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/request/IBaseInteractionRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/request/IBaseInteractionRequestData.d.ts deleted file mode 100644 index 7303275..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/request/IBaseInteractionRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IBaseInteractionRequestData { - Action: string; - fromOwner?: OwnerInfo; - toOwner?: OwnerInfo; -} -export interface OwnerInfo { - id: string; - type: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/request/IUIDRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/request/IUIDRequestData.d.ts deleted file mode 100644 index d905ad7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/request/IUIDRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IUIDRequestData { - uid: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IAchievement.d.ts deleted file mode 100644 index 910b13d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IAchievement.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; -export interface IAchievement { - id: string; - imageUrl: string; - assetPath: string; - rewards: IQuestRewards; - conditions: IQuestConditionTypes; - instantComplete: boolean; - showNotificationsInGame: boolean; - showProgress: boolean; - prefab: string; - rarity: string; - hidden: boolean; - showConditions: boolean; - progressBarEnabled: boolean; - side: string; - index: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts deleted file mode 100644 index 8c747fc..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts +++ /dev/null @@ -1,411 +0,0 @@ -import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; -import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { BonusSkillType } from "@spt/models/enums/BonusSkillType"; -import { BonusType } from "@spt/models/enums/BonusType"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -export interface IBotBase { - _id: string; - aid: number; - /** SPT property - use to store player id - TODO - move to AID ( account id as guid of choice) */ - sessionId: string; - savage?: string; - Info: Info; - Customization: Customization; - Health: Health; - Inventory: Inventory; - Skills: Skills; - Stats: Stats; - Encyclopedia: Record; - TaskConditionCounters: Record; - InsuredItems: InsuredItem[]; - Hideout: Hideout; - Quests: IQuestStatus[]; - TradersInfo: Record; - UnlockedInfo: IUnlockedInfo; - RagfairInfo: RagfairInfo; - /** Achievement id and timestamp */ - Achievements: Record; - RepeatableQuests: IPmcDataRepeatableQuest[]; - Bonuses: Bonus[]; - Notes: Notes; - CarExtractCounts: Record; - CoopExtractCounts: Record; - SurvivorClass: SurvivorClass; - WishList: string[]; - /** SPT specific property used during bot generation in raid */ - sptIsPmc?: boolean; -} -export interface ITaskConditionCounter { - id: string; - type: string; - value: number; - /** Quest id */ - sourceId: string; -} -export interface IUnlockedInfo { - unlockedProductionRecipe: string[]; -} -export interface Info { - EntryPoint: string; - Nickname: string; - LowerNickname: string; - Side: string; - SquadInviteRestriction: boolean; - HasCoopExtension: boolean; - Voice: string; - Level: number; - Experience: number; - RegistrationDate: number; - GameVersion: string; - AccountType: number; - MemberCategory: MemberCategory; - lockedMoveCommands: boolean; - SavageLockTime: number; - LastTimePlayedAsSavage: number; - Settings: Settings; - NicknameChangeDate: number; - NeedWipeOptions: any[]; - lastCompletedWipe: LastCompleted; - Bans: IBan[]; - BannedState: boolean; - BannedUntil: number; - IsStreamerModeAvailable: boolean; - lastCompletedEvent?: LastCompleted; -} -export interface Settings { - Role: string; - BotDifficulty: string; - Experience: number; - StandingForKill: number; - AggressorBonus: number; -} -export interface IBan { - type: BanType; - dateTime: number; -} -export declare enum BanType { - CHAT = 0, - RAGFAIR = 1, - VOIP = 2, - TRADING = 3, - ONLINE = 4, - FRIENDS = 5, - CHANGE_NICKNAME = 6 -} -export interface Customization { - Head: string; - Body: string; - Feet: string; - Hands: string; -} -export interface Health { - Hydration: CurrentMax; - Energy: CurrentMax; - Temperature: CurrentMax; - BodyParts: BodyPartsHealth; - UpdateTime: number; -} -export interface BodyPartsHealth { - Head: BodyPartHealth; - Chest: BodyPartHealth; - Stomach: BodyPartHealth; - LeftArm: BodyPartHealth; - RightArm: BodyPartHealth; - LeftLeg: BodyPartHealth; - RightLeg: BodyPartHealth; -} -export interface BodyPartHealth { - Health: CurrentMax; - Effects?: Record; -} -export interface BodyPartEffectProperties { - Time: number; -} -export interface CurrentMax { - Current: number; - Maximum: number; -} -export interface Inventory { - items: Item[]; - equipment: string; - stash: string; - sortingTable: string; - questRaidItems: string; - questStashItems: string; - /** Key is hideout area enum numeric as string e.g. "24", value is area _id */ - hideoutAreaStashes: Record; - fastPanel: Record; - favoriteItems: string[]; -} -export interface IBaseJsonSkills { - Common: Record; - Mastering: Record; - Points: number; -} -export interface Skills { - Common: Common[]; - Mastering: Mastering[]; - Points: number; -} -export interface IBaseSkill { - Id: string; - Progress: number; - max?: number; - min?: number; -} -export interface Common extends IBaseSkill { - PointsEarnedDuringSession?: number; - LastAccess?: number; -} -export interface Mastering extends IBaseSkill { -} -export interface Stats { - Eft: IEftStats; -} -export interface IEftStats { - CarriedQuestItems: string[]; - Victims: Victim[]; - TotalSessionExperience: number; - LastSessionDate: number; - SessionCounters: SessionCounters; - OverallCounters: OverallCounters; - SessionExperienceMult?: number; - ExperienceBonusMult?: number; - Aggressor?: Aggressor; - DroppedItems?: IDroppedItem[]; - FoundInRaidItems?: FoundInRaidItem[]; - DamageHistory?: DamageHistory; - DeathCause?: DeathCause; - LastPlayerState?: LastPlayerState; - TotalInGameTime: number; - SurvivorClass?: string; - sptLastRaidFenceRepChange?: number; -} -export interface IDroppedItem { - QuestId: string; - ItemId: string; - ZoneId: string; -} -export interface FoundInRaidItem { - QuestId: string; - ItemId: string; -} -export interface Victim { - AccountId: string; - ProfileId: string; - Name: string; - Side: string; - BodyPart: string; - Time: string; - Distance: number; - Level: number; - Weapon: string; - Role: string; -} -export interface SessionCounters { - Items: CounterKeyValue[]; -} -export interface OverallCounters { - Items: CounterKeyValue[]; -} -export interface CounterKeyValue { - Key: string[]; - Value: number; -} -export interface Aggressor { - AccountId: string; - ProfileId: string; - MainProfileNickname: string; - Name: string; - Side: string; - BodyPart: string; - HeadSegment: string; - WeaponName: string; - Category: string; -} -export interface DamageHistory { - LethalDamagePart: string; - LethalDamage: LethalDamage; - BodyParts: BodyPartsDamageHistory; -} -export interface LethalDamage { - Amount: number; - Type: string; - SourceId: string; - OverDamageFrom: string; - Blunt: boolean; - ImpactsCount: number; -} -export interface BodyPartsDamageHistory { - Head: DamageStats[]; - Chest: DamageStats[]; - Stomach: DamageStats[]; - LeftArm: DamageStats[]; - RightArm: DamageStats[]; - LeftLeg: DamageStats[]; - RightLeg: DamageStats[]; - Common: DamageStats[]; -} -export interface DamageStats { - Amount: number; - Type: string; - SourceId: string; - OverDamageFrom: string; - Blunt: boolean; - ImpactsCount: number; -} -export interface DeathCause { - DamageType: string; - Side: string; - Role: string; - WeaponId: string; -} -export interface LastPlayerState { - Info: LastPlayerStateInfo; - Customization: Record; - Equipment: any; -} -export interface LastPlayerStateInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} -export interface BackendCounter { - id: string; - qid?: string; - value: number; -} -export interface InsuredItem { - /** Trader Id item was insured by */ - tid: string; - itemId: string; -} -export interface Hideout { - Production: Record; - Areas: HideoutArea[]; - Improvement: Record; - Seed: number; - sptUpdateLastRunTimestamp: number; -} -export interface IHideoutImprovement { - completed: boolean; - improveCompleteTimestamp: number; -} -export interface Productive { - Products: Product[]; - /** Seconds passed of production */ - Progress?: number; - /** Is craft in some state of being worked on by client (crafting/ready to pick up) */ - inProgress?: boolean; - StartTimestamp?: number; - SkipTime?: number; - /** Seconds needed to fully craft */ - ProductionTime?: number; - GivenItemsInStart?: string[]; - Interrupted?: boolean; - Code?: string; - Decoded?: boolean; - AvailableForFinish?: boolean; - /** Used in hideout production.json */ - needFuelForAllProductionTime?: boolean; - /** Used when sending data to client */ - NeedFuelForAllProductionTime?: boolean; - sptIsScavCase?: boolean; - /** Some crafts are always inProgress, but need to be reset, e.g. water collector */ - sptIsComplete?: boolean; - /** Is the craft a Continuous, e.g bitcoins/water collector */ - sptIsContinuous?: boolean; - /** Stores a list of tools used in this craft and whether they're FiR, to give back once the craft is done */ - sptRequiredTools?: Item[]; -} -export interface Production extends Productive { - RecipeId: string; - SkipTime: number; - ProductionTime: number; -} -export interface ScavCase extends Productive { - RecipeId: string; -} -export interface Product { - _id: string; - _tpl: string; - upd?: Upd; -} -export interface HideoutArea { - type: HideoutAreas; - level: number; - active: boolean; - passiveBonusesEnabled: boolean; - /** Must be integer */ - completeTime: number; - constructing: boolean; - slots: HideoutSlot[]; - lastRecipe: string; -} -export interface HideoutSlot { - /** SPT specific value to keep track of what index this slot is (0,1,2,3 etc) */ - locationIndex: number; - item?: HideoutItem[]; -} -export interface HideoutItem { - _id: string; - _tpl: string; - upd?: Upd; -} -export interface LastCompleted { - $oid: string; -} -export interface Notes { - Notes: Note[]; -} -export interface CarExtractCounts { -} -export declare enum SurvivorClass { - UNKNOWN = 0, - NEUTRALIZER = 1, - MARAUDER = 2, - PARAMEDIC = 3, - SURVIVOR = 4 -} -export interface IQuestStatus { - qid: string; - startTime: number; - status: QuestStatus; - statusTimers?: Record; - /** Property does not exist in live profile data, but is used by ProfileChanges.questsStatus when sent to client */ - completedConditions?: string[]; - availableAfter?: number; -} -export interface TraderInfo { - loyaltyLevel: number; - salesSum: number; - standing: number; - nextResupply: number; - unlocked: boolean; - disabled: boolean; -} -export interface RagfairInfo { - rating: number; - isRatingGrowing: boolean; - offers: IRagfairOffer[]; -} -export interface Bonus { - id?: string; - type: BonusType; - templateId?: string; - passive?: boolean; - production?: boolean; - visible?: boolean; - value?: number; - icon?: string; - filter?: string[]; - skillType?: BonusSkillType; -} -export interface Note { - Time: number; - Text: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotCore.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotCore.d.ts deleted file mode 100644 index 16a782d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotCore.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -export interface IBotCore { - SAVAGE_KILL_DIST: number; - SOUND_DOOR_BREACH_METERS: number; - SOUND_DOOR_OPEN_METERS: number; - STEP_NOISE_DELTA: number; - JUMP_NOISE_DELTA: number; - GUNSHOT_SPREAD: number; - GUNSHOT_SPREAD_SILENCE: number; - BASE_WALK_SPEREAD2: number; - MOVE_SPEED_COEF_MAX: number; - SPEED_SERV_SOUND_COEF_A: number; - SPEED_SERV_SOUND_COEF_B: number; - G: number; - STAY_COEF: number; - SIT_COEF: number; - LAY_COEF: number; - MAX_ITERATIONS: number; - START_DIST_TO_COV: number; - MAX_DIST_TO_COV: number; - STAY_HEIGHT: number; - CLOSE_POINTS: number; - COUNT_TURNS: number; - SIMPLE_POINT_LIFE_TIME_SEC: number; - DANGER_POINT_LIFE_TIME_SEC: number; - DANGER_POWER: number; - COVER_DIST_CLOSE: number; - GOOD_DIST_TO_POINT: number; - COVER_TOOFAR_FROM_BOSS: number; - COVER_TOOFAR_FROM_BOSS_SQRT: number; - MAX_Y_DIFF_TO_PROTECT: number; - FLARE_POWER: number; - MOVE_COEF: number; - PRONE_POSE: number; - LOWER_POSE: number; - MAX_POSE: number; - FLARE_TIME: number; - MAX_REQUESTS__PER_GROUP: number; - UPDATE_GOAL_TIMER_SEC: number; - DIST_NOT_TO_GROUP: number; - DIST_NOT_TO_GROUP_SQR: number; - LAST_SEEN_POS_LIFETIME: number; - DELTA_GRENADE_START_TIME: number; - DELTA_GRENADE_END_TIME: number; - DELTA_GRENADE_RUN_DIST: number; - DELTA_GRENADE_RUN_DIST_SQRT: number; - PATROL_MIN_LIGHT_DIST: number; - HOLD_MIN_LIGHT_DIST: number; - STANDART_BOT_PAUSE_DOOR: number; - ARMOR_CLASS_COEF: number; - SHOTGUN_POWER: number; - RIFLE_POWER: number; - PISTOL_POWER: number; - SMG_POWER: number; - SNIPE_POWER: number; - GESTUS_PERIOD_SEC: number; - GESTUS_AIMING_DELAY: number; - GESTUS_REQUEST_LIFETIME: number; - GESTUS_FIRST_STAGE_MAX_TIME: number; - GESTUS_SECOND_STAGE_MAX_TIME: number; - GESTUS_MAX_ANSWERS: number; - GESTUS_FUCK_TO_SHOOT: number; - GESTUS_DIST_ANSWERS: number; - GESTUS_DIST_ANSWERS_SQRT: number; - GESTUS_ANYWAY_CHANCE: number; - TALK_DELAY: number; - CAN_SHOOT_TO_HEAD: boolean; - CAN_TILT: boolean; - TILT_CHANCE: number; - MIN_BLOCK_DIST: number; - MIN_BLOCK_TIME: number; - COVER_SECONDS_AFTER_LOSE_VISION: number; - MIN_ARG_COEF: number; - MAX_ARG_COEF: number; - DEAD_AGR_DIST: number; - MAX_DANGER_CARE_DIST_SQRT: number; - MAX_DANGER_CARE_DIST: number; - MIN_MAX_PERSON_SEARCH: number; - PERCENT_PERSON_SEARCH: number; - LOOK_ANYSIDE_BY_WALL_SEC_OF_ENEMY: number; - CLOSE_TO_WALL_ROTATE_BY_WALL_SQRT: number; - SHOOT_TO_CHANGE_RND_PART_MIN: number; - SHOOT_TO_CHANGE_RND_PART_MAX: number; - SHOOT_TO_CHANGE_RND_PART_DELTA: number; - FORMUL_COEF_DELTA_DIST: number; - FORMUL_COEF_DELTA_SHOOT: number; - FORMUL_COEF_DELTA_FRIEND_COVER: number; - SUSPETION_POINT_DIST_CHECK: number; - MAX_BASE_REQUESTS_PER_PLAYER: number; - MAX_HOLD_REQUESTS_PER_PLAYER: number; - MAX_GO_TO_REQUESTS_PER_PLAYER: number; - MAX_COME_WITH_ME_REQUESTS_PER_PLAYER: number; - CORE_POINT_MAX_VALUE: number; - CORE_POINTS_MAX: number; - CORE_POINTS_MIN: number; - BORN_POISTS_FREE_ONLY_FAREST_BOT: boolean; - BORN_POINSTS_FREE_ONLY_FAREST_PLAYER: boolean; - SCAV_GROUPS_TOGETHER: boolean; - LAY_DOWN_ANG_SHOOT: number; - HOLD_REQUEST_TIME_SEC: number; - TRIGGERS_DOWN_TO_RUN_WHEN_MOVE: number; - MIN_DIST_TO_RUN_WHILE_ATTACK_MOVING: number; - MIN_DIST_TO_RUN_WHILE_ATTACK_MOVING_OTHER_ENEMIS: number; - MIN_DIST_TO_STOP_RUN: number; - JUMP_SPREAD_DIST: number; - LOOK_TIMES_TO_KILL: number; - COME_INSIDE_TIMES: number; - TOTAL_TIME_KILL: number; - TOTAL_TIME_KILL_AFTER_WARN: number; - MOVING_AIM_COEF: number; - VERTICAL_DIST_TO_IGNORE_SOUND: number; - DEFENCE_LEVEL_SHIFT: number; - MIN_DIST_CLOSE_DEF: number; - USE_ID_PRIOR_WHO_GO: boolean; - SMOKE_GRENADE_RADIUS_COEF: number; - GRENADE_PRECISION: number; - MAX_WARNS_BEFORE_KILL: number; - CARE_ENEMY_ONLY_TIME: number; - MIDDLE_POINT_COEF: number; - MAIN_TACTIC_ONLY_ATTACK: boolean; - LAST_DAMAGE_ACTIVE: number; - SHALL_DIE_IF_NOT_INITED: boolean; - CHECK_BOT_INIT_TIME_SEC: number; - WEAPON_ROOT_Y_OFFSET: number; - DELTA_SUPRESS_DISTANCE_SQRT: number; - DELTA_SUPRESS_DISTANCE: number; - WAVE_COEF_LOW: number; - WAVE_COEF_MID: number; - WAVE_COEF_HIGH: number; - WAVE_COEF_HORDE: number; - WAVE_ONLY_AS_ONLINE: boolean; - LOCAL_BOTS_COUNT: number; - AXE_MAN_KILLS_END: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotType.d.ts deleted file mode 100644 index 074a7d6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotType.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Skills } from "@spt/models/eft/common/tables/IBotBase"; -export interface IBotType { - appearance: Appearance; - chances: Chances; - difficulty: Difficulties; - experience: Experience; - firstName: string[]; - generation: Generation; - health: Health; - inventory: Inventory; - lastName: string[]; - skills: Skills; -} -export interface Appearance { - body: Record; - feet: Record; - hands: Record; - head: Record; - voice: Record; -} -export interface Chances { - equipment: EquipmentChances; - weaponMods: ModsChances; - equipmentMods: ModsChances; -} -export interface EquipmentChances { - ArmBand: number; - ArmorVest: number; - Backpack: number; - Earpiece: number; - Eyewear: number; - FaceCover: number; - FirstPrimaryWeapon: number; - Headwear: number; - Holster: number; - Pockets: number; - Scabbard: number; - SecondPrimaryWeapon: number; - SecuredContainer: number; - TacticalVest: number; -} -export interface ModsChances { - mod_charge: number; - mod_equipment: number; - mod_equipment_000: number; - mod_equipment_001: number; - mod_equipment_002: number; - mod_flashlight: number; - mod_foregrip: number; - mod_launcher: number; - mod_magazine: number; - mod_mount: number; - mod_mount_000: number; - mod_mount_001: number; - mod_muzzle: number; - mod_nvg: number; - mod_pistol_grip: number; - mod_reciever: number; - mod_scope: number; - mod_scope_000: number; - mod_scope_001: number; - mod_scope_002: number; - mod_scope_003: number; - mod_sight_front: number; - mod_sight_rear: number; - mod_stock: number; - mod_stock_000: number; - mod_stock_akms: number; - mod_tactical: number; - mod_tactical_000: number; - mod_tactical_001: number; - mod_tactical_002: number; - mod_tactical_003: number; - mod_handguard: number; -} -export interface Difficulties { - easy: Difficulty; - normal: Difficulty; - hard: Difficulty; - impossible: Difficulty; -} -export interface Difficulty { - Aiming: Record; - Boss: Record; - Change: Record; - Core: Record; - Cover: Record; - Grenade: Record; - Hearing: Record; - Lay: Record; - Look: Record; - Mind: Record; - Move: Record; - Patrol: Record; - Scattering: Record; - Shoot: Record; -} -export interface Experience { - aggressorBonus: number; - level: MinMax; - reward: MinMax; - standingForKill: number; -} -export interface Generation { - items: GenerationWeightingItems; -} -export interface GenerationWeightingItems { - grenades: GenerationData; - healing: GenerationData; - drugs: GenerationData; - food: GenerationData; - drink: GenerationData; - currency: GenerationData; - stims: GenerationData; - backpackLoot: GenerationData; - pocketLoot: GenerationData; - vestLoot: GenerationData; - magazines: GenerationData; - specialItems: GenerationData; -} -export interface GenerationData { - /** key: number of items, value: weighting */ - weights: Record; - /** Array of item tpls */ - whitelist: Record; -} -export interface Health { - BodyParts: BodyPart[]; - Energy: MinMax; - Hydration: MinMax; - Temperature: MinMax; -} -export interface BodyPart { - Chest: MinMax; - Head: MinMax; - LeftArm: MinMax; - LeftLeg: MinMax; - RightArm: MinMax; - RightLeg: MinMax; - Stomach: MinMax; -} -export interface Inventory { - equipment: Equipment; - Ammo: Record>; - items: Items; - mods: Mods; -} -export interface Equipment { - ArmBand: Record; - ArmorVest: Record; - Backpack: Record; - Earpiece: Record; - Eyewear: Record; - FaceCover: Record; - FirstPrimaryWeapon: Record; - Headwear: Record; - Holster: Record; - Pockets: Record; - Scabbard: Record; - SecondPrimaryWeapon: Record; - SecuredContainer: Record; - TacticalVest: Record; -} -export interface Items { - Backpack: Record; - Pockets: Record; - SecuredContainer: Record; - SpecialLoot: Record; - TacticalVest: Record; -} -export type Mods = Record>; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ICustomizationItem.d.ts deleted file mode 100644 index 3883765..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ICustomizationItem.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; -export interface ICustomizationItem { - _id: string; - _name: string; - _parent: string; - _type: string; - _props: Props; - _proto: string; -} -export interface Props { - Name: string; - ShortName: string; - Description: string; - Side: string[]; - BodyPart: string; - AvailableAsDefault?: boolean; - Body: string; - Hands: string; - Feet: string; - Prefab: Prefab; - WatchPrefab: Prefab; - IntegratedArmorVest: boolean; - WatchPosition: Ixyz; - WatchRotation: Ixyz; -} -export interface Prefab { - path: string; - rcid: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IHandbookBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IHandbookBase.d.ts deleted file mode 100644 index 7d7db07..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IHandbookBase.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IHandbookBase { - Categories: Category[]; - Items: HandbookItem[]; -} -export interface Category { - Id: string; - ParentId?: string; - Icon: string; - Color: string; - Order: string; -} -export interface HandbookItem { - Id: string; - ParentId: string; - Price: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IItem.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IItem.d.ts deleted file mode 100644 index 8f60c4f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IItem.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -export interface Item { - _id: string; - _tpl: string; - parentId?: string; - slotId?: string; - location?: Location | number; - upd?: Upd; -} -export interface Upd { - Buff?: Buff; - OriginalStackObjectsCount?: number; - Togglable?: Togglable; - Map?: Map; - Tag?: Tag; - /** SPT specific property, not made by BSG */ - sptPresetId?: string; - FaceShield?: FaceShield; - StackObjectsCount?: number; - UnlimitedCount?: boolean; - Repairable?: Repairable; - RecodableComponent?: RecodableComponent; - FireMode?: FireMode; - SpawnedInSession?: boolean; - Light?: Light; - Key?: Key; - Resource?: Resource; - Sight?: Sight; - MedKit?: MedKit; - FoodDrink?: FoodDrink; - Dogtag?: Dogtag; - BuyRestrictionMax?: number; - BuyRestrictionCurrent?: number; - Foldable?: Foldable; - SideEffect?: SideEffect; - RepairKit?: RepairKit; - CultistAmulet?: ICultistAmulet; -} -export interface Buff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; -} -export interface Togglable { - On: boolean; -} -export interface Map { - Markers: MapMarker[]; -} -export interface MapMarker { - X: number; - Y: number; -} -export interface Tag { - Color: number; - Name: string; -} -export interface FaceShield { - Hits: number; -} -export interface Repairable { - Durability: number; - MaxDurability: number; -} -export interface RecodableComponent { - IsEncoded: boolean; -} -export interface MedKit { - HpResource: number; -} -export interface Sight { - ScopesCurrentCalibPointIndexes: number[]; - ScopesSelectedModes: number[]; - SelectedScope: number; -} -export interface Foldable { - Folded: boolean; -} -export interface FireMode { - FireMode: string; -} -export interface FoodDrink { - HpPercent: number; -} -export interface Key { - NumberOfUsages: number; -} -export interface Resource { - Value: number; - UnitsConsumed: number; -} -export interface Light { - IsActive: boolean; - SelectedMode: number; -} -export interface Dogtag { - AccountId: string; - ProfileId: string; - Nickname: string; - Side: string; - Level: number; - Time: string; - Status: string; - KillerAccountId: string; - KillerProfileId: string; - KillerName: string; - WeaponName: string; -} -export interface Location { - x: number; - y: number; - r: string | number; - isSearched?: boolean; - /** SPT property? */ - rotation?: string | boolean; -} -export interface SideEffect { - Value: number; -} -export interface RepairKit { - Resource: number; -} -export interface ICultistAmulet { - NumberOfUsages: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ILocationsBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ILocationsBase.d.ts deleted file mode 100644 index 2c96af3..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ILocationsBase.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface ILocationsBase { - locations: Locations; - paths: Path[]; -} -export interface Locations { -} -export interface Path { - Source: string; - Destination: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IMatch.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IMatch.d.ts deleted file mode 100644 index 042f5bb..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IMatch.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface IMatch { - metrics: Metrics; -} -export interface Metrics { - Keys: number[]; - NetProcessingBins: number[]; - RenderBins: number[]; - GameUpdateBins: number[]; - MemoryMeasureInterval: number; - PauseReasons: number[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IProfileTemplate.d.ts deleted file mode 100644 index 4d73192..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IProfileTemplate.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; -export interface IProfileTemplates { - "Standard": IProfileSides; - "Left Behind": IProfileSides; - "Prepare To Escape": IProfileSides; - "Edge Of Darkness": IProfileSides; - "SPT Developer": IProfileSides; - "SPT Easy start": IProfileSides; - "SPT Zero to hero": IProfileSides; -} -export interface IProfileSides { - descriptionLocaleKey: string; - usec: ITemplateSide; - bear: ITemplateSide; -} -export interface ITemplateSide { - character: IPmcData; - suits: string[]; - dialogues: Record; - userbuilds: IUserBuilds; - trader: ProfileTraderTemplate; -} -export interface ProfileTraderTemplate { - initialLoyaltyLevel: Record; - setQuestsAvailableForStart?: boolean; - setQuestsAvailableForFinish?: boolean; - initialStanding: number; - initialSalesSum: number; - jaegerUnlocked: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IQuest.d.ts deleted file mode 100644 index 54ff191..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IQuest.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { QuestRewardType } from "@spt/models/enums/QuestRewardType"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -import { QuestTypeEnum } from "@spt/models/enums/QuestTypeEnum"; -export interface IQuest { - /** SPT addition - human readable quest name */ - QuestName?: string; - _id: string; - canShowNotificationsInGame: boolean; - conditions: IQuestConditionTypes; - description: string; - failMessageText: string; - name: string; - note: string; - traderId: string; - location: string; - image: string; - type: QuestTypeEnum; - isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; - restartable: boolean; - instantComplete: boolean; - secretQuest: boolean; - startedMessageText: string; - successMessageText: string; - acceptPlayerMessage: string; - declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; - rewards: IQuestRewards; - /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; - changeQuestMessageText: string; - /** "Pmc" or "Scav" */ - side: string; - /** Status of quest to player */ - sptStatus?: QuestStatus; -} -export interface IQuestConditionTypes { - Started: IQuestCondition[]; - AvailableForFinish: IQuestCondition[]; - AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; - Fail: IQuestCondition[]; -} -export interface IQuestCondition { - id: string; - index?: number; - compareMethod?: string; - dynamicLocale: boolean; - visibilityConditions?: VisibilityCondition[]; - globalQuestCounterId?: string; - parentId?: string; - target: string[] | string; - value?: string | number; - type?: boolean; - status?: QuestStatus[]; - availableAfter?: number; - dispersion?: number; - onlyFoundInRaid?: boolean; - oneSessionOnly?: boolean; - doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; - maxDurability?: number; - minDurability?: number; - counter?: IQuestConditionCounter; - plantTime?: number; - zoneId?: string; - countInRaid?: boolean; - completeInSeconds?: number; - isEncoded?: boolean; - conditionType?: string; -} -export interface IQuestConditionCounter { - id: string; - conditions: IQuestConditionCounterCondition[]; -} -export interface IQuestConditionCounterCondition { - id: string; - dynamicLocale: boolean; - target?: string[] | string; - completeInSeconds?: number; - energy?: IValueCompare; - exitName?: string; - hydration?: IValueCompare; - time?: IValueCompare; - compareMethod?: string; - value?: number; - weapon?: string[]; - distance?: ICounterConditionDistance; - equipmentInclusive?: string[][]; - weaponModsInclusive?: string[][]; - weaponModsExclusive?: string[][]; - enemyEquipmentInclusive?: string[][]; - enemyEquipmentExclusive?: string[][]; - weaponCaliber?: string[]; - savageRole?: string[]; - status?: string[]; - bodyPart?: string[]; - daytime?: IDaytimeCounter; - conditionType?: string; - enemyHealthEffects?: IEnemyHealthEffect[]; - resetOnSessionEnd?: boolean; -} -export interface IEnemyHealthEffect { - bodyParts: string[]; - effects: string[]; -} -export interface IValueCompare { - compareMethod: string; - value: number; -} -export interface ICounterConditionDistance { - value: number; - compareMethod: string; -} -export interface IDaytimeCounter { - from: number; - to: number; -} -export interface VisibilityCondition { - id: string; - target: string; - value?: number; - dynamicLocale?: boolean; - oneSessionOnly: boolean; - conditionType: string; -} -export interface IQuestRewards { - AvailableForStart?: IQuestReward[]; - AvailableForFinish?: IQuestReward[]; - Started?: IQuestReward[]; - Success?: IQuestReward[]; - Fail?: IQuestReward[]; - FailRestartable?: IQuestReward[]; - Expired?: IQuestReward[]; -} -export interface IQuestReward { - value?: string | number; - id?: string; - type: QuestRewardType; - index: number; - target?: string; - items?: Item[]; - loyaltyLevel?: number; - /** Hideout area id */ - traderId?: string; - unknown?: boolean; - findInRaid?: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts deleted file mode 100644 index 854c8ef..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; -export interface IRepeatableQuest extends IQuest { - changeCost: IChangeCost[]; - changeStandingCost: number; - sptRepatableGroupName: string; -} -export interface IRepeatableQuestDatabase { - templates: IRepeatableTemplates; - rewards: IRewardOptions; - data: IOptions; - samples: ISampleQuests[]; -} -export interface IRepeatableTemplates { - Elimination: IQuest; - Completion: IQuest; - Exploration: IQuest; -} -export interface IPmcDataRepeatableQuest { - id?: string; - name: string; - activeQuests: IRepeatableQuest[]; - inactiveQuests: IRepeatableQuest[]; - endTime: number; - changeRequirement: Record; -} -export interface IChangeRequirement { - changeCost: IChangeCost[]; - changeStandingCost: number; -} -export interface IChangeCost { - templateId: string; - count: number; -} -export interface IRewardOptions { - itemsBlacklist: string[]; -} -export interface IOptions { - Completion: ICompletionFilter; -} -export interface ICompletionFilter { - itemsBlacklist: ItemsBlacklist[]; - itemsWhitelist: ItemsWhitelist[]; -} -export interface ItemsBlacklist { - minPlayerLevel: number; - itemIds: string[]; -} -export interface ItemsWhitelist { - minPlayerLevel: number; - itemIds: string[]; -} -export interface ISampleQuests { - _id: string; - traderId: string; - location: string; - image: string; - type: string; - isKey: boolean; - restartable: boolean; - instantComplete: boolean; - secretQuest: boolean; - canShowNotificationsInGame: boolean; - rewards: IQuestRewards; - conditions: IQuestConditionTypes; - name: string; - note: string; - description: string; - successMessageText: string; - failMessageText: string; - startedMessageText: string; - templateId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITemplateItem.d.ts deleted file mode 100644 index 32bc9fc..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITemplateItem.d.ts +++ /dev/null @@ -1,531 +0,0 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; -export interface ITemplateItem { - _id: string; - _name: string; - _parent: string; - _type: string; - _props: Props; - _proto: string; -} -export interface Props { - AllowSpawnOnLocations?: any[]; - BeltMagazineRefreshCount?: number; - ChangePriceCoef?: number; - FixedPrice?: boolean; - SendToClient?: boolean; - Name?: string; - ShortName?: string; - Description?: string; - Weight?: number; - BackgroundColor?: string; - Width?: number; - Height?: number; - StackMaxSize?: number; - Rarity?: string; - SpawnChance?: number; - CreditsPrice?: number; - ItemSound?: string; - Prefab?: Prefab; - UsePrefab?: Prefab; - StackObjectsCount?: number; - NotShownInSlot?: boolean; - ExaminedByDefault?: boolean; - ExamineTime?: number; - IsUndiscardable?: boolean; - IsUnsaleable?: boolean; - IsUnbuyable?: boolean; - IsUngivable?: boolean; - IsUnremovable?: boolean; - IsLockedafterEquip?: boolean; - IsSpecialSlotOnly?: boolean; - IsStationaryWeapon?: boolean; - QuestItem?: boolean; - QuestStashMaxCount?: number; - LootExperience?: number; - ExamineExperience?: number; - HideEntrails?: boolean; - InsuranceDisabled?: boolean; - RepairCost?: number; - RepairSpeed?: number; - ExtraSizeLeft?: number; - ExtraSizeRight?: number; - ExtraSizeUp?: number; - ExtraSizeDown?: number; - ExtraSizeForceAdd?: boolean; - MergesWithChildren?: boolean; - CanSellOnRagfair?: boolean; - CanRequireOnRagfair?: boolean; - ConflictingItems?: string[]; - Unlootable?: boolean; - UnlootableFromSlot?: string; - UnlootableFromSide?: string[]; - AnimationVariantsNumber?: number; - DiscardingBlock?: boolean; - DropSoundType?: string; - RagFairCommissionModifier?: number; - RarityPvE: string; - IsAlwaysAvailableForInsurance?: boolean; - DiscardLimit?: number; - MaxResource?: number; - Resource?: number; - DogTagQualities?: boolean; - Grids?: Grid[]; - Slots?: Slot[]; - CanPutIntoDuringTheRaid?: boolean; - CantRemoveFromSlotsDuringRaid?: string[]; - KeyIds?: string[]; - TagColor?: number; - TagName?: string; - Durability?: number; - Accuracy?: number; - Recoil?: number; - Loudness?: number; - EffectiveDistance?: number; - Ergonomics?: number; - Velocity?: number; - WithAnimatorAiming?: boolean; - RaidModdable?: boolean; - ToolModdable?: boolean; - UniqueAnimationModID?: number; - BlocksFolding?: boolean; - BlocksCollapsible?: boolean; - IsAnimated?: boolean; - HasShoulderContact?: boolean; - SightingRange?: number; - DoubleActionAccuracyPenaltyMult?: number; - ModesCount?: any; - DurabilityBurnModificator?: number; - HeatFactor?: number; - CoolFactor?: number; - muzzleModType?: string; - CustomAimPlane?: string; - sightModType?: string; - aimingSensitivity?: number; - SightModesCount?: number; - OpticCalibrationDistances?: number[]; - ScopesCount?: number; - AimSensitivity?: number | number[][]; - Zooms?: number[][]; - CalibrationDistances?: number[][]; - Intensity?: number; - Mask?: string; - MaskSize?: number; - IsMagazineForStationaryWeapon?: boolean; - NoiseIntensity?: number; - NoiseScale?: number; - Color?: IColor; - DiffuseIntensity?: number; - MagazineWithBelt?: boolean; - HasHinge?: boolean; - RampPalette?: string; - DepthFade?: number; - RoughnessCoef?: number; - SpecularCoef?: number; - MainTexColorCoef?: number; - MinimumTemperatureValue?: number; - RampShift?: number; - HeatMin?: number; - ColdMax?: number; - IsNoisy?: boolean; - IsFpsStuck?: boolean; - IsGlitch?: boolean; - IsMotionBlurred?: boolean; - IsPixelated?: boolean; - PixelationBlockCount?: number; - ShiftsAimCamera?: number; - magAnimationIndex?: number; - Cartridges?: Slot[]; - CanFast?: boolean; - CanHit?: boolean; - CanAdmin?: boolean; - LoadUnloadModifier?: number; - CheckTimeModifier?: number; - CheckOverride?: number; - ReloadMagType?: string; - VisibleAmmoRangesString?: string; - MalfunctionChance?: number; - IsShoulderContact?: boolean; - Foldable?: boolean; - Retractable?: boolean; - SizeReduceRight?: number; - CenterOfImpact?: number; - ShotgunDispersion?: number; - IsSilencer?: boolean; - DeviationCurve?: number; - DeviationMax?: number; - SearchSound?: string; - BlocksArmorVest?: boolean; - speedPenaltyPercent?: number; - GridLayoutName?: string; - ContainerSpawnChanceModifier?: number; - SpawnExcludedFilter?: string[]; - SpawnFilter?: any[]; - containType?: any[]; - sizeWidth?: number; - sizeHeight?: number; - isSecured?: boolean; - spawnTypes?: string; - lootFilter?: any[]; - spawnRarity?: string; - minCountSpawn?: number; - maxCountSpawn?: number; - openedByKeyID?: any[]; - RigLayoutName?: string; - MaxDurability?: number; - armorZone?: string[]; - armorClass?: string | number; - armorColliders?: string[]; - armorPlateColliders?: string[]; - bluntDamageReduceFromSoftArmor?: boolean; - mousePenalty?: number; - weaponErgonomicPenalty?: number; - BluntThroughput?: number; - ArmorMaterial?: string; - ArmorType?: string; - weapClass?: string; - weapUseType?: string; - ammoCaliber?: string; - OperatingResource?: number; - PostRecoilHorizontalRangeHandRotation?: Ixyz; - PostRecoilVerticalRangeHandRotation?: Ixyz; - ProgressRecoilAngleOnStable?: Ixyz; - RepairComplexity?: number; - durabSpawnMin?: number; - durabSpawnMax?: number; - isFastReload?: boolean; - RecoilForceUp?: number; - RecoilForceBack?: number; - RecoilAngle?: number; - RecoilCamera?: number; - weapFireType?: string[]; - RecolDispersion?: number; - SingleFireRate?: number; - CanQueueSecondShot?: boolean; - bFirerate?: number; - bEffDist?: number; - bHearDist?: number; - blockLeftStance?: boolean; - isChamberLoad?: boolean; - chamberAmmoCount?: number; - isBoltCatch?: boolean; - defMagType?: string; - defAmmo?: string; - AdjustCollimatorsToTrajectory?: boolean; - shotgunDispersion?: number; - Chambers?: Slot[]; - CameraSnap?: number; - CameraToWeaponAngleSpeedRange?: Ixyz; - CameraToWeaponAngleStep?: number; - ReloadMode?: string; - AimPlane?: number; - TacticalReloadStiffnes?: Ixyz; - TacticalReloadFixation?: number; - RecoilCenter?: Ixyz; - RotationCenter?: Ixyz; - RotationCenterNoStock?: Ixyz; - ShotsGroupSettings?: IShotsGroupSettings[]; - FoldedSlot?: string; - CompactHandling?: boolean; - MinRepairDegradation?: number; - MaxRepairDegradation?: number; - IronSightRange?: number; - IsBeltMachineGun?: boolean; - IsFlareGun?: boolean; - IsGrenadeLauncher?: boolean; - IsOneoff?: boolean; - MustBoltBeOpennedForExternalReload?: boolean; - MustBoltBeOpennedForInternalReload?: boolean; - NoFiremodeOnBoltcatch?: boolean; - BoltAction?: boolean; - HipAccuracyRestorationDelay?: number; - HipAccuracyRestorationSpeed?: number; - HipInnaccuracyGain?: number; - ManualBoltCatch?: boolean; - BurstShotsCount?: number; - BaseMalfunctionChance?: number; - AllowJam?: boolean; - AllowFeed?: boolean; - AllowMisfire?: boolean; - AllowSlide?: boolean; - DurabilityBurnRatio?: number; - HeatFactorGun?: number; - CoolFactorGun?: number; - CoolFactorGunMods?: number; - HeatFactorByShot?: number; - AllowOverheat?: boolean; - DoubleActionAccuracyPenalty?: number; - RecoilPosZMult?: number; - RecoilReturnPathDampingHandRotation?: number; - RecoilReturnPathOffsetHandRotation?: number; - RecoilReturnSpeedHandRotation?: number; - RecoilStableAngleIncreaseStep?: number; - RecoilStableIndexShot?: number; - MinRepairKitDegradation?: number; - MaxRepairKitDegradation?: number; - BlocksEarpiece?: boolean; - BlocksEyewear?: boolean; - BlocksHeadwear?: boolean; - BlocksFaceCover?: boolean; - Indestructibility?: number; - headSegments?: string[]; - FaceShieldComponent?: boolean; - FaceShieldMask?: string; - MaterialType?: string; - RicochetParams?: Ixyz; - DeafStrength?: string; - BlindnessProtection?: number; - Distortion?: number; - CompressorTreshold?: number; - CompressorAttack?: number; - CompressorRelease?: number; - CompressorGain?: number; - CutoffFreq?: number; - Resonance?: number; - RolloffMultiplier?: number; - ReverbVolume?: number; - CompressorVolume?: number; - AmbientVolume?: number; - DryVolume?: number; - HighFrequenciesGain?: number; - foodUseTime?: number; - foodEffectType?: string; - StimulatorBuffs?: string; - effects_health?: IHealthEffect[] | Record>; - effects_damage?: Record; - MaximumNumberOfUsage?: number; - knifeHitDelay?: number; - knifeHitSlashRate?: number; - knifeHitStabRate?: number; - knifeHitRadius?: number; - knifeHitSlashDam?: number; - knifeHitStabDam?: number; - knifeDurab?: number; - PrimaryDistance?: number; - SecondryDistance?: number; - SlashPenetration?: number; - StabPenetration?: number; - PrimaryConsumption?: number; - SecondryConsumption?: number; - DeflectionConsumption?: number; - AppliedTrunkRotation?: Ixyz; - AppliedHeadRotation?: Ixyz; - DisplayOnModel?: boolean; - AdditionalAnimationLayer?: number; - StaminaBurnRate?: number; - ColliderScaleMultiplier?: Ixyz; - ConfigPathStr?: string; - MaxMarkersCount?: number; - scaleMin?: number; - scaleMax?: number; - medUseTime?: number; - medEffectType?: string; - MaxHpResource?: number; - hpResourceRate?: number; - apResource?: number; - krResource?: number; - MaxOpticZoom?: number; - MaxRepairResource?: number; - TargetItemFilter?: string[]; - RepairQuality?: number; - RepairType?: string; - StackMinRandom?: number; - StackMaxRandom?: number; - ammoType?: string; - InitialSpeed?: number; - BallisticCoeficient?: number; - BulletMassGram?: number; - BulletDiameterMilimeters?: number; - Damage?: number; - ammoAccr?: number; - ammoRec?: number; - ammoDist?: number; - buckshotBullets?: number; - PenetrationPower?: number; - PenetrationPowerDiviation?: number; - ammoHear?: number; - ammoSfx?: string; - MisfireChance?: number; - MinFragmentsCount?: number; - MaxFragmentsCount?: number; - ammoShiftChance?: number; - casingName?: string; - casingEjectPower?: number; - casingMass?: number; - casingSounds?: string; - ProjectileCount?: number; - PenetrationChanceObstacle?: number; - PenetrationDamageMod?: number; - RicochetChance?: number; - FragmentationChance?: number; - Deterioration?: number; - SpeedRetardation?: number; - Tracer?: boolean; - TracerColor?: string; - TracerDistance?: number; - ArmorDamage?: number; - Caliber?: string; - StaminaBurnPerDamage?: number; - HeavyBleedingDelta?: number; - LightBleedingDelta?: number; - ShowBullet?: boolean; - HasGrenaderComponent?: boolean; - FuzeArmTimeSec?: number; - ExplosionStrength?: number; - MinExplosionDistance?: number; - MaxExplosionDistance?: number; - FragmentsCount?: number; - FragmentType?: string; - ShowHitEffectOnExplode?: boolean; - ExplosionType?: string; - AmmoLifeTimeSec?: number; - Contusion?: Ixyz; - ArmorDistanceDistanceDamage?: Ixyz; - Blindness?: Ixyz; - IsLightAndSoundShot?: boolean; - LightAndSoundShotAngle?: number; - LightAndSoundShotSelfContusionTime?: number; - LightAndSoundShotSelfContusionStrength?: number; - MalfMisfireChance?: number; - MalfFeedChance?: number; - StackSlots?: StackSlot[]; - type?: string; - eqMin?: number; - eqMax?: number; - rate?: number; - ThrowType?: string; - ExplDelay?: number; - Strength?: number; - ContusionDistance?: number; - throwDamMax?: number; - explDelay?: number; - EmitTime?: number; - CanBeHiddenDuringThrow?: boolean; - MinTimeToContactExplode?: number; - ExplosionEffectType?: string; - LinkedWeapon?: string; - UseAmmoWithoutShell?: boolean; - RandomLootSettings?: IRandomLootSettings; - RecoilCategoryMultiplierHandRotation?: number; - RecoilDampingHandRotation?: number; - LeanWeaponAgainstBody?: boolean; - RemoveShellAfterFire?: boolean; - RepairStrategyTypes?: string[]; - IsEncoded?: boolean; - LayoutName?: string; - Lower75Prefab?: Prefab; - MaxUsages?: number; -} -export interface IHealthEffect { - type: string; - value: number; -} -export interface Prefab { - path: string; - rcid: string; -} -export interface Grid { - _name: string; - _id: string; - _parent: string; - _props: GridProps; - _proto: string; -} -export interface GridProps { - filters: GridFilter[]; - cellsH: number; - cellsV: number; - minCount: number; - maxCount: number; - maxWeight: number; - isSortingTable: boolean; -} -export interface GridFilter { - Filter: string[]; - ExcludedFilter: string[]; -} -export interface Slot { - _name: string; - _id: string; - _parent: string; - _props: SlotProps; - _max_count?: number; - _required?: boolean; - _mergeSlotWithChildren?: boolean; - _proto: string; -} -export interface SlotProps { - filters: SlotFilter[]; -} -export interface SlotFilter { - Shift?: number; - locked?: boolean; - Plate?: string; - armorColliders?: string[]; - armorPlateColliders?: string[]; - Filter: string[]; - AnimationIndex?: number; -} -export interface StackSlot { - _name?: string; - _id: string; - _parent: string; - _max_count: number; - _props: StackSlotProps; - _proto: string; - upd: any; -} -export interface StackSlotProps { - filters: SlotFilter[]; -} -export interface IRandomLootSettings { - allowToSpawnIdenticalItems: boolean; - allowToSpawnQuestItems: boolean; - countByRarity: any[]; - excluded: IRandomLootExcluded; - filters: any[]; - findInRaid: boolean; - maxCount: number; - minCount: number; -} -export interface IRandomLootExcluded { - categoryTemplates: any[]; - rarity: string[]; - templates: any[]; -} -export interface EffectsHealth { - Energy: EffectsHealthProps; - Hydration: EffectsHealthProps; -} -export interface EffectsHealthProps { - value: number; -} -export interface EffectsDamage { - Pain: IEffectDamageProps; - LightBleeding: IEffectDamageProps; - HeavyBleeding: IEffectDamageProps; - Contusion: IEffectDamageProps; - RadExposure: IEffectDamageProps; - Fracture: IEffectDamageProps; - DestroyedPart: IEffectDamageProps; -} -export interface IEffectDamageProps { - delay: number; - duration: number; - fadeOut: number; - cost?: number; - healthPenaltyMin?: number; - healthPenaltyMax?: number; -} -export interface IColor { - r: number; - g: number; - b: number; - a: number; -} -export interface IShotsGroupSettings { - EndShotIndex: number; - ShotRecoilPositionStrength: Ixyz; - ShotRecoilRadianRange: Ixyz; - ShotRecoilRotationStrength: Ixyz; - StartShotIndex: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITrader.d.ts deleted file mode 100644 index 14ab409..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITrader.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; -export interface ITrader { - assort?: ITraderAssort; - base: ITraderBase; - dialogue?: Record; - questassort?: Record>; - suits?: ISuit[]; - services?: ITraderServiceModel[]; -} -export interface ITraderBase { - refreshTraderRagfairOffers: boolean; - _id: string; - availableInRaid: boolean; - avatar: string; - balance_dol: number; - balance_eur: number; - balance_rub: number; - buyer_up: boolean; - currency: string; - customization_seller: boolean; - discount: number; - discount_end: number; - gridHeight: number; - insurance: Insurance; - items_buy: IItemBuyData; - items_buy_prohibited: IItemBuyData; - location: string; - loyaltyLevels: LoyaltyLevel[]; - medic: boolean; - name: string; - nextResupply: number; - nickname: string; - repair: Repair; - sell_category: string[]; - surname: string; - unlockedByDefault: boolean; -} -export interface IItemBuyData { - category: string[]; - id_list: string[]; -} -export interface Insurance { - availability: boolean; - excluded_category: string[]; - max_return_hour: number; - max_storage_time: number; - min_payment: number; - min_return_hour: number; -} -export interface LoyaltyLevel { - buy_price_coef: number; - exchange_price_coef: number; - heal_price_coef: number; - insurance_price_coef: number; - minLevel: number; - minSalesSum: number; - minStanding: number; - repair_price_coef: number; -} -export interface Repair { - availability: boolean; - currency: string; - currency_coefficient: number; - excluded_category: string[]; - /** Doesn't exist in client object */ - excluded_id_list: any[]; - quality: number; -} -export interface ITraderAssort { - nextResupply: number; - items: Item[]; - barter_scheme: Record; - loyal_level_items: Record; -} -export interface IBarterScheme { - count: number; - _tpl: string; - onlyFunctional?: boolean; - sptQuestLocked?: boolean; -} -export interface ISuit { - _id: string; - tid: string; - suiteId: string; - isActive: boolean; - requirements: ISuitRequirements; -} -export interface ISuitRequirements { - loyaltyLevel: number; - profileLevel: number; - standing: number; - skillRequirements: string[]; - questRequirements: string[]; - itemRequirements: ItemRequirement[]; -} -export interface ItemRequirement { - count: number; - _tpl: string; - onlyFunctional: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/customization/IBuyClothingRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/customization/IBuyClothingRequestData.d.ts deleted file mode 100644 index d19b70d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/customization/IBuyClothingRequestData.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface IBuyClothingRequestData { - Action: "CustomizationBuy"; - offer: string; - items: ClothingItem[]; -} -export interface ClothingItem { - del: boolean; - id: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/customization/IGetSuitsResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/customization/IGetSuitsResponse.d.ts deleted file mode 100644 index cbb909d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/customization/IGetSuitsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IGetSuitsResponse { - _id: string; - suites: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/customization/IWearClothingRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/customization/IWearClothingRequestData.d.ts deleted file mode 100644 index 122d9cf..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/customization/IWearClothingRequestData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IWearClothingRequestData { - Action: "CustomizationWear"; - suites: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IAcceptFriendRequestData.d.ts deleted file mode 100644 index 0913eb5..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IAcceptFriendRequestData extends IBaseFriendRequest { -} -export interface ICancelFriendRequestData extends IBaseFriendRequest { -} -export interface IDeclineFriendRequestData extends IBaseFriendRequest { -} -export interface IBaseFriendRequest { - profileId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts deleted file mode 100644 index d1170d1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IAddUserGroupMailRequest { - dialogId: string; - uid: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts deleted file mode 100644 index 63b413f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IChangeGroupMailOwnerRequest { - dialogId: string; - uid: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IChatServer.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IChatServer.d.ts deleted file mode 100644 index 48cacc4..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IChatServer.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IChatServer { - _id: string; - RegistrationId: number; - VersionId: string; - Ip: string; - Port: number; - DateTime: number; - Chats: IChat[]; - Regions: string[]; - /** Possibly removed */ - IsDeveloper?: boolean; -} -export interface IChat { - _id: string; - Members: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IClearMailMessageRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IClearMailMessageRequest.d.ts deleted file mode 100644 index ca4de5a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IClearMailMessageRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IClearMailMessageRequest { - dialogId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts deleted file mode 100644 index 176d7f3..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ICreateGroupMailRequest { - Name: string; - Users: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IDeleteFriendRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IDeleteFriendRequest.d.ts deleted file mode 100644 index 2923e02..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IDeleteFriendRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IDeleteFriendRequest { - friend_id: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IFriendRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IFriendRequestData.d.ts deleted file mode 100644 index 9c326ac..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IFriendRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IFriendRequestData { - to: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IFriendRequestSendResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IFriendRequestSendResponse.d.ts deleted file mode 100644 index fc311eb..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IFriendRequestSendResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IFriendRequestSendResponse { - status: number; - requestId: string; - retryAfter: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsRequestData.d.ts deleted file mode 100644 index 53d8289..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetAllAttachmentsRequestData { - dialogId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts deleted file mode 100644 index 9bcfead..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; -export interface IGetAllAttachmentsResponse { - messages: Message[]; - profiles: any[]; - hasMessagesWithRewards: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetChatServerListRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetChatServerListRequestData.d.ts deleted file mode 100644 index 8f1beac..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetChatServerListRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetChatServerListRequestData { - VersionId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetFriendListDataResponse.d.ts deleted file mode 100644 index a11dbb3..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -export interface IGetFriendListDataResponse { - Friends: IUserDialogInfo[]; - Ignore: string[]; - InIgnoreList: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogInfoRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogInfoRequestData.d.ts deleted file mode 100644 index eed84b1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogInfoRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetMailDialogInfoRequestData { - dialogId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogListRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogListRequestData.d.ts deleted file mode 100644 index f8fbf5d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogListRequestData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IGetMailDialogListRequestData { - limit: number; - offset: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts deleted file mode 100644 index 1d271e4..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MessageType } from "@spt/models/enums/MessageType"; -export interface IGetMailDialogViewRequestData { - type: MessageType; - dialogId: string; - limit: number; - time: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts deleted file mode 100644 index ba28910..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; -export interface IGetMailDialogViewResponseData { - messages: Message[]; - profiles: IUserDialogInfo[]; - hasMessagesWithRewards: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IPinDialogRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IPinDialogRequestData.d.ts deleted file mode 100644 index 57b8a00..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IPinDialogRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IPinDialogRequestData { - dialogId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IRemoveDialogRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IRemoveDialogRequestData.d.ts deleted file mode 100644 index 874b828..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IRemoveDialogRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemoveDialogRequestData { - dialogId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IRemoveMailMessageRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IRemoveMailMessageRequest.d.ts deleted file mode 100644 index e2aa8c6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IRemoveMailMessageRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemoveMailMessageRequest { - dialogId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts deleted file mode 100644 index c7582f8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IRemoveUserGroupMailRequest { - dialogId: string; - uid: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/ISendMessageRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/ISendMessageRequest.d.ts deleted file mode 100644 index d94c682..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/ISendMessageRequest.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MessageType } from "@spt/models/enums/MessageType"; -export interface ISendMessageRequest { - dialogId: string; - type: MessageType; - text: string; - replyTo: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/ISetDialogReadRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/ISetDialogReadRequestData.d.ts deleted file mode 100644 index 2076232..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/ISetDialogReadRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ISetDialogReadRequestData { - dialogs: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/ICheckVersionResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/ICheckVersionResponse.d.ts deleted file mode 100644 index fa8aa6f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/ICheckVersionResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ICheckVersionResponse { - isvalid: boolean; - latestVersion: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/ICurrentGroupResponse.d.ts deleted file mode 100644 index eb01946..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/ICurrentGroupResponse.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -export interface ICurrentGroupResponse { - squad: ICurrentGroupSquadMember[]; -} -export interface ICurrentGroupSquadMember { - _id: string; - aid: string; - info: ICurrentGroupMemberInfo; - isLeader: boolean; - isReady: boolean; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameConfigResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGameConfigResponse.d.ts deleted file mode 100644 index 2bff352..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameConfigResponse.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export interface IGameConfigResponse { - aid: number; - lang: string; - languages: Record; - ndaFree: boolean; - taxonomy: number; - activeProfileId: string; - backend: Backend; - useProtobuf: boolean; - utc_time: number; - /** Total in game time */ - totalInGame: number; - reportAvailable: boolean; - twitchEventMember: boolean; -} -export interface Backend { - Lobby: string; - Trading: string; - Messaging: string; - Main: string; - RagFair: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameEmptyCrcRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGameEmptyCrcRequestData.d.ts deleted file mode 100644 index a3ecad9..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameEmptyCrcRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGameEmptyCrcRequestData { - crc: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameKeepAliveResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGameKeepAliveResponse.d.ts deleted file mode 100644 index 170ce6a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameKeepAliveResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IGameKeepAliveResponse { - msg: string; - utc_time: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameLogoutResponseData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGameLogoutResponseData.d.ts deleted file mode 100644 index 0f52050..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameLogoutResponseData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGameLogoutResponseData { - status: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGameModeRequestData.d.ts deleted file mode 100644 index 618c42d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameModeRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGameModeRequestData { - sessionMode: string | null; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGameModeResponse.d.ts deleted file mode 100644 index eaac690..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameModeResponse.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum ESessionMode { - REGULAR = "regular", - PVE = "pve" -} -export interface IGameModeResponse { - gameMode: ESessionMode; - backendUrl: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameStartResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGameStartResponse.d.ts deleted file mode 100644 index 9f0ab6d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGameStartResponse.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGameStartResponse { - utc_time: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGetItemPricesResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGetItemPricesResponse.d.ts deleted file mode 100644 index ab6e818..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGetItemPricesResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IGetItemPricesResponse { - supplyNextTime: number; - prices: Record; - currencyCourses: Record; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGetRaidTimeRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGetRaidTimeRequest.d.ts deleted file mode 100644 index b93fb0c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGetRaidTimeRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IGetRaidTimeRequest { - Side: string; - Location: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IGetRaidTimeResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IGetRaidTimeResponse.d.ts deleted file mode 100644 index 4dcf0a0..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IGetRaidTimeResponse.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface IGetRaidTimeResponse { - RaidTimeMinutes: number; - NewSurviveTimeSeconds: number; - OriginalSurvivalTimeSeconds: number; - ExitChanges: ExtractChange[]; -} -export interface ExtractChange { - Name: string; - MinTime?: number; - MaxTime?: number; - Chance?: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/ISendReportRequest.d.ts deleted file mode 100644 index b73d95c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/ISendReportRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendReportRequest { - type: string; - uid: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IServerDetails.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IServerDetails.d.ts deleted file mode 100644 index 101cf99..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IServerDetails.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IServerDetails { - ip: string; - port: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IVersionValidateRequestData.d.ts deleted file mode 100644 index 0aa0fed..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IVersionValidateRequestData.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface IVersionValidateRequestData { - version: Version; - develop: boolean; -} -export interface Version { - major: string; - minor: string; - game: string; - backend: string; - taxonomy: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/health/Effect.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/health/Effect.d.ts deleted file mode 100644 index 62d95a8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/health/Effect.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum Effect { - FRACTURE = "Fracture", - LIGHT_BLEEDING = "LightBleeding", - HEAVY_BLEEDING = "HeavyBleeding", - MILD_MUSCLE_PAIN = "MildMusclePain", - SEVERE_MUSCLE_PAIN = "SevereMusclePain" -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/health/IHealthTreatmentRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/health/IHealthTreatmentRequestData.d.ts deleted file mode 100644 index 598e60c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/health/IHealthTreatmentRequestData.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export interface IHealthTreatmentRequestData { - Action: "RestoreHealth"; - trader: string; - items: Cost[]; - difference: Difference; - timestamp: number; -} -export interface Cost { - /** Id of stack to take money from */ - id: string; - /** Amount of money to take off player for treatment */ - count: number; -} -export interface Difference { - BodyParts: BodyParts; - Energy: number; - Hydration: number; -} -export interface BodyParts { - Head: BodyPart; - Chest: BodyPart; - Stomach: BodyPart; - LeftArm: BodyPart; - RightArm: BodyPart; - LeftLeg: BodyPart; - RightLeg: BodyPart; -} -export interface BodyPart { - Health: number; - /** Effects in array are to be removed */ - Effects: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/health/IOffraidEatRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/health/IOffraidEatRequestData.d.ts deleted file mode 100644 index c969b08..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/health/IOffraidEatRequestData.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -export interface IOffraidEatRequestData extends IBaseInteractionRequestData { - Action: "Eat"; - item: string; - count: number; - time: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/health/IOffraidHealRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/health/IOffraidHealRequestData.d.ts deleted file mode 100644 index c2fe7ba..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/health/IOffraidHealRequestData.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -export interface IOffraidHealRequestData extends IBaseInteractionRequestData { - Action: "Heal"; - item: string; - part: BodyPart; - count: number; - time: number; -} -export declare enum BodyPart { - HEAD = "Head", - CHEST = "Chest", - STOMACH = "Stomach", - LEFT_ARM = "LeftArm", - RIGHT_ARM = "RightArm", - LEFT_LEG = "LeftLeg", - RIGHT_LEG = "RightLeg", - COMMON = "Common" -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/health/ISyncHealthRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/health/ISyncHealthRequestData.d.ts deleted file mode 100644 index 20e32f6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/health/ISyncHealthRequestData.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface ISyncHealthRequestData { - Health: Health; - IsAlive: boolean; - Hydration?: number; - Energy?: number; - Temperature?: number; -} -export interface Health { - Head?: BodyPartHealth; - Chest?: BodyPartHealth; - Stomach?: BodyPartHealth; - LeftArm?: BodyPartHealth; - RightArm?: BodyPartHealth; - LeftLeg?: BodyPartHealth; - RightLeg?: BodyPartHealth; -} -export interface BodyPartHealth { - Maximum: number; - Current: number; - Effects: Record; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts deleted file mode 100644 index ba629d2..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IWorkoutData extends Record { - skills: any; - effects: any; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHandleQTEEventRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHandleQTEEventRequestData.d.ts deleted file mode 100644 index 5dda485..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHandleQTEEventRequestData.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface IHandleQTEEventRequestData { - Action: string; - /** true if QTE was successful, otherwise false */ - results: boolean[]; - /** Id of the QTE object used from db/hideout/qte.json */ - id: string; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutArea.d.ts deleted file mode 100644 index ca0eb07..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutArea.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { BonusSkillType } from "@spt/models/enums/BonusSkillType"; -import { BonusType } from "@spt/models/enums/BonusType"; -export interface IHideoutArea { - _id: string; - type: number; - enabled: boolean; - needsFuel: boolean; - requirements: IAreaRequirement[]; - takeFromSlotLocked: boolean; - craftGivesExp: boolean; - displayLevel: boolean; - enableAreaRequirements: boolean; - parentArea?: string; - stages: Record; -} -export interface IAreaRequirement { - areaType: number; - requiredlevel: number; - type: string; -} -export interface Stage { - autoUpgrade: boolean; - bonuses: StageBonus[]; - constructionTime: number; - /** Containers inventory tpl */ - container?: string; - description: string; - displayInterface: boolean; - improvements: IStageImprovement[]; - requirements: IStageRequirement[]; - slots: number; -} -export interface IStageImprovement { - id: string; - bonuses: IStageImprovementBonus[]; - improvementTime: number; - requirements: IStageImprovementRequirement[]; -} -export interface IStageImprovementBonus { - passive: boolean; - production: boolean; - type: string; - value: number; - visible: boolean; -} -export interface IStageImprovementRequirement { - count: number; - isEncoded: boolean; - isFunctional: boolean; - templateId: string; - type: string; -} -export interface IStageRequirement { - areaType?: number; - requiredLevel?: number; - type: string; - templateId?: string; - count?: number; - isEncoded: false; - isFunctional?: boolean; - traderId?: string; - loyaltyLevel?: number; - skillName?: string; - skillLevel?: number; -} -export interface StageBonus { - value: number; - passive: boolean; - production: boolean; - visible: boolean; - skillType?: BonusSkillType; - type: BonusType; - filter?: string[]; - icon?: string; - /** CHANGES PER DUMP */ - id?: string; - templateId?: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutCancelProductionRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutCancelProductionRequestData.d.ts deleted file mode 100644 index 4946cc6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutCancelProductionRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IHideoutCancelProductionRequestData { - Action: "HideoutCancelProductionCommand"; - recipeId: string; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutContinuousProductionStartRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutContinuousProductionStartRequestData.d.ts deleted file mode 100644 index 3ef00c6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutContinuousProductionStartRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IHideoutContinuousProductionStartRequestData { - Action: "HideoutContinuousProductionStart"; - recipeId: string; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts deleted file mode 100644 index 7e927bf..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface IHideoutImproveAreaRequestData { - Action: "HideoutImproveArea"; - /** Hideout area id from areas.json */ - id: string; - areaType: number; - items: HideoutItem[]; - timestamp: number; -} -export interface HideoutItem { - /** Hideout inventory id that was used by improvement action */ - id: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts deleted file mode 100644 index 7373a4f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export interface IHideoutProduction { - _id: string; - areaType: number; - requirements: Requirement[]; - productionTime: number; - /** Tpl of item being crafted */ - endProduct: string; - isEncoded: boolean; - locked: boolean; - needFuelForAllProductionTime: boolean; - continuous: boolean; - count: number; - productionLimitCount: number; -} -export interface Requirement { - templateId?: string; - count?: number; - isEncoded?: boolean; - isFunctional?: boolean; - type: string; - areaType?: number; - requiredLevel?: number; - resource?: number; - questId?: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutPutItemInRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutPutItemInRequestData.d.ts deleted file mode 100644 index 8326c55..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutPutItemInRequestData.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface IHideoutPutItemInRequestData { - Action: "HideoutPutItemsInAreaSlots"; - areaType: number; - items: Record; - timestamp: number; -} -export interface ItemDetails { - count: number; - id: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index d081d42..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; -} -export interface Requirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface EndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts deleted file mode 100644 index 72fda86..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export interface IHideoutScavCaseStartRequestData { - Action: "HideoutScavCaseProductionStart"; - recipeId: string; - items: HideoutItem[]; - tools: Tool[]; - timestamp: number; -} -export interface HideoutItem { - id: string; - count: number; -} -export interface Tool { - id: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutSettingsBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutSettingsBase.d.ts deleted file mode 100644 index 8e45939..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutSettingsBase.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IHideoutSettingsBase { - generatorSpeedWithoutFuel: number; - generatorFuelFlowRate: number; - airFilterUnitFlowRate: number; - gpuBoostRate: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutSingleProductionStartRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutSingleProductionStartRequestData.d.ts deleted file mode 100644 index dfb92e2..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutSingleProductionStartRequestData.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface IHideoutSingleProductionStartRequestData { - Action: "HideoutSingleProductionStart"; - recipeId: string; - items: Item[]; - tools: Item[]; - timestamp: number; -} -export interface Item { - id: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutTakeItemOutRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutTakeItemOutRequestData.d.ts deleted file mode 100644 index 83a740a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutTakeItemOutRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IHideoutTakeItemOutRequestData { - Action: "HideoutTakeItemsFromAreaSlots"; - areaType: number; - slots: number[]; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutTakeProductionRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutTakeProductionRequestData.d.ts deleted file mode 100644 index a6847ef..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutTakeProductionRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IHideoutTakeProductionRequestData { - Action: "HideoutTakeProduction"; - recipeId: string; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutToggleAreaRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutToggleAreaRequestData.d.ts deleted file mode 100644 index cdea513..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutToggleAreaRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IHideoutToggleAreaRequestData { - Action: "HideoutToggleArea"; - areaType: number; - enabled: boolean; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeCompleteRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 545311e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IHideoutUpgradeCompleteRequestData { - Action: "HideoutUpgradeComplete"; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts deleted file mode 100644 index dfbfdca..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface IHideoutUpgradeRequestData { - Action: "HideoutUpgrade"; - areaType: number; - items: HideoutItem[]; - timestamp: number; -} -export interface HideoutItem { - count: number; - id: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IQteData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IQteData.d.ts deleted file mode 100644 index 7f507e1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IQteData.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Effect } from "@spt/models/eft/health/Effect"; -import { BodyPart } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { QteActivityType } from "@spt/models/enums/hideout/QteActivityType"; -import { QteEffectType } from "@spt/models/enums/hideout/QteEffectType"; -import { QteResultType } from "@spt/models/enums/hideout/QteResultType"; -import { QteRewardType } from "@spt/models/enums/hideout/QteRewardType"; -import { QteType } from "@spt/models/enums/hideout/QteType"; -import { RequirementType } from "@spt/models/enums/hideout/RequirementType"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { Traders } from "@spt/models/enums/Traders"; -export interface IQteData { - id: string; - type: QteActivityType; - area: HideoutAreas; - areaLevel: number; - quickTimeEvents: IQuickTimeEvent[]; - requirements: (IAreaRequirement | IItemRequirement | ITraderUnlockRequirement | ITraderLoyaltyRequirement | ISkillRequirement | IResourceRequirement | IToolRequirement | IQuestRequirement | IHealthRequirement | IBodyPartBuffRequirement)[]; - results: Record; -} -export interface IQuickTimeEvent { - type: QteType; - position: { - x: number; - y: number; - }; - startDelay: number; - endDelay: number; - speed: number; - successRange: { - x: number; - y: number; - }; - key: string; -} -export interface IQteRequirement { - type: RequirementType; -} -export interface IQteResult { - energy: number; - hydration: number; - rewardsRange: IQteEffect[]; -} -export interface IQteEffect { - type: QteRewardType; - skillId: number; - levelMultipliers: ISkillLevelMultiplier[]; - time: number; - weight: number; - result: QteResultType; -} -export interface ISkillLevelMultiplier { - level: number; - multiplier: number; -} -export interface IAreaRequirement extends IQteRequirement { - type: RequirementType.AREA; - areaType: HideoutAreas; - requiredLevel: number; -} -export interface ITraderUnlockRequirement extends IQteRequirement { - type: RequirementType.TRADER_UNLOCK; - traderId: Traders; -} -export interface ITraderLoyaltyRequirement extends IQteRequirement { - type: RequirementType.TRADER_LOYALTY; - traderId: Traders; - loyaltyLevel: number; -} -export interface ISkillRequirement extends IQteRequirement { - type: RequirementType.SKILL; - skillName: SkillTypes; - skillLevel: number; -} -export interface IResourceRequirement extends IQteRequirement { - type: RequirementType.RESOURCE; - templateId: string; - resource: number; -} -export interface IItemRequirement extends IQteRequirement { - type: RequirementType.ITEM; - templateId: string; - count: number; - isFunctional: boolean; - isEncoded: boolean; -} -export interface IToolRequirement extends IQteRequirement { - type: RequirementType.TOOL; - templateId: string; - count: number; - isFunctional: boolean; - isEncoded: boolean; -} -export interface IQuestRequirement extends IQteRequirement { - type: RequirementType.QUEST_COMPLETE; - questId: string; -} -export interface IHealthRequirement extends IQteRequirement { - type: RequirementType.HEALTH; - energy: number; - hydration: number; -} -export interface IBodyPartBuffRequirement extends IQteRequirement { - type: RequirementType.BODY_PART_BUFF; - effectName: Effect; - bodyPart: BodyPart; - excluded: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IRecordShootingRangePoints.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IRecordShootingRangePoints.d.ts deleted file mode 100644 index 5bfd2fd..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IRecordShootingRangePoints.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IRecordShootingRangePoints { - Action: "RecordShootingRangePoints"; - points: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/httpResponse/IGetBodyResponseData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/httpResponse/IGetBodyResponseData.d.ts deleted file mode 100644 index b5dc5c1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/httpResponse/IGetBodyResponseData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IGetBodyResponseData { - err: number; - errmsg: any; - (data: Type): Type; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/httpResponse/INullResponseData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/httpResponse/INullResponseData.d.ts deleted file mode 100644 index a3ae838..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/httpResponse/INullResponseData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface INullResponseData { - err: number; - errmsg: any; - data: null; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IInsuredItemsData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IInsuredItemsData.d.ts deleted file mode 100644 index c49fb79..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IInsuredItemsData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IInsuredItemsData { - id: string; - durability?: number; - maxDurability?: number; - hits?: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts deleted file mode 100644 index 451a6f2..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Item } from "../common/tables/IItem"; -export interface IItemDeliveryRequestData { - items: Item[]; - traderId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IRegisterPlayerRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IRegisterPlayerRequestData.d.ts deleted file mode 100644 index e2d9cf1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IRegisterPlayerRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IRegisterPlayerRequestData { - crc: number; - locationId: string; - variantId: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inRaid/ISaveProgressRequestData.d.ts deleted file mode 100644 index b654088..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IInsuredItemsData } from "@spt/models/eft/inRaid/IInsuredItemsData"; -import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState"; -export interface ISaveProgressRequestData { - exit: PlayerRaidEndState; - profile: IPostRaidPmcData; - isPlayerScav: boolean; - health: ISyncHealthRequestData; - insurance: IInsuredItemsData[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/insurance/IGetInsuranceCostRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/insurance/IGetInsuranceCostRequestData.d.ts deleted file mode 100644 index 0e32e96..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/insurance/IGetInsuranceCostRequestData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IGetInsuranceCostRequestData { - traders: string[]; - items: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/insurance/IGetInsuranceCostResponseData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/insurance/IGetInsuranceCostResponseData.d.ts deleted file mode 100644 index 4579fdb..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/insurance/IGetInsuranceCostResponseData.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type IGetInsuranceCostResponseData = Record>; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/insurance/IInsureRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/insurance/IInsureRequestData.d.ts deleted file mode 100644 index e3b018e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/insurance/IInsureRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -export interface IInsureRequestData extends IBaseInteractionRequestData { - Action: "Insure"; - tid: string; - items: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts deleted file mode 100644 index 6459a79..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Item } from "../common/tables/IItem"; -export interface IAddItemDirectRequest { - /** Item and child mods to add to player inventory */ - itemWithModsToAdd: Item[]; - foundInRaid: boolean; - callback: (buyCount: number) => void; - useSortingTable: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemRequestData.d.ts deleted file mode 100644 index 3fa86dc..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemRequestData.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface IAddItemRequestData { - /** Trader id */ - tid: string; - items: AddItem[]; -} -export interface AddItem { - count: number; - sptIsPreset?: boolean; - item_id: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemTempObject.d.ts deleted file mode 100644 index 7b3a6ea..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemTempObject.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Item, Location } from "@spt/models/eft/common/tables/IItem"; -export interface IAddItemTempObject { - itemRef: Item; - count: number; - isPreset: boolean; - location?: Location; - containerId?: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts deleted file mode 100644 index c19ba2f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Item } from "../common/tables/IItem"; -export interface IAddItemsDirectRequest { - /** Item and child mods to add to player inventory */ - itemsWithModsToAdd: Item[][]; - foundInRaid: boolean; - /** Runs after EACH item with children is added */ - callback: (buyCount: number) => void; - /** Should sorting table be used when no space found in stash */ - useSortingTable: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts deleted file mode 100644 index 63c5389..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { - Action: "Add"; - item: string; - container: Container; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts deleted file mode 100644 index cc7269c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { -} -export interface To { - id: string; - container: string; - location?: ToLocation | number; - isSearched?: boolean; -} -export interface ToLocation { - x: number; - y: number; - r: string; - rotation?: string; - isSearched: boolean; -} -export interface Container { - id: string; - container: string; - location?: Location | number; -} -export interface Location { - x: number; - y: number; - r: string; - rotation?: string; - isSearched: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBindRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBindRequestData.d.ts deleted file mode 100644 index 5af9fea..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryBindRequestData extends IInventoryBaseActionRequestData { - Action: "Bind"; - item: string; - index: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts deleted file mode 100644 index 1469136..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { - Action: "CreateMapMarker"; - item: string; - mapMarker: MapMarker; -} -export interface MapMarker { - Type: string; - X: number; - Y: number; - Note: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts deleted file mode 100644 index e946f9f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryDeleteMarkerRequestData extends IInventoryBaseActionRequestData { - Action: "DeleteMapMarker"; - item: string; - X: number; - Y: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts deleted file mode 100644 index 87dcf86..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionRequestData { - Action: "EditMapMarker"; - item: string; - X: number; - Y: number; - mapMarker: MapMarker; -} -export interface MapMarker { - Type: string; - X: number; - Y: number; - Note: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryExamineRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryExamineRequestData.d.ts deleted file mode 100644 index 58275ba..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryExamineRequestData.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryExamineRequestData extends IInventoryBaseActionRequestData { - Action: "Examine"; - item: string; - fromOwner: OwnerInfo; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryFoldRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryFoldRequestData.d.ts deleted file mode 100644 index 7937743..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryFoldRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryFoldRequestData extends IInventoryBaseActionRequestData { - Action: "Fold"; - item: string; - value: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMergeRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMergeRequestData.d.ts deleted file mode 100644 index ad924ba..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMergeRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryMergeRequestData extends IInventoryBaseActionRequestData { - Action: "Merge"; - item: string; - with: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts deleted file mode 100644 index afb6fd0..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { - Action: "Move"; - item: string; - to: To; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts deleted file mode 100644 index ce61370..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryReadEncyclopediaRequestData extends IInventoryBaseActionRequestData { - Action: "ReadEncyclopedia"; - ids: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts deleted file mode 100644 index b9fa232..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryRemoveRequestData extends IInventoryBaseActionRequestData { - Action: "Remove"; - item: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySortRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySortRequestData.d.ts deleted file mode 100644 index d784c77..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySortRequestData.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Upd } from "@spt/models/eft/common/tables/IItem"; -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventorySortRequestData extends IInventoryBaseActionRequestData { - Action: "ApplyInventoryChanges"; - changedItems: ChangedItem[]; -} -export interface ChangedItem { - _id: string; - _tpl: string; - parentId: string; - slotId: string; - location: Location; - upd: Upd; -} -export interface Location { - x: number; - y: number; - r: string; - isSearched: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts deleted file mode 100644 index a4bb8a4..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { - Action: "Split"; - /** Id of item to split */ - splitItem: string; - /** Id of new item stack */ - newItem: string; - /** Destination new item will be placed in */ - container: Container; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts deleted file mode 100644 index ccf4796..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { - Action: "Swap"; - item: string; - to: To; - item2: string; - to2: To; - fromOwner2: OwnerInfo; - toOwner2: OwnerInfo; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryTagRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryTagRequestData.d.ts deleted file mode 100644 index 5c9f651..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryTagRequestData.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryTagRequestData extends IInventoryBaseActionRequestData { - Action: "Tag"; - item: string; - TagName: string; - TagColor: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryToggleRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryToggleRequestData.d.ts deleted file mode 100644 index 0d8b1e4..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryToggleRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryToggleRequestData extends IInventoryBaseActionRequestData { - Action: "Toggle"; - item: string; - value: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryTransferRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryTransferRequestData.d.ts deleted file mode 100644 index fe0327d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryTransferRequestData.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryTransferRequestData extends IInventoryBaseActionRequestData { - Action: "Transfer"; - item: string; - with: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index d3a4bd7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts deleted file mode 100644 index c9b97e0..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActionRequestData { - Action: "OpenRandomLootContainer"; - /** Container item id being opened */ - item: string; - to: To[]; -} -export interface To { - /** Player character (pmc/scav) id items will be sent to */ - id: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts deleted file mode 100644 index d351a8c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; -export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { - Action: "RedeemProfileReward"; - events: IRedeemProfileRequestEvent[]; -} -export interface IRedeemProfileRequestEvent { - MessageId: string; - EventId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts deleted file mode 100644 index aacbb39..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; -export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { - Action: "SetFavoriteItems"; - items: any[]; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts deleted file mode 100644 index f9165dc..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IItemEventRouterBase } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; -export interface IEmptyItemEventRouterResponse extends IItemEventRouterBase { - profileChanges: ""; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts deleted file mode 100644 index 0c48014..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Health, IQuestStatus, Productive, Skills } 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"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { EquipmentBuildType } from "@spt/models/enums/EquipmentBuildType"; -export interface IItemEventRouterBase { - warnings: Warning[]; - profileChanges: TProfileChanges | ""; -} -export type TProfileChanges = Record; -export interface Warning { - index: number; - errmsg: string; - code?: string; - data?: any; -} -export interface ProfileChange { - _id: string; - experience: number; - quests: IQuest[]; - ragFairOffers: IRagfairOffer[]; - weaponBuilds: IWeaponBuildChange[]; - equipmentBuilds: IEquipmentBuildChange[]; - items: ItemChanges; - production: Record; - /** Hideout area improvement id */ - improvements: Record; - skills: Skills; - health: Health; - traderRelations: Record; - repeatableQuests?: IPmcDataRepeatableQuest[]; - recipeUnlocked: Record; - changedHideoutStashes?: Record; - questsStatus: IQuestStatus[]; -} -export interface IHideoutStashItem { - Id: string; - Tpl: string; -} -export interface IWeaponBuildChange { - id: string; - name: string; - root: string; - items: Item[]; -} -export interface IEquipmentBuildChange { - id: string; - name: string; - root: string; - items: Item[]; - type: string; - fastpanel: any[]; - buildType: EquipmentBuildType; -} -export interface ItemChanges { - new: Product[]; - change: Product[]; - del: Product[]; -} -export interface Improvement { - completed: boolean; - improveCompleteTimestamp: number; -} -/** Related to TraderInfo */ -export interface TraderData { - salesSum: number; - standing: number; - loyalty: number; - unlocked: boolean; - disabled: boolean; -} -export interface Product { - _id: string; - _tpl?: string; - parentId?: string; - slotId?: string; - location?: ItemChangeLocation; - upd?: Upd; -} -export interface ItemChangeLocation { - x: number; - y: number; - r: number; - isSearched?: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts deleted file mode 100644 index 515b49a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface IItemEventRouterRequest { - data: Daum[]; - tm: number; - reload: number; -} -export interface Daum { - Action: string; - item: string; - to: To; -} -export interface To { - id: string; - container: string; - location?: Location; -} -export interface Location { - x: number; - y: number; - r: string; - isSearched: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts deleted file mode 100644 index d4913be..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IItemEventRouterBase } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; -/** An object sent back to the game client that contains alterations the client must make to ensure server/client are in sync */ -export interface IItemEventRouterResponse extends IItemEventRouterBase { -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IChangeRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/launcher/IChangeRequestData.d.ts deleted file mode 100644 index b0431d7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IChangeRequestData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -export interface IChangeRequestData extends ILoginRequestData { - change: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IGetMiniProfileRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/launcher/IGetMiniProfileRequestData.d.ts deleted file mode 100644 index a14c7c9..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IGetMiniProfileRequestData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IGetMiniProfileRequestData { - username: string; - password: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/launcher/ILoginRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/launcher/ILoginRequestData.d.ts deleted file mode 100644 index e965813..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/launcher/ILoginRequestData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ILoginRequestData { - username: string; - password: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/launcher/IMiniProfile.d.ts deleted file mode 100644 index b25a1e7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IMiniProfile.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface IMiniProfile { - username: string; - nickname: string; - side: string; - currlvl: number; - currexp: number; - prevexp: number; - nextlvl: number; - maxlvl: number; - sptData: SPTData; -} -export interface SPTData { - version: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IRegisterData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/launcher/IRegisterData.d.ts deleted file mode 100644 index 4a3c15e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IRegisterData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -export interface IRegisterData extends ILoginRequestData { - edition: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IRemoveProfileData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/launcher/IRemoveProfileData.d.ts deleted file mode 100644 index 59848ed..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IRemoveProfileData.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -export type IRemoveProfileData = ILoginRequestData; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/location/IAirdropLootResult.d.ts deleted file mode 100644 index cacc805..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/location/IAirdropLootResult.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; -export interface IAirdropLootResult { - dropType: string; - loot: LootItem[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/location/IGetLocationRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/location/IGetLocationRequestData.d.ts deleted file mode 100644 index 04e84d9..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/location/IGetLocationRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IGetLocationRequestData { - crc: number; - locationId: string; - variantId: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IEndOfflineRaidRequestData.d.ts deleted file mode 100644 index 9368c32..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IEndOfflineRaidRequestData { - crc: number; - exitStatus: string; - exitName: string; - raidSeconds: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts deleted file mode 100644 index 959986c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IRaidSettings } from "@spt/models/eft/match/IRaidSettings"; -export interface IGetRaidConfigurationRequestData extends IRaidSettings { - keyId: string; - CanShowGroupPreview: boolean; - MaxGroupCount: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IGroupCharacter.d.ts deleted file mode 100644 index 013930a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IGroupCharacter.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -export interface IGroupCharacter { - _id: string; - aid: number; - Info: { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; - GameVersion?: string; - SavageLockTime?: number; - SavageNickname?: string; - hasCoopExtension?: boolean; - }; - PlayerVisualRepresentation?: { - Info: { - Side: string; - Level: number; - Nickname: string; - MemberCategory: MemberCategory; - GameVersion: string; - }; - Customization: { - Head: string; - Body: string; - Feet: string; - Hands: string; - }; - Equipment: { - Id: string; - Items: Item[]; - }; - }; - isLeader: boolean; - isReady?: boolean; - region?: string; - lookingGroup?: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts deleted file mode 100644 index 23bcba4..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -export interface IMatchGroupCurrentResponse { - squad: IGroupCharacter[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts deleted file mode 100644 index e03cb90..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IMatchGroupInviteSendRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts deleted file mode 100644 index 623eadb..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IMatchGroupPlayerRemoveRequest { - aidToKick: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts deleted file mode 100644 index 663ef1e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IServer } from "@spt/models/eft/match/IServer"; -export interface IMatchGroupStartGameRequest { - groupId: string; - servers: IServer[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts deleted file mode 100644 index 7702ac7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -export interface IMatchGroupStatusResponse { - players: IGroupCharacter[]; - maxPveCountExceeded: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts deleted file mode 100644 index 4476387..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IMatchGroupTransferRequest { - aidToChange: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IProfileStatusRequest.d.ts deleted file mode 100644 index 0667a99..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IProfileStatusRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IProfileStatusRequest { - groupId: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IProfileStatusResponse.d.ts deleted file mode 100644 index 8fa6186..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IProfileStatusResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ISessionStatus } from "@spt/models/eft/match/ISessionStatus"; -export interface IProfileStatusResponse { - maxPveCountExceeded: boolean; - profiles: ISessionStatus[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IPutMetricsRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IPutMetricsRequestData.d.ts deleted file mode 100644 index d9ed214..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IPutMetricsRequestData.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface IPutMetricsRequestData { - sid: string; - settings: any; - SharedSettings: any; - HardwareDescription: any; - Location: string; - Metrics: any; - ClientEvents: any; - SpikeSamples: any[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IRaidSettings.d.ts deleted file mode 100644 index 78a0c19..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IRaidSettings.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { DateTime } from "@spt/models/enums/DateTime"; -import { PlayersSpawnPlace } from "@spt/models/enums/PlayersSpawnPlace"; -import { RaidMode } from "@spt/models/enums/RaidMode"; -import { BotAmount } from "@spt/models/enums/RaidSettings/BotAmount"; -import { BotDifficulty } from "@spt/models/enums/RaidSettings/BotDifficulty"; -import { CloudinessType } from "@spt/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; -import { FogType } from "@spt/models/enums/RaidSettings/TimeAndWeather/FogType"; -import { RainType } from "@spt/models/enums/RaidSettings/TimeAndWeather/RainType"; -import { TimeFlowType } from "@spt/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; -import { WindSpeed } from "@spt/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; -import { SideType } from "@spt/models/enums/SideType"; -export interface IRaidSettings { - location: string; - timeVariant: DateTime; - raidMode: RaidMode; - metabolismDisabled: boolean; - playersSpawnPlace: PlayersSpawnPlace; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; - side: SideType; -} -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: CloudinessType; - rainType: RainType; - fogType: FogType; - windType: WindSpeed; - timeFlowType: TimeFlowType; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: BotAmount; -} -export interface WavesSettings { - botAmount: BotAmount; - botDifficulty: BotDifficulty; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IRequestIdRequest.d.ts deleted file mode 100644 index 755ca1b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IRequestIdRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRequestIdRequest { - requestId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IServer.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IServer.d.ts deleted file mode 100644 index d7c30d8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IServer.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IServer { - ping: number; - ip: string; - port: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/ISessionStatus.d.ts deleted file mode 100644 index c745cbf..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/ISessionStatus.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface ISessionStatus { - profileid: string; - profileToken: string; - status: string; - ip: string; - port: number; - sid: string; - version?: string; - location?: string; - raidMode?: string; - mode?: string; - shortId?: string; - additional_info?: any[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IUpdatePingRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IUpdatePingRequestData.d.ts deleted file mode 100644 index defbd66..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IUpdatePingRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IUpdatePingRequestData { - servers: any[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/notes/INoteActionData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/notes/INoteActionData.d.ts deleted file mode 100644 index 344c40d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/notes/INoteActionData.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -export interface INoteActionData extends IBaseInteractionRequestData { - Action: string; - index: number; - note: INote; -} -export interface INote { - Time: number; - Text: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/notifier/INotifier.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/notifier/INotifier.d.ts deleted file mode 100644 index 4ead272..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/notifier/INotifier.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface INotifierChannel { - server: string; - channel_id: string; - url: string; - notifierServer: string; - ws: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/notifier/ISelectProfileResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/notifier/ISelectProfileResponse.d.ts deleted file mode 100644 index f2d6be7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/notifier/ISelectProfileResponse.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ISelectProfileResponse { - status: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts deleted file mode 100644 index f1123c1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Skills } from "@spt/models/eft/common/tables/IBotBase"; -export interface IPlayerIncrementSkillLevelRequestData { - _id: string; - experience: number; - quests: any[]; - ragFairOffers: any[]; - builds: any[]; - items: Items; - production: Production; - skills: Skills; - traderRelations: TraderRelations; -} -export interface Items { - new: any[]; - change: any[]; - del: any[]; -} -export interface Production { -} -export interface TraderRelations { -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts deleted file mode 100644 index 3cb8533..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -export interface IPresetBuildActionRequestData { - Action: string; - Id: string; - /** name of preset given by player */ - Name: string; - Root: string; - Items: Item[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/presetBuild/IRemoveBuildRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/presetBuild/IRemoveBuildRequestData.d.ts deleted file mode 100644 index bcbdbce..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/presetBuild/IRemoveBuildRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemoveBuildRequestData { - id: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/GetProfileStatusResponseData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/GetProfileStatusResponseData.d.ts deleted file mode 100644 index 1228c2e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/GetProfileStatusResponseData.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface GetProfileStatusResponseData { - maxPveCountExceeded: false; - profiles: ProfileData[]; -} -export interface ProfileData { - profileid: string; - profileToken: string; - status: string; - ip: string; - port: number; - sid: string; - version?: string; - location?: string; - raidMode?: string; - mode?: string; - shortId?: string; - additional_info?: any[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/ICompletedAchievementsResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/ICompletedAchievementsResponse.d.ts deleted file mode 100644 index 09275bc..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/ICompletedAchievementsResponse.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICompletedAchievementsResponse { - elements: Record; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/IConnectResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/IConnectResponse.d.ts deleted file mode 100644 index 8e809ef..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/IConnectResponse.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IConnectResponse { - backendUrl: string; - name: string; - editions: string[]; - profileDescriptions: Record; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/ICreateProfileResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/ICreateProfileResponse.d.ts deleted file mode 100644 index c297482..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/ICreateProfileResponse.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICreateProfileResponse { - uid: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts deleted file mode 100644 index a5a43cb..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IAchievement } from "../common/tables/IAchievement"; -export interface IGetAchievementsResponse { - elements: IAchievement[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetOtherProfileRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetOtherProfileRequest.d.ts deleted file mode 100644 index de3144b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetOtherProfileRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetOtherProfileRequest { - accountId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetOtherProfileResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetOtherProfileResponse.d.ts deleted file mode 100644 index 7df4eba..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetOtherProfileResponse.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { OverallCounters, Skills } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -export interface IGetOtherProfileResponse { - id: string; - aid: number; - info: IOtherProfileInfo; - customization: IOtherProfileCustomization; - skills: Skills; - equipment: IOtherProfileEquipment; - achievements: Record; - favoriteItems: string[]; - pmcStats: IOtherProfileStats; - scavStats: IOtherProfileStats; -} -export interface IOtherProfileInfo { - nickname: string; - side: string; - experience: number; - memberCategory: number; - bannedState: boolean; - bannedUntil: number; - registrationDate: number; -} -export interface IOtherProfileCustomization { - head: string; - body: string; - feet: string; - hands: string; -} -export interface IOtherProfileEquipment { - Id: string; - Items: Item[]; -} -export interface IOtherProfileStats { - eft: IOtherProfileSubStats; -} -export interface IOtherProfileSubStats { - totalInGameTime: number; - overAllCounters: OverallCounters; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetProfileSettingsRequest.d.ts deleted file mode 100644 index 8168615..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/IGetProfileSettingsRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileSettingsRequest { - squadInviteRestriction: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/IProfileChangeNicknameRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/IProfileChangeNicknameRequestData.d.ts deleted file mode 100644 index 4a61196..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/IProfileChangeNicknameRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IProfileChangeNicknameRequestData { - nickname: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/IProfileChangeVoiceRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/IProfileChangeVoiceRequestData.d.ts deleted file mode 100644 index 91058ce..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/IProfileChangeVoiceRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IProfileChangeVoiceRequestData { - voice: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/IProfileCreateRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/IProfileCreateRequestData.d.ts deleted file mode 100644 index 93cc656..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/IProfileCreateRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IProfileCreateRequestData { - side: string; - nickname: string; - headId: string; - voiceId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/ISearchFriendRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/ISearchFriendRequestData.d.ts deleted file mode 100644 index e63e386..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/ISearchFriendRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ISearchFriendRequestData { - nickname: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/ISearchFriendResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/ISearchFriendResponse.d.ts deleted file mode 100644 index d3cc7df..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/ISearchFriendResponse.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface ISearchFriendResponse { - _id: string; - aid: number; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/IValidateNicknameRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/IValidateNicknameRequestData.d.ts deleted file mode 100644 index 9cca7e7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/IValidateNicknameRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IValidateNicknameRequestData { - nickname: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/quests/IAcceptQuestRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/quests/IAcceptQuestRequestData.d.ts deleted file mode 100644 index 0e4821a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/quests/IAcceptQuestRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IAcceptQuestRequestData { - Action: "QuestAccept"; - qid: string; - type: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/quests/ICompleteQuestRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/quests/ICompleteQuestRequestData.d.ts deleted file mode 100644 index 36a6db3..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/quests/ICompleteQuestRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface ICompleteQuestRequestData { - Action: string; - /** Quest Id */ - qid: string; - removeExcessItems: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/quests/IFailQuestRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/quests/IFailQuestRequestData.d.ts deleted file mode 100644 index a1a65ea..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/quests/IFailQuestRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IFailQuestRequestData { - Action: "QuestFail"; - qid: string; - removeExcessItems: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/quests/IHandoverQuestRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/quests/IHandoverQuestRequestData.d.ts deleted file mode 100644 index 63f10a8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/quests/IHandoverQuestRequestData.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface IHandoverQuestRequestData { - Action: "QuestHandover"; - qid: string; - conditionId: string; - items: Item[]; -} -export interface Item { - id: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/quests/IListQuestsRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/quests/IListQuestsRequestData.d.ts deleted file mode 100644 index 91f0b8c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/quests/IListQuestsRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IListQuestsRequestData { - completed: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/quests/IRepeatableQuestChangeRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/quests/IRepeatableQuestChangeRequest.d.ts deleted file mode 100644 index 015f58e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/quests/IRepeatableQuestChangeRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IRepeatableQuestChangeRequest { - Action: "RepeatableQuestChange"; - qid: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts deleted file mode 100644 index 465ee02..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface IAddOfferRequestData { - Action: string; - sellInOnePiece: boolean; - items: string[]; - requirements: Requirement[]; -} -export interface Requirement { - _tpl: string; - count: number; - level: number; - side: number; - onlyFunctional: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IExtendOfferRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IExtendOfferRequestData.d.ts deleted file mode 100644 index 2a4a876..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IExtendOfferRequestData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IExtendOfferRequestData { - offerId: string; - renewalTime: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetItemPriceResult.d.ts deleted file mode 100644 index a81eee6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IGetItemPriceResult extends MinMax { - avg: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetMarketPriceRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetMarketPriceRequestData.d.ts deleted file mode 100644 index 00f8f17..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetMarketPriceRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetMarketPriceRequestData { - templateId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetOffersResult.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetOffersResult.d.ts deleted file mode 100644 index f3420fa..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetOffersResult.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -export interface IGetOffersResult { - categories?: Record; - offers: IRagfairOffer[]; - offersCount: number; - selectedCategory: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetRagfairOfferByIdRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetRagfairOfferByIdRequest.d.ts deleted file mode 100644 index 91e3615..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IGetRagfairOfferByIdRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetRagfairOfferByIdRequest { - id: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRagfairOffer.d.ts deleted file mode 100644 index 1741b47..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRagfairOffer.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -export interface IRagfairOffer { - sellResult?: SellResult[]; - _id: string; - items: Item[]; - requirements: OfferRequirement[]; - root: string; - intId: number; - /** Handbook price */ - itemsCost: number; - /** Rouble price */ - requirementsCost: number; - startTime: number; - endTime: number; - sellInOnePiece: boolean; - loyaltyLevel: number; - buyRestrictionMax?: number; - buyRestrictionCurrent?: number; - locked: boolean; - unlimitedCount: boolean; - /** Rouble price */ - summaryCost: number; - user: IRagfairOfferUser; - notAvailable: boolean; - /** TODO - implement this value - not currently used */ - CurrentItemCount: number; - priority: boolean; -} -export interface OfferRequirement { - _tpl: string; - count: number; - onlyFunctional: boolean; -} -export interface IRagfairOfferUser { - id: string; - nickname?: string; - rating?: number; - memberType: MemberCategory; - avatar?: string; - isRatingGrowing?: boolean; -} -export interface SellResult { - sellTime: number; - amount: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRemoveOfferRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRemoveOfferRequestData.d.ts deleted file mode 100644 index d926615..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRemoveOfferRequestData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IRemoveOfferRequestData { - Action: string; - offerId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/ISearchRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/ISearchRequestData.d.ts deleted file mode 100644 index 8261c5b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/ISearchRequestData.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { RagfairSort } from "@spt/models/enums/RagfairSort"; -export interface ISearchRequestData { - page: number; - limit: number; - sortType: RagfairSort; - sortDirection: number; - currency: number; - priceFrom: number; - priceTo: number; - quantityFrom: number; - quantityTo: number; - conditionFrom: number; - conditionTo: number; - oneHourExpiration: boolean; - removeBartering: boolean; - offerOwnerType: OfferOwnerType; - onlyFunctional: boolean; - updateOfferCount: boolean; - handbookId: string; - linkedSearchId: string; - neededSearchId: string; - buildItems: BuildItems; - buildCount: number; - tm: number; - reload: number; -} -export declare enum OfferOwnerType { - ANYOWNERTYPE = 0, - TRADEROWNERTYPE = 1, - PLAYEROWNERTYPE = 2 -} -export interface BuildItems { -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/ISendRagfairReportRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/ISendRagfairReportRequestData.d.ts deleted file mode 100644 index 2d14d20..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/ISendRagfairReportRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ISendRagfairReportRequestData { - offerId: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts deleted file mode 100644 index ebf470e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IStorePlayerOfferTaxAmountRequestData { - id: string; - tpl: string; - count: number; - fee: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/repair/IBaseRepairActionDataRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/repair/IBaseRepairActionDataRequest.d.ts deleted file mode 100644 index e645fb3..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/repair/IBaseRepairActionDataRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IBaseRepairActionDataRequest { - Action: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts deleted file mode 100644 index d51c1b9..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; -export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { - Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; - target: string; -} -export interface RepairKitsInfo { - _id: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts deleted file mode 100644 index 50f308e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; -export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { - Action: "TraderRepair"; - tid: string; - repairItems: RepairItem[]; -} -export interface RepairItem { - _id: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessBaseTradeRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessBaseTradeRequestData.d.ts deleted file mode 100644 index a9ef757..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessBaseTradeRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IProcessBaseTradeRequestData { - Action: string; - type: string; - tid: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts deleted file mode 100644 index d64b2c9..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "SptInsure" | "SptRepair" | ""; - type: string; - tid: string; - item_id: string; - count: number; - scheme_id: number; - scheme_items: SchemeItem[]; -} -export interface SchemeItem { - /** Id of stack to take money from, is money tpl when Action is `SptInsure` */ - id: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessRagfairTradeRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessRagfairTradeRequestData.d.ts deleted file mode 100644 index 66abc0b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessRagfairTradeRequestData.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface IProcessRagfairTradeRequestData { - Action: string; - offers: IOfferRequest[]; -} -export interface IOfferRequest { - id: string; - count: number; - items: IItemReqeust[]; -} -export interface IItemReqeust { - id: string; - count: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessSellTradeRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessSellTradeRequestData.d.ts deleted file mode 100644 index 459bd28..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/trade/IProcessSellTradeRequestData.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -export interface IProcessSellTradeRequestData extends IProcessBaseTradeRequestData { - Action: "sell_to_trader"; - type: string; - tid: string; - price: number; - items: Item[]; -} -export interface Item { - id: string; - count: number; - scheme_id: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts deleted file mode 100644 index 3727ce4..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -export interface ISellScavItemsToFenceRequestData { - Action: "SellAllFromSavage"; - totalValue: number; - fromOwner: OwnerInfo; - toOwner: OwnerInfo; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/weather/IWeatherData.d.ts deleted file mode 100644 index 81bc746..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/weather/IWeatherData.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Season } from "@spt/models/enums/Season"; -import { WindDirection } from "@spt/models/enums/WindDirection"; -export interface IWeatherData { - acceleration: number; - time: string; - date: string; - weather: IWeather; - season: Season; -} -export interface IWeather { - pressure: number; - temp: number; - fog: number; - rain_intensity: number; - rain: number; - wind_gustiness: number; - wind_direction: WindDirection; - wind_speed: number; - cloud: number; - time: string; - date: string; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/wishlist/IWishlistActionData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/wishlist/IWishlistActionData.d.ts deleted file mode 100644 index 9217864..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/wishlist/IWishlistActionData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IWishlistActionData { - Action: string; - templateId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsAid.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsAid.d.ts deleted file mode 100644 index 310d507..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsAid.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsAid extends IWsNotificationEvent { - aid: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsAidNickname.d.ts deleted file mode 100644 index e623b19..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsAidNickname.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsAidNickname extends IWsNotificationEvent { - aid: number; - Nickname: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts deleted file mode 100644 index 217e8e5..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; -export interface IWsChatMessageReceived extends IWsNotificationEvent { - dialogId: string; - message: Message; - profiles?: IGroupCharacter[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupId.d.ts deleted file mode 100644 index 62a8c6f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupId.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupId extends IWsNotificationEvent { - groupId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts deleted file mode 100644 index ad176aa..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; -export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts deleted file mode 100644 index cf15409..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { - aid: number; - Nickname: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts deleted file mode 100644 index b52a49c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { - requestId: string; - from: number; - members: IGroupCharacter[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts deleted file mode 100644 index a374183..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { - owner: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts deleted file mode 100644 index ab76918..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { - extendedProfile: IGroupCharacter; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts deleted file mode 100644 index 5fa52af..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IRaidSettings } from "@spt/models/eft/match/IRaidSettings"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { - raidSettings: IRaidSettings; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsNotificationEvent.d.ts deleted file mode 100644 index 5fc72f3..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsNotificationEvent.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IWsNotificationEvent { - type: string; - eventId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsPing.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsPing.d.ts deleted file mode 100644 index d43aa03..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsPing.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsPing extends IWsNotificationEvent { -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts deleted file mode 100644 index 1c4c88e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsRagfairOfferSold extends IWsNotificationEvent { - offerId: string; - count: number; - handbookId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsUserConfirmed.d.ts deleted file mode 100644 index ac32e0d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsUserConfirmed.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { ProfileStatus } from "@spt/models/enums/ProfileStatus"; -import { RaidMode } from "@spt/models/enums/RaidMode"; -export interface IWsUserConfirmed extends IWsNotificationEvent { - profileid: string; - profileToken: string; - status: ProfileStatus; - ip: string; - port: number; - sid: string; - version: string; - location: string; - raidMode: RaidMode; - mode: string; - shortId: string; - additional_info: any[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/AccountTypes.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/AccountTypes.d.ts deleted file mode 100644 index 79d74d5..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/AccountTypes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare enum AccountTypes { - SPT_DEVELOPER = "spt developer" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/AirdropType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/AirdropType.d.ts deleted file mode 100644 index a6f6e3a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/AirdropType.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare enum AirdropTypeEnum { - MIXED = "mixed", - WEAPONARMOR = "weaponarmor", - FOODMEDICAL = "foodmedical", - BARTER = "barter" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/AmmoTypes.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/AmmoTypes.d.ts deleted file mode 100644 index 51ea4bb..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/AmmoTypes.d.ts +++ /dev/null @@ -1,222 +0,0 @@ -export declare enum Grenade { - M386_HE_GRENADE = "5ede475b549eed7c6d5c18fb", - M576_MP_APERS_GRENADE = "5ede475339ee016e8c534742", - M433_HEDP_GRENADE = "5f0c892565703e5c461894e9", - M406_HE_GRENADE = "5ede4739e0350d05467f73e8", - M381_HE_GRENADE = "5ede474b0c226a66f5402622", - M441_HE_GRENADE = "5ede47405b097655935d7d16" -} -export declare enum Ammo762x51 { - M62_TRACER = "5a608bf24f39f98ffc77720e", - M80 = "58dd3ad986f77403051cba8f", - M61 = "5a6086ea4f39f99cd479502f", - BCP_FMJ = "5e023e53d4353e3302577c4c", - ULTRA_NOSLER = "5e023e88277cce2b522ff2b1", - TCW_SP = "5e023e6e34d52a55c3304f71", - M993 = "5efb0c1bd79ff02a1f5e68d9" -} -export declare enum Ammo762x54 { - SNB_GZH = "560d61e84bdc2da74d8b4571", - LPS_GZH = "5887431f2459777e1612938f", - PS_GZH = "59e77a2386f7742ee578960a", - T46M_GZH = "5e023cf8186a883be655e54f", - BT_GZH = "5e023d34e8a400319a28ed44", - BS_GZH = "5e023d48186a883be655e551", - FMJ = "64b8f7968532cf95ee0a0dbf", - SP_BT = "64b8f7b5389d7ffd620ccba2", - HP_BT = "64b8f7c241772715af0f9c3d" -} -export declare enum Ammo86x70 { - TAC_X = "5fc382b6d6fa9c00c571bbc3", - UCW = "5fc382c1016cce60e8341b20", - AP = "5fc382a9d724d907e2077dab", - FMJ = "5fc275cf85fd526b824a571a" -} -export declare enum Ammo46x30 { - AP_SX = "5ba26835d4351e0035628ff5", - ACTION_SX = "5ba26812d4351e003201fef1", - FMJ_SX = "5ba2678ad4351e44f824b344", - SUBSONIC_SX = "5ba26844d4351e00334c9475", - JSP_SX = "64b6979341772715af0f9c39" -} -export declare enum Ammo57x28 { - SS198LF = "5cc80f79e4a949033c7343b2", - R37_F = "5cc86832d7f00c000d3a6e6c", - SS190 = "5cc80f38e4a949001152b560", - R37_X = "5cc86840d7f00c002412c56c", - L191 = "5cc80f53e4a949000e1ea4f8", - SS197SR = "5cc80f8fe4a949033b0224a2", - SB193 = "5cc80f67e4a949035e43bbba" -} -export declare enum Ammo762x25 { - FMJ43 = "5735ff5c245977640e39ba7e", - LRN = "573601b42459776410737435", - P_GL = "5736026a245977644601dc61", - PST_GZH = "573603562459776430731618", - LRNPC = "573602322459776445391df1", - AKBS = "5735fdcd2459776445391d61", - PT_GZH = "573603c924597764442bd9cb" -} -export declare enum Ammo9x18 { - PM_SP8_GZH = "5737218f245977612125ba51", - P_GZH = "573719762459775a626ccbc1", - PSTM_GZH = "57371aab2459775a77142f22", - RG028_GZH = "573720e02459776143012541", - BZHT_GZH = "573718ba2459775a75491131", - PM_PSV = "5737207f24597760ff7b25f2", - SP7_GZH = "57372140245977611f70ee91", - PBM_GZH = "573719df2459775a626ccbc2", - PSO_GZH = "57371f8d24597761006c6a81", - PST_GZH = "5737201124597760fc4431f1", - PS_GS_PPO = "57371f2b24597761224311f1", - PRS_GS = "57371eb62459776125652ac1", - PPT_GZH = "57371e4124597760ff7b25f1", - PPE_GZH = "57371b192459775a9f58a5e0" -} -export declare enum Ammo9x19 { - PSO_GZH = "58864a4f2459770fcc257101", - PST_GZH = "56d59d3ad2720bdb418b4577", - GREEN_TRACER = "5c3df7d588a4501f290594e5", - RIP = "5c0d56a986f774449d5de529", - AP_63 = "5c925fa22e221601da359b7b", - LUGER_CCI = "5a3c16fe86f77452b62de32a", - PBP_GZH = "5efb0da7a29a85116f6ea05f", - QUAKEMAKER = "5efb0e16aeb21837e749c7ff", - FMJ_M882 = "64b7bbb74b75259c590fa897" -} -export declare enum Ammo9x21 { - P_GZH = "5a26abfac4a28232980eabff", - PS_GZH = "5a269f97c4a282000b151807", - PE_GZH = "5a26ac06c4a282000c5a90a8", - BT_GZH = "5a26ac0ec4a28200741e1e18" -} -export declare enum Ammo9x33R { - FMJ = "62330b3ed4dc74626d570b95", - HOLLOW_POINT = "62330bfadc5883093563729b", - SOFT_POINT = "62330c40bdd19b369e1e53d1", - JACKET_HP = "62330c18744e5e31df12f516" -} -export declare enum Ammo1143x23ACP { - MATCH_FMJ = "5e81f423763d9f754677bf2e", - HYDRA_SHOK = "5efb0fc6aeb21837e749c801", - LASERMATCH_FMJ = "5efb0d4f4bc50b58e81710f3", - AP = "5efb0cabfb3e451d70735af5", - RIP = "5ea2a8e200685063ec28c05a" -} -export declare enum Ammo545x39 { - PS_GS = "56dff3afd2720bba668b4567", - SP = "56dff421d2720b5f5a8b4567", - PPBS_GS_IGOLNIK = "5c0d5e4486f77478390952fe", - BS_7N40 = "61962b617c6c7b169525f168", - PRS_GS = "56dff338d2720bbd668b4569", - BT_GS = "56dff061d2720bb5668b4567", - US_GS = "56dff4ecd2720b5f5a8b4568", - BP_GS = "56dfef82d2720bbd668b4567", - HP = "56dff216d2720bbd668b4568", - BS_GS = "56dff026d2720bb8668b4567", - T_GS = "56dff4a2d2720bbd668b456a", - PP_GS = "56dff2ced2720bb4668b4567", - FMJ = "56dff0bed2720bb0668b4567" -} -export declare enum Ammo556x45 { - M856 = "59e68f6f86f7746c9f75e846", - MK255_MOD_0_RRLP = "59e6918f86f7746c9f75e849", - M995 = "59e690b686f7746c9f75e848", - M855A1 = "54527ac44bdc2d36668b4567", - M856A1 = "59e6906286f7746c9f75e847", - M855 = "54527a984bdc2d4e668b4567", - HP = "59e6927d86f77411da468256", - FMJ = "59e6920f86f77411d82aa167", - WARMAGEDDON = "5c0d5ae286f7741e46554302", - MK_318_MOD_0_SOST = "60194943740c5d77f6705eea", - SSA_AP = "601949593ae8f707c4608daa" -} -export declare enum Ammo762x35 { - M62_TRACER = "619636be6db0f2477964e710", - BCP_FMJ = "5fbe3ffdf8b6a877a729ea82", - AP = "5fd20ff893a8961fc660a954", - V_MAX = "6196364158ef8c428c287d9f", - WHISPER = "6196365d58ef8c428c287da1", - CBJ = "64b8725c4b75259c590fa899" -} -export declare enum Ammo762x39 { - PS_GZH = "5656d7c34bdc2d9d198b4587", - HP = "59e4d3d286f774176a36250a", - US_GZH = "59e4d24686f7741776641ac7", - T45M1_GZH = "59e4cf5286f7741778269d8a", - BP_GZH = "59e0d99486f7744a32234762", - MAI_AP = "601aa3d2b2bcb34913271e6d", - PP_GZH = "64b7af434b75259c590fa893", - SP = "64b7af734b75259c590fa895", - FMJ = "64b7af5a8532cf95ee0a0dbd" -} -export declare enum Ammo9x39 { - SP5_GS = "57a0dfb82459774d3078b56c", - BP_GS = "5c0d688c86f77413ae3407b2", - SP6_GS = "57a0e5022459774d1673f889", - SPP_GS = "5c0d668f86f7747ccb7f13b2", - PAB9_GS = "61962d879bb3d20b0946d385" -} -export declare enum Ammo366TKM { - FMJ = "59e6542b86f77411dc52a77a", - GEKSA = "59e6658b86f77411d949b250", - EKO = "59e655cb86f77411dc52a77b", - APM = "5f0596629e22f464da6bbdd9" -} -export declare enum Ammo127x55 { - PS12 = "5cadf6ddae9215051e1c23b2", - PS12B = "5cadf6eeae921500134b2799", - PS12A = "5cadf6e5ae921500113bb973" -} -export declare enum Ammo12Gauge { - BUCKSHOT_7MM = "560d5e524bdc2d25448b4571", - MAGNUM_85MM = "5d6e6806a4b936088465b17e", - RIP = "5c0d591486f7744c505b416f", - BMG_SLUG_50CAL = "5d6e68c4a4b9361b93413f79", - BUCKSHOT_525MM = "5d6e6772a4b936088465b17c", - EXPRESS_65MM = "5d6e67fba4b9361bc73bc779", - FLECHETTE = "5d6e6911a4b9361bd5780d52", - FTX_CUSTOM_LITE_SLUG = "5d6e68e6a4b9361c140bcfe0", - AP20_ARMOR_PIERCING_SLUG = "5d6e68a8a4b9360b6c0d54e2", - DUAL_SABOT_SLUG = "5d6e68dea4b9361bcc29e659", - POLEVA_6U_SLUG = "5d6e689ca4b9361bc8618956", - POLEVA_3_SLUG = "5d6e6891a4b9361bd473feea", - GRIZZLY_40_SLUG = "5d6e6869a4b9361c140bcfde", - SUPERFORMANCE_HP_SLUG = "5d6e68d1a4b93622fe60e845", - COPPER_SABOT_PREMIER_HP_SLUG = "5d6e68b3a4b9361bca7e50b5", - LEAD_SLUG = "58820d1224597753c90aeb13", - PIRANHA = "64b8ee384b75259c590fa89b" -} -export declare enum Ammo20Gauge { - BUCKSHOT_75MM = "5a38ebd9c4a282000d722a5b", - STAR_SLUG = "5d6e6a05a4b93618084f58d0", - BUCKSHOT_73MM = "5d6e69c7a4b9360b6c0d54e4", - DEVASTATOR_SLUG = "5d6e6a5fa4b93614ec501745", - BUCKSHOT_56MM = "5d6e695fa4b936359b35d852", - POLEVA_6U_SLUG = "5d6e6a42a4b9364f07165f52", - POLEVA_3_SLUG = "5d6e6a53a4b9361bd473feec", - BUCKSHOT_62MM = "5d6e69b9a4b9361bc8618958" -} -export declare enum Ammo23x75 { - SHRAPNEL10_BUCKSHOT = "5e85a9a6eacf8c039e4e2ac1", - SHRAPNEL25_BUCKSHOT = "5f647f31b6238e5dd066e196", - ZVEZDA_FLASHBANG = "5e85a9f4add9fe03027d9bf1", - BARRIKADA_SLUG = "5e85aa1a988a8701445df1f5" -} -export declare enum Ammo30x29 { - VOG_30 = "5d70e500a4b9364de70d38ce" -} -export declare enum Ammo127x108 { - B32 = "5cde8864d7f00c0010373be1", - BZT_44M = "5d2f2ab648f03550091993ca" -} -export declare enum Ammo26x75 { - GREEN_FLARE = "62389aaba63f32501b1b444f", - RED_FLARE = "62389ba9a63f32501b1b4451", - WHITE_FLARE = "62389bc9423ed1685422dc57", - YELLOW_FLARE = "62389be94d5d474bf712e709" -} -export declare enum Ammo68x51 { - SIG_FMJ = "6529302b8c26af6326029fb7", - SIG_HYBRID = "6529243824cbe3c74a05e5c1" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/BackendErrorCodes.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/BackendErrorCodes.d.ts deleted file mode 100644 index a36e9ce..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/BackendErrorCodes.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -export declare enum BackendErrorCodes { - NONE = 0, - UNKNOWN_ERROR = 200, - NOT_AUTHORIZED = 201, - NEED_AUTHORIZATION_CODE = 209, - WRONG_AUTHORIZATION_CODE = 211, - NEED_CAPTCHA = 214, - NO_NEED_CAPTCHA = 215, - CAPTCHA_INVALID_ANSWER = 216, - CAPTCHA_FAILED = 218, - CAPTCHA_BRUTE_FORCED = 219, - NO_ROOM_IN_STASH = 223, - NICKNAME_NOT_UNIQUE = 225, - NICKNAME_NOT_VALID = 226, - UNSUPPORTED_CLIENT_VERSION = 232, - REPORT_NOT_ALLOWED = 238, - NICKNAME_IS_ABUSIVE = 241, - NICKNAME_CHANGE_TIMEOUT = 242, - NOT_ENOUGH_SPACE_TO_UNPACK = 257, - NOT_MODIFIED = 304, - HTTP_BAD_REQUEST = 400, - HTTP_NOT_AUTHORIZED = 401, - HTTP_FORBIDDEN = 403, - HTTP_NOT_FOUND = 404, - HTTP_METHOD_NOT_ALLOWED = 405, - UNKNOWN_TRADING_ERROR = 500, - HTTPNOTIMPLEMENTED = 501, - HTTPBADGATEWAY = 502, - HTTPSERVICEUNAVAILABLE = 503, - HTTPGATEWAYTIMEOUT = 504, - TRADEROUTOFMONEY = 505, - HTTPVARIANTALSONEGOTIATES = 506, - PRICECHANGED = 509, - TRADERDISABLED = 512, - ITEMHASBEENSOLD = 513, - NOTENOUGHSPACEFORMONEY = 518, - HTTPINVALIDSSLCERTIFICATE = 526, - UNKNOWNRAGFAIRERROR = 550, - UNKNOWNRAGFAIRERROR2 = 551, - UNKNOWNMATCHMAKERERROR = 600, - SESSIONPARAMETERSERROR = 601, - SESSIONLOST = 602, - SERVERNOTREGISTERED = 604, - UNKNOWNQUESTERROR = 700, - QUESTBADPARAM = 702, - QUESTNOTFOUND = 703, - QUESTISUNAVAILABLE = 704, - NOFREESPACEFORREWARDS = 705, - WRONGQUESTSTATUS = 706, - CANTCOMPLETEQUEST = 707, - UNKNOWNMAILERROR = 900, - TOOMANYFRIENDREQUESTS = 925, - UNKNOWNSCRIPTEXECUTIONERROR = 1000, - UNKNOWNREPAIRINGERROR = 1200, - UNKNOWNINSURANCEERROR = 1300, - UNKNOWNCURRENCYEXCHANGEERROR = 1400, - OFFERNOTFOUND = 1503, - NOTENOUGHSPACE = 1505, - OFFEROUTOFSTOCK = 1506, - OFFERSOLD = 1507, - RAGFAIRUNAVAILABLE = 1511, - BANNEDERRORCODE = 1513, - INSUFFICIENTNUMBERINSTOCK = 1516, - TOOMANYITEMSTOSELL = 1517, - INCORRECTCLIENTPRICE = 1519, - EXAMINATIONFAILED = 22001, - ITEMALREADYEXAMINED = 22002, - UNKNOWNNGINXERROR = 9000, - PARSERESPONSEERROR = 9001, - UNKNOWNMATCHMAKERERROR2 = 503000,// They have two of these...why :/ - UNKNOWNGROUPERROR = 502000, - GROUPREQUESTNOTFOUND = 502002, - GROUPFULL = 502004, - PLAYERALREADYINGROUP = 502005, - PLAYERNOTINGROUP = 502006, - PLAYERNOTLEADER = 502007, - CANTCHANGEREADYSTATE = 502010, - PLAYERFORBIDDENGROUPINVITES = 502011, - LEADERALREADYREADY = 502012, - GROUPSENDINVITEERROR = 502013, - PLAYERISOFFLINE = 502014, - PLAYERISNOTSEARCHINGFORGROUP = 502018, - PLAYERALREADYLOOKINGFORGAME = 503001, - PLAYERINRAID = 503002, - LIMITFORPRESETSREACHED = 504001, - PLAYERPROFILENOTFOUND = 505001 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/BaseClasses.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/BaseClasses.d.ts deleted file mode 100644 index d98a58f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/BaseClasses.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -export declare enum BaseClasses { - WEAPON = "5422acb9af1c889c16000029", - UBGL = "55818b014bdc2ddc698b456b", - ARMOR = "5448e54d4bdc2dcc718b4568", - ARMORED_EQUIPMENT = "57bef4c42459772e8d35a53b", - REPAIR_KITS = "616eb7aea207f41933308f46", - HEADWEAR = "5a341c4086f77401f2541505", - FACECOVER = "5a341c4686f77469e155819e", - VEST = "5448e5284bdc2dcb718b4567", - BACKPACK = "5448e53e4bdc2d60728b4567", - COMPOUND = "566162e44bdc2d3f298b4573", - VISORS = "5448e5724bdc2ddf718b4568", - FOOD = "5448e8d04bdc2ddf718b4569", - GAS_BLOCK = "56ea9461d2720b67698b456f", - RAIL_COVER = "55818b1d4bdc2d5b648b4572", - DRINK = "5448e8d64bdc2dce718b4568", - BARTER_ITEM = "5448eb774bdc2d0a728b4567", - INFO = "5448ecbe4bdc2d60728b4568", - MEDKIT = "5448f39d4bdc2d0a728b4568", - DRUGS = "5448f3a14bdc2d27728b4569", - STIMULATOR = "5448f3a64bdc2d60728b456a", - MEDICAL = "5448f3ac4bdc2dce718b4569", - MEDICAL_SUPPLIES = "57864c8c245977548867e7f1", - MOD = "5448fe124bdc2da5018b4567", - FUNCTIONAL_MOD = "550aa4154bdc2dd8348b456b", - FUEL = "5d650c3e815116009f6201d2", - GEAR_MOD = "55802f3e4bdc2de7118b4584", - STOCK = "55818a594bdc2db9688b456a", - FOREGRIP = "55818af64bdc2d5b648b4570", - MASTER_MOD = "55802f4a4bdc2ddb688b4569", - MOUNT = "55818b224bdc2dde698b456f", - MUZZLE = "5448fe394bdc2d0d028b456c", - SIGHTS = "5448fe7a4bdc2d6f028b456b", - MEDS = "543be5664bdc2dd4348b4569", - MAP = "567849dd4bdc2d150f8b456e", - MONEY = "543be5dd4bdc2deb348b4569", - NIGHTVISION = "5a2c3a9486f774688b05e574", - THERMAL_VISION = "5d21f59b6dbe99052b54ef83", - KEY = "543be5e94bdc2df1348b4568", - KEY_MECHANICAL = "5c99f98d86f7745c314214b3", - KEYCARD = "5c164d2286f774194c5e69fa", - EQUIPMENT = "543be5f84bdc2dd4348b456a", - THROW_WEAPON = "543be6564bdc2df4348b4568", - FOOD_DRINK = "543be6674bdc2df1348b4569", - PISTOL = "5447b5cf4bdc2d65278b4567", - REVOLVER = "617f1ef5e8b54b0998387733", - SMG = "5447b5e04bdc2d62278b4567", - ASSAULT_RIFLE = "5447b5f14bdc2d61278b4567", - ASSAULT_CARBINE = "5447b5fc4bdc2d87278b4567", - SHOTGUN = "5447b6094bdc2dc3278b4567", - MARKSMAN_RIFLE = "5447b6194bdc2d67278b4567", - SNIPER_RIFLE = "5447b6254bdc2dc3278b4568", - MACHINE_GUN = "5447bed64bdc2d97278b4568", - GRENADE_LAUNCHER = "5447bedf4bdc2d87278b4568", - SPECIAL_WEAPON = "5447bee84bdc2dc3278b4569", - SPEC_ITEM = "5447e0e74bdc2d3c308b4567", - SPRING_DRIVEN_CYLINDER = "627a137bf21bc425b06ab944", - KNIFE = "5447e1d04bdc2dff2f8b4567", - AMMO = "5485a8684bdc2da71d8b4567", - AMMO_BOX = "543be5cb4bdc2deb348b4568", - LOOT_CONTAINER = "566965d44bdc2d814c8b4571", - MOB_CONTAINER = "5448bf274bdc2dfc2f8b456a", - SEARCHABLE_ITEM = "566168634bdc2d144c8b456c", - STASH = "566abbb64bdc2d144c8b457d", - SORTING_TABLE = "6050cac987d3f925bf016837", - LOCKABLE_CONTAINER = "5671435f4bdc2d96058b4569", - SIMPLE_CONTAINER = "5795f317245977243854e041", - INVENTORY = "55d720f24bdc2d88028b456d", - STATIONARY_CONTAINER = "567583764bdc2d98058b456e", - POCKETS = "557596e64bdc2dc2118b4571", - ARMBAND = "5b3f15d486f77432d0509248", - DOG_TAG_USEC = "59f32c3b86f77472a31742f0", - DOG_TAG_BEAR = "59f32bb586f774757e1e8442", - JEWELRY = "57864a3d24597754843f8721", - ELECTRONICS = "57864a66245977548f04a81f", - BUILDING_MATERIAL = "57864ada245977548638de91", - TOOL = "57864bb7245977548b3b66c2", - HOUSEHOLD_GOODS = "57864c322459775490116fbf", - LUBRICANT = "57864e4c24597754843f8723", - BATTERY = "57864ee62459775490116fc1", - ASSAULT_SCOPE = "55818add4bdc2d5b648b456f", - TACTICAL_COMBO = "55818b164bdc2ddc698b456c", - FLASHLIGHT = "55818b084bdc2d5b648b4571", - MAGAZINE = "5448bc234bdc2d3c308b4569", - LIGHT_LASER_DESIGNATOR = "55818b0e4bdc2dde698b456e", - FLASH_HIDER = "550aa4bf4bdc2dd6348b456b", - COLLIMATOR = "55818ad54bdc2ddc698b4569", - IRON_SIGHT = "55818ac54bdc2d5b648b456e", - COMPACT_COLLIMATOR = "55818acf4bdc2dde698b456b", - COMPENSATOR = "550aa4af4bdc2dd4348b456e", - OPTIC_SCOPE = "55818ae44bdc2dde698b456c", - SPECIAL_SCOPE = "55818aeb4bdc2ddc698b456a", - OTHER = "590c745b86f7743cc433c5f2", - SILENCER = "550aa4cd4bdc2dd8348b456c", - PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", - ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", - AUXILIARY_MOD = "5a74651486f7744e73386dd1", - BIPOD = "55818afb4bdc2dde698b456d", - HEADPHONES = "5645bcb74bdc2ded0b8b4578", - RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", - STACKABLE_ITEM = "5661632d4bdc2d903d8b456b", - BUILT_IN_INSERTS = "65649eb40bf0ed77b8044453", - ARMOR_PLATE = "644120aa86ffbe10ee032b6f", - CULTIST_AMULET = "64b69b0c8f3be32ed22682f8", - RADIO_TRANSMITTER = "62e9103049c018f425059f38", - HANDGUARD = "55818a104bdc2db9688b4569", - PISTOL_GRIP = "55818a684bdc2ddd698b456d", - RECEIVER = "55818a304bdc2db5418b457d", - BARREL = "555ef6e44bdc2de9068b457e", - CHARGING_HANDLE = "55818a6f4bdc2db9688b456b", - COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 ", - HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/BonusSkillType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/BonusSkillType.d.ts deleted file mode 100644 index 64d9c12..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/BonusSkillType.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BonusSkillType { - PHYSICAL = "Physical", - COMBAT = "Combat", - SPECIAL = "Special", - PRACTICAL = "Practical", - MENTAL = "Mental" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/BonusType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/BonusType.d.ts deleted file mode 100644 index 466457f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/BonusType.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export declare enum BonusType { - ENERGY_REGENERATION = "EnergyRegeneration", - HYDRATION_REGENERATION = "HydrationRegeneration", - HEALTH_REGENERATION = "HealthRegeneration", - EXPERIENCE_RATE = "ExperienceRate", - QUEST_MONEY_REWARD = "QuestMoneyReward", - SCAV_COOLDOWN_TIMER = "ScavCooldownTimer", - UNLOCK_ITEM_CRAFT = "UnlockItemCraft", - UNLOCK_ITEM_PASSIVE_CREATION = "UnlockItemPassiveCreation", - UNLOCK_RANDOM_ITEM_CREATION = "UnlockRandomItemCreation", - SKILL_LEVELING_BOOST = "SkillLevelingBoost", - DEBUFF_END_DELAY = "DebuffEndDelay", - RAGFAIR_COMMISSION = "RagfairCommission", - INSURANCE_RETURN_TIME = "InsuranceReturnTime", - UNLOCK_WEAPON_MODIFICATION = "UnlockWeaponModification", - UNLOCK_SCAV_PLAY = "UnlockScavPlay", - UNLOCK_ADD_OFFER = "UnlockAddOffer", - UNLOCK_ITEM_CHARGE = "UnlockItemCharge", - RECEIVE_ITEM_BONUS = "ReceiveItemBonus", - UNLOCK_UNIQUE_ID = "UnlockUniqueId", - INCREASE_CANISTER_SLOTS = "IncreaseCanisterSlots", - ADDITIONAL_SLOTS = "AdditionalSlots", - FUEL_CONSUMPTION = "FuelConsumption", - REPAIR_WEAPON_BONUS = "RepairWeaponBonus", - REPAIR_ARMOR_BONUS = "RepairArmorBonus", - UNLOCK_WEAPON_REPAIR = "UnlockWeaponRepair", - UNLOCK_ARMOR_REPAIR = "UnlockArmorRepair", - STASH_SIZE = "StashSize", - MAXIMUM_ENERGY_RESERVE = "MaximumEnergyReserve", - TEXT_BONUS = "TextBonus", - SKILL_GROUP_LEVELING_BOOST = "SkillGroupLevelingBoost", - STASH_ROWS = "StashRows" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ConfigTypes.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ConfigTypes.d.ts deleted file mode 100644 index 646fd55..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/ConfigTypes.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export declare enum ConfigTypes { - AIRDROP = "spt-airdrop", - BOT = "spt-bot", - PMC = "spt-pmc", - CORE = "spt-core", - HEALTH = "spt-health", - HIDEOUT = "spt-hideout", - HTTP = "spt-http", - IN_RAID = "spt-inraid", - INSURANCE = "spt-insurance", - INVENTORY = "spt-inventory", - ITEM = "spt-item", - LOCALE = "spt-locale", - LOCATION = "spt-location", - LOOT = "spt-loot", - MATCH = "spt-match", - PLAYERSCAV = "spt-playerscav", - PMC_CHAT_RESPONSE = "spt-pmcchatresponse", - QUEST = "spt-quest", - RAGFAIR = "spt-ragfair", - REPAIR = "spt-repair", - SCAVCASE = "spt-scavcase", - TRADER = "spt-trader", - WEATHER = "spt-weather", - SEASONAL_EVENT = "spt-seasonalevents", - LOST_ON_DEATH = "spt-lostondeath", - GIFTS = "spt-gifts", - BTR = "spt-btr" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ContainerTypes.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ContainerTypes.d.ts deleted file mode 100644 index e6b330a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/ContainerTypes.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export declare enum CommonContainers { - AMMO_CASE = "5aafbde786f774389d0cbc0f", - DOCUMENTS_CASE = "590c60fc86f77412b13fddcf", - DOGTAG_CASE = "5c093e3486f77430cb02e593", - GRENADE_CASE = "5e2af55f86f7746d4159f07c", - INJECTOR_CASE = "619cbf7d23893217ec30b689", - ITEM_CASE = "59fb042886f7746c5005a7b2", - KEY_TOOL = "59fafd4b86f7745ca07e1232", - KEYCARD_HOLDER = "619cbf9e0a7c3a1a2731940a", - SCAV_JUNKBOX = "5b7c710788a4506dec015957", - MAGAZINE_CASE = "5c127c4486f7745625356c13", - MEDICINE_CASE = "5aafbcd986f7745e590fff23", - MONEY_CASE = "59fb016586f7746d0d4b423a", - HOLODILNICK_THERMAL_BAG = "5c093db286f7740a1b2617e3", - PISTOL_CASE = "567143bf4bdc2d1a0f8b4567", - SICC_ORGANIZATIONAL_POUCH = "5d235bb686f77443f4331278", - SIMPLE_WALLET = "5783c43d2459774bbe137486", - THICC_ITEM_CASE = "5c0a840b86f7742ffa4f2482", - THICC_WEAPON_CASE = "5b6d9ce188a4501afc1b2b25", - WEAPON_CASE = "59fb023c86f7746d0d4b423c", - WZ_WALLET = "60b0f6c058e0b0481a09ad11" -} -export declare enum SecuredContainers { - ALPHA = "544a11ac4bdc2d470e8b456a", - BETA = "5857a8b324597729ab0a0e7d", - EPSILON = "59db794186f77448bc595262", - GAMMA = "5857a8bc2459772bad15db29", - KAPPA = "5c093ca986f7740a1867ab12" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/DateTime.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/DateTime.d.ts deleted file mode 100644 index dcd1b5e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/DateTime.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare enum DateTime { - CURR = "CURR", - PAST = "PAST" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ELocationName.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ELocationName.d.ts deleted file mode 100644 index bb05be5..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/ELocationName.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export declare enum ELocationName { - FACTORY_DAY = "factory4_day", - FACTORY_NIGHT = "factory4_night", - BIGMAP = "bigmap", - WOODS = "Woods", - SHORELINE = "Shoreline", - SANDBOX = "Sandbox", - INTERCHANGE = "Interchange", - LIGHTHOUSE = "Lighthouse", - LABORATORY = "laboratory", - RESERVE = "RezervBase", - STREETS = "TarkovStreets", - ANY = "any" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/EquipmentBuildType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/EquipmentBuildType.d.ts deleted file mode 100644 index d98463f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/EquipmentBuildType.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare enum EquipmentBuildType { - CUSTOM = 0, - STANDARD = 1 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/EquipmentSlots.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/EquipmentSlots.d.ts deleted file mode 100644 index 35c18ff..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/EquipmentSlots.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export declare enum EquipmentSlots { - HEADWEAR = "Headwear", - EARPIECE = "Earpiece", - FACE_COVER = "FaceCover", - ARMOR_VEST = "ArmorVest", - EYEWEAR = "Eyewear", - ARM_BAND = "ArmBand", - TACTICAL_VEST = "TacticalVest", - POCKETS = "Pockets", - BACKPACK = "Backpack", - SECURED_CONTAINER = "SecuredContainer", - FIRST_PRIMARY_WEAPON = "FirstPrimaryWeapon", - SECOND_PRIMARY_WEAPON = "SecondPrimaryWeapon", - HOLSTER = "Holster", - SCABBARD = "Scabbard" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ExitStatis.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ExitStatis.d.ts deleted file mode 100644 index 78d9733..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/ExitStatis.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/GiftSenderType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/GiftSenderType.d.ts deleted file mode 100644 index fc695c8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/GiftSenderType.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum GiftSenderType { - SYSTEM = "System", - TRADER = "Trader", - USER = "User" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/GiftSentResult.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/GiftSentResult.d.ts deleted file mode 100644 index 08930c1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/GiftSentResult.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare enum GiftSentResult { - FAILED_UNKNOWN = 1, - FAILED_GIFT_ALREADY_RECEIVED = 2, - FAILED_GIFT_DOESNT_EXIST = 3, - SUCCESS = 4 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/HideoutAreas.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/HideoutAreas.d.ts deleted file mode 100644 index 1af487a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/HideoutAreas.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export declare enum HideoutAreas { - NOTSET = -1, - VENTS = 0, - SECURITY = 1, - LAVATORY = 2, - STASH = 3, - GENERATOR = 4, - HEATING = 5, - WATER_COLLECTOR = 6, - MEDSTATION = 7, - NUTRITION_UNIT = 8, - REST_SPACE = 9, - WORKBENCH = 10, - INTEL_CENTER = 11, - SHOOTING_RANGE = 12, - LIBRARY = 13, - SCAV_CASE = 14, - ILLUMINATION = 15, - PLACE_OF_FAME = 16, - AIR_FILTERING = 17, - SOLAR_POWER = 18, - BOOZE_GENERATOR = 19, - BITCOIN_FARM = 20, - CHRISTMAS_TREE = 21, - EMERGENCY_WALL = 22, - GYM = 23, - WEAPON_STAND = 24, - WEAPON_STAND_SECONDARY = 25 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/HideoutEventActions.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/HideoutEventActions.d.ts deleted file mode 100644 index 556c799..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/HideoutEventActions.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export declare enum HideoutEventActions { - HIDEOUT_UPGRADE = "HideoutUpgrade", - HIDEOUT_UPGRADE_COMPLETE = "HideoutUpgradeComplete", - HIDEOUT_PUT_ITEMS_IN_AREA_SLOTS = "HideoutPutItemsInAreaSlots", - HIDEOUT_TAKE_ITEMS_FROM_AREA_SLOTS = "HideoutTakeItemsFromAreaSlots", - HIDEOUT_TOGGLE_AREA = "HideoutToggleArea", - HIDEOUT_SINGLE_PRODUCTION_START = "HideoutSingleProductionStart", - HIDEOUT_SCAV_CASE_PRODUCTION_START = "HideoutScavCaseProductionStart", - HIDEOUT_CONTINUOUS_PRODUCTION_START = "HideoutContinuousProductionStart", - HIDEOUT_TAKE_PRODUCTION = "HideoutTakeProduction", - HIDEOUT_RECORD_SHOOTING_RANGE_POINTS = "RecordShootingRangePoints", - HIDEOUT_IMPROVE_AREA = "HideoutImproveArea", - HIDEOUT_CANCEL_PRODUCTION_COMMAND = "HideoutCancelProductionCommand" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ItemAddedResult.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ItemAddedResult.d.ts deleted file mode 100644 index 8eafb90..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/ItemAddedResult.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum ItemAddedResult { - UNKNOWN = -1, - SUCCESS = 1, - NO_SPACE = 2, - NO_CONTAINERS = 3, - INCOMPATIBLE_ITEM = 4 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ItemEventActions.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ItemEventActions.d.ts deleted file mode 100644 index f8a8b5a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/ItemEventActions.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export declare enum ItemEventActions { - MOVE = "Move", - REMOVE = "Remove", - SPLIT = "Split", - MERGE = "Merge", - TRANSFER = "Transfer", - SWAP = "Swap", - FOLD = "Fold", - TOGGLE = "Toggle", - TAG = "Tag", - BIND = "Bind", - UNBIND = "Unbind", - EXAMINE = "Examine", - READ_ENCYCLOPEDIA = "ReadEncyclopedia", - APPLY_INVENTORY_CHANGES = "ApplyInventoryChanges", - CREATE_MAP_MARKER = "CreateMapMarker", - DELETE_MAP_MARKER = "DeleteMapMarker", - EDIT_MAP_MARKER = "EditMapMarker", - OPEN_RANDOM_LOOT_CONTAINER = "OpenRandomLootContainer", - HIDEOUT_QTE_EVENT = "HideoutQuickTimeEvent", - SAVE_WEAPON_BUILD = "SaveWeaponBuild", - REMOVE_WEAPON_BUILD = "RemoveWeaponBuild", - REMOVE_BUILD = "RemoveBuild", - SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild", - REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", - REDEEM_PROFILE_REWARD = "RedeemProfileReward", - SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/MemberCategory.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/MemberCategory.d.ts deleted file mode 100644 index a81380e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/MemberCategory.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export declare enum MemberCategory { - DEFAULT = 0, - DEVELOPER = 1, - UNIQUE_ID = 2, - TRADER = 4, - GROUP = 8, - SYSTEM = 16, - CHAT_MODERATOR = 32, - CHAT_MODERATOR_WITH_PERMANENT_BAN = 64, - UNIT_TEST = 128, - SHERPA = 256, - EMISSARY = 512 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/MessageType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/MessageType.d.ts deleted file mode 100644 index 33cddc8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/MessageType.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export declare enum MessageType { - USER_MESSAGE = 1, - NPC_TRADER = 2, - AUCTION_MESSAGE = 3, - FLEAMARKET_MESSAGE = 4, - ADMIN_MESSAGE = 5, - GROUP_CHAT_MESSAGE = 6, - SYSTEM_MESSAGE = 7, - INSURANCE_RETURN = 8, - GLOBAL_CHAT = 9, - QUEST_START = 10, - QUEST_FAIL = 11, - QUEST_SUCCESS = 12, - MESSAGE_WITH_ITEMS = 13, - INITIAL_SUPPORT = 14, - BTR_ITEMS_DELIVERY = 15 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ModSpawn.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ModSpawn.d.ts deleted file mode 100644 index 445b5ab..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/ModSpawn.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum ModSpawn { - DEFAULT_MOD = 0, - SPAWN = 1, - SKIP = 2 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/Money.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/Money.d.ts deleted file mode 100644 index 0d39613..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/Money.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum Money { - ROUBLES = "5449016a4bdc2d6f028b456f", - EUROS = "569668774bdc2da2298b4568", - DOLLARS = "5696686a4bdc2da3298b456a" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/NotificationEventType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/NotificationEventType.d.ts deleted file mode 100644 index 51f0d4e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/NotificationEventType.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export declare enum NotificationEventType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - CHAT_MESSAGE_RECEIVED = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader", - GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", - GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", - GROUP_MATCH_RAID_READY = "groupMatchRaidReady", - GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", - GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", - GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", - GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", - GROUP_MATCH_START_GAME = "groupMatchStartGame", - GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", - GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", - GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", - USER_CONFIRMED = "userConfirmed", - CHANNEL_DELETED = "channel_deleted", - FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", - FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", - FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", - FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", - YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/PlayerRaidEndState.d.ts deleted file mode 100644 index d792259..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/PlayerRaidEndState.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum PlayerRaidEndState { - SURVIVED = "survived", - LEFT = "left", - RUNNER = "runner", - MISSING_IN_ACTION = "missinginaction", - KILLED = "killed" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/PlayersSpawnPlace.d.ts deleted file mode 100644 index 8a2eab6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/PlayersSpawnPlace.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum PlayersSpawnPlace { - SAME_PLACE = "SamePlace", - DIFFERENT_PLACES = "DifferentPlaces", - AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ProfileStatus.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ProfileStatus.d.ts deleted file mode 100644 index 5a4419b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/ProfileStatus.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum ProfileStatus { - FREE = "Free", - MATCH_WAIT = "MatchWait", - BUSY = "Busy", - LEAVING = "Leaving", - TRANSFER = "Transfer" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/QuestRewardType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/QuestRewardType.d.ts deleted file mode 100644 index 3f01040..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/QuestRewardType.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export declare enum QuestRewardType { - SKILL = "Skill", - EXPERIENCE = "Experience", - TRADER_STANDING = "TraderStanding", - TRADER_UNLOCK = "TraderUnlock", - ITEM = "Item", - ASSORTMENT_UNLOCK = "AssortmentUnlock", - PRODUCTIONS_SCHEME = "ProductionScheme", - TRADER_STANDING_RESET = "TraderStandingReset", - TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows", - ACHIEVEMENT = "Achievement" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/QuestStatus.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/QuestStatus.d.ts deleted file mode 100644 index e706c05..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/QuestStatus.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare enum QuestStatus { - Locked = 0, - AvailableForStart = 1, - Started = 2, - AvailableForFinish = 3, - Success = 4, - Fail = 5, - FailRestartable = 6, - MarkedAsFailed = 7, - Expired = 8, - AvailableAfter = 9 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/QuestTypeEnum.d.ts deleted file mode 100644 index 6925ac2..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/QuestTypeEnum.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export declare enum QuestTypeEnum { - PICKUP = "PickUp", - ELIMINATION = "Elimination", - DISCOVER = "Discover", - COMPLETION = "Completion", - EXPLORATION = "Exploration", - LEVELLING = "Levelling", - EXPERIENCE = "Experience", - STANDING = "Standing", - LOYALTY = "Loyalty", - MERCHANT = "Merchant", - SKILL = "Skill", - MULTI = "Multi", - WEAPON_ASSEMBLY = "WeaponAssembly" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/RagfairSort.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/RagfairSort.d.ts deleted file mode 100644 index 798a5e7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/RagfairSort.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum RagfairSort { - ID = 0, - RATING = 3, - OFFER_TITLE = 4, - PRICE = 5, - EXPIRY = 6 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/RaidMode.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/RaidMode.d.ts deleted file mode 100644 index e20cf3f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/RaidMode.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum RaidMode { - ONLINE = "Online", - LOCAL = "Local", - COOP = "Coop" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts deleted file mode 100644 index 3bd9d9c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum CloudinessType { - CLEAR = "Clear", - PARTLY_CLOUDY = "PartlyCloudy", - CLOUDY = "Cloudy", - CLOUDY_WITH_GAPS = "CloudyWithGaps", - HEAVY_CLOUD_COVER = "HeavyCloudCover", - THUNDER_CLOUD = "Thundercloud" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts deleted file mode 100644 index 8ee3025..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum FogType { - NO_FOG = "NoFog", - FAINT = "Faint", - FOG = "Fog", - HEAVY = "Heavy", - CONTINUOUS = "Continuous" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts deleted file mode 100644 index 1e9a70e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum RainType { - NO_RAIN = "NoRain", - DRIZZLING = "Drizzling", - RAIN = "Rain", - HEAVY = "Heavy", - SHOWER = "Shower" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts deleted file mode 100644 index b153fb5..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare enum TimeFlowType { - X0 = "x0", - X0_14 = "x0_14", - X0_25 = "x0_25", - X0_5 = "x0_5", - X1 = "x1", - X2 = "x2", - X4 = "x4", - X8 = "x8" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts deleted file mode 100644 index 6cc9973..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum WindSpeed { - LIGHT = "Light", - MODERATE = "Moderate", - STRONG = "Strong", - VERY_STRONG = "VeryStrong", - HURRICANE = "Hurricane" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/Season.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/Season.d.ts deleted file mode 100644 index b1d3662..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/Season.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum Season { - SUMMER = 0, - AUTUMN = 1, - WINTER = 2, - SPRING = 3, - STORM = 4 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/SeasonalEventType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/SeasonalEventType.d.ts deleted file mode 100644 index cfea1f5..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/SeasonalEventType.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum SeasonalEventType { - NONE = "None", - CHRISTMAS = "Christmas", - HALLOWEEN = "Halloween", - NEW_YEARS = "NewYears", - PROMO = "Promo", - SNOW = "Snow" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/SideType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/SideType.d.ts deleted file mode 100644 index faa6ff6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/SideType.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum SideType { - PMC = "Pmc", - SAVAGE = "Savage", - RANDOM = "Random" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/SkillTypes.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/SkillTypes.d.ts deleted file mode 100644 index c41ce6f..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/SkillTypes.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export declare enum SkillTypes { - BOT_RELOAD = "BotReload", - BOT_SOUND = "BotSound", - HIDEOUT_MANAGEMENT = "HideoutManagement", - CRAFTING = "Crafting", - METABOLISM = "Metabolism", - IMMUNITY = "Immunity", - ENDURANCE = "Endurance", - STRENGTH = "Strength", - VITALITY = "Vitality", - HEALTH = "Health", - STRESS_RESISTANCE = "StressResistance", - THROWING = "Throwing", - RECOIL_CONTROL = "RecoilControl", - COVERT_MOVEMENT = "CovertMovement", - FIELD_MEDICINE = "FieldMedicine", - SEARCH = "Search", - SNIPING = "Sniping", - PERCEPTION = "Perception", - INTELLECT = "Intellect", - ATTENTION = "Attention", - CHARISMA = "Charisma", - MEMORY = "Memory", - MELEE = "Melee", - SURGERY = "Surgery", - AIM_DRILLS = "AimDrills", - TROUBLESHOOTING = "TroubleShooting", - PRONE_MOVEMENT = "ProneMovement", - FIRST_AID = "FirstAid", - LIGHT_VESTS = "LightVests", - HEAVY_VESTS = "HeavyVests", - WEAPON_MODDING = "WeaponModding", - ADVANCED_MODDING = "AdvancedModding", - NIGHT_OPS = "NightOps", - SILENT_OPS = "SilentOps", - LOCKPICKING = "Lockpicking", - /** Also called Weapon Maintenance */ - WEAPON_TREATMENT = "WeaponTreatment", - MAG_DRILLS = "MagDrills", - FREE_TRADING = "Freetrading", - AUCTIONS = "Auctions", - CLEAN_OPS = "Cleanoperations", - BARTER = "Barter", - SHADOW_CONNECTIONS = "Shadowconnections", - TASK_PERFORMANCE = "Taskperformance", - BEAR_ASSAULT_OPS = "BearAssaultoperations", - BEAR_AUTHORITY = "BearAuthority", - BEAR_AK_SYSTEMS = "BearAksystems", - BEAR_HEAVY_CAL = "BearHeavycaliber", - BEAR_RAW_POWER = "BearRawpower", - USEC_AR_SYSTEMS = "UsecArsystems", - USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", - USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", - USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/TraderServiceType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/TraderServiceType.d.ts deleted file mode 100644 index f3586dc..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/TraderServiceType.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum TraderServiceType { - EXUSEC_LOYALTY = "ExUsecLoyalty", - ZRYACHIY_AID = "ZryachiyAid", - CULTISTS_AID = "CultistsAid", - BTR_ITEMS_DELIVERY = "BtrItemsDelivery", - PLAYER_TAXI = "PlayerTaxi", - BTR_BOT_COVER = "BtrBotCover" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/Traders.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/Traders.d.ts deleted file mode 100644 index f7d340a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/Traders.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare enum Traders { - PRAPOR = "54cb50c76803fa8b248b4571", - THERAPIST = "54cb57776803fa99248b456e", - FENCE = "579dc571d53a0658a154fbec", - SKIER = "58330581ace78e27b8b10cee", - PEACEKEEPER = "5935c25fb3acc3127c3d8cd9", - MECHANIC = "5a7c2eca46aef81a7ca2145d", - RAGMAN = "5ac3b934156ae10c4430e83c", - JAEGER = "5c0647fdd443bc2504c2d371", - LIGHTHOUSEKEEPER = "638f541a29ffd1183d187f57", - BTR = "656f0f98d80a697f855d34b1" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/WeaponSkillTypes.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/WeaponSkillTypes.d.ts deleted file mode 100644 index 1e20a2d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/WeaponSkillTypes.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export declare enum WeaponSkillTypes { - PISTOL = "Pistol", - REVOLVER = "Revolver", - SMG = "SMG", - ASSAULT = "Assault", - SHOTGUN = "Shotgun", - SNIPER = "Sniper", - LMG = "LMG", - HMG = "HMG", - DMR = "DMR", - LAUNCHER = "Launcher", - ATTACHED_LAUNCHER = "AttachedLauncher", - MELEE = "Melee" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/WeaponTypes.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/WeaponTypes.d.ts deleted file mode 100644 index b01dd66..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/WeaponTypes.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -export declare enum Weapons127x55 { - ASH_12 = "5cadfbf7ae92152ac412eeef", - RSH_12 = "633ec7c2a6918cb895019c6c" -} -export declare enum Weapons86x70 { - MK_18 = "5fc22d7c187fea44d52eda44", - AXMC = "627e14b21713922ded6f2c15" -} -export declare enum Weapons9x39 { - AS_VAL = "57c44b372459772d2b39b8ce", - VSS_VINTOREZ = "57838ad32459774a17445cd2", - KBP_9A_91 = "644674a13d52156624001fbc", - VSK_94 = "645e0c6b3b381ede770e1cc9" -} -export declare enum Weapons762x54R { - SVDS = "5c46fbd72e2216398b5a8c9c", - MP_18 = "61f7c9e189e6fb1a5e3ea78d", - MOSIN_INFANTRY = "5bfd297f0db834001a669119", - MOSIN_SNIPER = "5ae08f0a5acfc408fb1398a1", - SV_98 = "55801eed4bdc2d89578b4588", - AVT_40 = "6410733d5dd49d77bd07847e", - SVT_40 = "643ea5b23db6f9f57107d9fd", - PKM = "64637076203536ad5600c990", - PKP = "64ca3d3954fc657e230529cc" -} -export declare enum Weapons762x51 { - VPO_101 = "5c501a4d2e221602b412b540", - DT_MDR_762 = "5dcbd56fdbd3d91b3e5468d5", - SA_58 = "5b0bbe4e5acfc40dc528a72d", - SCARH_BLACK = "6183afd850224f204c1da514", - SCARH_FDE = "6165ac306ef05c2ce828ef74", - HK_G28 = "6176aca650224f204c1da3fb", - M1A = "5aafa857e5b5b00018480968", - RFB = "5f2a9575926fd9352339381f", - RSASS = "5a367e5dc4a282000e49738f", - SR_25 = "5df8ce05b11454561e39243b", - DVL_10 = "588892092459774ac91d4b11", - M700 = "5bfea6e90db834001b7347f3", - T5000M = "5df24cf80dee1b22f862e9bc" -} -export declare enum Weapons366TKM { - VPO_209 = "59e6687d86f77411d949b251", - VPO_215 = "5de652c31b7e3716273428be" -} -export declare enum Weapons762x39 { - OP_SKS = "587e02ff24597743df3deaeb", - SKS = "574d967124597745970e7c94", - AK_103 = "5ac66d2e5acfc43b321d4b53", - AK_104 = "5ac66d725acfc43b321d4b60", - AKM = "59d6088586f774275f37482f", - AKMN = "5a0ec13bfcdbcb00165aa685", - AKMS = "59ff346386f77477562ff5e2", - AKMSN = "5abcbc27d8ce8700182eceeb", - MK47_MUTANT = "606587252535c57a13424cfd", - RD_704 = "628a60ae6b1d481ff772e9c8", - VPO_136 = "59e6152586f77473dc057aa1", - RPD = "6513ef33e06849f06c0957ca", - RPDN = "65268d8ecb944ff1e90ea385" -} -export declare enum Weapons762x35 { - MCX = "5fbcc1d9016cce60e8341ab3" -} -export declare enum Weapons556x45 { - ADAR_2_15 = "5c07c60e0db834002330051f", - AK_101 = "5ac66cb05acfc40198510a10", - AK_102 = "5ac66d015acfc400180ae6e4", - DT_MDR_556 = "5c488a752e221602b412af63", - HK_416A5 = "5bb2475ed4351e00853264e3", - HK_G36 = "623063e994fc3f7b302a9696", - M4A1 = "5447a9cd4bdc2dbd208b4567", - SCARL_BLACK = "6184055050224f204c1da540", - SCARL_FDE = "618428466ef05c2ce828f218", - TX15_DML = "5d43021ca4b9362eab4b5e25", - AUG_A1 = "62e7c4fba689e8c9c50dfc38", - AUG_A3 = "63171672192e68c5460cebc5" -} -export declare enum Weapons545x39 { - AK_105 = "5ac66d9b5acfc4001633997a", - AK_74 = "5bf3e03b0db834001d2c4a9c", - AK_74M = "5ac4cd105acfc40016339859", - AK_74N = "5644bd2b4bdc2d3b4c8b4572", - AKS_74 = "5bf3e0490db83400196199af", - AKS_74N = "5ab8e9fcd8ce870019439434", - AKS_74U = "57dc2fa62459775949412633", - AKS_74UB = "5839a40f24597726f856b511", - AKS_74UN = "583990e32459771419544dd2", - SAG_AK = "628b5638ad252a16da6dd245", - SAG_AK_SHORT = "628b9c37a733087d0d7fe84b", - RPK_16 = "5beed0f50db834001c062b12", - AK_12 = "6499849fc93611967b034949" -} -export declare enum Weapons57x28FN { - FN_57_BLACK = "5d3eb3b0a4b93615055e84d2", - FN_57_FDE = "5d67abc1a4b93614ec50137f", - FN_P90 = "5cc82d76e24e8d00134b4b83" -} -export declare enum Weapons46x30HK { - MP7A1 = "5ba26383d4351e00334c93d9", - MP7A2 = "5bd70322209c4d00d7167b8f" -} -export declare enum Weapons1143x23 { - M1911A1 = "5e81c3cbac2bb513793cdc75", - M45A1 = "5f36a0e5fbf956000b716b65", - USP45 = "6193a720f8ee7e52e42109ed", - UMP45 = "5fc3e272f8b6a877a729eac5", - VECTOR45 = "5fb64bc92b1b027b1f50bcf2" -} -export declare enum Weapons9x33R { - CR_50DS = "61a4c8884f95bc3b2c5dc96f" -} -export declare enum Weapons9x21 { - SR_1MP = "59f98b4986f7746f546d2cef", - SR_2M = "62e14904c2699c0ec93adc47" -} -export declare enum Weapons9x19 { - GLOCK_17 = "5a7ae0c351dfba0017554310", - GLOCK_18C = "5b1fa9b25acfc40018633c01", - M9A3 = "5cadc190ae921500103bb3b6", - MP_443 = "576a581d2459771e7b1bc4f1", - P226R = "56d59856d2720bd8418b456a", - PL_15 = "602a9740da11d6478d5a06dc", - CR_200DS = "624c2e8614da335f1e034d8c", - MP5 = "5926bb2186f7744b1c6c6e60", - MP5K = "5d2f0d8048f0356c925bc3b0", - MP9 = "5e00903ae9dc277128008b87", - MP9_N = "5de7bd7bfd6b4e6e2276dc25", - MPX = "58948c8e86f77409493f7266", - PP_19_01 = "59984ab886f7743e98271174", - SAIGA_9 = "59f9cabd86f7743a10721f46", - STM_9 = "60339954d62c9b14ed777c06", - VECTOR_9MM = "5fc3f2d5900b1d5091531e57", - GLOCK_19X = "63088377b5cd696784087147" -} -export declare enum Weapons9x18 { - APB = "5abccb7dd8ce87001773e277", - APS = "5a17f98cfcdbcb0980087290", - PB_SILENCED = "56e0598dd2720bb5668b45a6", - PM = "5448bd6b4bdc2dfc2f8b4569", - PM_T = "579204f224597773d619e051", - PP9_KLIN = "57f4c844245977379d5c14d1", - PP91_KEDR = "57d14d2524597714373db789", - PP91_KEDRB = "57f3c6bd24597738e730fa2f" -} -export declare enum Weapons762x25 { - TT = "571a12c42459771f627b58a0", - TT_GOLD = "5b3b713c5acfc4330140bd8d", - PPSH_41 = "5ea03f7400685063ec28bfa8" -} -export declare enum Weapons12Gauge { - M3_SUPER90 = "6259b864ebedf17603599e88", - M590A1 = "5e870397991fd70db46995c8", - M870 = "5a7828548dc32e5a9c28b516", - MP_133 = "54491c4f4bdc2db1078b4568", - MP_153 = "56dee2bdd2720bc8328b4567", - MP_155 = "606dae0ab0e443224b421bb7", - MP_43_1C = "5580223e4bdc2d1c128b457f", - MTS_255_12 = "60db29ce99594040e04c4a27", - SAIGA_12GA = "576165642459773c7a400233" -} -export declare enum Weapons20Gauge { - TOZ_106 = "5a38e6bac4a2826c6e06d79b" -} -export declare enum Weapons23x75 { - KS_23M = "5e848cc2988a8701445df1e8" -} -export declare enum Weapons68x51 { - MCX_SPEAR = "65290f395ae2ae97b80fdf2d" -} -export declare enum Weapons40x46 { - M32A1 = "6275303a9f372d6ea97f9ec7", - FN40GL = "5e81ebcd8e146c7080625e15" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/WeatherType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/WeatherType.d.ts deleted file mode 100644 index 503dc30..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/WeatherType.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export declare enum WeatherType { - CLEAR_DAY = 0, - CLEAR_WIND = 1, - CLEAR_NIGHT = 2, - PARTLY_CLOUD_DAY = 3, - PARTLY_CLOUD_NIGHT = 4, - CLEAR_FOG_DAY = 5, - CLEAR_FOG_NIGHT = 6, - CLOUD_FOG = 7, - FOG = 8, - MOSTLY_CLOUD = 9, - LIGHT_RAIN = 10, - RAIN = 11, - CLOUD_WIND = 12, - CLOUD_WIND_RAIN = 13, - FULL_CLOUD = 14, - THUNDER_CLOUD = 15, - NONE = 16 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts deleted file mode 100644 index 80d737e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export declare enum WildSpawnTypeNumber { - MARKSMAN = 0, - ASSAULT = 1, - BOSSTEST = 2, - BOSSBULLY = 3, - FOLLOWERTEST = 4, - FOLLOWERBULLY = 5, - BOSSKILLA = 6, - BOSSKOJANIY = 7, - FOLLOWERKOJANIY = 8, - PMCBOT = 9, - CURSEDASSAULT = 10, - BOSSGLUHAR = 11, - FOLLOWERGLUHARASSAULT = 12, - FOLLOWERGLUHARSECURITY = 13, - FOLLOWERGLUHARSCOUT = 14, - FOLLOWERGLUHARSNIPE = 15, - FOLLOWERSANITAR = 16, - BOSSSANITAR = 17, - TEST = 18, - ASSAULTGROUP = 19, - SECTANTWARRIOR = 20, - SECTANTPRIEST = 21, - BOSSTAGILLA = 22, - FOLLOWERTAGILLA = 23, - EXUSEC = 24, - GIFTER = 25, - BOSSKNIGHT = 26, - FOLLOWERBIGPIPE = 27, - FOLLOWERBIRDEYE = 28, - BOSSZRYACHIY = 29, - FOLLOWERZRYACHIY = 30, - BOSSBOAR = 32, - FOLLOWERBOAR = 33, - ARENAFIGHTER = 34, - ARENAFIGHTEREVENT = 35, - BOSSBOARSNIPER = 36, - CRAZYASSAULTEVENT = 37, - PEACEFULLZRYACHIYEVENT = 38, - SECTACTPRIESTEVENT = 39, - RAVANGEZRYACHIYEVENT = 40, - FOLLOWERBOARCLOSE1 = 41, - FOLLOWERBOARCLOSE2 = 42, - BOSSKOLONTAY = 43, - FOLLOWERKOLONTAYASSAULT = 44, - FOLLOWERKOLONTAYSECURITY = 45, - SHOOTERBTR = 46, - SPIRITWINTER = 47, - SPIRITSPRING = 48, - PMCBEAR = 49, - PMCUSEC = 50, - skier = 51, - peacemaker = 52, - SPTUSEC = 100, - SPTBEAR = 101 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/WindDirection.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/WindDirection.d.ts deleted file mode 100644 index fb30b20..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/WindDirection.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare enum WindDirection { - EAST = 1, - NORTH = 2, - WEST = 3, - SOUTH = 4, - SE = 5, - SW = 6, - NW = 7, - NE = 8 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteActivityType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteActivityType.d.ts deleted file mode 100644 index 7a08cc6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteActivityType.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare enum QteActivityType { - GYM = 0 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteEffectType.d.ts deleted file mode 100644 index 9ecd1a2..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteEffectType.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteResultType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteResultType.d.ts deleted file mode 100644 index 05b48b8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteResultType.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare enum QteResultType { - NONE = "None", - EXIT = "Exit" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteRewardType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteRewardType.d.ts deleted file mode 100644 index 251c2ad..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteRewardType.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare enum QteRewardType { - SKILL = "Skill", - HEALTH_EFFECT = "HealthEffect", - MUSCLE_PAIN = "MusclePain", - GYM_ARM_TRAUMA = "GymArmTrauma" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteType.d.ts deleted file mode 100644 index 4c50c0d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteType.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare enum QteType { - SHRINKING_CIRCLE = 0 -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/hideout/RequirementType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/hideout/RequirementType.d.ts deleted file mode 100644 index 834eabf..0000000 --- a/TypeScript/22CustomSptCommand/types/models/enums/hideout/RequirementType.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare enum RequirementType { - AREA = "Area", - ITEM = "Item", - TRADER_UNLOCK = "TraderUnlock", - TRADER_LOYALTY = "TraderLoyalty", - SKILL = "Skill", - RESOURCE = "Resource", - TOOL = "Tool", - QUEST_COMPLETE = "QuestComplete", - HEALTH = "Health", - BODY_PART_BUFF = "BodyPartBuff" -} diff --git a/TypeScript/22CustomSptCommand/types/models/external/HttpFramework.d.ts b/TypeScript/22CustomSptCommand/types/models/external/HttpFramework.d.ts deleted file mode 100644 index fda8732..0000000 --- a/TypeScript/22CustomSptCommand/types/models/external/HttpFramework.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -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 - * @returns The decorator that create the listener proxy - */ -export declare const Listen: (basePath: string) => any>(Base: T) => T; -/** - * HTTP DELETE decorator - */ -export declare const Delete: (path?: string) => (target: any, propertyKey: string) => void; -/** - * HTTP GET decorator - */ -export declare const Get: (path?: string) => (target: any, propertyKey: string) => void; -/** - * HTTP OPTIONS decorator - */ -export declare const Options: (path?: string) => (target: any, propertyKey: string) => void; -/** - * HTTP PATCH decorator - */ -export declare const Patch: (path?: string) => (target: any, propertyKey: string) => void; -/** - * HTTP POST decorator - */ -export declare const Post: (path?: string) => (target: any, propertyKey: string) => void; -/** - * HTTP PUT decorator - */ -export declare const Put: (path?: string) => (target: any, propertyKey: string) => void; diff --git a/TypeScript/22CustomSptCommand/types/models/external/IPostDBLoadMod.d.ts b/TypeScript/22CustomSptCommand/types/models/external/IPostDBLoadMod.d.ts deleted file mode 100644 index 8b482b6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/external/IPostDBLoadMod.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPostDBLoadMod { - postDBLoad(container: DependencyContainer): void; -} diff --git a/TypeScript/22CustomSptCommand/types/models/external/IPostDBLoadModAsync.d.ts b/TypeScript/22CustomSptCommand/types/models/external/IPostDBLoadModAsync.d.ts deleted file mode 100644 index 63b55bb..0000000 --- a/TypeScript/22CustomSptCommand/types/models/external/IPostDBLoadModAsync.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPostDBLoadModAsync { - postDBLoadAsync(container: DependencyContainer): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/models/external/IPostSptLoadMod.d.ts b/TypeScript/22CustomSptCommand/types/models/external/IPostSptLoadMod.d.ts deleted file mode 100644 index 5ef9766..0000000 --- a/TypeScript/22CustomSptCommand/types/models/external/IPostSptLoadMod.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPostSptLoadMod { - postSptLoad(container: DependencyContainer): void; -} diff --git a/TypeScript/22CustomSptCommand/types/models/external/IPostSptLoadModAsync.d.ts b/TypeScript/22CustomSptCommand/types/models/external/IPostSptLoadModAsync.d.ts deleted file mode 100644 index 7778d96..0000000 --- a/TypeScript/22CustomSptCommand/types/models/external/IPostSptLoadModAsync.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPostSptLoadModAsync { - postSptLoadAsync(container: DependencyContainer): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/models/external/IPreSptLoadMod.d.ts b/TypeScript/22CustomSptCommand/types/models/external/IPreSptLoadMod.d.ts deleted file mode 100644 index dc38515..0000000 --- a/TypeScript/22CustomSptCommand/types/models/external/IPreSptLoadMod.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPreSptLoadMod { - preSptLoad(container: DependencyContainer): void; -} diff --git a/TypeScript/22CustomSptCommand/types/models/external/IPreSptLoadModAsync.d.ts b/TypeScript/22CustomSptCommand/types/models/external/IPreSptLoadModAsync.d.ts deleted file mode 100644 index 0322434..0000000 --- a/TypeScript/22CustomSptCommand/types/models/external/IPreSptLoadModAsync.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPreSptLoadModAsync { - preSptLoadAsync(container: DependencyContainer): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/models/external/tsyringe.d.ts b/TypeScript/22CustomSptCommand/types/models/external/tsyringe.d.ts deleted file mode 100644 index 56a7e58..0000000 --- a/TypeScript/22CustomSptCommand/types/models/external/tsyringe.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export type { DependencyContainer }; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bindings/Route.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bindings/Route.d.ts deleted file mode 100644 index abe8d2c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/bindings/Route.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRoute { - spt: any; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/BotGenerationDetails.d.ts deleted file mode 100644 index 3977ee5..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/BotGenerationDetails.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { - /** Should the bot be generated as a PMC */ - isPmc: boolean; - /** assault/pmcBot etc */ - role: string; - /** Side of bot */ - side: string; - /** Active players current level */ - playerLevel?: number; - playerName?: string; - /** Level specific overrides for PMC level */ - locationSpecificPmcLevelOverride?: MinMax; - /** Delta of highest level of bot e.g. 50 means 50 levels above player */ - botRelativeLevelDeltaMax: number; - /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ - botRelativeLevelDeltaMin: number; - /** How many to create and store */ - botCountToGenerate: number; - /** Desired difficulty of the bot */ - botDifficulty: string; - /** Will the generated bot be a player scav */ - isPlayerScav: boolean; - eventRole?: string; - allPmcsHaveSameNameAsPlayer?: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index d4a2526..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Mods } 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"; -export declare class GenerateWeaponResult { - weapon: Item[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: Mods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/IBotLootCache.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/IBotLootCache.d.ts deleted file mode 100644 index 529c2cd..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/IBotLootCache.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export interface IBotLootCache { - backpackLoot: Record; - pocketLoot: Record; - vestLoot: Record; - secureLoot: Record; - combinedPoolLoot: Record; - specialItems: Record; - healingItems: Record; - drugItems: Record; - foodItems: Record; - drinkItems: Record; - currencyItems: Record; - stimItems: Record; - grenadeItems: Record; -} -export declare enum LootCacheType { - SPECIAL = "Special", - BACKPACK = "Backpack", - POCKET = "Pocket", - VEST = "Vest", - SECURE = "SecuredContainer", - COMBINED = "Combined", - HEALING_ITEMS = "HealingItems", - DRUG_ITEMS = "DrugItems", - STIM_ITEMS = "StimItems", - GRENADE_ITEMS = "GrenadeItems", - FOOD_ITEMS = "FoodItems", - DRINK_ITEMS = "DrinkItems", - CURRENCY_ITEMS = "CurrencyItems" -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/IChooseRandomCompatibleModResult.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/IChooseRandomCompatibleModResult.d.ts deleted file mode 100644 index 6ba6630..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/IChooseRandomCompatibleModResult.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface IChooseRandomCompatibleModResult { - incompatible: boolean; - found?: boolean; - chosenTpl?: string; - reason: string; - slotBlocked?: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/IItemSpawnLimitSettings.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/IItemSpawnLimitSettings.d.ts deleted file mode 100644 index ca3e6a6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/IItemSpawnLimitSettings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IItemSpawnLimitSettings { - currentLimits: Record; - globalLimits: Record; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IBotCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IBotCallbacks.d.ts deleted file mode 100644 index e49406e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IBotCallbacks.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -export interface IBotCallbacks { - getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; - getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; - getBotCap(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IBundleCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IBundleCallbacks.d.ts deleted file mode 100644 index 7e37c6e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IBundleCallbacks.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IBundleCallbacks { - sendBundle(sessionID: string, req: any, resp: any, body: any): any; - getBundles(url: string, info: any, sessionID: string): string; - getBundle(url: string, info: any, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ICustomizationCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ICustomizationCallbacks.d.ts deleted file mode 100644 index 8dba3d7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ICustomizationCallbacks.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISuit } from "@spt/models/eft/common/tables/ITrader"; -import { IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData"; -import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export interface ICustomizationCallbacks { - getSuits(url: string, info: any, sessionID: string): IGetBodyResponseData; - getTraderSuits(url: string, info: any, sessionID: string): IGetBodyResponseData; - wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; - buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts deleted file mode 100644 index b30c042..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IFriendRequestData } from "@spt/models/eft/dialog/IFriendRequestData"; -import { IGetAllAttachmentsRequestData } from "@spt/models/eft/dialog/IGetAllAttachmentsRequestData"; -import { IGetAllAttachmentsResponse } from "@spt/models/eft/dialog/IGetAllAttachmentsResponse"; -import { IGetChatServerListRequestData } from "@spt/models/eft/dialog/IGetChatServerListRequestData"; -import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendListDataResponse"; -import { IGetMailDialogInfoRequestData } from "@spt/models/eft/dialog/IGetMailDialogInfoRequestData"; -import { IGetMailDialogListRequestData } from "@spt/models/eft/dialog/IGetMailDialogListRequestData"; -import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; -import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; -import { IPinDialogRequestData } from "@spt/models/eft/dialog/IPinDialogRequestData"; -import { IRemoveDialogRequestData } from "@spt/models/eft/dialog/IRemoveDialogRequestData"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; -export interface IDialogueCallbacks { - getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; - removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; - pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; - unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; - setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; - getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; - listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; - update(): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IGameCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IGameCallbacks.d.ts deleted file mode 100644 index 21554dd..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IGameCallbacks.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; -import { IGameEmptyCrcRequestData } from "@spt/models/eft/game/IGameEmptyCrcRequestData"; -import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -export interface IGameCallbacks { - versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; - gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; - getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHandbookCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHandbookCallbacks.d.ts deleted file mode 100644 index 5857a3e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHandbookCallbacks.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IHandbookCallbacks { - load(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHealthCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHealthCallbacks.d.ts deleted file mode 100644 index c0244a1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHealthCallbacks.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; -import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; -import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -export interface IHealthCallbacks { - onLoad(sessionID: string): ISptProfile; - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): any; - offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): any; - offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): any; - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): any; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHideoutCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHideoutCallbacks.d.ts deleted file mode 100644 index 1349144..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHideoutCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData"; -import { IHideoutScavCaseStartRequestData } from "@spt/models/eft/hideout/IHideoutScavCaseStartRequestData"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; -import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; -import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export interface IHideoutCallbacks { - upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; - upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; - putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; - takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; - toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; - singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; - scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; - continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; - takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; - update(timeSinceLastRun: number): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHttpCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHttpCallbacks.d.ts deleted file mode 100644 index 3ecd945..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IHttpCallbacks.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IHttpCallbacks { - load(): void; - sendImage(sessionID: string, req: any, resp: any, body: any): void; - getImage(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IInraidCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IInraidCallbacks.d.ts deleted file mode 100644 index b267942..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IInraidCallbacks.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -export interface IInraidCallbacks { - onLoad(sessionID: string): ISptProfile; - registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; - saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; - getRaidEndState(): string; - getRaidMenuSettings(url: string, info: IEmptyRequestData, sessionID: string): string; - getWeaponDurability(url: string, info: any, sessionID: string): string; - getAirdropConfig(url: string, info: any, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IInsuranceCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IInsuranceCallbacks.d.ts deleted file mode 100644 index 2fae550..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IInsuranceCallbacks.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsuranceCostRequestData"; -import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -export interface IInsuranceCallbacks { - onLoad(sessionID: string): ISptProfile; - getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): any; - insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): any; - update(secondsSinceLastRun: number): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IInventoryCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IInventoryCallbacks.d.ts deleted file mode 100644 index 079d37b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IInventoryCallbacks.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; -import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; -import { IInventoryDeleteMarkerRequestData } from "@spt/models/eft/inventory/IInventoryDeleteMarkerRequestData"; -import { IInventoryEditMarkerRequestData } from "@spt/models/eft/inventory/IInventoryEditMarkerRequestData"; -import { IInventoryExamineRequestData } from "@spt/models/eft/inventory/IInventoryExamineRequestData"; -import { IInventoryFoldRequestData } from "@spt/models/eft/inventory/IInventoryFoldRequestData"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryReadEncyclopediaRequestData } from "@spt/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySortRequestData } from "@spt/models/eft/inventory/IInventorySortRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventorySwapRequestData } from "@spt/models/eft/inventory/IInventorySwapRequestData"; -import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTagRequestData"; -import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export interface IInventoryCallbacks { - moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; - removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; - splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse; - mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse; - transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse; - swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse; - toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse; - tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; - examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse; - readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse; - sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IItemEventCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IItemEventCallbacks.d.ts deleted file mode 100644 index 98fdb0b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IItemEventCallbacks.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterRequest } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export interface IItemEventCallbacks { - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ILauncherCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ILauncherCallbacks.d.ts deleted file mode 100644 index d01ae52..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ILauncherCallbacks.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"; -import { IGetMiniProfileRequestData } from "@spt/models/eft/launcher/IGetMiniProfileRequestData"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; -import { IRemoveProfileData } from "@spt/models/eft/launcher/IRemoveProfileData"; -export interface ILauncherCallbacks { - connect(): string; - login(url: string, info: ILoginRequestData, sessionID: string): string; - register(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK"; - get(url: string, info: ILoginRequestData, sessionID: string): string; - changeUsername(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK"; - changePassword(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK"; - wipe(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK"; - getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; - getServerVersion(): string; - ping(url: string, info: any, sessionID: string): string; - removeProfile(url: string, info: IRemoveProfileData, sessionID: string): string; - getCompatibleTarkovVersion(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ILocationCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ILocationCallbacks.d.ts deleted file mode 100644 index e51c723..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ILocationCallbacks.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData"; -export interface ILocationCallbacks { - getLocationData(url: string, info: any, sessionID: string): IGetBodyResponseData; - getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IModCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IModCallbacks.d.ts deleted file mode 100644 index 1a4cd7b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IModCallbacks.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IModCallbacks { - load(): void; - sendBundle(sessionID: string, req: any, resp: any, body: any): void; - getBundles(url: string, info: any, sessionID: string): string; - getBundle(url: string, info: any, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/INoteCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/INoteCallbacks.d.ts deleted file mode 100644 index 5ea2c96..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/INoteCallbacks.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; -export interface INoteCallbacks { - addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; - editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; - deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/INotifierCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/INotifierCallbacks.d.ts deleted file mode 100644 index 9f1fae1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/INotifierCallbacks.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INotifierChannel } from "@spt/models/eft/notifier/INotifier"; -export interface INotifierCallbacks { - /** - * If we don't have anything to send, it's ok to not send anything back - * because notification requests can be long-polling. In fact, we SHOULD wait - * until we actually have something to send because otherwise we'd spam the client - * and the client would abort the connection due to spam. - */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; - getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; - createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData; - notify(url: string, info: any, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts deleted file mode 100644 index b0d75bd..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IPresetBuildActionRequestData } from "@spt/models/eft/presetBuild/IPresetBuildActionRequestData"; -import { IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; -export interface IPresetBuildCallbacks { - getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; - saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; - removeWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; - saveEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; - removeEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IPresetCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IPresetCallbacks.d.ts deleted file mode 100644 index 4169857..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IPresetCallbacks.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IPresetCallbacks { - load(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IProfileCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IProfileCallbacks.d.ts deleted file mode 100644 index f769cfd..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IProfileCallbacks.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData"; -import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData"; -import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData"; -import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData"; -import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -export interface IProfileCallbacks { - onLoad(sessionID: string): any; - createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; - getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData; - changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData; - validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; - getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IQuestCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IQuestCallbacks.d.ts deleted file mode 100644 index 1a688a7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IQuestCallbacks.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuest } from "@spt/models/eft/common/tables/IQuest"; -import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; -import { IHandoverQuestRequestData } from "@spt/models/eft/quests/IHandoverQuestRequestData"; -import { IListQuestsRequestData } from "@spt/models/eft/quests/IListQuestsRequestData"; -import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; -export interface IQuestCallbacks { - changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; - acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; - completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; - listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData; - activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IRagfairCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IRagfairCallbacks.d.ts deleted file mode 100644 index dcad1ee..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IRagfairCallbacks.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAddOfferRequestData } from "@spt/models/eft/ragfair/IAddOfferRequestData"; -import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; -import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; -import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; -import { IRemoveOfferRequestData } from "@spt/models/eft/ragfair/IRemoveOfferRequestData"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -export interface IRagfairCallbacks { - load(): void; - search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; - getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; - getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; - removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse; - extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse; - update(timeSinceLastRun: number): boolean; - updatePlayer(timeSinceLastRun: number): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IRepairCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IRepairCallbacks.d.ts deleted file mode 100644 index e8d4fe1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IRepairCallbacks.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepairActionDataRequest } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; -export interface IRepairCallbacks { - traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ISaveCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ISaveCallbacks.d.ts deleted file mode 100644 index 1ad3b82..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ISaveCallbacks.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISaveCallbacks { - load(): void; - update(secondsSinceLastRun: number): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ITradeCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ITradeCallbacks.d.ts deleted file mode 100644 index 9b71d93..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ITradeCallbacks.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -import { IProcessRagfairTradeRequestData } from "@spt/models/eft/trade/IProcessRagfairTradeRequestData"; -export interface ITradeCallbacks { - processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; - processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ITraderCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ITraderCallbacks.d.ts deleted file mode 100644 index 963e523..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/ITraderCallbacks.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -export interface ITraderCallbacks { - load(): void; - getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - update(): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IWeatherCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IWeatherCallbacks.d.ts deleted file mode 100644 index 5713469..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IWeatherCallbacks.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -export interface IWeatherCallbacks { - getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IWishlistCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IWishlistCallbacks.d.ts deleted file mode 100644 index 16f056d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IWishlistCallbacks.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IWishlistActionData } from "@spt/models/eft/wishlist/IWishlistActionData"; -export interface IWishlistCallbacks { - addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; - removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IAirdropConfig.d.ts deleted file mode 100644 index d438f00..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IAirdropConfig.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IAirdropConfig extends IBaseConfig { - kind: "spt-airdrop"; - airdropChancePercent: AirdropChancePercent; - airdropTypeWeightings: Record; - /** Lowest point plane will fly at */ - planeMinFlyHeight: number; - /** Highest point plane will fly at */ - planeMaxFlyHeight: number; - /** Loudness of plane engine */ - planeVolume: number; - /** Speed plane flies overhead */ - planeSpeed: number; - /** Speed loot crate falls after being dropped */ - crateFallSpeed: number; - /** Container tpls to use when spawning crate - affects container size, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ - containerIds: Record; - /** Earliest time aircraft will spawn in raid */ - airdropMinStartTimeSeconds: number; - /** Latest time aircraft will spawn in raid */ - airdropMaxStartTimeSeconds: number; - /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ - loot: Record; -} -/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ -export interface AirdropChancePercent { - bigmap: number; - woods: number; - lighthouse: number; - shoreline: number; - interchange: number; - reserve: number; - tarkovStreets: number; - sandbox: number; -} -/** Loot inside crate */ -export interface AirdropLoot { - /** Min/max of weapons inside crate */ - weaponPresetCount?: MinMax; - /** Min/max of armors (head/chest/rig) inside crate */ - armorPresetCount?: MinMax; - /** Min/max of items inside crate */ - itemCount: MinMax; - /** Min/max of sealed weapon boxes inside crate */ - weaponCrateCount: MinMax; - /** Items to never allow - tpls */ - itemBlacklist: string[]; - /** Item type (parentId) to allow inside crate */ - itemTypeWhitelist: string[]; - /** Item type/ item tpls to limit count of inside crate - key: item base type: value: max count */ - itemLimits: Record; - /** Items to limit stack size of key: item tpl value: min/max stack size */ - itemStackLimits: Record; - /** Armor levels to allow inside crate e.g. [4,5,6] */ - armorLevelWhitelist?: number[]; - /** Should boss items be added to airdrop crate */ - allowBossItems: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IBTRConfig.d.ts deleted file mode 100644 index 123c507..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IBTRConfig.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; -export interface IBTRConfig extends IBaseConfig { - kind: "spt-btr"; - /** How fast the BTR moves */ - moveSpeed: number; - /** How long the cover fire service lasts for */ - coverFireTime: number; - /** How long the BTR waits at every point in its path */ - pointWaitTime: MinMax; - /** How long after purchasing the taxi service before the BTR leaves */ - taxiWaitTime: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IBaseConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IBaseConfig.d.ts deleted file mode 100644 index 8780d43..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IBaseConfig.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface IBaseConfig { - kind: string; -} -export interface IRunIntervalValues { - inRaid: number; - outOfRaid: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts deleted file mode 100644 index dd9c1cc..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { GenerationData } from "@spt/models/eft/common/tables/IBotType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; -export interface IBotConfig extends IBaseConfig { - kind: "spt-bot"; - /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; - /** Bot roles that should not have PMC types (sptBear/sptUsec) added as enemies to */ - botsToNotAddPMCsAsEnemiesTo: string[]; - /** What bot types should be classified as bosses */ - bosses: string[]; - /** Control weapon/armor durability min/max values for each bot type */ - durability: IBotDurability; - /** Controls the percentage values of randomization item resources */ - lootItemResourceRandomization: Record; - /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ - revenge: Record; - /** Control how many items are allowed to spawn on a bot - * key: bottype, value: */ - itemSpawnLimits: Record>; - /** Blacklist/whitelist items on a bot */ - equipment: Record; - /** Show a bots botType value after their name */ - showTypeInNickname: boolean; - /** What ai brain should a normal scav use per map */ - assaultBrainType: Record>; - /** What ai brain should a player scav use per map */ - playerScavBrainType: Record>; - /** Max number of bots that can be spawned in a raid at any one time */ - maxBotCap: Record; - /** Chance scav has fake pscav name e.g. Scav name (player name) */ - chanceAssaultScavHasPlayerScavName: number; - /** How many stacks of secret ammo should a bot have in its bot secure container */ - secureContainerAmmoStackCount: number; - /** Bot roles in this array will be given a dog tag on generation */ - botRolesWithDogTags: string[]; - /** Settings to control the items that get added into wallets on bots */ - walletLoot: IWalletLootSettings; - /** Currency weights, Keyed by botrole / currency */ - currencyStackSize: Record>>; -} -/** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { - assault: number; - bossBully: number; - bossGluhar: number; - bossKilla: number; - bossKojaniy: number; - bossSanitar: number; - bossTagilla: number; - bossKnight: number; - bossTest: number; - cursedAssault: number; - followerBully: number; - followerGluharAssault: number; - followerGluharScout: number; - followerGluharSecurity: number; - followerGluharSnipe: number; - followerKojaniy: number; - followerSanitar: number; - followerTagilla: number; - followerBirdEye: number; - followerBigPipe: number; - followerTest: number; - followerBoar: number; - marksman: number; - pmcBot: number; - sectantPriest: number; - sectantWarrior: number; - gifter: number; - test: number; - exUsec: number; - arenaFighterEvent: number; - arenaFighter: number; - crazyAssaultEvent: number; - bossBoar: number; - bossBoarSniper: number; - sptUsec: number; - sptBear: number; -} -export interface IWalletLootSettings { - /** Chance wallets have loot in them */ - chancePercent: number; - itemCount: MinMax; - stackSizeWeight: Record; - currencyWeight: Record; - /** What wallets will have money in them */ - walletTplPool: string[]; -} -export interface EquipmentFilters { - /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; - /** Whitelist for weapon sight types allowed per gun */ - weaponSightWhitelist: Record; - /** Chance face shield is down/active */ - faceShieldIsActiveChancePercent?: number; - /** Chance gun flashlight is active during the day */ - lightIsActiveDayChancePercent?: number; - /** Chance gun flashlight is active during the night */ - lightIsActiveNightChancePercent?: number; - /** Chance gun laser is active during the day */ - laserIsActiveChancePercent?: number; - /** Chance NODS are down/active during the day */ - nvgIsActiveChanceDayPercent?: number; - /** Chance NODS are down/active during the night */ - nvgIsActiveChanceNightPercent?: number; - forceOnlyArmoredRigWhenNoArmor?: boolean; - /** Should plates be filtered by level */ - filterPlatesByLevel?: boolean; - /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ - weaponSlotIdsToMakeRequired?: string[]; - /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; - /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; - /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; - /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; - /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; - /** Should the stock mod be forced to spawn on bot */ - forceStock?: boolean; - armorPlateWeighting?: IArmorPlateWeights[]; -} -export interface ModLimits { - /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ - scopeLimit?: number; - /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ - lightLaserLimit?: number; -} -export interface RandomisationDetails { - /** Between what levels do these randomisation setting apply to */ - levelRange: MinMax; - generation?: Record; - /** Mod slots that should be fully randomised -ignores mods from bottype.json and instaed creates a pool using items.json */ - randomisedWeaponModSlots?: string[]; - /** Armor slots that should be randomised e.g. 'Headwear, Armband' */ - randomisedArmorSlots?: string[]; - /** Equipment chances */ - equipment?: Record; - /** Weapon mod chances */ - weaponMods?: Record; - /** Equipment mod chances */ - equipmentMods?: Record; -} -export interface EquipmentFilterDetails { - /** Between what levels do these equipment filter setting apply to */ - levelRange: MinMax; - /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; - /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; -} -export interface WeightingAdjustmentDetails { - /** Between what levels do these weight settings apply to */ - levelRange: MinMax; - /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ - ammo?: IAdjustmentDetails; - /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ - equipment?: IAdjustmentDetails; - /** Key: clothing slot e.g. feet, value: item tpl + weight */ - clothing?: IAdjustmentDetails; -} -export interface IAdjustmentDetails { - add: Record>; - edit: Record>; -} -export interface IArmorPlateWeights extends Record { - levelRange: MinMax; -} -export interface IRandomisedResourceDetails { - food: IRandomisedResourceValues; - meds: IRandomisedResourceValues; -} -export interface IRandomisedResourceValues { - /** Minimum percent of item to randomized between min and max resource */ - resourcePercent: number; - /** Chance for randomization to not occur */ - chanceMaxResourcePercent: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotDurability.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IBotDurability.d.ts deleted file mode 100644 index 728db97..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotDurability.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export interface IBotDurability { - default: DefaultDurability; - pmc: PmcDurability; - boss: BotDurability; - follower: BotDurability; - assault: BotDurability; - cursedassault: BotDurability; - marksman: BotDurability; - pmcbot: BotDurability; - arenafighterevent: BotDurability; - arenafighter: BotDurability; - crazyassaultevent: BotDurability; - exusec: BotDurability; - gifter: BotDurability; - sectantpriest: BotDurability; - sectantwarrior: BotDurability; -} -/** Durability values to be used when a more specific bot type cant be found */ -export interface DefaultDurability { - armor: ArmorDurability; - weapon: WeaponDurability; -} -export interface PmcDurability { - armor: PmcDurabilityArmor; - weapon: WeaponDurability; -} -export interface PmcDurabilityArmor { - lowestMaxPercent: number; - highestMaxPercent: number; - maxDelta: number; - minDelta: number; -} -export interface BotDurability { - armor: ArmorDurability; - weapon: WeaponDurability; -} -export interface ArmorDurability { - maxDelta: number; - minDelta: number; - minLimitPercent: number; -} -export interface WeaponDurability { - lowestMax: number; - highestMax: number; - maxDelta: number; - minDelta: number; - minLimitPercent: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts deleted file mode 100644 index 755b308..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface ICoreConfig extends IBaseConfig { - kind: "spt-core"; - sptVersion: string; - projectName: string; - compatibleTarkovVersion: string; - serverName: string; - profileSaveIntervalSeconds: number; - sptFriendNickname: string; - allowProfileWipe: boolean; - bsgLogging: IBsgLogging; - release: IRelease; - fixes: IGameFixes; - features: IServerFeatures; - /** Commit hash build server was created from */ - commit?: string; - /** Timestamp of server build */ - buildTime?: string; -} -export interface IBsgLogging { - /** - * verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals. - * complain to them about it! In all cases, better exceptions will be logged. - * WARNING: trace-info logging will quickly create log files in the megabytes. - * 0 - trace - * 1 - debug - * 2 - info - * 3 - warn - * 4 - error - * 5 - fatal - * 6 - off - */ - verbosity: number; - sendToServer: boolean; -} -export interface IRelease { - betaDisclaimerText?: string; - betaDisclaimerAcceptText: string; - serverModsLoadedText: string; - serverModsLoadedDebugText: string; - clientModsLoadedText: string; - clientModsLoadedDebugText: string; - illegalPluginsLoadedText: string; - illegalPluginsExceptionText: string; - releaseSummaryText?: string; - isBeta?: boolean; - isModdable?: boolean; - isModded: boolean; - betaDisclaimerTimeoutDelay: number; -} -export interface IGameFixes { - /** Shotguns use a different value than normal guns causing huge pellet dispersion */ - fixShotgunDispersion: boolean; - /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ - removeModItemsFromProfile: boolean; - /** Fix issues that cause the game to not start due to inventory item issues */ - fixProfileBreakingInventoryItemIssues: boolean; -} -export interface IServerFeatures { - autoInstallModDependencies: boolean; - compressProfile: boolean; - chatbotFeatures: IChatbotFeatures; -} -export interface IChatbotFeatures { - sptFriendEnabled: boolean; - commandoEnabled: boolean; - commandoFeatures: ICommandoFeatures; -} -export interface ICommandoFeatures { - giveCommandEnabled: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IGiftsConfig.d.ts deleted file mode 100644 index c3c8799..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IGiftsConfig.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { Traders } from "@spt/models/enums/Traders"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; -export interface IGiftsConfig extends IBaseConfig { - kind: "spt-gifts"; - gifts: Record; -} -export interface Gift { - /** Items to send to player */ - items: Item[]; - /** Who is sending the gift to player */ - sender: GiftSenderType; - /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ - senderId?: string; - senderDetails: IUserDialogInfo; - /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ - trader?: Traders; - messageText: string; - /** Optional - if sending text from the client locale file */ - localeTextId?: string; - /** Optional - Used by Seasonal events to send on specific day */ - timestampToSend?: number; - associatedEvent: SeasonalEventType; - collectionTimeHours: number; - /** Optional, can be used to change profile settings like level/skills */ - profileChangeEvents?: IProfileChangeEvent[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IHealthConfig.d.ts deleted file mode 100644 index b86c208..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IHealthConfig.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IHealthConfig extends IBaseConfig { - kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; -} -export interface HealthMultipliers { - death: number; - blacked: number; -} -export interface Save { - health: boolean; - effects: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IHideoutConfig.d.ts deleted file mode 100644 index c1967c0..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IHideoutConfig.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IBaseConfig, IRunIntervalValues } from "@spt/models/spt/config/IBaseConfig"; -export interface IHideoutConfig extends IBaseConfig { - kind: "spt-hideout"; - /** How many seconds should pass before hideout crafts / fuel usage is checked and procesed */ - runIntervalSeconds: number; - /** Default values used to hydrate `runIntervalSeconds` with */ - runIntervalValues: IRunIntervalValues; - hoursForSkillCrafting: number; - expCraftAmount: number; - overrideCraftTimeSeconds: number; - overrideBuildTimeSeconds: number; - /** Only process a profiles hideout crafts when it has been active in the last x minutes */ - updateProfileHideoutWhenActiveWithinMinutes: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IHttpConfig.d.ts deleted file mode 100644 index 0f42e77..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IHttpConfig.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IHttpConfig extends IBaseConfig { - kind: "spt-http"; - /** Address used by webserver */ - ip: string; - port: number; - /** Address used by game client to connect to */ - backendIp: string; - backendPort: string; - webSocketPingDelayMs: number; - logRequests: boolean; - /** e.g. "SPT_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "SPT_Data/Server/images/traders/NewTraderImage.png" */ - serverImagePathOverride: Record; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IInRaidConfig.d.ts deleted file mode 100644 index 7d6befd..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IInRaidConfig.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IInRaidConfig extends IBaseConfig { - kind: "spt-inraid"; - MIAOnRaidEnd: boolean; - /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; - /** What effects should be saved post-raid */ - save: Save; - /** Names of car extracts */ - carExtracts: string[]; - /** Names of coop extracts */ - coopExtracts: string[]; - /** Fence rep gain from a single car extract */ - carExtractBaseStandingGain: number; - /** Fence rep gain from a single coop extract */ - coopExtractBaseStandingGain: number; - /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; - /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ - pmcKillProbabilityForScavGain: number; - /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ - keepFiRSecureContainerOnDeath: boolean; - /** Percentage chance a player scav hot is hostile to the player when scavving */ - playerScavHostileChancePercent: number; -} -export interface RaidMenuSettings { - aiAmount: string; - aiDifficulty: string; - bossEnabled: boolean; - scavWars: boolean; - taggedAndCursed: boolean; - enablePve: boolean; - randomWeather: boolean; - randomTime: boolean; -} -export interface Save { - /** Should loot gained from raid be saved */ - loot: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IInsuranceConfig.d.ts deleted file mode 100644 index a5056a5..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IInsuranceConfig.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IInsuranceConfig extends IBaseConfig { - kind: "spt-insurance"; - /** Insurance price multiplier */ - insuranceMultiplier: Record; - /** Chance item is returned as insurance, keyed by trader id */ - returnChancePercent: Record; - /** Item slots that should never be returned as insurance */ - blacklistedEquipment: string[]; - /** Some slots should always be removed, e.g. 'cartridges' */ - slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ - returnTimeOverrideSeconds: number; - /** How often server should process insurance in seconds */ - runIntervalSeconds: number; - minAttachmentRoublePriceToBeTaken: number; - chanceNoAttachmentsTakenPercent: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts deleted file mode 100644 index b489393..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IInventoryConfig extends IBaseConfig { - kind: "spt-inventory"; - /** Should new items purchased by flagged as found in raid */ - newItemsMarkedFound: boolean; - randomLootContainers: Record; - sealedAirdropContainer: ISealedAirdropContainerSettings; - /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ - customMoneyTpls: string[]; - /** Multipliers for skill gain when inside menus, NOT in-game */ - skillGainMultiplers: Record; -} -export interface RewardDetails { - rewardCount: number; - foundInRaid: boolean; - rewardTplPool?: Record; - rewardTypePool?: Record; -} -export interface ISealedAirdropContainerSettings { - weaponRewardWeight: Record; - defaultPresetsOnly: boolean; - /** Should contents be flagged as found in raid when opened */ - foundInRaid: boolean; - weaponModRewardLimits: Record; - rewardTypeLimits: Record; - ammoBoxWhitelist: string[]; - allowBossItems: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IItemConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IItemConfig.d.ts deleted file mode 100644 index 0530278..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IItemConfig.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IItemConfig extends IBaseConfig { - kind: "spt-item"; - /** Items that should be globally blacklisted */ - blacklist: string[]; - /** items that should not be given as rewards */ - rewardItemBlacklist: string[]; - /** Items that can only be found on bosses */ - bossItems: string[]; - handbookPriceOverride: Record; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ILocaleConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ILocaleConfig.d.ts deleted file mode 100644 index c3de13e..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ILocaleConfig.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface ILocaleConfig extends IBaseConfig { - kind: "spt-locale"; - /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ - gameLocale: string; - /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ - serverLocale: string; - /** Languages server can be translated into */ - serverSupportedLocales: string[]; - fallbacks: { - [locale: string]: string; - }; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ILocationConfig.d.ts deleted file mode 100644 index 1e113b2..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ILocationConfig.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { BossLocationSpawn, Wave } from "@spt/models/eft/common/ILocationBase"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface ILocationConfig extends IBaseConfig { - kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; - /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ - 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; - /** Custom bot waves to add to a locations base json on game start if addCustomBotWavesToMaps is true */ - customWaves: CustomWaves; - /** Open zones to add to map */ - openZones: Record; - /** Key = map id, value = item tpls that should only have one forced loot spawn position */ - forcedLootSingleSpawnById: Record; - /** How many attempts should be taken to fit an item into a container before giving up */ - fitLootIntoContainerAttempts: number; - /** Add all possible zones to each maps `OpenZones` property */ - addOpenZonesToAllMaps: boolean; - /** Allow addition of custom bot waves designed by SPT to be added to maps - defined in configs/location.json.customWaves */ - addCustomBotWavesToMaps: boolean; - /** Should the limits defined inside botTypeLimits to appled to locations on game start */ - enableBotTypeLimits: boolean; - /** Add limits to a locations base.MinMaxBots array if enableBotTypeLimits is true */ - botTypeLimits: Record; - /** container randomisation settings */ - containerRandomisationSettings: IContainerRandomistionSettings; - /** How full must a random loose magazine be % */ - minFillLooseMagazinePercent: number; - /** How full must a random static magazine be % */ - minFillStaticMagazinePercent: number; - allowDuplicateItemsInStaticContainers: boolean; - /** Chance loose magazines have ammo in them TODO - rename to dynamicMagazineLootHasAmmoChancePercent */ - magazineLootHasAmmoChancePercent: number; - /** Chance static magazines have ammo in them */ - staticMagazineLootHasAmmoChancePercent: number; - /** Key: map, value: loose loot ids to ignore */ - looseLootBlacklist: Record; - /** Key: map, value: settings to control how long scav raids are */ - scavRaidTimeSettings: IScavRaidTimeSettings; - /** Settings to adjust mods for lootable equipment in raid */ - equipmentLootSettings: IEquipmentLootSettings; - /** Sets the max Patrol Value of the Boxzone on the map Ground Zero */ - sandboxMaxPatrolvalue: number; -} -export interface IEquipmentLootSettings { - modSpawnChancePercent: Record; -} -export interface IFixEmptyBotWavesSettings { - enabled: boolean; - ignoreMaps: string[]; -} -export interface IRogueLighthouseSpawnTimeSettings { - enabled: boolean; - waitTimeSeconds: number; -} -export interface ISplitWaveSettings { - enabled: boolean; - ignoreMaps: string[]; - waveSizeThreshold: number; -} -export interface CustomWaves { - /** Bosses spawn on raid start */ - boss: Record; - normal: Record; -} -export interface IBotTypeLimit extends MinMax { - type: string; -} -/** Multiplier to apply to the loot count for a given map */ -export interface LootMultiplier { - bigmap: number; - develop: number; - factory4_day: number; - factory4_night: number; - interchange: number; - laboratory: number; - rezervbase: number; - shoreline: number; - woods: number; - hideout: number; - lighthouse: number; - privatearea: number; - suburbs: number; - tarkovstreets: number; - terminal: number; - town: number; - sandbox: number; -} -export interface IContainerRandomistionSettings { - enabled: boolean; - /** What maps can use the container randomisation feature */ - maps: Record; - /** Some container types don't work when randomised */ - containerTypesToNotRandomise: string[]; - containerGroupMinSizeMultiplier: number; - containerGroupMaxSizeMultiplier: number; -} -export interface IScavRaidTimeSettings { - settings: IScavRaidTimeConfigSettings; - maps: Record; -} -export interface IScavRaidTimeConfigSettings { - trainArrivalDelayObservedSeconds: number; -} -export interface IScavRaidTimeLocationSettings { - /** Should loot be reduced by same percent length of raid is reduced by */ - reduceLootByPercent: boolean; - /** Smallest % of container loot that should be spawned */ - minStaticLootPercent: number; - /** Smallest % of loose loot that should be spawned */ - minDynamicLootPercent: number; - /** Chance raid time is reduced */ - reducedChancePercent: number; - /** How much should raid time be reduced - weighted */ - reductionPercentWeights: Record; - /** Should bot waves be removed / spawn times be adjusted */ - adjustWaves: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ILootConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ILootConfig.d.ts deleted file mode 100644 index e22c3ea..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ILootConfig.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Spawnpoint } 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; - /** Loose loot probability adjustments to apply on game start */ - looseLootSpawnPointAdjustments: Record>; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ILostOnDeathConfig.d.ts deleted file mode 100644 index 8574646..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ILostOnDeathConfig.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface ILostOnDeathConfig extends IBaseConfig { - kind: "spt-lostondeath"; - /** What equipment in each slot should be lost on death */ - equipment: Equipment; - /** Should special slot items be removed from quest inventory on death e.g. wifi camera/markers */ - specialSlotItems: boolean; - /** Should quest items be removed from quest inventory on death */ - questItems: boolean; -} -export interface Equipment { - ArmBand: boolean; - Headwear: boolean; - Earpiece: boolean; - FaceCover: boolean; - ArmorVest: boolean; - Eyewear: boolean; - TacticalVest: boolean; - PocketItems: boolean; - Backpack: boolean; - Holster: boolean; - FirstPrimaryWeapon: boolean; - SecondPrimaryWeapon: boolean; - Scabbard: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IMatchConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IMatchConfig.d.ts deleted file mode 100644 index f6a9b4c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IMatchConfig.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IMatchConfig extends IBaseConfig { - kind: "spt-match"; - enabled: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IPlayerScavConfig.d.ts deleted file mode 100644 index 8834768..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IPlayerScavConfig.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { GenerationData } from "@spt/models/eft/common/tables/IBotType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IPlayerScavConfig extends IBaseConfig { - kind: "spt-playerscav"; - karmaLevel: Record; -} -export interface KarmaLevel { - botTypeForLoot: string; - modifiers: Modifiers; - itemLimits: ItemLimits; - equipmentBlacklist: Record; - lootItemsToAddChancePercent: Record; -} -export interface Modifiers { - equipment: Record; - mod: Record; -} -export interface ItemLimits { - healing: GenerationData; - drugs: GenerationData; - stims: GenerationData; - looseLoot: GenerationData; - magazines: GenerationData; - grenades: GenerationData; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IPmChatResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IPmChatResponse.d.ts deleted file mode 100644 index 83fab34..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IPmChatResponse.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IPmcChatResponse extends IBaseConfig { - kind: "spt-pmcchatresponse"; - victim: IResponseSettings; - killer: IResponseSettings; -} -export interface IResponseSettings { - responseChancePercent: number; - responseTypeWeights: Record; - stripCapitalisationChancePercent: number; - allCapsChancePercent: number; - appendBroToMessageEndChancePercent: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts deleted file mode 100644 index 00fabb3..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IPmcConfig extends IBaseConfig { - kind: "spt-pmc"; - /** What game version should the PMC have */ - gameVersionWeight: Record; - /** What account type should the PMC have */ - accountTypeWeight: Record; - /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; - /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; - /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; - /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ - useDifficultyOverride: boolean; - /** Difficulty override e.g. "AsOnline/Hard" */ - difficulty: string; - /** Chance out of 100 to have a complete gun in backpack */ - looseWeaponInBackpackChancePercent: number; - /** Chance out of 100 to have an enhancement applied to PMC weapon */ - weaponHasEnhancementChancePercent: number; - /** MinMax count of weapons to have in backpack */ - looseWeaponInBackpackLootMinMax: MinMax; - /** Percentage chance PMC will be USEC */ - isUsec: number; - /** WildSpawnType enum value USEC PMCs use */ - usecType: string; - /** WildSpawnType enum value BEAR PMCs use */ - bearType: string; - chanceSameSideIsHostilePercent: number; - /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ - pmcType: Record>>; - maxBackpackLootTotalRub: number; - maxPocketLootTotalRub: number; - maxVestLootTotalRub: number; - /** Percentage chance a bot from a wave is converted into a PMC, key = bot wildspawn tpye (assault/exusec), value: min+max chance to be converted */ - convertIntoPmcChance: Record; - /** WildSpawnType bots PMCs should see as hostile */ - enemyTypes: string[]; - /** How many levels above player level can a PMC be */ - botRelativeLevelDeltaMax: number; - /** How many levels below player level can a PMC be */ - botRelativeLevelDeltaMin: number; - /** Force a number of healing items into PMCs secure container to ensure they can heal */ - forceHealingItemsIntoSecure: boolean; - allPMCsHavePlayerNameWithRandomPrefixChance: number; - locationSpecificPmcLevelOverride: Record; - /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ - addSecureContainerLootFromBotConfig: boolean; -} -export interface PmcTypes { - usec: string; - bear: string; -} -export interface SlotLootSettings { - whitelist: string[]; - blacklist: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IQuestConfig.d.ts deleted file mode 100644 index 362602c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IQuestConfig.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { ELocationName } from "@spt/models/enums/ELocationName"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IQuestConfig extends IBaseConfig { - kind: "spt-quest"; - mailRedeemTimeHours: Record; - questTemplateIds: IPlayerTypeQuestIds; - /** Show non-seasonal quests be shown to player */ - showNonSeasonalEventQuests: boolean; - eventQuests: Record; - repeatableQuests: IRepeatableQuestConfig[]; - locationIdMap: Record; - bearOnlyQuests: string[]; - usecOnlyQuests: string[]; -} -export interface IPlayerTypeQuestIds { - pmc: IQuestTypeIds; - scav: IQuestTypeIds; -} -export interface IQuestTypeIds { - Elimination: string; - Completion: string; - Exploration: string; -} -export interface IEventQuestData { - name: string; - season: SeasonalEventType; - startTimestamp: number; - endTimestamp: number; - yearly: boolean; -} -export interface IRepeatableQuestConfig { - id: string; - name: string; - side: string; - types: string[]; - resetTime: number; - numQuests: number; - minPlayerLevel: number; - rewardScaling: IRewardScaling; - locations: Record; - traderWhitelist: ITraderWhitelist[]; - questConfig: IRepeatableQuestTypesConfig; - /** Item base types to block when generating rewards */ - rewardBaseTypeBlacklist: string[]; - /** Item tplIds to ignore when generating rewards */ - rewardBlacklist: string[]; - rewardAmmoStackMinSize: number; -} -export interface IRewardScaling { - levels: number[]; - experience: number[]; - roubles: number[]; - items: number[]; - reputation: number[]; - rewardSpread: number; - skillRewardChance: number[]; - skillPointReward: number[]; -} -export interface ITraderWhitelist { - traderId: string; - questTypes: string[]; - rewardBaseWhitelist: string[]; - rewardCanBeWeapon: boolean; - weaponRewardChancePercent: number; -} -export interface IRepeatableQuestTypesConfig { - Exploration: IExploration; - Completion: ICompletion; - Pickup: IPickup; - Elimination: IEliminationConfig[]; -} -export interface IExploration extends IBaseQuestConfig { - maxExtracts: number; - maxExtractsWithSpecificExit: number; - specificExits: ISpecificExits; -} -export interface ISpecificExits { - probability: number; - passageRequirementWhitelist: string[]; -} -export interface ICompletion extends IBaseQuestConfig { - minRequestedAmount: number; - maxRequestedAmount: number; - uniqueItemCount: number; - minRequestedBulletAmount: number; - maxRequestedBulletAmount: number; - useWhitelist: boolean; - useBlacklist: boolean; -} -export interface IPickup extends IBaseQuestConfig { - ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[]; -} -export interface IPickupTypeWithMaxCount { - itemType: string; - maxPickupCount: number; - minPickupCount: number; -} -export interface IEliminationConfig extends IBaseQuestConfig { - levelRange: MinMax; - targets: ITarget[]; - bodyPartProb: number; - bodyParts: IBodyPart[]; - specificLocationProb: number; - distLocationBlacklist: string[]; - distProb: number; - maxDist: number; - minDist: number; - maxKills: number; - minKills: number; - minBossKills: number; - maxBossKills: number; - minPmcKills: number; - maxPmcKills: number; - weaponCategoryRequirementProb: number; - weaponCategoryRequirements: IWeaponRequirement[]; - weaponRequirementProb: number; - weaponRequirements: IWeaponRequirement[]; -} -export interface IBaseQuestConfig { - possibleSkillRewards: string[]; -} -export interface ITarget extends IProbabilityObject { - data: IBossInfo; -} -export interface IBossInfo { - isBoss: boolean; - isPmc: boolean; -} -export interface IBodyPart extends IProbabilityObject { - data: string[]; -} -export interface IWeaponRequirement extends IProbabilityObject { - data: string[]; -} -export interface IProbabilityObject { - key: string; - relativeProbability: number; - data?: any; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts deleted file mode 100644 index bb318de..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig, IRunIntervalValues } from "@spt/models/spt/config/IBaseConfig"; -export interface IRagfairConfig extends IBaseConfig { - kind: "spt-ragfair"; - /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ - runIntervalSeconds: number; - /** Default values used to hydrate `runIntervalSeconds` with */ - runIntervalValues: IRunIntervalValues; - /** Player listing settings */ - sell: Sell; - /** Trader ids + should their assorts be listed on flea */ - traders: Record; - dynamic: Dynamic; -} -export interface Sell { - /** Should a fee be deducted from player when liting an item for sale */ - fees: boolean; - /** Settings to control chances of offer being sold */ - chance: Chance; - /** Settings to control how long it takes for a player offer to sell */ - time: MinMax; - /** Seconds from clicking remove to remove offer from market */ - expireSeconds: number; -} -export interface Chance { - /** Base chance percent to sell an item */ - base: number; - /** Value to multiply the sell chance by */ - sellMultiplier: number; - /** Max possible sell chance % for a player listed offer */ - maxSellChancePercent: number; - /** Min possible sell chance % for a player listed offer */ - minSellChancePercent: number; -} -export interface Dynamic { - purchasesAreFoundInRaid: boolean; - /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ - useTraderPriceForOffersIfHigher: boolean; - /** Barter offer specific settings */ - barter: IBarterDetails; - pack: IPackDetails; - /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; - /** How many offers should expire before an offer regeneration occurs */ - expiredOfferThreshold: number; - /** How many offers should be listed */ - offerItemCount: MinMax; - /** How much should the price of an offer vary by (percent 0.8 = 80%, 1.2 = 120%) */ - priceRanges: IPriceRanges; - /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ - showDefaultPresetsOnly: boolean; - endTimeSeconds: MinMax; - /** Settings to control the durability range of item items listed on flea */ - condition: Condition; - /** Size stackable items should be listed for in percent of max stack size */ - stackablePercent: MinMax; - /** Items that cannot be stacked can have multiples sold in one offer, what range of values can be listed */ - nonStackableCount: MinMax; - /** Range of rating offers for items being listed */ - rating: MinMax; - /** Armor specific flea settings */ - armor: IArmorSettings; - /** A multipler to apply to individual tpls price just prior to item quality adjustment */ - itemPriceMultiplier: Record; - /** Percentages to sell offers in each currency */ - currencies: Record; - /** Item tpls that should be forced to sell as a single item */ - showAsSingleStack: string[]; - /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ - removeSeasonalItemsWhenNotInEvent: boolean; - /** Flea blacklist settings */ - blacklist: Blacklist; - /** Dict of price limits keyed by item type */ - unreasonableModPrices: Record; -} -export interface IPriceRanges { - default: MinMax; - preset: MinMax; - pack: MinMax; -} -export interface IBarterDetails { - /** Percentage change an offer is listed as a barter */ - chancePercent: number; - /** Min number of required items for a barter requirement */ - itemCountMin: number; - /** Max number of required items for a barter requirement */ - itemCountMax: number; - /** How much can the total price of requested items vary from the item offered */ - priceRangeVariancePercent: number; - /** Min rouble price for an offer to be considered for turning into a barter */ - minRoubleCostToBecomeBarter: number; - /** Item Tpls to never be turned into a barter */ - itemTypeBlacklist: string[]; -} -export interface IPackDetails { - /** Percentage change an offer is listed as a pack */ - chancePercent: number; - /** Min number of required items for a pack */ - itemCountMin: number; - /** Max number of required items for a pack */ - itemCountMax: number; - /** item types to allow being a pack */ - itemTypeWhitelist: string[]; -} -export interface OfferAdjustment { - /** Shuld offer price be adjusted when below handbook price */ - adjustPriceWhenBelowHandbookPrice: boolean; - /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ - maxPriceDifferenceBelowHandbookPercent: number; - /** How much to multiply the handbook price to get the new price */ - handbookPriceMultipier: number; - /** What is the minimum rouble price to consider adjusting price of item */ - priceThreshholdRub: number; -} -export interface Condition { - /** Percentage change durability is altered */ - conditionChance: number; - current: MinMax; - max: MinMax; -} -export interface Blacklist { - /** Damaged ammo packs */ - damagedAmmoPacks: boolean; - /** Custom blacklist for item Tpls */ - custom: string[]; - /** BSG blacklist a large number of items from flea, true = use blacklist */ - enableBsgList: boolean; - /** Should quest items be blacklisted from flea */ - enableQuestList: boolean; - /** Should trader items that are blacklisted by bsg be listed on flea */ - traderItems: boolean; - /** Maximum level an armor plate can be found in a flea-listed armor item */ - armorPlate: IArmorPlateBlacklistSettings; - /** Should specific categories be blacklisted from the flea, true = use blacklist */ - enableCustomItemCategoryList: boolean; - /** Custom category blacklist for parent Ids */ - customItemCategoryList: string[]; -} -export interface IArmorPlateBlacklistSettings { - /** Max level of plates an armor can have without being removed */ - maxProtectionLevel: number; - /** Item slots to NOT remove from items on flea */ - ignoreSlots: string[]; -} -export interface IUnreasonableModPrices { - /** Enable a system that adjusts very high ragfair prices to be below a max multiple of items the handbook values */ - enabled: boolean; - /** Multipler to start adjusting item values from, e.g. a value of 10 means any value over 10x the handbook price gets adjusted */ - handbookPriceOverMultiplier: number; - /** The new multiplier for items found using above property, e.g. a value of 4 means set items price to 4x handbook price */ - newPriceHandbookMultiplier: number; -} -export interface IArmorSettings { - /** % chance / 100 that armor plates will be removed from an offer before listing */ - removeRemovablePlateChance: number; - /** What slots are to be removed when removeRemovablePlateChance is true */ - plateSlotIdToRemovePool: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IRepairConfig.d.ts deleted file mode 100644 index 12a87fa..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IRepairConfig.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IRepairConfig extends IBaseConfig { - kind: "spt-repair"; - priceMultiplier: number; - applyRandomizeDurabilityLoss: boolean; - weaponSkillRepairGain: number; - armorKitSkillPointGainPerRepairPointMultiplier: number; - /** INT gain multiplier per repaired item type */ - repairKitIntellectGainMultiplier: IIntellectGainValues; - maxIntellectGainPerRepair: IMaxIntellectGainValues; - weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; -} -export interface IIntellectGainValues { - weapon: number; - armor: number; -} -export interface IMaxIntellectGainValues { - kit: number; - trader: number; -} -export interface IWeaponTreatmentRepairValues { - /** The chance to gain more weapon maintenance skill */ - critSuccessChance: number; - critSuccessAmount: number; - /** The chance to gain less weapon maintenance skill */ - critFailureChance: number; - critFailureAmount: number; - /** The multiplier used for calculating weapon maintenance XP */ - pointGainMultiplier: number; -} -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; -} -export interface BonusSettings { - rarityWeight: Record; - bonusTypeWeight: Record; - common: Record; - rare: Record; -} -export interface BonusValues { - valuesMinMax: MinMax; - /** What dura is buff active between (min max of current max) */ - activeDurabilityPercentMinMax: MinMax; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IScavCaseConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IScavCaseConfig.d.ts deleted file mode 100644 index c611948..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IScavCaseConfig.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IScavCaseConfig extends IBaseConfig { - kind: "spt-scavcase"; - rewardItemValueRangeRub: Record; - moneyRewards: MoneyRewards; - ammoRewards: AmmoRewards; - rewardItemParentBlacklist: string[]; - rewardItemBlacklist: string[]; - allowMultipleMoneyRewardsPerRarity: boolean; - allowMultipleAmmoRewardsPerRarity: boolean; - allowBossItemsAsRewards: boolean; -} -export interface MoneyRewards { - moneyRewardChancePercent: number; - rubCount: MoneyLevels; - usdCount: MoneyLevels; - eurCount: MoneyLevels; -} -export interface MoneyLevels { - common: MinMax; - rare: MinMax; - superrare: MinMax; -} -export interface AmmoRewards { - ammoRewardChancePercent: number; - ammoRewardBlacklist: Record; - ammoRewardValueRangeRub: Record; - minStackSize: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts deleted file mode 100644 index da7070b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface ISeasonalEventConfig extends IBaseConfig { - kind: "spt-seasonalevents"; - enableSeasonalEventDetection: boolean; - /** event / botType / equipSlot / itemid */ - eventGear: Record>>>; - events: ISeasonalEvent[]; - eventBotMapping: Record; - eventBossSpawns: Record>; - gifterSettings: GifterSetting[]; -} -export interface ISeasonalEvent { - name: string; - type: SeasonalEventType; - startDay: number; - startMonth: number; - endDay: number; - endMonth: number; -} -export interface GifterSetting { - map: string; - zones: string; - spawnChance: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts deleted file mode 100644 index a8c969c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; -export interface ITraderConfig extends IBaseConfig { - kind: "spt-trader"; - updateTime: UpdateTime[]; - purchasesAreFoundInRaid: boolean; - /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ - tradersResetFromServerStart: boolean; - updateTimeDefault: number; - traderPriceMultipler: number; - fence: FenceConfig; -} -export interface UpdateTime { - traderId: string; - /** Seconds between trader resets */ - seconds: MinMax; -} -export interface FenceConfig { - discountOptions: DiscountOptions; - partialRefreshTimeSeconds: number; - partialRefreshChangePercent: number; - assortSize: number; - weaponPresetMinMax: MinMax; - equipmentPresetMinMax: MinMax; - itemPriceMult: number; - presetPriceMult: number; - armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; - weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; - /** Key: item tpl */ - itemStackSizeOverrideMinMax: Record; - itemTypeLimits: Record; - /** Prevent duplicate offers of items of specific categories by parentId */ - preventDuplicateOffersOfCategory: string[]; - regenerateAssortsOnRefresh: boolean; - /** Max rouble price before item is not listed on flea */ - itemCategoryRoublePriceLimit: Record; - /** Each slotid with % to be removed prior to listing on fence */ - presetSlotsToRemoveChancePercent: Record; - /** Block seasonal items from appearing when season is inactive */ - blacklistSeasonalItems: boolean; - /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ - ammoMaxPenLimit: number; - blacklist: string[]; - coopExtractGift: CoopExtractReward; - btrDeliveryExpireHours: number; -} -export interface IItemDurabilityCurrentMax { - current: MinMax; - max: MinMax; -} -export interface CoopExtractReward extends LootRequest { - sendGift: boolean; - messageLocaleIds: string[]; - giftExpiryHours: number; -} -export interface DiscountOptions { - assortSize: number; - itemPriceMult: number; - presetPriceMult: number; - weaponPresetMinMax: MinMax; - equipmentPresetMinMax: MinMax; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IWeatherConfig.d.ts deleted file mode 100644 index 970ade5..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IWeatherConfig.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Season } from "@spt/models/enums/Season"; -import { WindDirection } from "@spt/models/enums/WindDirection"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -export interface IWeatherConfig extends IBaseConfig { - kind: "spt-weather"; - acceleration: number; - weather: Weather; - seasonDates: ISeasonDateTimes[]; - overrideSeason?: Season; -} -export interface ISeasonDateTimes { - seasonType: Season; - name: string; - startDay: number; - startMonth: number; - endDay: number; - endMonth: number; -} -export interface Weather { - clouds: WeatherSettings; - windSpeed: WeatherSettings; - windDirection: WeatherSettings; - windGustiness: MinMax; - rain: WeatherSettings; - rainIntensity: MinMax; - fog: WeatherSettings; - temp: MinMax; - pressure: MinMax; -} -export interface WeatherSettings { - values: T[]; - weights: number[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/controllers/IBotController.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/controllers/IBotController.d.ts deleted file mode 100644 index e577497..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/controllers/IBotController.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; -import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; -export interface IBotController { - getBotLimit(type: string): number; - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - isBotPmc(botRole: string): boolean; - isBotBoss(botRole: string): boolean; - isBotFollower(botRole: string): boolean; - generate(info: IGenerateBotsRequestData, playerScav: boolean): IBotBase[]; - getBotCap(): number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/dialog/ISendMessageDetails.d.ts deleted file mode 100644 index 379b032..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/dialog/ISendMessageDetails.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { Traders } from "@spt/models/enums/Traders"; -export interface ISendMessageDetails { - /** Player id */ - recipientId: string; - /** Who is sending this message */ - sender: MessageType; - /** Optional - leave blank to use sender value */ - dialogType?: MessageType; - /** Optional - if sender is USER these details are used */ - senderDetails?: IUserDialogInfo; - /** Optional - the trader sending the message */ - trader?: Traders; - /** Optional - used in player/system messages, otherwise templateId is used */ - messageText?: string; - /** Optinal - Items to send to player */ - items?: Item[]; - /** Optional - How long items will be stored in mail before expiry */ - itemsMaxStorageLifetimeSeconds?: number; - /** Optional - Used when sending messages from traders who send text from locale json */ - templateId?: string; - /** Optional - ragfair related */ - systemData?: ISystemData; - /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; - /** OPTIONAL - allows modification of profile settings via mail */ - profileChangeEvents?: IProfileChangeEvent[]; -} -export interface IProfileChangeEvent { - _id: string; - Type: ProfileChangeEventType; - value: number; - entity?: string; -} -export declare enum ProfileChangeEventType { - TRADER_SALES_SUM = "TraderSalesSum", - TRADER_STANDING = "TraderStanding", - PROFILE_LEVEL = "ProfileLevel", - SKILL_POINTS = "SkillPoints", - EXAMINE_ALL_ITEMS = "ExamineAllItems", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/fence/ICreateFenceAssortsResult.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/fence/ICreateFenceAssortsResult.d.ts deleted file mode 100644 index 553f4e2..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/fence/ICreateFenceAssortsResult.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -export interface ICreateFenceAssortsResult { - sptItems: Item[][]; - barter_scheme: Record; - loyal_level_items: Record; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/fence/IFenceAssortGenerationValues.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/fence/IFenceAssortGenerationValues.d.ts deleted file mode 100644 index dea4726..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/fence/IFenceAssortGenerationValues.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IFenceAssortGenerationValues { - normal: IGenerationAssortValues; - discount: IGenerationAssortValues; -} -export interface IGenerationAssortValues { - item: number; - weaponPreset: number; - equipmentPreset: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/generators/IBotGenerator.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/generators/IBotGenerator.d.ts deleted file mode 100644 index e46ce24..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/generators/IBotGenerator.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Inventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; -import { Chances, Generation, Inventory } from "@spt/models/eft/common/tables/IBotType"; -export interface IBotGenerator { - generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/generators/ILocationGenerator.d.ts deleted file mode 100644 index 2df98e7..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/generators/ILocationGenerator.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; -import { ILooseLoot, SpawnpointTemplate } from "@spt/models/eft/common/ILooseLoot"; -export interface ILocationGenerator { - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/generators/IPMCLootGenerator.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/generators/IPMCLootGenerator.d.ts deleted file mode 100644 index a9db89b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/generators/IPMCLootGenerator.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IPMCLootGenerator { - generatePMCPocketLootPool(): string[]; - generatePMCBackpackLootPool(): string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/generators/IRagfairAssortGenerator.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/generators/IRagfairAssortGenerator.d.ts deleted file mode 100644 index 193b685..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/generators/IRagfairAssortGenerator.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -export interface IRagfairAssortGenerator { - getAssortItems(): Item[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/generators/IRagfairOfferGenerator.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/generators/IRagfairOfferGenerator.d.ts deleted file mode 100644 index 66d28e9..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/generators/IRagfairOfferGenerator.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -export interface IRagfairOfferGenerator { - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece: boolean): IRagfairOffer; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts deleted file mode 100644 index ee1893d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; -} -export interface RewardCountAndPriceDetails { - minCount: number; - maxCount: number; - minPriceRub: number; - maxPriceRub: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/location/IRaidChanges.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/location/IRaidChanges.d.ts deleted file mode 100644 index b7a989b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/location/IRaidChanges.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface IRaidChanges { - /** What percentage of dynamic loot should the map contain */ - dynamicLootPercent: number; - /** What percentage of static loot should the map contain */ - staticLootPercent: number; - /** How many seconds into the raid is the player simulated to spawn in at */ - simulatedRaidStartSeconds: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/logging/IClientLogRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/logging/IClientLogRequest.d.ts deleted file mode 100644 index 71f0b38..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/logging/IClientLogRequest.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { LogLevel } from "@spt/models/spt/logging/LogLevel"; -export interface IClientLogRequest { - Source: string; - Level: LogLevel | string; - Message: string; - Color?: string; - BackgroundColor?: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/logging/LogBackgroundColor.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/logging/LogBackgroundColor.d.ts deleted file mode 100644 index 1dd369b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/logging/LogBackgroundColor.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare enum LogBackgroundColor { - DEFAULT = "", - BLACK = "blackBG", - RED = "redBG", - GREEN = "greenBG", - YELLOW = "yellowBG", - BLUE = "blueBG", - MAGENTA = "magentaBG", - CYAN = "cyanBG", - WHITE = "whiteBG" -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/logging/LogLevel.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/logging/LogLevel.d.ts deleted file mode 100644 index 567733b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/logging/LogLevel.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum LogLevel { - ERROR = 0, - WARN = 1, - SUCCESS = 2, - INFO = 3, - CUSTOM = 4, - DEBUG = 5 -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/logging/LogTextColor.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/logging/LogTextColor.d.ts deleted file mode 100644 index aefca2a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/logging/LogTextColor.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare enum LogTextColor { - BLACK = "black", - RED = "red", - GREEN = "green", - YELLOW = "yellow", - BLUE = "blue", - MAGENTA = "magenta", - CYAN = "cyan", - WHITE = "white", - GRAY = "gray" -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/logging/SptLogger.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/logging/SptLogger.d.ts deleted file mode 100644 index ea1b3d8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/logging/SptLogger.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface SptLogger { - error: (msg: string | Record) => void; - warn: (msg: string | Record) => void; - succ?: (msg: string | Record) => void; - info: (msg: string | Record) => void; - debug: (msg: string | Record) => void; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/mod/IModLoader.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/mod/IModLoader.d.ts deleted file mode 100644 index 9a71f61..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/mod/IModLoader.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -export interface IModLoader { - load(container: DependencyContainer): void; - getModPath(mod: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/mod/IPackageJsonData.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/mod/IPackageJsonData.d.ts deleted file mode 100644 index d21e5f1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/mod/IPackageJsonData.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface IPackageJsonData { - incompatibilities?: string[]; - loadBefore?: string[]; - loadAfter?: string[]; - dependencies?: Record; - modDependencies?: Record; - name: string; - url: string; - author: string; - version: string; - sptVersion: string; - /** We deliberately purge this data */ - scripts: Record; - devDependencies: Record; - licence: string; - main: string; - isBundleMod: boolean; - contributors: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/mod/NewItemDetails.d.ts deleted file mode 100644 index 65996c1..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/mod/NewItemDetails.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare abstract class NewItemDetailsBase { - /** Price of the item on flea market */ - fleaPriceRoubles: number; - /** Price of the item in the handbook */ - handbookPriceRoubles: number; - /** Handbook ParentId for the new item */ - handbookParentId: string; - /** - * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) - * If a language is not included, the first item in the array will be used in its place - */ - locales: Record; -} -export declare class NewItemFromCloneDetails extends NewItemDetailsBase { - /** Id of the item to copy and use as a base */ - itemTplToClone: string; - /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; - /** ParentId for the new item (item type) */ - parentId: string; - /** - * the id the new item should have, leave blank to have one generated for you - * This is often known as the TplId, or TemplateId - */ - newId: string; -} -export declare class NewItemDetails extends NewItemDetailsBase { - newItem: ITemplateItem; -} -export declare class LocaleDetails { - name: string; - shortName: string; - description: string; -} -export declare class CreateItemResult { - constructor(); - success: boolean; - itemId: string; - errors: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/ragfair/IRagfairServerPrices.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/ragfair/IRagfairServerPrices.d.ts deleted file mode 100644 index c7d246a..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/ragfair/IRagfairServerPrices.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IRagfairServerPrices { - static: Record; - dynamic: Record; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/repeatable/IQuestTypePool.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/repeatable/IQuestTypePool.d.ts deleted file mode 100644 index 200303b..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/repeatable/IQuestTypePool.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { ELocationName } from "@spt/models/enums/ELocationName"; -export interface IQuestTypePool { - types: string[]; - pool: IQuestPool; -} -export interface IQuestPool { - Exploration: IExplorationPool; - Elimination: IEliminationPool; - Pickup: IExplorationPool; -} -export interface IExplorationPool { - locations: Partial>; -} -export interface IEliminationPool { - targets: IEliminationTargetPool; -} -export interface IEliminationTargetPool { - Savage?: ITargetLocation; - AnyPmc?: ITargetLocation; - bossBully?: ITargetLocation; - bossGluhar?: ITargetLocation; - bossKilla?: ITargetLocation; - bossSanitar?: ITargetLocation; - bossTagilla?: ITargetLocation; - bossKnight?: ITargetLocation; - bossZryachiy?: ITargetLocation; - bossBoar?: ITargetLocation; - bossBoarSniper?: ITargetLocation; -} -export interface ITargetLocation { - locations: string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/server/ExhaustableArray.d.ts deleted file mode 100644 index 2419acf..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/server/ExhaustableArray.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class ExhaustableArray implements IExhaustableArray { - private itemPool; - private randomUtil; - private cloner; - private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); - getRandomValue(): T; - getFirstValue(): T; - hasValues(): boolean; -} -export interface IExhaustableArray { - getRandomValue(): T; - getFirstValue(): T; - hasValues(): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/server/IDatabaseTables.d.ts deleted file mode 100644 index 3a98412..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/server/IDatabaseTables.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; -import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem"; -import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; -import { IMatch } from "@spt/models/eft/common/tables/IMatch"; -import { IProfileTemplates } from "@spt/models/eft/common/tables/IProfileTemplate"; -import { IQuest } from "@spt/models/eft/common/tables/IQuest"; -import { IRepeatableQuestDatabase } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ITrader } from "@spt/models/eft/common/tables/ITrader"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; -import { IDefaultEquipmentPreset } from "@spt/models/eft/profile/ISptProfile"; -import { ILocaleBase } from "@spt/models/spt/server/ILocaleBase"; -import { ILocations } from "@spt/models/spt/server/ILocations"; -import { IServerBase } from "@spt/models/spt/server/IServerBase"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDatabaseTables { - bots?: { - types: Record; - base: IBotBase; - core: IBotCore; - }; - hideout?: { - areas: IHideoutArea[]; - production: IHideoutProduction[]; - scavcase: IHideoutScavCase[]; - settings: IHideoutSettingsBase; - qte: IQteData[]; - }; - locales?: ILocaleBase; - locations?: ILocations; - match?: IMatch; - templates?: { - character: string[]; - items: Record; - quests: Record; - repeatableQuests: IRepeatableQuestDatabase; - handbook: IHandbookBase; - customization: Record; - /** The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec) */ - profiles: IProfileTemplates; - /** Flea prices of items - gathered from online flea market dump */ - prices: Record; - /** Default equipment loadouts that show on main inventory screen */ - defaultEquipmentPresets: IDefaultEquipmentPreset[]; - /** Achievements */ - achievements: IAchievement[]; - }; - traders?: Record; - globals?: IGlobals; - server?: IServerBase; - settings?: ISettingsBase; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/server/ILocaleBase.d.ts deleted file mode 100644 index 3004cb8..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/server/ILocaleBase.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface ILocaleBase { - global: Record>; - menu: Record; - languages: Record; - server: Record>; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/server/ILocations.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/server/ILocations.d.ts deleted file mode 100644 index 500efcc..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/server/ILocations.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ILocation } from "@spt/models/eft/common/ILocation"; -import { ILocationsBase } from "@spt/models/eft/common/tables/ILocationsBase"; -export interface ILocations { - bigmap?: ILocation; - develop?: ILocation; - factory4_day?: ILocation; - factory4_night?: ILocation; - hideout?: ILocation; - interchange?: ILocation; - laboratory?: ILocation; - lighthouse?: ILocation; - privatearea?: ILocation; - rezervbase?: ILocation; - shoreline?: ILocation; - suburbs?: ILocation; - tarkovstreets?: ILocation; - terminal?: ILocation; - town?: ILocation; - woods?: ILocation; - sandbox?: ILocation; - sandbox_high?: ILocation; - /** Holds a mapping of the linkages between locations on the UI */ - base?: ILocationsBase; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/server/IServerBase.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/server/IServerBase.d.ts deleted file mode 100644 index d033db3..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/server/IServerBase.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IServerBase { - ip: string; - port: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/server/ISettingsBase.d.ts deleted file mode 100644 index 6be2ad4..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/server/ISettingsBase.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -export interface ISettingsBase { - config: Config; -} -export interface Config { - AFKTimeoutSeconds: number; - AdditionalRandomDelaySeconds: number; - ClientSendRateLimit: number; - CriticalRetriesCount: number; - DefaultRetriesCount: number; - FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; - GroupStatusInterval: number; - GroupStatusButtonInterval: number; - KeepAliveInterval: number; - LobbyKeepAliveInterval: number; - Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; - NVidiaHighlights: boolean; - NextCycleDelaySeconds: number; - PingServerResultSendInterval: number; - PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; - RequestConfirmationTimeouts: number[]; - RequestsMadeThroughLobby: string[]; - SecondCycleDelaySeconds: number; - ShouldEstablishLobbyConnection: boolean; - TurnOffLogging: boolean; - WeaponOverlapDistanceCulling: number; - WebDiagnosticsEnabled: boolean; - NetworkStateView: INetworkStateView; -} -export interface FramerateLimit { - MaxFramerateGameLimit: number; - MaxFramerateLobbyLimit: number; - MinFramerateLimit: number; -} -export interface MemoryManagementSettings { - AggressiveGC: boolean; - GigabytesRequiredToDisableGCDuringRaid: number; - HeapPreAllocationEnabled: boolean; - HeapPreAllocationMB: number; - OverrideRamCleanerSettings: boolean; - RamCleanerEnabled: boolean; -} -export interface ReleaseProfiler { - Enabled: boolean; - MaxRecords: number; - RecordTriggerValue: number; -} -export interface INetworkStateView { - LossThreshold: number; - RttThreshold: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/CustomPreset.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/IInsuranceEquipmentPkg.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/IInsuranceEquipmentPkg.d.ts deleted file mode 100644 index 92d0565..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/IInsuranceEquipmentPkg.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -export interface IInsuranceEquipmentPkg { - sessionID: string; - pmcData: IPmcData; - itemToReturnToPlayer: Item; - traderId: string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/ITraderServiceModel.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/ITraderServiceModel.d.ts deleted file mode 100644 index 165b65c..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/ITraderServiceModel.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { TraderServiceType } from "@spt/models/enums/TraderServiceType"; -export interface ITraderServiceModel { - serviceType: TraderServiceType; - itemsToPay?: { - [key: string]: number; - }; - itemsToReceive?: string[]; - subServices?: { - [key: string]: number; - }; - requirements?: ITraderServiceRequirementsModel; -} -export interface ITraderServiceRequirementsModel { - completedQuests?: string[]; - standings?: { - [key: string]: number; - }; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/LootItem.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/LootItem.d.ts deleted file mode 100644 index acb7606..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/LootItem.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class LootItem { - id?: string; - tpl: string; - isPreset: boolean; - stackCount: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/LootRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index 9f028a6..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/utils/IAsyncQueue.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/utils/IAsyncQueue.d.ts deleted file mode 100644 index 4bc9199..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/utils/IAsyncQueue.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ICommand } from "@spt/models/spt/utils/ICommand"; -export interface IAsyncQueue { - waitFor(command: ICommand): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/utils/ICommand.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/utils/ICommand.d.ts deleted file mode 100644 index 696bb83..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/utils/ICommand.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ICommand { - uuid: string; - cmd: () => Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/utils/ILogger.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/utils/ILogger.d.ts deleted file mode 100644 index 1b9726d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/utils/ILogger.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; -import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; -export interface ILogger { - writeToLogFile(data: string | Daum): void; - log(data: string | Record | Error, color: string, backgroundColor?: string): void; - logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; - error(data: string): void; - warning(data: string): void; - success(data: string): void; - info(data: string): void; - debug(data: string | Record, onlyShowInConsole?: boolean): void; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/EventOutputHolder.d.ts b/TypeScript/22CustomSptCommand/types/routers/EventOutputHolder.d.ts deleted file mode 100644 index a943e2b..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/EventOutputHolder.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class EventOutputHolder { - protected profileHelper: ProfileHelper; - protected timeUtil: TimeUtil; - protected cloner: ICloner; - /** What has client been informed of this game session */ - protected clientActiveSessionStorage: Record; - constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); - protected output: IItemEventRouterResponse; - getOutput(sessionID: string): IItemEventRouterResponse; - /** - * Reset the response object to a default state - * Occurs prior to event being handled by server - * @param sessionID Players id - */ - resetOutput(sessionID: string): void; - /** - * Update output object with most recent values from player profile - * @param sessionId Session id - */ - updateOutputProperties(sessionId: string): void; - /** - * Convert the internal trader data object into an object we can send to the client - * @param traderData server data for traders - * @returns dict of trader id + TraderData - */ - protected constructTraderRelations(traderData: Record): Record; - /** - * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true - * @param pmcData Player profile - * @returns dictionary of hideout improvements - */ - protected getImprovementsFromProfileAndFlagComplete(pmcData: IPmcData): Record; - /** - * Return productions from player profile except those completed crafts the client has already seen - * @param pmcData Player profile - * @returns dictionary of hideout productions - */ - protected getProductionsFromProfileAndFlagComplete(productions: Record): Record; - /** - * 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; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/HttpRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/HttpRouter.d.ts deleted file mode 100644 index 3fdb53f..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/HttpRouter.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { IncomingMessage } from "node:http"; -import { DynamicRouter, Router, StaticRouter } from "@spt/di/Router"; -export declare class HttpRouter { - protected staticRouters: StaticRouter[]; - protected dynamicRoutes: DynamicRouter[]; - constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; -} -declare class ResponseWrapper { - output: string; - constructor(output: string); -} -export {}; diff --git a/TypeScript/22CustomSptCommand/types/routers/ImageRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/ImageRouter.d.ts deleted file mode 100644 index eb3697f..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/ImageRouter.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -import { ImageRouteService } from "@spt/services/mod/image/ImageRouteService"; -import { HttpFileUtil } from "@spt/utils/HttpFileUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class ImageRouter { - protected vfs: VFS; - protected imageRouteService: ImageRouteService; - protected httpFileUtil: HttpFileUtil; - constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); - addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; - getImage(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/ItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/ItemEventRouter.d.ts deleted file mode 100644 index f8043c0..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/ItemEventRouter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ItemEventRouterDefinition } from "@spt/di/Router"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IItemEventRouterRequest } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ItemEventRouter { - protected logger: ILogger; - protected profileHelper: ProfileHelper; - protected itemEventRouters: ItemEventRouterDefinition[]; - protected localisationService: LocalisationService; - protected eventOutputHolder: EventOutputHolder; - protected cloner: ICloner; - constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); - /** - * @param info Event request - * @param sessionID Session id - * @returns Item response - */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/dynamic/BotDynamicRouter.d.ts deleted file mode 100644 index 9b1131d..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/dynamic/BotDynamicRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { BotCallbacks } from "@spt/callbacks/BotCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; -export declare class BotDynamicRouter extends DynamicRouter { - protected botCallbacks: BotCallbacks; - constructor(botCallbacks: BotCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/dynamic/BundleDynamicRouter.d.ts deleted file mode 100644 index c552c6d..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/dynamic/BundleDynamicRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { BundleCallbacks } from "@spt/callbacks/BundleCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; -export declare class BundleDynamicRouter extends DynamicRouter { - protected bundleCallbacks: BundleCallbacks; - constructor(bundleCallbacks: BundleCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/dynamic/CustomizationDynamicRouter.d.ts deleted file mode 100644 index b7f4956..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { CustomizationCallbacks } from "@spt/callbacks/CustomizationCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; -export declare class CustomizationDynamicRouter extends DynamicRouter { - protected customizationCallbacks: CustomizationCallbacks; - constructor(customizationCallbacks: CustomizationCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/dynamic/DataDynamicRouter.d.ts deleted file mode 100644 index d71fde1..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/dynamic/DataDynamicRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { DataCallbacks } from "@spt/callbacks/DataCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; -export declare class DataDynamicRouter extends DynamicRouter { - protected dataCallbacks: DataCallbacks; - constructor(dataCallbacks: DataCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/dynamic/HttpDynamicRouter.d.ts deleted file mode 100644 index 01d1ffb..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/dynamic/HttpDynamicRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { DynamicRouter } from "@spt/di/Router"; -import { ImageRouter } from "@spt/routers/ImageRouter"; -export declare class HttpDynamicRouter extends DynamicRouter { - protected imageRouter: ImageRouter; - constructor(imageRouter: ImageRouter); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/dynamic/InraidDynamicRouter.d.ts deleted file mode 100644 index e4cf1eb..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/dynamic/InraidDynamicRouter.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InraidCallbacks } from "@spt/callbacks/InraidCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; -export declare class InraidDynamicRouter extends DynamicRouter { - protected inraidCallbacks: InraidCallbacks; - constructor(inraidCallbacks: InraidCallbacks); - getTopLevelRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/dynamic/LocationDynamicRouter.d.ts deleted file mode 100644 index a52f8d6..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/dynamic/LocationDynamicRouter.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { LocationCallbacks } from "@spt/callbacks/LocationCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; -export declare class LocationDynamicRouter extends DynamicRouter { - protected locationCallbacks: LocationCallbacks; - constructor(locationCallbacks: LocationCallbacks); - getTopLevelRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/dynamic/NotifierDynamicRouter.d.ts deleted file mode 100644 index c00c80e..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { NotifierCallbacks } from "@spt/callbacks/NotifierCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; -export declare class NotifierDynamicRouter extends DynamicRouter { - protected notifierCallbacks: NotifierCallbacks; - constructor(notifierCallbacks: NotifierCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/dynamic/TraderDynamicRouter.d.ts deleted file mode 100644 index cdd6b71..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/dynamic/TraderDynamicRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { TraderCallbacks } from "@spt/callbacks/TraderCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; -export declare class TraderDynamicRouter extends DynamicRouter { - protected traderCallbacks: TraderCallbacks; - constructor(traderCallbacks: TraderCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts deleted file mode 100644 index c9babf3..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { CustomizationCallbacks } from "@spt/callbacks/CustomizationCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - protected customizationCallbacks: CustomizationCallbacks; - constructor(customizationCallbacks: CustomizationCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/HealthItemEventRouter.d.ts deleted file mode 100644 index 490884f..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/HealthItemEventRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { HealthCallbacks } from "@spt/callbacks/HealthCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - protected healthCallbacks: HealthCallbacks; - constructor(healthCallbacks: HealthCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/HideoutItemEventRouter.d.ts deleted file mode 100644 index 6839fee..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/HideoutItemEventRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { HideoutCallbacks } from "@spt/callbacks/HideoutCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - protected hideoutCallbacks: HideoutCallbacks; - constructor(hideoutCallbacks: HideoutCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts deleted file mode 100644 index af2b3dc..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { InsuranceCallbacks } from "@spt/callbacks/InsuranceCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - protected insuranceCallbacks: InsuranceCallbacks; - constructor(insuranceCallbacks: InsuranceCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/InventoryItemEventRouter.d.ts deleted file mode 100644 index 660de81..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/InventoryItemEventRouter.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { HideoutCallbacks } from "@spt/callbacks/HideoutCallbacks"; -import { InventoryCallbacks } from "@spt/callbacks/InventoryCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - protected inventoryCallbacks: InventoryCallbacks; - protected hideoutCallbacks: HideoutCallbacks; - constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/NoteItemEventRouter.d.ts deleted file mode 100644 index b415c3a..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/NoteItemEventRouter.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NoteCallbacks } from "@spt/callbacks/NoteCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; -export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - protected noteCallbacks: NoteCallbacks; - constructor(noteCallbacks: NoteCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/QuestItemEventRouter.d.ts deleted file mode 100644 index 1ce94f9..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/QuestItemEventRouter.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { QuestCallbacks } from "@spt/callbacks/QuestCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - protected logger: ILogger; - protected questCallbacks: QuestCallbacks; - constructor(logger: ILogger, questCallbacks: QuestCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/RagfairItemEventRouter.d.ts deleted file mode 100644 index 09cdbf6..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/RagfairItemEventRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { RagfairCallbacks } from "@spt/callbacks/RagfairCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - protected ragfairCallbacks: RagfairCallbacks; - constructor(ragfairCallbacks: RagfairCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/RepairItemEventRouter.d.ts deleted file mode 100644 index d2f857d..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/RepairItemEventRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { RepairCallbacks } from "@spt/callbacks/RepairCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - protected repairCallbacks: RepairCallbacks; - constructor(repairCallbacks: RepairCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/TradeItemEventRouter.d.ts deleted file mode 100644 index 5617ab3..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/TradeItemEventRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { TradeCallbacks } from "@spt/callbacks/TradeCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - protected tradeCallbacks: TradeCallbacks; - constructor(tradeCallbacks: TradeCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/item_events/WishlistItemEventRouter.d.ts deleted file mode 100644 index bc6d257..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/item_events/WishlistItemEventRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { WishlistCallbacks } from "@spt/callbacks/WishlistCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - protected wishlistCallbacks: WishlistCallbacks; - constructor(wishlistCallbacks: WishlistCallbacks); - getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/save_load/HealthSaveLoadRouter.d.ts deleted file mode 100644 index df04248..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -export declare class HealthSaveLoadRouter extends SaveLoadRouter { - getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/save_load/InraidSaveLoadRouter.d.ts deleted file mode 100644 index 3ea61fa..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -export declare class InraidSaveLoadRouter extends SaveLoadRouter { - getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/save_load/InsuranceSaveLoadRouter.d.ts deleted file mode 100644 index ba8cb8a..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/save_load/ProfileSaveLoadRouter.d.ts deleted file mode 100644 index 77d50bd..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/22CustomSptCommand/types/routers/serializers/BundleSerializer.d.ts deleted file mode 100644 index dc71cd8..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/serializers/BundleSerializer.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -import { Serializer } from "@spt/di/Serializer"; -import { BundleLoader } from "@spt/loaders/BundleLoader"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HttpFileUtil } from "@spt/utils/HttpFileUtil"; -export declare class BundleSerializer extends Serializer { - protected logger: ILogger; - protected bundleLoader: BundleLoader; - protected httpFileUtil: HttpFileUtil; - constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; - canHandle(route: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/22CustomSptCommand/types/routers/serializers/ImageSerializer.d.ts deleted file mode 100644 index 5c77243..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/serializers/ImageSerializer.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -import { Serializer } from "@spt/di/Serializer"; -import { ImageRouter } from "@spt/routers/ImageRouter"; -export declare class ImageSerializer extends Serializer { - protected imageRouter: ImageRouter; - constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; - canHandle(route: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/22CustomSptCommand/types/routers/serializers/NotifySerializer.d.ts deleted file mode 100644 index 8c07f81..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/serializers/NotifySerializer.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -import { NotifierController } from "@spt/controllers/NotifierController"; -import { Serializer } from "@spt/di/Serializer"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -export declare class NotifySerializer extends Serializer { - protected notifierController: NotifierController; - protected jsonUtil: JsonUtil; - protected httpServerHelper: HttpServerHelper; - constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; - canHandle(route: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/AchievementStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/AchievementStaticRouter.d.ts deleted file mode 100644 index 80e3ae6..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/AchievementStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AchievementCallbacks } from "@spt/callbacks/AchievementCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class AchievementStaticRouter extends StaticRouter { - protected achievementCallbacks: AchievementCallbacks; - constructor(achievementCallbacks: AchievementCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/BotStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/BotStaticRouter.d.ts deleted file mode 100644 index 2a164a5..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/BotStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { BotCallbacks } from "@spt/callbacks/BotCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class BotStaticRouter extends StaticRouter { - protected botCallbacks: BotCallbacks; - constructor(botCallbacks: BotCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/BuildStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/BuildStaticRouter.d.ts deleted file mode 100644 index c5c3a5e..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/BuildStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { BuildsCallbacks } from "@spt/callbacks/BuildsCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class BuildsStaticRouter extends StaticRouter { - protected buildsCallbacks: BuildsCallbacks; - constructor(buildsCallbacks: BuildsCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/BundleStaticRouter.d.ts deleted file mode 100644 index 070d981..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/BundleStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { BundleCallbacks } from "@spt/callbacks/BundleCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class BundleStaticRouter extends StaticRouter { - protected bundleCallbacks: BundleCallbacks; - constructor(bundleCallbacks: BundleCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/ClientLogStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/ClientLogStaticRouter.d.ts deleted file mode 100644 index 2df39ad..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/ClientLogStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ClientLogCallbacks } from "@spt/callbacks/ClientLogCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class ClientLogStaticRouter extends StaticRouter { - protected clientLogCallbacks: ClientLogCallbacks; - constructor(clientLogCallbacks: ClientLogCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/CustomizationStaticRouter.d.ts deleted file mode 100644 index 5d80536..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/CustomizationStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { CustomizationCallbacks } from "@spt/callbacks/CustomizationCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class CustomizationStaticRouter extends StaticRouter { - protected customizationCallbacks: CustomizationCallbacks; - constructor(customizationCallbacks: CustomizationCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/DataStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/DataStaticRouter.d.ts deleted file mode 100644 index f59a136..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/DataStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { DataCallbacks } from "@spt/callbacks/DataCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class DataStaticRouter extends StaticRouter { - protected dataCallbacks: DataCallbacks; - constructor(dataCallbacks: DataCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/DialogStaticRouter.d.ts deleted file mode 100644 index 5a17ba4..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/DialogStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { DialogueCallbacks } from "@spt/callbacks/DialogueCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class DialogStaticRouter extends StaticRouter { - protected dialogueCallbacks: DialogueCallbacks; - constructor(dialogueCallbacks: DialogueCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/GameStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/GameStaticRouter.d.ts deleted file mode 100644 index bf045af..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/GameStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { GameCallbacks } from "@spt/callbacks/GameCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class GameStaticRouter extends StaticRouter { - protected gameCallbacks: GameCallbacks; - constructor(gameCallbacks: GameCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/HealthStaticRouter.d.ts deleted file mode 100644 index d968017..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/HealthStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { HealthCallbacks } from "@spt/callbacks/HealthCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class HealthStaticRouter extends StaticRouter { - protected healthCallbacks: HealthCallbacks; - constructor(healthCallbacks: HealthCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/InraidStaticRouter.d.ts deleted file mode 100644 index 2a0da3c..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/InraidStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { InraidCallbacks } from "@spt/callbacks/InraidCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class InraidStaticRouter extends StaticRouter { - protected inraidCallbacks: InraidCallbacks; - constructor(inraidCallbacks: InraidCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/InsuranceStaticRouter.d.ts deleted file mode 100644 index 99e394f..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/InsuranceStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { InsuranceCallbacks } from "@spt/callbacks/InsuranceCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class InsuranceStaticRouter extends StaticRouter { - protected insuranceCallbacks: InsuranceCallbacks; - constructor(insuranceCallbacks: InsuranceCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/ItemEventStaticRouter.d.ts deleted file mode 100644 index b23856d..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/ItemEventStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ItemEventCallbacks } from "@spt/callbacks/ItemEventCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class ItemEventStaticRouter extends StaticRouter { - protected itemEventCallbacks: ItemEventCallbacks; - constructor(itemEventCallbacks: ItemEventCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/LauncherStaticRouter.d.ts deleted file mode 100644 index 08312d2..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/LauncherStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { LauncherCallbacks } from "@spt/callbacks/LauncherCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class LauncherStaticRouter extends StaticRouter { - protected launcherCallbacks: LauncherCallbacks; - constructor(launcherCallbacks: LauncherCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/LocationStaticRouter.d.ts deleted file mode 100644 index 9a2e16c..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/LocationStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { LocationCallbacks } from "@spt/callbacks/LocationCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class LocationStaticRouter extends StaticRouter { - protected locationCallbacks: LocationCallbacks; - constructor(locationCallbacks: LocationCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/MatchStaticRouter.d.ts deleted file mode 100644 index 955ce34..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/MatchStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { MatchCallbacks } from "@spt/callbacks/MatchCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class MatchStaticRouter extends StaticRouter { - protected matchCallbacks: MatchCallbacks; - constructor(matchCallbacks: MatchCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/NotifierStaticRouter.d.ts deleted file mode 100644 index 7cb4756..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/NotifierStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { NotifierCallbacks } from "@spt/callbacks/NotifierCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class NotifierStaticRouter extends StaticRouter { - protected notifierCallbacks: NotifierCallbacks; - constructor(notifierCallbacks: NotifierCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/ProfileStaticRouter.d.ts deleted file mode 100644 index cb6aa84..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/ProfileStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ProfileCallbacks } from "@spt/callbacks/ProfileCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class ProfileStaticRouter extends StaticRouter { - protected profileCallbacks: ProfileCallbacks; - constructor(profileCallbacks: ProfileCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/QuestStaticRouter.d.ts deleted file mode 100644 index 9c0e710..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/QuestStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { QuestCallbacks } from "@spt/callbacks/QuestCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class QuestStaticRouter extends StaticRouter { - protected questCallbacks: QuestCallbacks; - constructor(questCallbacks: QuestCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/RagfairStaticRouter.d.ts deleted file mode 100644 index 475e1ee..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/RagfairStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RagfairCallbacks } from "@spt/callbacks/RagfairCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class RagfairStaticRouter extends StaticRouter { - protected ragfairCallbacks: RagfairCallbacks; - constructor(ragfairCallbacks: RagfairCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/TraderStaticRouter.d.ts deleted file mode 100644 index e7d5ee1..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/TraderStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { TraderCallbacks } from "@spt/callbacks/TraderCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class TraderStaticRouter extends StaticRouter { - protected traderCallbacks: TraderCallbacks; - constructor(traderCallbacks: TraderCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/static/WeatherStaticRouter.d.ts deleted file mode 100644 index d3055e6..0000000 --- a/TypeScript/22CustomSptCommand/types/routers/static/WeatherStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { WeatherCallbacks } from "@spt/callbacks/WeatherCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class WeatherStaticRouter extends StaticRouter { - protected weatherCallbacks: WeatherCallbacks; - constructor(weatherCallbacks: WeatherCallbacks); -} diff --git a/TypeScript/22CustomSptCommand/types/servers/ConfigServer.d.ts b/TypeScript/22CustomSptCommand/types/servers/ConfigServer.d.ts deleted file mode 100644 index 6f9bc83..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/ConfigServer.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class ConfigServer { - protected logger: ILogger; - protected vfs: VFS; - protected jsonUtil: JsonUtil; - protected configs: Record; - protected readonly acceptableFileExtensions: string[]; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); - getConfig(configType: ConfigTypes): T; - getConfigByString(configType: string): T; - initialize(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/DatabaseServer.d.ts b/TypeScript/22CustomSptCommand/types/servers/DatabaseServer.d.ts deleted file mode 100644 index c198a87..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/DatabaseServer.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables"; -export declare class DatabaseServer { - protected tableData: IDatabaseTables; - getTables(): IDatabaseTables; - setTables(tableData: IDatabaseTables): void; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/HttpServer.d.ts b/TypeScript/22CustomSptCommand/types/servers/HttpServer.d.ts deleted file mode 100644 index b00fe68..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/HttpServer.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; -import { WebSocketServer } from "@spt/servers/WebSocketServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -export declare class HttpServer { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected httpServerHelper: HttpServerHelper; - protected localisationService: LocalisationService; - protected httpListeners: IHttpListener[]; - protected configServer: ConfigServer; - protected applicationContext: ApplicationContext; - protected webSocketServer: WebSocketServer; - protected httpConfig: IHttpConfig; - protected started: boolean; - constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, localisationService: LocalisationService, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext, webSocketServer: WebSocketServer); - /** - * Handle server loading event - */ - load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; - /** - * Check against hardcoded values that determine its from a local address - * @param remoteAddress Address to check - * @returns True if its local - */ - protected isLocalRequest(remoteAddress: string): boolean; - protected getCookies(req: IncomingMessage): Record; - isStarted(): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/RagfairServer.d.ts b/TypeScript/22CustomSptCommand/types/servers/RagfairServer.d.ts deleted file mode 100644 index af3acf3..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/RagfairServer.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { RagfairOfferGenerator } from "@spt/generators/RagfairOfferGenerator"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairCategoriesService } from "@spt/services/RagfairCategoriesService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; -export declare class RagfairServer { - protected logger: ILogger; - protected ragfairOfferGenerator: RagfairOfferGenerator; - protected ragfairOfferService: RagfairOfferService; - protected ragfairCategoriesService: RagfairCategoriesService; - protected ragfairRequiredItemsService: RagfairRequiredItemsService; - protected localisationService: LocalisationService; - protected traderHelper: TraderHelper; - protected traderAssortHelper: TraderAssortHelper; - protected configServer: ConfigServer; - protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, localisationService: LocalisationService, traderHelper: TraderHelper, traderAssortHelper: TraderAssortHelper, configServer: ConfigServer); - load(): Promise; - update(): Promise; - /** - * Get traders who need to be periodically refreshed - * @returns string array of traders - */ - getUpdateableTraders(): string[]; - getAllActiveCategories(fleaUnlocked: boolean, searchRequestData: ISearchRequestData, offers: IRagfairOffer[]): Record; - /** - * Disable/Hide an offer from flea - * @param offerId - */ - hideOffer(offerId: string): void; - getOffer(offerID: string): IRagfairOffer; - getOffers(): IRagfairOffer[]; - removeOfferStack(offerID: string, amount: number): void; - doesOfferExist(offerId: string): boolean; - addPlayerOffers(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/SaveServer.d.ts b/TypeScript/22CustomSptCommand/types/servers/SaveServer.d.ts deleted file mode 100644 index f71fbb2..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/SaveServer.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; -export declare class SaveServer { - protected vfs: VFS; - protected saveLoadRouters: SaveLoadRouter[]; - protected jsonUtil: JsonUtil; - protected hashUtil: HashUtil; - protected localisationService: LocalisationService; - protected logger: ILogger; - protected configServer: ConfigServer; - protected profileFilepath: string; - protected profiles: {}; - protected onBeforeSaveCallbacks: {}; - protected saveMd5: {}; - constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); - /** - * Add callback to occur prior to saving profile changes - * @param id Id for save callback - * @param callback Callback to execute prior to running SaveServer.saveProfile() - */ - addBeforeSaveCallback(id: string, callback: (profile: Partial) => Partial): void; - /** - * Remove a callback from being executed prior to saving profile in SaveServer.saveProfile() - * @param id Id of callback to remove - */ - removeBeforeSaveCallback(id: string): void; - /** - * Load all profiles in /user/profiles folder into memory (this.profiles) - */ - load(): void; - /** - * Save changes for each profile from memory into user/profiles json - */ - save(): void; - /** - * Get a player profile from memory - * @param sessionId Session id - * @returns ISptProfile - */ - getProfile(sessionId: string): ISptProfile; - /** - * Get all profiles from memory - * @returns Dictionary of ISptProfile - */ - getProfiles(): Record; - /** - * Delete a profile by id - * @param sessionID Id of profile to remove - * @returns true when deleted, false when profile not found - */ - deleteProfileById(sessionID: string): boolean; - /** - * Create a new profile in memory with empty pmc/scav objects - * @param profileInfo Basic profile data - */ - createProfile(profileInfo: Info): void; - /** - * Add full profile in memory by key (info.id) - * @param profileDetails Profile to save - */ - addProfile(profileDetails: ISptProfile): void; - /** - * Look up profile json in user/profiles by id and store in memory - * Execute saveLoadRouters callbacks after being loaded into memory - * @param sessionID Id of profile to store in memory - */ - loadProfile(sessionID: string): void; - /** - * Save changes from in-memory profile to user/profiles json - * Execute onBeforeSaveCallbacks callbacks prior to being saved to json - * @param sessionID profile id (user/profiles/id.json) - * @returns time taken to save in MS - */ - saveProfile(sessionID: string): number; - /** - * Remove a physical profile json from user/profiles - * @param sessionID Profile id to remove - * @returns true if file no longer exists - */ - removeProfile(sessionID: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/WebSocketServer.d.ts b/TypeScript/22CustomSptCommand/types/servers/WebSocketServer.d.ts deleted file mode 100644 index b9d66ee..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/WebSocketServer.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -import http, { IncomingMessage } from "node:http"; -import { WebSocket, Server } from "ws"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; -export declare class WebSocketServer { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; - protected localisationService: LocalisationService; - protected httpServerHelper: HttpServerHelper; - protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; - protected webSocketServer: Server; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); - getWebSocketServer(): Server; - setupWebSocket(httpServer: http.Server): void; - protected getRandomisedMessage(): string; - protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/http/HttpMethods.d.ts b/TypeScript/22CustomSptCommand/types/servers/http/HttpMethods.d.ts deleted file mode 100644 index 96031e2..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/http/HttpMethods.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum HttpMethods { - OPTIONS = "OPTIONS", - GET = "GET", - POST = "POST", - PUT = "PUT", - PATCH = "PATCH", - DELETE = "DELETE" -} diff --git a/TypeScript/22CustomSptCommand/types/servers/http/IHttpListener.d.ts b/TypeScript/22CustomSptCommand/types/servers/http/IHttpListener.d.ts deleted file mode 100644 index ff148d6..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/http/IHttpListener.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -export interface IHttpListener { - canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/22CustomSptCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts deleted file mode 100644 index 920dad4..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -import { IncomingMessage } from "node:http"; -import { WebSocket } from "ws"; -export interface IWebSocketConnectionHandler { - getSocketId(): string; - getHookUrl(): string; - onConnection(ws: WebSocket, req: IncomingMessage): void; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/ws/message/DefaultSptWebSocketMessageHandler.d.ts b/TypeScript/22CustomSptCommand/types/servers/ws/message/DefaultSptWebSocketMessageHandler.d.ts deleted file mode 100644 index d5247ec..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/ws/message/DefaultSptWebSocketMessageHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { RawData, WebSocket } from "ws"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; -export declare class DefaultSptWebSocketMessageHandler implements ISptWebSocketMessageHandler { - protected logger: ILogger; - constructor(logger: ILogger); - onSptMessage(sessionId: string, client: WebSocket, message: RawData): void; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/ws/message/ISptWebSocketMessageHandler.d.ts b/TypeScript/22CustomSptCommand/types/servers/ws/message/ISptWebSocketMessageHandler.d.ts deleted file mode 100644 index 137bc87..0000000 --- a/TypeScript/22CustomSptCommand/types/servers/ws/message/ISptWebSocketMessageHandler.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RawData, WebSocket } from "ws"; -export interface ISptWebSocketMessageHandler { - onSptMessage(sessionID: string, client: WebSocket, message: RawData): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/BotEquipmentFilterService.d.ts b/TypeScript/22CustomSptCommand/types/services/BotEquipmentFilterService.d.ts deleted file mode 100644 index 5ee2fb4..0000000 --- a/TypeScript/22CustomSptCommand/types/services/BotEquipmentFilterService.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -export declare class BotEquipmentFilterService { - protected logger: ILogger; - protected botHelper: BotHelper; - protected profileHelper: ProfileHelper; - protected configServer: ConfigServer; - protected botConfig: IBotConfig; - protected botEquipmentConfig: Record; - constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); - /** - * Filter a bots data to exclude equipment and cartridges defines in the botConfig - * @param sessionId Players id - * @param baseBotNode bots json data to filter - * @param botLevel Level of the bot - * @param botGenerationDetails details on how to generate a bot - */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; - /** - * Iterate over the changes passed in and apply them to baseValues parameter - * @param equipmentChanges Changes to apply - * @param baseValues data to update - */ - protected adjustChances(equipmentChanges: Record, baseValues: EquipmentChances | ModsChances): void; - /** - * Iterate over the Generation changes and alter data in baseValues.Generation - * @param generationChanges Changes to apply - * @param baseBotGeneration dictionary to update - */ - protected adjustGenerationChances(generationChanges: Record, baseBotGeneration: Generation): void; - /** - * Get equipment settings for bot - * @param botEquipmentRole equipment role to return - * @returns EquipmentFilters object - */ - getBotEquipmentSettings(botEquipmentRole: string): EquipmentFilters; - /** - * Get weapon sight whitelist for a specific bot type - * @param botEquipmentRole equipment role of bot to look up - * @returns Dictionary of weapon type and their whitelisted scope types - */ - getBotWeaponSightWhitelist(botEquipmentRole: string): Record; - /** - * Get an object that contains equipment and cartridge blacklists for a specified bot type - * @param botRole Role of the bot we want the blacklist for - * @param playerLevel Level of the player - * @returns EquipmentBlacklistDetails object - */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails; - /** - * Get the whitelist for a specific bot type that's within the players level - * @param botRole Bot type - * @param playerLevel Players level - * @returns EquipmentFilterDetails object - */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails; - /** - * Retrieve item weighting adjustments from bot.json config based on bot level - * @param botRole Bot type to get adjustments for - * @param botLevel Level of bot - * @returns Weighting adjustments for bot items - */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails; - /** - * Retrieve item weighting adjustments from bot.json config based on player level - * @param botRole Bot type to get adjustments for - * @param playerlevel Level of bot - * @returns Weighting adjustments for bot items - */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails; - /** - * Filter bot equipment based on blacklist and whitelist from config/bot.json - * Prioritizes whitelist first, if one is found blacklist is ignored - * @param baseBotNode bot .json file to update - * @param blacklist equipment blacklist - * @returns Filtered bot file - */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; - /** - * Filter bot cartridges based on blacklist and whitelist from config/bot.json - * Prioritizes whitelist first, if one is found blacklist is ignored - * @param baseBotNode bot .json file to update - * @param blacklist equipment on this list should be excluded from the bot - * @param whitelist equipment on this list should be used exclusively - * @returns Filtered bot file - */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; - /** - * Add/Edit weighting changes to bot items using values from config/bot.json/equipment - * @param weightingAdjustments Weighting change to apply to bot - * @param botItemPool Bot item dictionary to adjust - */ - protected adjustWeighting(weightingAdjustments: IAdjustmentDetails, botItemPool: Record, showEditWarnings?: boolean): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/22CustomSptCommand/types/services/BotEquipmentModPoolService.d.ts deleted file mode 100644 index c53f31b..0000000 --- a/TypeScript/22CustomSptCommand/types/services/BotEquipmentModPoolService.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Mods } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { VFS } from "@spt/utils/VFS"; -/** Store a mapping between weapons, their slots and the items that fit those slots */ -export declare class BotEquipmentModPoolService { - protected logger: ILogger; - protected vfs: VFS; - protected itemHelper: ItemHelper; - protected databaseServer: DatabaseServer; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected botConfig: IBotConfig; - protected weaponModPool: Mods; - protected gearModPool: Mods; - protected weaponPoolGenerated: boolean; - protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Store dictionary of mods for each item passed in - * @param items items to find related mods and store in modPool - */ - protected generatePool(items: ITemplateItem[], poolType: string): void; - /** - * Empty the mod pool - */ - resetPool(): void; - /** - * Get array of compatible mods for an items mod slot (generate pool if it doesnt exist already) - * @param itemTpl item to look up - * @param slotName slot to get compatible mods for - * @returns tpls that fit the slot - */ - getCompatibleModsForWeaponSlot(itemTpl: string, slotName: string): string[]; - /** - * Get array of compatible mods for an items mod slot (generate pool if it doesnt exist already) - * @param itemTpl item to look up - * @param slotName slot to get compatible mods for - * @returns tpls that fit the slot - */ - getCompatibleModsFoGearSlot(itemTpl: string, slotName: string): string[]; - /** - * Get mods for a piece of gear by its tpl - * @param itemTpl items tpl to look up mods for - * @returns Dictionary of mods (keys are mod slot names) with array of compatible mod tpls as value - */ - getModsForGearSlot(itemTpl: string): Record; - /** - * Get mods for a weapon by its tpl - * @param itemTpl Weapons tpl to look up mods for - * @returns Dictionary of mods (keys are mod slot names) with array of compatible mod tpls as value - */ - getModsForWeaponSlot(itemTpl: string): Record; - /** - * Create weapon mod pool and set generated flag to true - */ - protected generateWeaponPool(): void; - /** - * Create gear mod pool and set generated flag to true - */ - protected generateGearPool(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/BotGenerationCacheService.d.ts b/TypeScript/22CustomSptCommand/types/services/BotGenerationCacheService.d.ts deleted file mode 100644 index ba27266..0000000 --- a/TypeScript/22CustomSptCommand/types/services/BotGenerationCacheService.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class BotGenerationCacheService { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected localisationService: LocalisationService; - protected botHelper: BotHelper; - protected storedBots: Map; - protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); - /** - * Store array of bots in cache, shuffle results before storage - * @param botsToStore Bots we want to store in the cache - */ - storeBots(key: string, botsToStore: IBotBase[]): void; - /** - * Find and return a bot based on its role - * Remove bot from internal array so it can't be retreived again - * @param key role to retreive (assault/bossTagilla etc) - * @returns IBotBase object - */ - getBot(key: string): IBotBase; - /** - * Cache a bot that has been sent to the client in memory for later use post-raid to determine if player killed a traitor scav - * @param botToStore Bot object to store - */ - storeUsedBot(botToStore: IBotBase): void; - /** - * Get a bot by its profileId that has been generated and sent to client for current raid - * Cache is wiped post-raid in client/match/offline/end endOfflineRaid() - * @param profileId Id of bot to get - * @returns IBotBase - */ - getUsedBot(profileId: string): IBotBase; - /** - * Remove all cached bot profiles from memory - */ - clearStoredBots(): void; - /** - * Does cache have a bot with requested key - * @returns false if empty - */ - cacheHasBotOfRole(key: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/services/BotLootCacheService.d.ts b/TypeScript/22CustomSptCommand/types/services/BotLootCacheService.d.ts deleted file mode 100644 index 57d56af..0000000 --- a/TypeScript/22CustomSptCommand/types/services/BotLootCacheService.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class BotLootCacheService { - protected logger: ILogger; - protected itemHelper: ItemHelper; - protected databaseServer: DatabaseServer; - protected pmcLootGenerator: PMCLootGenerator; - protected localisationService: LocalisationService; - protected ragfairPriceService: RagfairPriceService; - protected cloner: ICloner; - protected lootCache: Record; - constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); - /** - * Remove cached bot loot data - */ - clearCache(): void; - /** - * Get the fully created loot array, ordered by price low to high - * @param botRole bot to get loot for - * @param isPmc is the bot a pmc - * @param lootType what type of loot is needed (backpack/pocket/stim/vest etc) - * @param botJsonTemplate Base json db file for the bot having its loot generated - * @returns ITemplateItem array - */ - getLootFromCache(botRole: string, isPmc: boolean, lootType: LootCacheType, botJsonTemplate: IBotType): Record; - /** - * Generate loot for a bot and store inside a private class property - * @param botRole bots role (assault / pmcBot etc) - * @param isPmc Is the bot a PMC (alteres what loot is cached) - * @param botJsonTemplate db template for bot having its loot generated - */ - protected addLootToCache(botRole: string, isPmc: boolean, botJsonTemplate: IBotType): void; - /** - * Add unique items into combined pool - * @param poolToAddTo Pool of items to add to - * @param itemsToAdd items to add to combined pool if unique - */ - protected addUniqueItemsToPool(poolToAddTo: ITemplateItem[], itemsToAdd: ITemplateItem[]): void; - protected addItemsToPool(poolToAddTo: Record, poolOfItemsToAdd: Record): void; - /** - * Ammo/grenades have this property - * @param props - * @returns - */ - protected isBulletOrGrenade(props: Props): boolean; - /** - * Internal and external magazine have this property - * @param props - * @returns - */ - protected isMagazine(props: Props): boolean; - /** - * Medical use items (e.g. morphine/lip balm/grizzly) - * @param props - * @returns - */ - protected isMedicalItem(props: Props): boolean; - /** - * Grenades have this property (e.g. smoke/frag/flash grenades) - * @param props - * @returns - */ - protected isGrenade(props: Props): boolean; - protected isFood(tpl: string): boolean; - protected isDrink(tpl: string): boolean; - protected isCurrency(tpl: string): boolean; - /** - * Check if a bot type exists inside the loot cache - * @param botRole role to check for - * @returns true if they exist - */ - protected botRoleExistsInCache(botRole: string): boolean; - /** - * If lootcache is null, init with empty property arrays - * @param botRole Bot role to hydrate - */ - protected initCacheForBotRole(botRole: string): void; - /** - * Compares two item prices by their flea (or handbook if that doesnt exist) price - * -1 when a < b - * 0 when a === b - * 1 when a > b - * @param itemAPrice - * @param itemBPrice - * @returns - */ - protected compareByValue(itemAPrice: number, itemBPrice: number): number; -} diff --git a/TypeScript/22CustomSptCommand/types/services/BotWeaponModLimitService.d.ts b/TypeScript/22CustomSptCommand/types/services/BotWeaponModLimitService.d.ts deleted file mode 100644 index 63c4967..0000000 --- a/TypeScript/22CustomSptCommand/types/services/BotWeaponModLimitService.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -export declare class BotModLimits { - scope: ItemCount; - scopeMax: number; - scopeBaseTypes: string[]; - flashlightLaser: ItemCount; - flashlightLaserMax: number; - flashlgihtLaserBaseTypes: string[]; -} -export declare class ItemCount { - count: number; -} -export declare class BotWeaponModLimitService { - protected logger: ILogger; - protected configServer: ConfigServer; - protected itemHelper: ItemHelper; - protected botConfig: IBotConfig; - constructor(logger: ILogger, configServer: ConfigServer, itemHelper: ItemHelper); - /** - * Initalise mod limits to be used when generating a weapon - * @param botRole "assault", "bossTagilla" or "pmc" - * @returns BotModLimits object - */ - getWeaponModLimits(botRole: string): BotModLimits; - /** - * Check if weapon mod item is on limited list + has surpassed the limit set for it - * Exception: Always allow ncstar backup mount - * Exception: Always allow scopes with a scope for a parent - * Exception: Always disallow mounts that hold only scopes once scope limit reached - * Exception: Always disallow mounts that hold only flashlights once flashlight limit reached - * @param botRole role the bot has e.g. assault - * @param modTemplate mods template data - * @param modLimits limits set for weapon being generated for this bot - * @param modsParent The parent of the mod to be checked - * @returns true if over item limit - */ - weaponModHasReachedLimit(botRole: string, modTemplate: ITemplateItem, modLimits: BotModLimits, modsParent: ITemplateItem, weapon: Item[]): boolean; - /** - * Check if the specific item type on the weapon has reached the set limit - * @param modTpl log mod tpl if over type limit - * @param currentCount current number of this item on gun - * @param maxLimit mod limit allowed - * @param botRole role of bot we're checking weapon of - * @returns true if limit reached - */ - protected weaponModLimitReached(modTpl: string, currentCount: { - count: number; - }, maxLimit: number, botRole: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/services/CustomLocationWaveService.d.ts b/TypeScript/22CustomSptCommand/types/services/CustomLocationWaveService.d.ts deleted file mode 100644 index 728a1e8..0000000 --- a/TypeScript/22CustomSptCommand/types/services/CustomLocationWaveService.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { BossLocationSpawn, Wave } from "@spt/models/eft/common/ILocationBase"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class CustomLocationWaveService { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - /** - * Add a boss wave to a map - * @param locationId e.g. factory4_day, bigmap - * @param waveToAdd Boss wave to add to map - */ - addBossWaveToMap(locationId: string, waveToAdd: BossLocationSpawn): void; - /** - * Add a normal bot wave to a map - * @param locationId e.g. factory4_day, bigmap - * @param waveToAdd Wave to add to map - */ - addNormalWaveToMap(locationId: string, waveToAdd: Wave): void; - /** - * Clear all custom boss waves from a map - * @param locationId e.g. factory4_day, bigmap - */ - clearBossWavesForMap(locationId: string): void; - /** - * Clear all custom normal waves from a map - * @param locationId e.g. factory4_day, bigmap - */ - clearNormalWavesForMap(locationId: string): void; - /** - * Add custom boss and normal waves to maps found in config/location.json to db - */ - applyWaveChangesToAllMaps(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/FenceService.d.ts b/TypeScript/22CustomSptCommand/types/services/FenceService.d.ts deleted file mode 100644 index 0e75ae6..0000000 --- a/TypeScript/22CustomSptCommand/types/services/FenceService.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; -import { IFenceAssortGenerationValues, IGenerationAssortValues } from "@spt/models/spt/fence/IFenceAssortGenerationValues"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -/** - * Handle actions surrounding Fence - * e.g. generating or refreshing assorts / get next refresh time - */ -export declare class FenceService { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - protected handbookHelper: HandbookHelper; - protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected traderConfig: ITraderConfig; - /** Time when some items in assort will be replaced */ - protected nextPartialRefreshTimestamp: number; - /** Main assorts you see at all rep levels */ - protected fenceAssort: ITraderAssort; - /** Assorts shown on a separate tab when you max out fence rep */ - protected fenceDiscountAssort: ITraderAssort; - /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ - protected desiredAssortCounts: IFenceAssortGenerationValues; - protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); - /** - * Replace main fence assort with new assort - * @param assort New assorts to replace old with - */ - setFenceAssort(assort: ITraderAssort): void; - /** - * Replace discount fence assort with new assort - * @param assort New assorts to replace old with - */ - setDiscountFenceAssort(assort: ITraderAssort): void; - /** - * Get main fence assort - * @return ITraderAssort - */ - getMainFenceAssort(): ITraderAssort; - /** - * Get discount fence assort - * @return ITraderAssort - */ - getDiscountFenceAssort(): ITraderAssort; - /** - * Replace high rep level fence assort with new assort - * @param discountAssort New assorts to replace old with - */ - setFenceDiscountAssort(discountAssort: ITraderAssort): void; - /** - * Get assorts player can purchase - * Adjust prices based on fence level of player - * @param pmcProfile Player profile - * @returns ITraderAssort - */ - getFenceAssorts(pmcProfile: IPmcData): ITraderAssort; - /** - * Adds to fence assort a single item (with its children) - * @param items the items to add with all its childrens - * @param mainItem the most parent item of the array - */ - addItemsToFenceAssort(items: Item[], mainItem: Item): void; - /** - * Calculates the overall price for an item (with all its children) - * @param itemTpl the item tpl to calculate the fence price for - * @param items the items (with its children) to calculate fence price for - * @returns the fence price of the item - */ - getItemPrice(itemTpl: string, items: Item[]): number; - /** - * Calculate the overall price for an ammo box, where only one item is - * the ammo box itself and every other items are the bullets in that box - * @param items the ammo box (and all its children ammo items) - * @returns the price of the ammo box - */ - protected getAmmoBoxPrice(items: Item[]): number; - /** - * Adjust all items contained inside an assort by a multiplier - * @param assort (clone)Assort that contains items with prices to adjust - * @param itemMultipler multipler to use on items - * @param presetMultiplier preset multipler to use on presets - */ - protected adjustAssortItemPricesByConfigMultiplier(assort: ITraderAssort, itemMultipler: number, presetMultiplier: number): void; - /** - * Merge two trader assort files together - * @param firstAssort assort 1# - * @param secondAssort assort #2 - * @returns merged assort - */ - protected mergeAssorts(firstAssort: ITraderAssort, secondAssort: ITraderAssort): ITraderAssort; - /** - * Adjust assorts price by a modifier - * @param item assort item details - * @param assort assort to be modified - * @param modifier value to multiply item price by - * @param presetModifier value to multiply preset price by - */ - protected adjustItemPriceByModifier(item: Item, assort: ITraderAssort, modifier: number, presetModifier: number): void; - /** - * Get fence assorts with no price adjustments based on fence rep - * @returns ITraderAssort - */ - getRawFenceAssorts(): ITraderAssort; - /** - * Does fence need to perform a partial refresh because its passed the refresh timer defined in trader.json - * @returns true if it needs a partial refresh - */ - needsPartialRefresh(): boolean; - /** - * Replace a percentage of fence assorts with freshly generated items - */ - performPartialRefresh(): void; - /** - * Handle the process of folding new assorts into existing assorts, when a new assort exists already, increment its StackObjectsCount instead - * @param newFenceAssorts Assorts to fold into existing fence assorts - * @param existingFenceAssorts Current fence assorts new assorts will be added to - */ - protected updateFenceAssorts(newFenceAssorts: ICreateFenceAssortsResult, existingFenceAssorts: ITraderAssort): void; - /** - * Increment fence next refresh timestamp by current timestamp + partialRefreshTimeSeconds from config - */ - protected incrementPartialRefreshTime(): void; - /** - * Get values that will hydrate the passed in assorts back to the desired counts - * @param assortItems Current assorts after items have been removed - * @param generationValues Base counts assorts should be adjusted to - * @returns IGenerationAssortValues object with adjustments needed to reach desired state - */ - protected getItemCountsToGenerate(assortItems: Item[], generationValues: IGenerationAssortValues): IGenerationAssortValues; - /** - * Delete desired number of items from assort (including children) - * @param itemCountToReplace - * @param discountItemCountToReplace - */ - protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; - /** - * Choose an item at random and remove it + mods from assorts - * @param assort Trader assort to remove item from - * @param rootItems Pool of root items to pick from to remove - */ - protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; - /** - * Get an integer rounded count of items to replace based on percentrage from traderConfig value - * @param totalItemCount total item count - * @returns rounded int of items to replace - */ - protected getCountOfItemsToReplace(totalItemCount: number): number; - /** - * Get the count of items fence offers - * @returns number - */ - getOfferCount(): number; - /** - * Create trader assorts for fence and store in fenceService cache - * Uses fence base cache generatedon server start as a base - */ - generateFenceAssorts(): void; - /** - * Convert the intermediary assort data generated into format client can process - * @param intermediaryAssorts Generated assorts that will be converted - * @returns ITraderAssort - */ - protected convertIntoFenceAssort(intermediaryAssorts: ICreateFenceAssortsResult): ITraderAssort; - /** - * Create object that contains calculated fence assort item values to make based on config - * Stored in this.desiredAssortCounts - */ - protected createInitialFenceAssortGenerationValues(): void; - /** - * Create skeleton to hold assort items - * @returns ITraderAssort object - */ - protected createFenceAssortSkeleton(): ITraderAssort; - /** - * Hydrate assorts parameter object with generated assorts - * @param assortCount Number of assorts to generate - * @param assorts object to add created assorts to - */ - protected createAssorts(itemCounts: IGenerationAssortValues, loyaltyLevel: number): ICreateFenceAssortsResult; - /** - * Add item assorts to existing assort data - * @param assortCount Number to add - * @param assorts Assorts data to add to - * @param baseFenceAssortClone Base data to draw from - * @param itemTypeLimits - * @param loyaltyLevel Loyalty level to set new item to - */ - protected addItemAssorts(assortCount: number, assorts: ICreateFenceAssortsResult, baseFenceAssortClone: ITraderAssort, itemTypeLimits: Record, loyaltyLevel: number): void; - /** - * Find an assort item that matches the first parameter, also matches based on upd properties - * e.g. salewa hp resource units left - * @param rootItemBeingAdded item to look for a match against - * @param itemDbDetails Db details of matching item - * @param itemsWithChildren Items to search through - * @returns Matching assort item - */ - protected getMatchingItem(rootItemBeingAdded: Item, itemDbDetails: ITemplateItem, itemsWithChildren: Item[][]): Item; - /** - * Should this item be forced into only 1 stack on fence - * @param existingItem Existing item from fence assort - * @param itemDbDetails Item we want to add db details - * @returns True item should be force stacked - */ - protected itemShouldBeForceStacked(existingItem: Item, itemDbDetails: ITemplateItem): boolean; - protected itemInPreventDupeCategoryList(tpl: string): boolean; - /** - * Adjust price of item based on what is left to buy (resource/uses left) - * @param barterSchemes All barter scheme for item having price adjusted - * @param itemRoot Root item having price adjusted - * @param itemTemplate Db template of item - */ - protected adjustItemPriceByQuality(barterSchemes: Record, itemRoot: Item, itemTemplate: ITemplateItem): void; - protected getMatchingItemLimit(itemTypeLimits: Record, itemTpl: string): { - current: number; - max: number; - }; - /** - * Find presets in base fence assort and add desired number to 'assorts' parameter - * @param desiredWeaponPresetsCount - * @param assorts Assorts to add preset to - * @param baseFenceAssort Base data to draw from - * @param loyaltyLevel Which loyalty level is required to see/buy item - */ - protected addPresetsToAssort(desiredWeaponPresetsCount: number, desiredEquipmentPresetsCount: number, assorts: ICreateFenceAssortsResult, baseFenceAssort: ITraderAssort, loyaltyLevel: number): void; - /** - * Adjust plate / soft insert durability values - * @param armor Armor item array to add mods into - * @param itemDbDetails Armor items db template - */ - protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; - /** - * Get stack size of a singular item (no mods) - * @param itemDbDetails item being added to fence - * @returns Stack size - */ - protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; - /** - * Remove parts of a weapon prior to being listed on flea - * @param itemAndMods Weapon to remove parts from - */ - protected removeRandomModsOfItem(itemAndMods: Item[]): void; - /** - * Roll % chance check to see if item should be removed - * @param weaponMod Weapon mod being checked - * @param itemsBeingDeleted Current list of items on weapon being deleted - * @returns True if item will be removed - */ - protected presetModItemWillBeRemoved(weaponMod: Item, itemsBeingDeleted: string[]): boolean; - /** - * Randomise items' upd properties e.g. med packs/weapons/armor - * @param itemDetails Item being randomised - * @param itemToAdjust Item being edited - */ - protected randomiseItemUpdProperties(itemDetails: ITemplateItem, itemToAdjust: Item): void; - /** - * Generate a randomised current and max durabiltiy value for an armor item - * @param itemDetails Item to create values for - * @param equipmentDurabilityLimits Max durabiltiy percent min/max values - * @returns Durability + MaxDurability values - */ - protected getRandomisedArmorDurabilityValues(itemDetails: ITemplateItem, equipmentDurabilityLimits: IItemDurabilityCurrentMax): Repairable; - /** - * Construct item limit record to hold max and current item count - * @param limits limits as defined in config - * @returns record, key: item tplId, value: current/max item count allowed - */ - protected initItemLimitCounter(limits: Record): Record; - /** - * Get the next update timestamp for fence - * @returns future timestamp - */ - getNextFenceUpdateTimestamp(): number; - /** - * Get fence refresh time in seconds - * @returns Refresh time in seconds - */ - protected getFenceRefreshTime(): number; - /** - * Get fence level the passed in profile has - * @param pmcData Player profile - * @returns FenceLevel object - */ - getFenceInfo(pmcData: IPmcData): IFenceLevel; - /** - * Remove or lower stack size of an assort from fence by id - * @param assortId assort id to adjust - * @param buyCount Count of items bought - */ - amendOrRemoveFenceOffer(assortId: string, buyCount: number): void; - protected deleteOffer(assortId: string, assorts: Item[]): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/GiftService.d.ts b/TypeScript/22CustomSptCommand/types/services/GiftService.d.ts deleted file mode 100644 index aca276c..0000000 --- a/TypeScript/22CustomSptCommand/types/services/GiftService.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { GiftSentResult } from "@spt/models/enums/GiftSentResult"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { Gift, IGiftsConfig } from "@spt/models/spt/config/IGiftsConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class GiftService { - protected logger: ILogger; - protected mailSendService: MailSendService; - protected localisationService: LocalisationService; - protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected profileHelper: ProfileHelper; - protected configServer: ConfigServer; - protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, mailSendService: MailSendService, localisationService: LocalisationService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); - /** - * Does a gift with a specific ID exist in db - * @param giftId Gift id to check for - * @returns True if it exists in db - */ - giftExists(giftId: string): boolean; - /** - * Send player a gift from a range of sources - * @param playerId Player to send gift to / sessionId - * @param giftId Id of gift in configs/gifts.json to send player - * @returns outcome of sending gift to player - */ - sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; - /** - * Get sender id based on gifts sender type enum - * @param giftData Gift to send player - * @returns trader/user/system id - */ - protected getSenderId(giftData: Gift): string; - /** - * Convert GiftSenderType into a dialog MessageType - * @param giftData Gift to send player - * @returns MessageType enum value - */ - protected getMessageType(giftData: Gift): MessageType; - /** - * Prapor sends gifts to player for first week after profile creation - * @param sessionId Player id - * @param day What day to give gift for - */ - sendPraporStartingGift(sessionId: string, day: number): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts b/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts deleted file mode 100644 index 5492a56..0000000 --- a/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { SecureContainerHelper } from "@spt/helpers/SecureContainerHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IInsuredItemsData } from "@spt/models/eft/inRaid/IInsuredItemsData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; -import { ILostOnDeathConfig } from "@spt/models/spt/config/ILostOnDeathConfig"; -import { IInsuranceEquipmentPkg } from "@spt/models/spt/services/IInsuranceEquipmentPkg"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class InsuranceService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected secureContainerHelper: SecureContainerHelper; - protected randomUtil: RandomUtil; - protected itemHelper: ItemHelper; - protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected saveServer: SaveServer; - protected traderHelper: TraderHelper; - protected dialogueHelper: DialogueHelper; - protected handbookHelper: HandbookHelper; - protected localisationService: LocalisationService; - protected localeService: LocaleService; - protected mailSendService: MailSendService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected insured: Record>; - protected insuranceConfig: IInsuranceConfig; - protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); - /** - * Does player have insurance array - * @param sessionId Player id - * @returns True if exists - */ - insuranceExists(sessionId: string): boolean; - /** - * Get all insured items by all traders for a profile - * @param sessionId Profile id (session id) - * @returns Item array - */ - getInsurance(sessionId: string): Record; - /** - * Get insured items by profile id + trader id - * @param sessionId Profile id (session id) - * @param traderId Trader items were insured with - * @returns Item array - */ - getInsuranceItems(sessionId: string, traderId: string): Item[]; - resetInsurance(sessionId: string): void; - /** - * Sends stored insured items as message to player - * @param pmcData profile to send insured items to - * @param sessionID SessionId of current player - * @param mapId Id of the map player died/exited that caused the insurance to be issued on - */ - sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void; - /** - * Check all root insured items and remove location property + set slotId to 'hideout' - * @param sessionId Session id - * @param traderId Trader id - */ - protected removeLocationProperty(sessionId: string, traderId: string): void; - /** - * Get a timestamp of when insurance items should be sent to player based on trader used to insure - * Apply insurance return bonus if found in profile - * @param pmcData Player profile - * @param trader Trader base used to insure items - * @returns Timestamp to return items to player in seconds - */ - protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Create insurance equipment packages that should be sent to the user. The packages should contain items that have - * been lost in a raid and should be returned to the player through the insurance system. - * - * NOTE: We do not have data on items that were dropped in a raid. This means we have to pull item data from the - * profile at the start of the raid to return to the player in insurance. Because of this, the item - * positioning may differ from the position the item was in when the player died. Apart from removing all - * positioning, this is the best we can do. >:{} - * - * @param pmcData Player profile - * @param offraidData Post-raid data - * @param preRaidGear Pre-raid data - * @param sessionID Session id - * @param playerDied Did player die in raid - * @returns Array of insured items lost in raid - */ - getGearLostInRaid(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): IInsuranceEquipmentPkg[]; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; - /** - * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it - * @param equipmentPkg Gear to store - generated by getGearLostInRaid() - */ - storeGearLostInRaidToSendLater(sessionID: string, equipmentPkg: IInsuranceEquipmentPkg[]): void; - /** - * Take preraid item and update properties to ensure its ready to be given to player in insurance return mail - * @param pmcData Player profile - * @param preRaidItemWithChildren Insured item (with children) as it was pre-raid - * @param allItemsFromClient Item data when player left raid (durability values) - * @returns Item (with children) to send to player - */ - protected getInsuredItemDetails(pmcData: IPmcData, preRaidItem: Item, insuredItemFromClient: IInsuredItemsData): Item; - /** - * Reset slotId property to "hideout" when necessary (used to be in ) - * @param pmcData Players pmcData.Inventory.equipment value - * @param itemToReturn item we will send to player as insurance return - */ - protected updateSlotIdValue(playerBaseInventoryEquipmentId: string, itemToReturn: Item): void; - /** - * Add gear item to InsuredItems array in player profile - * @param sessionID Session id - * @param pmcData Player profile - * @param itemToReturnToPlayer item to store - * @param traderId Id of trader item was insured with - */ - protected addGearToSend(gear: IInsuranceEquipmentPkg): void; - /** - * Does insurance exist for a player and by trader - * @param sessionId Player id (session id) - * @param traderId Trader items insured with - * @returns True if exists - */ - protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; - /** - * Empty out array holding insured items by sessionid + traderid - * @param sessionId Player id (session id) - * @param traderId Trader items insured with - */ - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - /** - * Store insured item - * @param sessionId Player id (session id) - * @param traderId Trader item insured with - * @param itemToAdd Insured item (with children) - */ - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; - /** - * Get price of insurance * multiplier from config - * @param pmcData Player profile - * @param inventoryItem Item to be insured - * @param traderId Trader item is insured with - * @returns price in roubles - */ - getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * - * @returns The ID. - */ - getRootItemParentID(sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/services/ItemBaseClassService.d.ts b/TypeScript/22CustomSptCommand/types/services/ItemBaseClassService.d.ts deleted file mode 100644 index 9c6e6c8..0000000 --- a/TypeScript/22CustomSptCommand/types/services/ItemBaseClassService.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/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 items: Record; - protected cacheGenerated: boolean; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); - /** - * Create cache and store inside ItemBaseClassService - * Store a dict of an items tpl to the base classes it and its parents have - */ - hydrateItemBaseClassCache(): void; - /** - * Helper method, recursivly iterate through items parent items, finding and adding ids to dictionary - * @param itemIdToUpdate item tpl to store base ids against in dictionary - * @param item item being checked - */ - protected addBaseItems(itemIdToUpdate: string, item: ITemplateItem): void; - /** - * Does item tpl inherit from the requested base class - * @param itemTpl item to check base classes of - * @param baseClass base class to check for - * @returns true if item inherits from base class passed in - */ - itemHasBaseClass(itemTpl: string, baseClasses: string[]): boolean; - /** - * Check if cached item template is of type Item - * @param itemTemplateId item to check - * @returns true if item is of type Item - */ - private cachedItemIsOfItemType; - /** - * Get base classes item inherits from - * @param itemTpl item to get base classes for - * @returns array of base classes - */ - getItemBaseClasses(itemTpl: string): string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/services/ItemFilterService.d.ts b/TypeScript/22CustomSptCommand/types/services/ItemFilterService.d.ts deleted file mode 100644 index fde948b..0000000 --- a/TypeScript/22CustomSptCommand/types/services/ItemFilterService.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { IItemConfig } from "@spt/models/spt/config/IItemConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -/** Centralise the handling of blacklisting items, uses blacklist found in config/item.json, stores items that should not be used by players / broken items */ -export declare class ItemFilterService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected itemConfig: IItemConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, configServer: ConfigServer); - /** - * Check if the provided template id is blacklisted in config/item.json - * @param tpl template id - * @returns true if blacklisted - */ - isItemBlacklisted(tpl: string): boolean; - /** - * Check if item is blacklisted from being a reward for player - * @param tpl item tpl to check is on blacklist - * @returns True when blacklisted - */ - isItemRewardBlacklisted(tpl: string): boolean; - /** - * Get an array of items that should never be given as a reward to player - * @returns string array of item tpls - */ - getItemRewardBlacklist(): string[]; - /** - * Return every template id blacklisted in config/item.json - * @returns string array of blacklisted tempalte ids - */ - getBlacklistedItems(): string[]; - /** - * Check if the provided template id is boss item in config/item.json - * @param tpl template id - * @returns true if boss item - */ - isBossItem(tpl: string): boolean; - /** - * Return boss items in config/item.json - * @returns string array of boss item tempalte ids - */ - getBossItems(): string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/services/LocaleService.d.ts b/TypeScript/22CustomSptCommand/types/services/LocaleService.d.ts deleted file mode 100644 index 2326dcc..0000000 --- a/TypeScript/22CustomSptCommand/types/services/LocaleService.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { ILocaleConfig } from "@spt/models/spt/config/ILocaleConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -/** - * Handles getting locales from config or users machine - */ -export declare class LocaleService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected localeConfig: ILocaleConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, configServer: ConfigServer); - /** - * Get the eft globals db file based on the configured locale in config/locale.json, if not found, fall back to 'en' - * @returns dictionary - */ - getLocaleDb(): Record; - /** - * Gets the game locale key from the locale.json file, - * if value is 'system' get system locale - * @returns locale e.g en/ge/cz/cn - */ - getDesiredGameLocale(): string; - /** - * Gets the game locale key from the locale.json file, - * if value is 'system' get system locale - * @returns locale e.g en/ge/cz/cn - */ - getDesiredServerLocale(): string; - /** - * Get array of languages supported for localisation - * @returns array of locales e.g. en/fr/cn - */ - getServerSupportedLocales(): string[]; - /** - * Get array of languages supported for localisation - * @returns array of locales e.g. en/fr/cn - */ - getLocaleFallbacks(): { - [locale: string]: string; - }; - /** - * Get the full locale of the computer running the server lowercased e.g. en-gb / pt-pt - * @returns string - */ - protected getPlatformForServerLocale(): string; - /** - * Get the locale of the computer running the server - * @returns langage part of locale e.g. 'en' part of 'en-US' - */ - protected getPlatformForClientLocale(): string; - /** - * This is in a function so we can overwrite it during testing - * @returns The current platform locale - */ - protected getPlatformLocale(): Intl.Locale; -} diff --git a/TypeScript/22CustomSptCommand/types/services/LocalisationService.d.ts b/TypeScript/22CustomSptCommand/types/services/LocalisationService.d.ts deleted file mode 100644 index 42dfa4e..0000000 --- a/TypeScript/22CustomSptCommand/types/services/LocalisationService.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { I18n } from "i18n"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -/** - * Handles translating server text into different langauges - */ -export declare class LocalisationService { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - protected localeService: LocaleService; - protected i18n: I18n; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localeService: LocaleService); - /** - * Get a localised value using the passed in key - * @param key Key to loop up locale for - * @param args optional arguments - * @returns Localised string - */ - getText(key: string, args?: any): string; - /** - * Get all locale keys - * @returns string array of keys - */ - getKeys(): string[]; - /** - * From the provided partial key, find all keys that start with text and choose a random match - * @param partialKey Key to match locale keys on - * @returns locale text - */ - getRandomTextThatMatchesPartialKey(partialKey: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/services/MailSendService.d.ts b/TypeScript/22CustomSptCommand/types/services/MailSendService.d.ts deleted file mode 100644 index 176e5f8..0000000 --- a/TypeScript/22CustomSptCommand/types/services/MailSendService.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; -import { NotifierHelper } from "@spt/helpers/NotifierHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, IUserDialogInfo, Message, MessageItems } from "@spt/models/eft/profile/ISptProfile"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { Traders } from "@spt/models/enums/Traders"; -import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class MailSendService { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected saveServer: SaveServer; - protected databaseServer: DatabaseServer; - protected notifierHelper: NotifierHelper; - protected dialogueHelper: DialogueHelper; - protected notificationSendHelper: NotificationSendHelper; - protected localisationService: LocalisationService; - protected itemHelper: ItemHelper; - protected traderHelper: TraderHelper; - protected readonly systemSenderId = "59e7125688a45068a6249071"; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, dialogueHelper: DialogueHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper, traderHelper: TraderHelper); - /** - * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale - * @param sessionId The session ID to send the message to - * @param trader The trader sending the message - * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) - * @param message Text to send to the player - * @param items Optional items to send to player - * @param maxStorageTimeSeconds Optional time to collect items before they expire - */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any, systemData?: any, ragfair?: any): void; - /** - * Send a message from an NPC (e.g. prapor) to the player with or without items - * @param sessionId The session ID to send the message to - * @param trader The trader sending the message - * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) - * @param messageLocaleId The localised text to send to player - * @param items Optional items to send to player - * @param maxStorageTimeSeconds Optional time to collect items before they expire - */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any, systemData?: any, ragfair?: any): void; - /** - * Send a message from SYSTEM to the player with or without items - * @param sessionId The session ID to send the message to - * @param message The text to send to player - * @param items Optional items to send to player - * @param maxStorageTimeSeconds Optional time to collect items before they expire - */ - sendSystemMessageToPlayer(sessionId: string, message: string, items?: Item[], maxStorageTimeSeconds?: number, profileChangeEvents?: IProfileChangeEvent[]): void; - /** - * Send a message from SYSTEM to the player with or without items with localised text - * @param sessionId The session ID to send the message to - * @param messageLocaleId Id of key from locale file to send to player - * @param items Optional items to send to player - * @param maxStorageTimeSeconds Optional time to collect items before they expire - */ - sendLocalisedSystemMessageToPlayer(sessionId: string, messageLocaleId: string, items?: Item[], profileChangeEvents?: IProfileChangeEvent[], maxStorageTimeSeconds?: number): void; - /** - * Send a USER message to a player with or without items - * @param sessionId The session ID to send the message to - * @param senderId Who is sending the message - * @param message The text to send to player - * @param items Optional items to send to player - * @param maxStorageTimeSeconds Optional time to collect items before they expire - */ - sendUserMessageToPlayer(sessionId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; - /** - * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) - * Helper functions in this class are available to simplify common actions - * @param messageDetails Details needed to send a message to the player - */ - sendMessageToPlayer(messageDetails: ISendMessageDetails): void; - /** - * Send a message from the player to an NPC - * @param sessionId Player id - * @param targetNpcId NPC message is sent to - * @param message Text to send to NPC - */ - sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; - /** - * Create a message for storage inside a dialog in the player profile - * @param senderDialog Id of dialog that will hold the message - * @param messageDetails Various details on what the message must contain/do - * @returns Message - */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; - /** - * Add items to message and adjust various properties to reflect the items being added - * @param message Message to add items to - * @param itemsToSendToPlayer Items to add to message - * @param maxStorageTimeSeconds total time items are stored in mail before being deleted - */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; - /** - * perform various sanitising actions on the items before they're considered ready for insertion into message - * @param dialogType The type of the dialog that will hold the reward items being processed - * @param messageDetails - * @returns Sanitised items - */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; - /** - * Try to find the most correct item to be the 'primary' item in a reward mail - * @param items Possible items to choose from - * @returns Chosen 'primary' item - */ - protected getBaseItemFromRewards(items: Item[]): Item; - /** - * Get a dialog with a specified entity (user/trader) - * Create and store empty dialog if none exists in profile - * @param messageDetails Data on what message should do - * @returns Relevant Dialogue - */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; - /** - * Get the appropriate sender id by the sender enum type - * @param messageDetails - * @returns gets an id of the individual sending it - */ - protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; -} diff --git a/TypeScript/22CustomSptCommand/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/22CustomSptCommand/types/services/MatchBotDetailsCacheService.d.ts deleted file mode 100644 index e899577..0000000 --- a/TypeScript/22CustomSptCommand/types/services/MatchBotDetailsCacheService.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -/** Cache bots in a dictionary, keyed by the bots name, keying by name isnt ideal as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ -export declare class MatchBotDetailsCacheService { - protected logger: ILogger; - protected localisationService: LocalisationService; - protected botDetailsCache: Record; - constructor(logger: ILogger, localisationService: LocalisationService); - /** - * Store a bot in the cache, keyed by its name - * @param botToCache Bot details to cache - */ - cacheBot(botToCache: IBotBase): void; - /** - * Clean the cache of all bot details - */ - clearCache(): void; - /** - * Find a bot in the cache by its name and side - * @param botName Name of bot to find - * @returns Bot details - */ - getBotByNameAndSide(botName: string, botSide: string): IBotBase; -} diff --git a/TypeScript/22CustomSptCommand/types/services/MatchLocationService.d.ts b/TypeScript/22CustomSptCommand/types/services/MatchLocationService.d.ts deleted file mode 100644 index dafa99a..0000000 --- a/TypeScript/22CustomSptCommand/types/services/MatchLocationService.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { SaveServer } from "@spt/servers/SaveServer"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class MatchLocationService { - protected timeUtil: TimeUtil; - protected saveServer: SaveServer; - protected locations: {}; - constructor(timeUtil: TimeUtil, saveServer: SaveServer); - deleteGroup(info: any): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/ModCompilerService.d.ts b/TypeScript/22CustomSptCommand/types/services/ModCompilerService.d.ts deleted file mode 100644 index eb4298c..0000000 --- a/TypeScript/22CustomSptCommand/types/services/ModCompilerService.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { CompilerOptions } from "typescript"; -import type { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ModHashCacheService } from "@spt/services/cache/ModHashCacheService"; -import { VFS } from "@spt/utils/VFS"; -export declare class ModCompilerService { - protected logger: ILogger; - protected modHashCacheService: ModHashCacheService; - protected vfs: VFS; - protected serverDependencies: string[]; - constructor(logger: ILogger, modHashCacheService: ModHashCacheService, vfs: VFS); - /** - * Convert a mods TS into JS - * @param modName Name of mod - * @param modPath Dir path to mod - * @param modTypeScriptFiles - * @returns - */ - compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - /** - * Convert a TS file into JS - * @param fileNames Paths to TS files - * @param options Compiler options - */ - protected compile(fileNames: string[], options: CompilerOptions): Promise; - /** - * Do the files at the provided paths exist - * @param fileNames - * @returns - */ - protected areFilesReady(fileNames: string[]): boolean; - /** - * Wait the provided number of milliseconds - * @param ms Milliseconds - * @returns - */ - protected delay(ms: number): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/services/NotificationService.d.ts b/TypeScript/22CustomSptCommand/types/services/NotificationService.d.ts deleted file mode 100644 index 69d895a..0000000 --- a/TypeScript/22CustomSptCommand/types/services/NotificationService.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export declare class NotificationService { - protected messageQueue: Record; - getMessageQueue(): Record; - getMessageFromQueue(sessionId: string): any[]; - updateMessageOnQueue(sessionId: string, value: any[]): void; - has(sessionID: string): boolean; - /** - * Pop first message from queue. - */ - pop(sessionID: string): any; - /** - * Add message to queue - */ - add(sessionID: string, message: IWsNotificationEvent): void; - /** - * Get message queue for session - * @param sessionID - */ - get(sessionID: string): any[]; -} diff --git a/TypeScript/22CustomSptCommand/types/services/OpenZoneService.d.ts b/TypeScript/22CustomSptCommand/types/services/OpenZoneService.d.ts deleted file mode 100644 index 1bc5f00..0000000 --- a/TypeScript/22CustomSptCommand/types/services/OpenZoneService.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -/** Service for adding new zones to a maps OpenZones property */ -export declare class OpenZoneService { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected databaseServer: DatabaseServer; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Add open zone to specified map - * @param locationId map location (e.g. factory4_day) - * @param zoneToAdd zone to add - */ - addZoneToMap(locationId: string, zoneToAdd: string): void; - /** - * Add open zones to all maps found in config/location.json to db - */ - applyZoneChangesToAllMaps(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts b/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts deleted file mode 100644 index 8d77ae2..0000000 --- a/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; -import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class PaymentService { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected httpResponse: HttpResponseUtil; - protected databaseServer: DatabaseServer; - protected handbookHelper: HandbookHelper; - protected traderHelper: TraderHelper; - protected itemHelper: ItemHelper; - protected inventoryHelper: InventoryHelper; - protected localisationService: LocalisationService; - protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); - /** - * Take money and insert items into return to server request - * @param pmcData Pmc profile - * @param request Buy item request - * @param sessionID Session id - * @param output Client response - */ - payMoney(pmcData: IPmcData, request: IProcessBuyTradeRequestData, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Get the item price of a specific traders assort - * @param traderAssortId Id of assort to look up - * @param traderId Id of trader with assort - * @returns Handbook rouble price of item - */ - protected getTraderItemHandbookPriceRouble(traderAssortId: string, traderId: string): number; - /** - * Receive money back after selling - * @param {IPmcData} pmcData - * @param {number} amountToSend - * @param {IProcessSellTradeRequestData} request - * @param {IItemEventRouterResponse} output - * @param {string} sessionID - * @returns IItemEventRouterResponse - */ - giveProfileMoney(pmcData: IPmcData, amountToSend: number, request: IProcessSellTradeRequestData, output: IItemEventRouterResponse, sessionID: string): void; - /** - * Remove currency from player stash/inventory and update client object with changes - * @param pmcData Player profile to find and remove currency from - * @param currencyTpl Type of currency to pay - * @param amountToPay money value to pay - * @param sessionID Session id - * @param output output object to send to client - */ - addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; - /** - * Get all money stacks in inventory and prioritise items in stash - * @param pmcData - * @param currencyTpl - * @param playerStashId Players stash id - * @returns Sorting money items - */ - protected getSortedMoneyItemsInInventory(pmcData: IPmcData, currencyTpl: string, playerStashId: string): Item[]; - /** - * Prioritise player stash first over player inventory - * Post-raid healing would often take money out of the players pockets/secure container - * @param a First money stack item - * @param b Second money stack item - * @param inventoryItems players inventory items - * @param playerStashId Players stash id - * @returns sort order - */ - protected prioritiseStashSort(a: Item, b: Item, inventoryItems: Item[], playerStashId: string): number; - /** - * Recursivly check items parents to see if it is inside the players inventory, not stash - * @param itemId item id to check - * @param inventoryItems player inventory - * @param playerStashId Players stash id - * @returns true if its in inventory - */ - protected isInStash(itemId: string, inventoryItems: Item[], playerStashId: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/services/PlayerService.d.ts b/TypeScript/22CustomSptCommand/types/services/PlayerService.d.ts deleted file mode 100644 index ae57410..0000000 --- a/TypeScript/22CustomSptCommand/types/services/PlayerService.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class PlayerService { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected localisationService: LocalisationService; - protected databaseServer: DatabaseServer; - constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); - /** - * Get level of player - * @param pmcData Player profile - * @returns Level of player - */ - calculateLevel(pmcData: IPmcData): number; -} diff --git a/TypeScript/22CustomSptCommand/types/services/PmcChatResponseService.d.ts b/TypeScript/22CustomSptCommand/types/services/PmcChatResponseService.d.ts deleted file mode 100644 index cc172c0..0000000 --- a/TypeScript/22CustomSptCommand/types/services/PmcChatResponseService.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -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 { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class PmcChatResponseService { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected randomUtil: RandomUtil; - protected notificationSendHelper: NotificationSendHelper; - protected matchBotDetailsCacheService: MatchBotDetailsCacheService; - protected localisationService: LocalisationService; - protected weightedRandomHelper: WeightedRandomHelper; - protected configServer: ConfigServer; - protected pmcResponsesConfig: IPmcChatResponse; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); - /** - * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative - * @param sessionId Session id - * @param pmcVictims Array of bots killed by player - * @param pmcData Player profile - */ - sendVictimResponse(sessionId: string, pmcVictims: Victim[], pmcData: IPmcData): void; - /** - * Not fully implemented yet, needs method of acquiring killers details after raid - * @param sessionId Session id - * @param pmcData Players profile - * @param killer The bot who killed the player - */ - sendKillerResponse(sessionId: string, pmcData: IPmcData, killer: Aggressor): void; - /** - * Choose a localised message to send the player (different if sender was killed or killed player) - * @param isVictim Is the message coming from a bot killed by the player - * @param pmcData Player profile - * @returns Message from PMC to player - */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string; - /** - * Should capitalisation be stripped from the message response before sending - * @param isVictim Was responder a victim of player - * @returns true = should be stripped - */ - protected stripCapitalistion(isVictim: boolean): boolean; - /** - * Should capitalisation be stripped from the message response before sending - * @param isVictim Was responder a victim of player - * @returns true = should be stripped - */ - protected allCaps(isVictim: boolean): boolean; - /** - * Should a suffix be appended to the end of the message being sent to player - * @param isVictim Was responder a victim of player - * @returns true = should be stripped - */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; - /** - * Choose a type of response based on the weightings in pmc response config - * @param isVictim Was responder killed by player - * @returns Response type (positive/negative) - */ - protected chooseResponseType(isVictim?: boolean): string; - /** - * Get locale keys related to the type of response to send (victim/killer) - * @param keyType Positive/negative - * @param isVictim Was responder killed by player - * @returns - */ - protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[]; - /** - * Get all locale keys that start with `pmcresponse-suffix` - * @returns array of keys - */ - protected getResponseSuffixLocaleKeys(): string[]; - /** - * Randomly draw a victim of the the array and return thier details - * @param pmcVictims Possible victims to choose from - * @returns IUserDialogInfo - */ - protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo; - /** - * Convert a victim object into a IUserDialogInfo object - * @param pmcVictim victim to convert - * @returns IUserDialogInfo - */ - protected getVictimDetails(pmcVictim: Victim): IUserDialogInfo; -} diff --git a/TypeScript/22CustomSptCommand/types/services/ProfileActivityService.d.ts b/TypeScript/22CustomSptCommand/types/services/ProfileActivityService.d.ts deleted file mode 100644 index fdc86c7..0000000 --- a/TypeScript/22CustomSptCommand/types/services/ProfileActivityService.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export declare class ProfileActivityService { - protected profileActivityTimestamps: Record; - /** - * Was the requested profile active in the last requested minutes - * @param sessionId Profile to check - * @param minutes Minutes to check for activity in - * @returns True when profile was active within past x minutes - */ - activeWithinLastMinutes(sessionId: string, minutes: number): boolean; - /** - * Get an array of profile ids that were active in the last x minutes - * @param minutes How many minutes from now to search for profiles - * @returns String array of profile ids - */ - getActiveProfileIdsWithinMinutes(minutes: number): string[]; - /** - * Update the timestamp a profile was last observed active - * @param sessionId Profile to update - */ - setActivityTimestamp(sessionId: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts b/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts deleted file mode 100644 index 18da0c0..0000000 --- a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -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 { 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"; -import { ISptProfile, IEquipmentBuild, IMagazineBuild, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { Watermark } from "@spt/utils/Watermark"; -export declare class ProfileFixerService { - protected logger: ILogger; - protected watermark: Watermark; - protected hideoutHelper: HideoutHelper; - protected inventoryHelper: InventoryHelper; - protected traderHelper: TraderHelper; - protected profileHelper: ProfileHelper; - protected itemHelper: ItemHelper; - protected localisationService: LocalisationService; - protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; - protected hashUtil: HashUtil; - protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected coreConfig: ICoreConfig; - protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); - /** - * Find issues in the pmc profile data that may cause issues and fix them - * @param pmcProfile profile to check and fix - */ - checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; - /** - * Find issues in the scav profile data that may cause issues - * @param scavProfile profile to check and fix - */ - checkForAndFixScavProfileIssues(scavProfile: IPmcData): void; - protected addMissingGunStandContainerImprovements(pmcProfile: IPmcData): void; - protected addMissingHallOfFameContainerImprovements(pmcProfile: IPmcData): void; - protected ensureGunStandLevelsMatch(pmcProfile: IPmcData): void; - protected addHideoutAreaStashes(pmcProfile: IPmcData): void; - protected addMissingHideoutWallAreas(pmcProfile: IPmcData): void; - /** - * Add tag to profile to indicate when it was made - * @param fullProfile - */ - addMissingSptVersionTagToProfile(fullProfile: ISptProfile): void; - /** - * TODO - make this non-public - currently used by RepeatableQuestController - * Remove unused condition counters - * @param pmcProfile profile to remove old counters from - */ - removeDanglingConditionCounters(pmcProfile: IPmcData): void; - addLighthouseKeeperIfMissing(pmcProfile: IPmcData): void; - protected addUnlockedInfoObjectIfMissing(pmcProfile: IPmcData): void; - /** - * Repeatable quests leave behind TaskConditionCounter objects that make the profile bloat with time, remove them - * @param pmcProfile Player profile to check - */ - protected removeDanglingTaskConditionCounters(pmcProfile: IPmcData): void; - protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; - protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; - protected addMissingBonusesProperty(pmcProfile: IPmcData): void; - /** - * Adjust profile quest status and statusTimers object values - * quest.status is numeric e.g. 2 - * quest.statusTimers keys are numeric as strings e.g. "2" - * @param profile profile to update - */ - protected updateProfileQuestDataValues(profile: IPmcData): void; - protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; - /** - * Some profiles have hideout maxed and therefore no improvements - * @param pmcProfile Profile to add improvement data to - */ - protected addMissingWallImprovements(pmcProfile: IPmcData): void; - /** - * A new property was added to slot items "locationIndex", if this is missing, the hideout slot item must be removed - * @param pmcProfile Profile to find and remove slots from - */ - protected removeResourcesFromSlotsInHideoutWithoutLocationIndexValue(pmcProfile: IPmcData): void; - /** - * Hideout slots need to be in a specific order, locationIndex in ascending order - * @param pmcProfile profile to edit - */ - protected reorderHideoutAreasWithResouceInputs(pmcProfile: IPmcData): void; - /** - * add in objects equal to the number of slots - * @param areaType area to check - * @param pmcProfile profile to update - */ - protected addEmptyObjectsToHideoutAreaSlots(areaType: HideoutAreas, emptyItemCount: number, pmcProfile: IPmcData): void; - protected addObjectsToArray(count: number, slots: HideoutSlot[]): HideoutSlot[]; - /** - * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing - * @param pmcProfile Profile to update - */ - addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; - /** - * @param profileBonuses bonuses from profile - * @param bonus bonus to find - * @returns matching bonus - */ - protected getBonusFromProfile(profileBonuses: Bonus[], bonus: StageBonus): Bonus; - /** - * Checks profile inventiory for items that do not exist inside the items db - * @param sessionId Session id - * @param pmcProfile Profile to check inventory of - */ - checkForOrphanedModdedItems(sessionId: string, fullProfile: ISptProfile): void; - /** - * @param buildType The type of build, used for logging only - * @param build The build to check for invalid items - * @param itemsDb The items database to use for item lookup - * @returns True if the build should be removed from the build list, false otherwise - */ - protected shouldRemoveWeaponEquipmentBuild(buildType: string, build: IWeaponBuild | IEquipmentBuild, itemsDb: Record): boolean; - /** - * @param magazineBuild The magazine build to check for validity - * @param itemsDb The items database to use for item lookup - * @returns True if the build should be removed from the build list, false otherwise - */ - protected shouldRemoveMagazineBuild(magazineBuild: IMagazineBuild, itemsDb: Record): boolean; - /** - * Attempt to fix common item issues that corrupt profiles - * @param pmcProfile Profile to check items of - */ - fixProfileBreakingInventoryItemIssues(pmcProfile: IPmcData): void; - /** - * Add `Improvements` object to hideout if missing - added in eft 13.0.21469 - * @param pmcProfile profile to update - */ - addMissingUpgradesPropertyToHideout(pmcProfile: IPmcData): void; - /** - * Iterate over associated profile template and check all hideout areas exist, add if not - * @param fullProfile Profile to update - */ - addMissingHideoutAreasToProfile(fullProfile: ISptProfile): void; - /** - * These used to be used for storing scav case rewards, rewards are now generated on pickup - * @param pmcProfile Profile to update - */ - removeLegacyScavCaseProductionCrafts(pmcProfile: IPmcData): void; - /** - * 3.7.0 moved AIDs to be numeric, old profiles need to be migrated - * We store the old AID value in new field `sessionId` - * @param fullProfile Profile to update - */ - fixIncorrectAidValue(fullProfile: ISptProfile): void; - /** - * Bsg nested `stats` into a sub object called 'eft' - * @param fullProfile Profile to check for and migrate stats data - */ - migrateStatsToNewStructure(fullProfile: ISptProfile): void; - /** - * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets - * @param pmcProfile Profile to add missing IDs to - */ - addMissingIdsToBonuses(pmcProfile: IPmcData): void; - /** - * 3.8.0 utilized the wrong ProductionTime for bitcoin, fix it if it's found - */ - fixBitcoinProductionTime(pmcProfile: IPmcData): void; - /** - * At some point the property name was changed,migrate data across to new name - * @param pmcProfile Profile to migrate improvements in - */ - protected migrateImprovements(pmcProfile: IPmcData): void; - /** - * After removing mods that add quests, the quest panel will break without removing these - * @param pmcProfile Profile to remove dead quests from - */ - protected removeOrphanedQuests(pmcProfile: IPmcData): void; - /** - * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value - * Resolve this by setting the nextResupply to 0 if it's null - */ - protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/ProfileSnapshotService.d.ts b/TypeScript/22CustomSptCommand/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 5bb718b..0000000 --- a/TypeScript/22CustomSptCommand/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/RagfairCategoriesService.d.ts b/TypeScript/22CustomSptCommand/types/services/RagfairCategoriesService.d.ts deleted file mode 100644 index c1ecb2d..0000000 --- a/TypeScript/22CustomSptCommand/types/services/RagfairCategoriesService.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -export declare class RagfairCategoriesService { - protected logger: ILogger; - protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, paymentHelper: PaymentHelper); - /** - * Get a dictionary of each item the play can see in their flea menu, filtered by what is available for them to buy - * @param offers All offers in flea - * @param searchRequestData Search criteria requested - * @param fleaUnlocked Can player see full flea yet (level 15 by default) - * @returns KVP of item tpls + count of offers - */ - getCategoriesFromOffers(offers: IRagfairOffer[], searchRequestData: ISearchRequestData, fleaUnlocked: boolean): Record; -} diff --git a/TypeScript/22CustomSptCommand/types/services/RagfairLinkedItemService.d.ts b/TypeScript/22CustomSptCommand/types/services/RagfairLinkedItemService.d.ts deleted file mode 100644 index 6011c1a..0000000 --- a/TypeScript/22CustomSptCommand/types/services/RagfairLinkedItemService.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -export declare class RagfairLinkedItemService { - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected linkedItemsCache: Record>; - constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper); - getLinkedItems(linkedSearchId: string): Set; - /** - * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl - * @param itemTpl Item to get sub-items for - * @returns ITemplateItem array - */ - getLinkedDbItems(itemTpl: string): ITemplateItem[]; - /** - * Create Dictionary of every item and the items associated with it - */ - protected buildLinkedItemTable(): void; - /** - * Add ammo to revolvers linked item dictionary - * @param cylinder Revolvers cylinder - * @param applyLinkedItems - */ - protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void; - /** - * Scans a given slot type for filters and returns them as a Set - * @param item - * @param slot - * @returns array of ids - */ - protected getFilters(item: ITemplateItem, slot: string): string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/services/RagfairOfferService.d.ts b/TypeScript/22CustomSptCommand/types/services/RagfairOfferService.d.ts deleted file mode 100644 index 04d5265..0000000 --- a/TypeScript/22CustomSptCommand/types/services/RagfairOfferService.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RagfairOfferHolder } from "@spt/utils/RagfairOfferHolder"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class RagfairOfferService { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected databaseServer: DatabaseServer; - protected saveServer: SaveServer; - protected ragfairServerHelper: RagfairServerHelper; - protected profileHelper: ProfileHelper; - protected eventOutputHolder: EventOutputHolder; - protected httpResponse: HttpResponseUtil; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected playerOffersLoaded: boolean; - /** Offer id + offer object */ - protected expiredOffers: Record; - protected ragfairConfig: IRagfairConfig; - protected ragfairOfferHandler: RagfairOfferHolder; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Get all offers - * @returns IRagfairOffer array - */ - getOffers(): IRagfairOffer[]; - getOfferByOfferId(offerId: string): IRagfairOffer; - getOffersOfType(templateId: string): IRagfairOffer[]; - addOffer(offer: IRagfairOffer): void; - addOfferToExpired(staleOffer: IRagfairOffer): void; - /** - * Get total count of current expired offers - * @returns Number of expired offers - */ - getExpiredOfferCount(): number; - /** - * Get an array of arrays of expired offer items + children - * @returns Expired offer assorts - */ - getExpiredOfferAssorts(): Item[][]; - /** - * Clear out internal expiredOffers dictionary of all items - */ - resetExpiredOffers(): void; - /** - * Does the offer exist on the ragfair - * @param offerId offer id to check for - * @returns offer exists - true - */ - doesOfferExist(offerId: string): boolean; - /** - * Remove an offer from ragfair by offer id - * @param offerId Offer id to remove - */ - removeOfferById(offerId: string): void; - /** - * Reduce size of an offer stack by specified amount - * @param offerId Offer to adjust stack size of - * @param amount How much to deduct from offers stack size - */ - removeOfferStack(offerId: string, amount: number): void; - removeAllOffersByTrader(traderId: string): void; - /** - * Do the trader offers on flea need to be refreshed - * @param traderID Trader to check - * @returns true if they do - */ - traderOffersNeedRefreshing(traderID: string): boolean; - addPlayerOffers(): void; - expireStaleOffers(): void; - /** - * Remove stale offer from flea - * @param staleOffer Stale offer to process - */ - protected processStaleOffer(staleOffer: IRagfairOffer): void; - protected returnPlayerOffer(playerOffer: IRagfairOffer): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/RagfairPriceService.d.ts b/TypeScript/22CustomSptCommand/types/services/RagfairPriceService.d.ts deleted file mode 100644 index 5b8fa56..0000000 --- a/TypeScript/22CustomSptCommand/types/services/RagfairPriceService.d.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -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 { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairConfig, IUnreasonableModPrices } from "@spt/models/spt/config/IRagfairConfig"; -import { IRagfairServerPrices } from "@spt/models/spt/ragfair/IRagfairServerPrices"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -/** - * Stores flea prices for items as well as methods to interact with them - */ -export declare class RagfairPriceService implements OnLoad { - protected handbookHelper: HandbookHelper; - protected databaseServer: DatabaseServer; - protected logger: ILogger; - protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; - protected traderHelper: TraderHelper; - protected randomUtil: RandomUtil; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected ragfairConfig: IRagfairConfig; - protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries - */ - onLoad(): Promise; - getRoute(): string; - /** - * Iterate over all items of type "Item" in db and get template price, store in cache - */ - refreshStaticPrices(): void; - /** - * Copy the prices.json data into our dynamic price dictionary - */ - refreshDynamicPrices(): void; - /** - * Get the dynamic price for an item. If value doesn't exist, use static (handbook) value. - * if no static value, return 1 - * @param tplId Item tpl id to get price for - * @returns price in roubles - */ - getFleaPriceForItem(tplId: string): number; - /** - * Get the flea price for an offers items + children - * @param offerItems offer item + children to process - * @returns Rouble price - */ - getFleaPriceForOfferItems(offerItems: Item[]): number; - /** - * get the dynamic (flea) price for an item - * @param itemTpl item template id to look up - * @returns price in roubles - */ - getDynamicPriceForItem(itemTpl: string): number; - /** - * Grab the static (handbook) for an item by its tplId - * @param itemTpl item template id to look up - * @returns price in roubles - */ - getStaticPriceForItem(itemTpl: string): number; - /** - * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing - * This will refresh the caches prior to building the output - * @returns Dictionary of item tpls and rouble cost - */ - getAllFleaPrices(): Record; - getAllStaticPrices(): Record; - /** - * Get the percentage difference between two values - * @param a numerical value a - * @param b numerical value b - * @returns different in percent - */ - protected getPriceDifference(a: number, b: number): number; - /** - * Get the rouble price for an assorts barter scheme - * @param barterScheme - * @returns Rouble price - */ - getBarterPrice(barterScheme: IBarterScheme[]): number; - /** - * Generate a currency cost for an item and its mods - * @param offerItems Item with mods to get price for - * @param desiredCurrency Currency price desired in - * @param isPackOffer Price is for a pack type offer - * @returns cost of item in desired currency - */ - getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number; - /** - * @param itemTemplateId items tpl value - * @param desiredCurrency Currency to return result in - * @param item Item object (used for weapon presets) - * @param offerItems - * @param isPackOffer - * @returns - */ - getDynamicItemPrice(itemTemplateId: string, desiredCurrency: string, item?: Item, offerItems?: Item[], isPackOffer?: boolean): number; - /** - * using data from config, adjust an items price to be relative to its handbook price - * @param handbookPrices Prices of items in handbook - * @param unreasonableItemChange Change object from config - * @param itemTpl Item being adjusted - * @param price Current price of item - * @returns Adjusted price of item - */ - protected adjustUnreasonablePrice(handbookPrices: HandbookItem[], unreasonableItemChange: IUnreasonableModPrices, itemTpl: string, price: number): number; - /** - * Get different min/max price multipliers for different offer types (preset/pack/default) - * @param isPreset Offer is a preset - * @param isPack Offer is a pack - * @returns MinMax values - */ - protected getOfferTypeRangeValues(isPreset: boolean, isPack: boolean): MinMax; - /** - * Check to see if an items price is below its handbook price and adjust according to values set to config/ragfair.json - * @param itemPrice price of item - * @param itemTpl item template Id being checked - * @returns adjusted price value in roubles - */ - protected adjustPriceIfBelowHandbook(itemPrice: number, itemTpl: string): number; - /** - * Multiply the price by a randomised curve where n = 2, shift = 2 - * @param existingPrice price to alter - * @param rangeValues min and max to adjust price by - * @returns multiplied price - */ - protected randomiseOfferPrice(existingPrice: number, rangeValues: MinMax): number; - /** - * Calculate the cost of a weapon preset by adding together the price of its mods + base price of default weapon preset - * @param weaponRootItem base weapon - * @param weaponWithChildren weapon plus mods - * @param existingPrice price of existing base weapon - * @returns price of weapon in roubles - */ - protected getWeaponPresetPrice(weaponRootItem: Item, weaponWithChildren: Item[], existingPrice: number): number; - /** - * Get the highest price for an item that is stored in handbook or trader assorts - * @param itemTpl Item to get highest price of - * @returns rouble cost - */ - protected getHighestHandbookOrTraderPriceAsRouble(itemTpl: string): number; - /** - * Attempt to get the default preset for a weapon, failing that get the first preset in the array - * (assumes default = has encyclopedia entry) - * @param presets weapon presets to choose from - * @returns Default preset object - */ - protected getWeaponPreset(weapon: Item): { - isDefault: boolean; - preset: IPreset; - }; -} diff --git a/TypeScript/22CustomSptCommand/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/22CustomSptCommand/types/services/RagfairRequiredItemsService.d.ts deleted file mode 100644 index cfc224d..0000000 --- a/TypeScript/22CustomSptCommand/types/services/RagfairRequiredItemsService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -export declare class RagfairRequiredItemsService { - protected logger: ILogger; - protected paymentHelper: PaymentHelper; - protected ragfairOfferService: RagfairOfferService; - protected requiredItemsCache: {}; - constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); - getRequiredItemsById(searchId: string): IRagfairOffer[]; - buildRequiredItemTable(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/RagfairTaxService.d.ts b/TypeScript/22CustomSptCommand/types/services/RagfairTaxService.d.ts deleted file mode 100644 index 4e4e648..0000000 --- a/TypeScript/22CustomSptCommand/types/services/RagfairTaxService.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IStorePlayerOfferTaxAmountRequestData } from "@spt/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -export declare class RagfairTaxService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected ragfairPriceService: RagfairPriceService; - protected itemHelper: ItemHelper; - protected playerOfferTaxCache: Record; - constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); - storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; - clearStoredOfferTaxById(offerIdToRemove: string): void; - getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; - /** - // This method, along with calculateItemWorth, is trying to mirror the client-side code found in the method "CalculateTaxPrice". - // It's structured to resemble the client-side code as closely as possible - avoid making any big structure changes if it's not necessary. - * @param item Item being sold on flea - * @param pmcData player profile - * @param requirementsValue - * @param offerItemCount Number of offers being created - * @param sellInOnePiece - * @returns Tax in roubles - */ - calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; -} diff --git a/TypeScript/22CustomSptCommand/types/services/RaidTimeAdjustmentService.d.ts b/TypeScript/22CustomSptCommand/types/services/RaidTimeAdjustmentService.d.ts deleted file mode 100644 index e2a4237..0000000 --- a/TypeScript/22CustomSptCommand/types/services/RaidTimeAdjustmentService.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -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 { ILocationConfig, IScavRaidTimeLocationSettings, LootMultiplier } 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"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class RaidTimeAdjustmentService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected randomUtil: RandomUtil; - protected weightedRandomHelper: WeightedRandomHelper; - protected applicationContext: ApplicationContext; - protected configServer: ConfigServer; - protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, applicationContext: ApplicationContext, configServer: ConfigServer); - /** - * Make alterations to the base map data passed in - * Loot multipliers/waves/wave start times - * @param raidAdjustments Changes to process on map - * @param mapBase Map to adjust - */ - makeAdjustmentsToMap(raidAdjustments: IRaidChanges, mapBase: ILocationBase): void; - /** - * Adjust the loot multiplier values passed in to be a % of their original value - * @param mapLootMultiplers Multiplers to adjust - * @param loosePercent Percent to change values to - */ - protected adjustLootMultipliers(mapLootMultiplers: LootMultiplier, loosePercent: number): void; - /** - * Adjust bot waves to act as if player spawned later - * @param mapBase map to adjust - * @param raidAdjustments Map adjustments - */ - protected adjustWaves(mapBase: ILocationBase, raidAdjustments: IRaidChanges): void; - /** - * Create a randomised adjustment to the raid based on map data in location.json - * @param sessionId Session id - * @param request Raid adjustment request - * @returns Response to send to client - */ - getRaidAdjustments(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * Get raid start time settings for specific map - * @param location Map Location e.g. bigmap - * @returns IScavRaidTimeLocationSettings - */ - protected getMapSettings(location: string): IScavRaidTimeLocationSettings; - /** - * Adjust exit times to handle scavs entering raids part-way through - * @param mapBase Map base file player is on - * @param newRaidTimeMinutes How long raid is in minutes - * @returns List of exit changes to send to client - */ - protected getExitAdjustments(mapBase: ILocationBase, newRaidTimeMinutes: number): ExtractChange[]; -} diff --git a/TypeScript/22CustomSptCommand/types/services/RepairService.d.ts b/TypeScript/22CustomSptCommand/types/services/RepairService.d.ts deleted file mode 100644 index 9203417..0000000 --- a/TypeScript/22CustomSptCommand/types/services/RepairService.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RepairHelper } from "@spt/helpers/RepairHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; -import { BonusType } from "@spt/models/enums/BonusType"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class RepairService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected profileHelper: ProfileHelper; - protected randomUtil: RandomUtil; - protected itemHelper: ItemHelper; - protected traderHelper: TraderHelper; - protected weightedRandomHelper: WeightedRandomHelper; - protected paymentService: PaymentService; - protected repairHelper: RepairHelper; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, profileHelper: ProfileHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Use trader to repair an items durability - * @param sessionID Session id - * @param pmcData profile to find item to repair in - * @param repairItemDetails details of the item to repair - * @param traderId Trader being used to repair item - * @returns RepairDetails object - */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; - /** - * @param sessionID Session id - * @param pmcData profile to take money from - * @param repairedItemId Repaired item id - * @param repairCost Cost to repair item in roubles - * @param traderId Id of the trader who repaired the item / who is paid - * @param output - */ - payForRepair(sessionID: string, pmcData: IPmcData, repairedItemId: string, repairCost: number, traderId: string, output: IItemEventRouterResponse): void; - /** - * Add skill points to profile after repairing an item - * @param sessionId Session id - * @param repairDetails details of item repaired, cost/item - * @param pmcData Profile to add points to - */ - addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void; - protected getIntellectGainedFromRepair(repairDetails: RepairDetails): number; - /** - * Return an appromixation of the amount of skill points live would return for the given repairDetails - * @param repairDetails the repair details to calculate skill points for - * @returns the number of skill points to reward the user - */ - protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number; - /** - * @param sessionId Session id - * @param pmcData Profile to update repaired item in - * @param repairKits Array of Repair kits to use - * @param itemToRepairId Item id to repair - * @param output IItemEventRouterResponse - * @returns Details of repair, item/price - */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; - /** - * Calculate value repairkit points need to be divided by to get the durability points to be added to an item - * @param itemToRepairDetails Item to repair details - * @param isArmor Is the item being repaired armor - * @param pmcData Player profile - * @returns Number to divide kit points by - */ - protected getKitDivisor(itemToRepairDetails: ITemplateItem, isArmor: boolean, pmcData: IPmcData): number; - /** - * Get the bonus multiplier for a skill from a player profile - * @param skillBonus Bonus to get multipler of - * @param pmcData Player profile to look in for skill - * @returns Multiplier value - */ - protected getBonusMultiplierValue(skillBonus: BonusType, pmcData: IPmcData): number; - /** - * Should a repair kit apply total durability loss on repair - * @param pmcData Player profile - * @param applyRandomizeDurabilityLoss Value from repair config - * @returns True if loss should be applied - */ - protected shouldRepairKitApplyDurabilityLoss(pmcData: IPmcData, applyRandomizeDurabilityLoss: boolean): boolean; - /** - * Update repair kits Resource object if it doesn't exist - * @param repairKitDetails Repair kit details from db - * @param repairKitInInventory Repair kit to update - */ - protected addMaxResourceToKitIfMissing(repairKitDetails: ITemplateItem, repairKitInInventory: Item): void; - /** - * Chance to apply buff to an item (Armor/weapon) if repaired by armor kit - * @param repairDetails Repair details of item - * @param pmcData Player profile - */ - addBuffToItem(repairDetails: RepairDetails, pmcData: IPmcData): void; - /** - * Add random buff to item - * @param itemConfig weapon/armor config - * @param repairDetails Details for item to repair - */ - addBuff(itemConfig: BonusSettings, item: Item): void; - /** - * Check if item should be buffed by checking the item type and relevant player skill level - * @param repairDetails Item that was repaired - * @param itemTpl tpl of item to be buffed - * @param pmcData Player profile - * @returns True if item should have buff applied - */ - protected shouldBuffItem(repairDetails: RepairDetails, pmcData: IPmcData): boolean; - /** - * Based on item, what underlying skill does this item use for buff settings - * @param itemTemplate Item to check for skill - * @returns Skill name - */ - protected getItemSkillType(itemTemplate: ITemplateItem): SkillTypes | undefined; - /** - * Ensure multiplier is between 1 and 0.01 - * @param receiveDurabilityMaxPercent Max durability percent - * @param receiveDurabilityPercent current durability percent - * @returns durability multiplier value - */ - protected getDurabilityMultiplier(receiveDurabilityMaxPercent: number, receiveDurabilityPercent: number): number; -} -export declare class RepairDetails { - repairCost?: number; - repairPoints?: number; - repairedItem: Item; - repairedItemIsArmor: boolean; - repairAmount: number; - repairedByKit: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts b/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts deleted file mode 100644 index 4162e14..0000000 --- a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IConfig } from "@spt/models/eft/common/IGlobals"; -import { Inventory } from "@spt/models/eft/common/tables/IBotType"; -import { Season } from "@spt/models/enums/Season"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { GiftService } from "@spt/services/GiftService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { DatabaseImporter } from "@spt/utils/DatabaseImporter"; -export declare class SeasonalEventService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected databaseImporter: DatabaseImporter; - protected giftService: GiftService; - protected localisationService: LocalisationService; - protected botHelper: BotHelper; - protected profileHelper: ProfileHelper; - protected configServer: ConfigServer; - protected seasonalEventConfig: ISeasonalEventConfig; - protected questConfig: IQuestConfig; - protected httpConfig: IHttpConfig; - protected weatherConfig: IWeatherConfig; - protected halloweenEventActive: boolean; - protected christmasEventActive: boolean; - /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; - constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); - protected get christmasEventItems(): string[]; - protected get halloweenEventItems(): string[]; - /** - * Get an array of christmas items found in bots inventories as loot - * @returns array - */ - getChristmasEventItems(): string[]; - /** - * Get an array of halloween items found in bots inventories as loot - * @returns array - */ - getHalloweenEventItems(): string[]; - itemIsChristmasRelated(itemTpl: string): boolean; - itemIsHalloweenRelated(itemTpl: string): boolean; - /** - * Check if item id exists in christmas or halloween event arrays - * @param itemTpl item tpl to check for - * @returns - */ - itemIsSeasonalRelated(itemTpl: string): boolean; - /** - * Get an array of seasonal items that should not appear - * e.g. if halloween is active, only return christmas items - * or, if halloween and christmas are inactive, return both sets of items - * @returns array of tpl strings - */ - getInactiveSeasonalEventItems(): string[]; - /** - * Is a seasonal event currently active - * @returns true if event is active - */ - seasonalEventEnabled(): boolean; - /** - * Is christmas event active - * @returns true if active - */ - christmasEventEnabled(): boolean; - /** - * is halloween event active - * @returns true if active - */ - halloweenEventEnabled(): boolean; - /** - * Is detection of seasonal events enabled (halloween / christmas) - * @returns true if seasonal events should be checked for - */ - isAutomaticEventDetectionEnabled(): boolean; - /** - * Get a dictionary of gear changes to apply to bots for a specific event e.g. Christmas/Halloween - * @param eventName Name of event to get gear changes for - * @returns bots with equipment changes - */ - protected getEventBotGear(eventType: SeasonalEventType): Record>>; - /** - * Get the dates each seasonal event starts and ends at - * @returns Record with event name + start/end date - */ - getEventDetails(): ISeasonalEvent[]; - /** - * Look up quest in configs/quest.json - * @param questId Quest to look up - * @param event event type (Christmas/Halloween/None) - * @returns true if related - */ - isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; - /** - * Handle seasonal events - * @param sessionId Players id - */ - enableSeasonalEvents(sessionId: string): void; - protected cacheActiveEvents(): void; - getActiveWeatherSeason(): Season; - /** - * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) - * @param botInventory Bots inventory to iterate over - * @param botRole the role of the bot being processed - */ - removeChristmasItemsFromBotInventory(botInventory: Inventory, botRole: string): void; - /** - * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id - * @param globalConfig globals.json - * @param eventName Name of the event to enable. e.g. Christmas - */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; - protected adjustZryachiyMeleeChance(): void; - protected enableHalloweenSummonEvent(): void; - protected addEventBossesToMaps(eventType: SeasonalEventType): void; - /** - * Change trader icons to be more event themed (Halloween only so far) - * @param eventType What event is active - */ - protected adjustTraderIcons(eventType: SeasonalEventType): void; - /** - * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property - */ - protected addLootItemsToGifterDropItemsList(): void; - /** - * Read in data from seasonalEvents.json and add found equipment items to bots - * @param eventName Name of the event to read equipment in from config - */ - protected addEventGearToBots(eventType: SeasonalEventType): void; - protected addPumpkinsToScavBackpacks(): void; - /** - * Set Khorovod(dancing tree) chance to 100% on all maps that support it - */ - protected enableDancingTree(): void; - /** - * Add santa to maps - */ - protected addGifterBotToMaps(): void; - /** - * Send gift to player if they'e not already received it - * @param playerId Player to send gift to - * @param giftkey Key of gift to give - */ - protected giveGift(playerId: string, giftkey: string): void; - /** - * Get the underlying bot type for an event bot e.g. `peacefullZryachiyEvent` will return `bossZryachiy` - * @param eventBotRole Event bot role type - * @returns Bot role as string - */ - getBaseRoleForEventBot(eventBotRole: string): string; - enableSnow(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/TraderAssortService.d.ts b/TypeScript/22CustomSptCommand/types/services/TraderAssortService.d.ts deleted file mode 100644 index 48af0b7..0000000 --- a/TypeScript/22CustomSptCommand/types/services/TraderAssortService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -export declare class TraderAssortService { - protected pristineTraderAssorts: Record; - getPristineTraderAssort(traderId: string): ITraderAssort; - /** - * Store trader assorts inside a class property - * @param traderId Traderid to store assorts against - * @param assort Assorts to store - */ - setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/22CustomSptCommand/types/services/TraderPurchasePersisterService.d.ts deleted file mode 100644 index 0ad76c9..0000000 --- a/TypeScript/22CustomSptCommand/types/services/TraderPurchasePersisterService.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -/** - * Help with storing limited item purchases from traders in profile to persist them over server restarts - */ -export declare class TraderPurchasePersisterService { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; - protected profileHelper: ProfileHelper; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Get the purchases made from a trader for this profile before the last trader reset - * @param sessionId Session id - * @param traderId Trader to loop up purchases for - * @returns Dict of assort id and count purchased - */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record; - /** - * Get a purchase made from a trader for requested profile before the last trader reset - * @param sessionId Session id - * @param traderId Trader to loop up purchases for - * @param assortId Id of assort to get data for - * @returns TraderPurchaseData - */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData; - /** - * Remove all trader purchase records from all profiles that exist - * @param traderId Traders id - */ - resetTraderPurchasesStoredInProfile(traderId: string): void; - /** - * Iterate over all server profiles and remove specific trader purchase data that has passed the trader refesh time - * @param traderId Trader id - */ - removeStalePurchasesFromProfiles(traderId: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/TraderServicesService.d.ts b/TypeScript/22CustomSptCommand/types/services/TraderServicesService.d.ts deleted file mode 100644 index 111c71a..0000000 --- a/TypeScript/22CustomSptCommand/types/services/TraderServicesService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class TraderServicesService { - protected profileHelper: ProfileHelper; - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected cloner: ICloner; - constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); - getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; -} diff --git a/TypeScript/22CustomSptCommand/types/services/cache/BundleHashCacheService.d.ts b/TypeScript/22CustomSptCommand/types/services/cache/BundleHashCacheService.d.ts deleted file mode 100644 index f8289c2..0000000 --- a/TypeScript/22CustomSptCommand/types/services/cache/BundleHashCacheService.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class BundleHashCacheService { - protected vfs: VFS; - protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; - protected logger: ILogger; - protected bundleHashes: Record; - protected readonly bundleHashCachePath = "./user/cache/bundleHashCache.json"; - constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); - getStoredValue(key: string): number; - storeValue(key: string, value: number): void; - matchWithStoredHash(bundlePath: string, hash: number): boolean; - calculateAndMatchHash(bundlePath: string): boolean; - calculateAndStoreHash(bundlePath: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/cache/ModHashCacheService.d.ts b/TypeScript/22CustomSptCommand/types/services/cache/ModHashCacheService.d.ts deleted file mode 100644 index 3cb8ff8..0000000 --- a/TypeScript/22CustomSptCommand/types/services/cache/ModHashCacheService.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class ModHashCacheService { - protected vfs: VFS; - protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; - protected logger: ILogger; - protected modHashes: Record; - protected readonly modCachePath = "./user/cache/modCache.json"; - constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); - getStoredValue(key: string): string; - storeValue(key: string, value: string): void; - matchWithStoredHash(modName: string, hash: string): boolean; - calculateAndCompareHash(modName: string, modContent: string): boolean; - calculateAndStoreHash(modName: string, modContent: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/CustomItemService.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/CustomItemService.d.ts deleted file mode 100644 index 0c82e8b..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/CustomItemService.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; -import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class CustomItemService { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected itemBaseClassService: ItemBaseClassService; - protected cloner: ICloner; - protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); - /** - * Create a new item from a cloned item base - * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start - * Add to the items db - * Add to the flea market - * Add to the handbook - * Add to the locales - * @param newItemDetails Item details for the new item to be created - * @returns tplId of the new item created - */ - createItemFromClone(newItemDetails: NewItemFromCloneDetails): CreateItemResult; - /** - * Create a new item without using an existing item as a template - * Add to the items db - * Add to the flea market - * Add to the handbook - * Add to the locales - * @param newItemDetails Details on what the item to be created - * @returns CreateItemResult containing the completed items Id - */ - createItem(newItemDetails: NewItemDetails): CreateItemResult; - /** - * If the id provided is an empty string, return a randomly generated guid, otherwise return the newId parameter - * @param newId id supplied to code - * @returns item id - */ - protected getOrGenerateIdForItem(newId: string): string; - /** - * Iterates through supplied properties and updates the cloned items properties with them - * Complex objects cannot have overrides, they must be fully hydrated with values if they are to be used - * @param overrideProperties new properties to apply - * @param itemClone item to update - */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; - /** - * Addd a new item object to the in-memory representation of items.json - * @param newItemId id of the item to add to items.json - * @param itemToAdd Item to add against the new id - */ - protected addToItemsDb(newItemId: string, itemToAdd: ITemplateItem): void; - /** - * Add a handbook price for an item - * @param newItemId id of the item being added - * @param parentId parent id of the item being added - * @param priceRoubles price of the item being added - */ - protected addToHandbookDb(newItemId: string, parentId: string, priceRoubles: number): void; - /** - * Iterate through the passed in locale data and add to each locale in turn - * If data is not provided for each langauge eft uses, the first object will be used in its place - * e.g. - * en[0] - * fr[1] - * - * No jp provided, so english will be used as a substitute - * @param localeDetails key is language, value are the new locale details - * @param newItemId id of the item being created - */ - protected addToLocaleDbs(localeDetails: Record, newItemId: string): void; - /** - * Add a price to the in-memory representation of prices.json, used to inform the flea of an items price on the market - * @param newItemId id of the new item - * @param fleaPriceRoubles Price of the new item - */ - protected addToFleaPriceDb(newItemId: string, fleaPriceRoubles: number): void; - /** - * Add a weapon to the hideout weapon shelf whitelist - * @param newItemId Weapon id to add - */ - protected addToWeaponShelf(newItemId: string): void; - /** - * Add a custom weapon to PMCs loadout - * @param weaponTpl Custom weapon tpl to add to PMCs - * @param weaponWeight The weighting for the weapon to be picked vs other weapons - * @param weaponSlot The slot the weapon should be added to (e.g. FirstPrimaryWeapon/SecondPrimaryWeapon/Holster) - */ - addCustomWeaponToPMCs(weaponTpl: string, weaponWeight: number, weaponSlot: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts deleted file mode 100644 index bb969b3..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { DynamicRouter, RouteAction } from "@spt/di/Router"; -export declare class DynamicRouterMod extends DynamicRouter { - private topLevelRoute; - constructor(routes: RouteAction[], topLevelRoute: string); - getTopLevelRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts deleted file mode 100644 index 3c9d955..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -import { RouteAction } from "@spt/di/Router"; -export declare class DynamicRouterModService { - private container; - constructor(container: DependencyContainer); - registerDynamicRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/httpListener/HttpListenerMod.d.ts deleted file mode 100644 index 75e42ee..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/httpListener/HttpListenerMod.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; -export declare class HttpListenerMod implements IHttpListener { - private canHandleOverride; - private handleOverride; - constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); - canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/httpListener/HttpListenerModService.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/httpListener/HttpListenerModService.d.ts deleted file mode 100644 index 23abfbe..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/httpListener/HttpListenerModService.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -import { IncomingMessage, ServerResponse } from "node:http"; -import { DependencyContainer } from "tsyringe"; -export declare class HttpListenerModService { - protected container: DependencyContainer; - constructor(container: DependencyContainer); - registerHttpListener(name: string, canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/image/ImageRouteService.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/image/ImageRouteService.d.ts deleted file mode 100644 index 29569b2..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/image/ImageRouteService.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class ImageRouteService { - protected routes: Record; - addRoute(urlKey: string, route: string): void; - getByKey(urlKey: string): string; - existsByKey(urlKey: string): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/onLoad/OnLoadMod.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/onLoad/OnLoadMod.d.ts deleted file mode 100644 index 6544704..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/onLoad/OnLoadMod.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { OnLoad } from "@spt/di/OnLoad"; -export declare class OnLoadMod implements OnLoad { - private onLoadOverride; - private getRouteOverride; - constructor(onLoadOverride: () => void, getRouteOverride: () => string); - onLoad(): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/onLoad/OnLoadModService.d.ts deleted file mode 100644 index f402103..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/onLoad/OnLoadModService.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -export declare class OnLoadModService { - protected container: DependencyContainer; - constructor(container: DependencyContainer); - registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/onUpdate/OnUpdateMod.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/onUpdate/OnUpdateMod.d.ts deleted file mode 100644 index 3a8a26f..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/onUpdate/OnUpdateMod.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { OnUpdate } from "@spt/di/OnUpdate"; -export declare class OnUpdateMod implements OnUpdate { - private onUpdateOverride; - private getRouteOverride; - constructor(onUpdateOverride: (timeSinceLastRun: number) => boolean, getRouteOverride: () => string); - onUpdate(timeSinceLastRun: number): Promise; - getRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/onUpdate/OnUpdateModService.d.ts deleted file mode 100644 index 05d735b..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -export declare class OnUpdateModService { - protected container: DependencyContainer; - constructor(container: DependencyContainer); - registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/staticRouter/StaticRouterMod.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/staticRouter/StaticRouterMod.d.ts deleted file mode 100644 index 48bf4a1..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/staticRouter/StaticRouterMod.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RouteAction, StaticRouter } from "@spt/di/Router"; -export declare class StaticRouterMod extends StaticRouter { - private topLevelRoute; - constructor(routes: RouteAction[], topLevelRoute: string); - getTopLevelRoute(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/staticRouter/StaticRouterModService.d.ts deleted file mode 100644 index f60432d..0000000 --- a/TypeScript/22CustomSptCommand/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -import { RouteAction } from "@spt/di/Router"; -export declare class StaticRouterModService { - protected container: DependencyContainer; - constructor(container: DependencyContainer); - registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/App.d.ts b/TypeScript/22CustomSptCommand/types/utils/App.d.ts deleted file mode 100644 index 211044e..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/App.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { HttpServer } from "@spt/servers/HttpServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { EncodingUtil } from "@spt/utils/EncodingUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class App { - protected logger: ILogger; - protected timeUtil: TimeUtil; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected encodingUtil: EncodingUtil; - protected httpServer: HttpServer; - protected onLoadComponents: OnLoad[]; - protected onUpdateComponents: OnUpdate[]; - protected onUpdateLastRun: {}; - protected coreConfig: ICoreConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, configServer: ConfigServer, encodingUtil: EncodingUtil, httpServer: HttpServer, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); - load(): Promise; - protected update(onUpdateComponents: OnUpdate[]): Promise; - protected logUpdateException(err: any, updateable: OnUpdate): void; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/AsyncQueue.d.ts b/TypeScript/22CustomSptCommand/types/utils/AsyncQueue.d.ts deleted file mode 100644 index a14181d..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/AsyncQueue.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { ICommand } from "@spt/models/spt/utils/ICommand"; -export declare class AsyncQueue implements IAsyncQueue { - protected commandsQueue: ICommand[]; - constructor(); - waitFor(command: ICommand): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/CompareUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/CompareUtil.d.ts deleted file mode 100644 index a5b94d5..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/CompareUtil.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare class CompareUtil { - private static typesToCheckAgainst; - /** - * This function does an object comparison, equivalent to applying reflections - * and scanning for all possible properties including arrays. - * @param v1 value 1 to compare - * @param v2 value 2 to compare - * @returns true if equal, false if not - */ - recursiveCompare(v1: any, v2: any): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/DatabaseImporter.d.ts b/TypeScript/22CustomSptCommand/types/utils/DatabaseImporter.d.ts deleted file mode 100644 index 4005d46..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/DatabaseImporter.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ImageRouter } from "@spt/routers/ImageRouter"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { EncodingUtil } from "@spt/utils/EncodingUtil"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { ImporterUtil } from "@spt/utils/ImporterUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class DatabaseImporter implements OnLoad { - protected logger: ILogger; - protected vfs: VFS; - protected jsonUtil: JsonUtil; - protected localisationService: LocalisationService; - protected databaseServer: DatabaseServer; - protected imageRouter: ImageRouter; - protected encodingUtil: EncodingUtil; - protected hashUtil: HashUtil; - protected importerUtil: ImporterUtil; - protected configServer: ConfigServer; - private hashedFile; - private valid; - private filepath; - protected httpConfig: IHttpConfig; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); - /** - * Get path to spt data - * @returns path to data - */ - getSptDataPath(): string; - onLoad(): Promise; - /** - * Read all json files in database folder and map into a json object - * @param filepath path to database folder - */ - protected hydrateDatabase(filepath: string): Promise; - protected onReadValidate(fileWithPath: string, data: string): void; - getRoute(): string; - protected validateFile(filePathAndName: string, fileData: any): boolean; - /** - * Find and map files with image router inside a designated path - * @param filepath Path to find files in - */ - loadImages(filepath: string, directories: string[], routes: string[]): void; - /** - * Check for a path override in the http json config file - * @param imagePath Key - * @returns override for key - */ - protected getImagePathOverride(imagePath: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/EncodingUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/EncodingUtil.d.ts deleted file mode 100644 index dabb97a..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/EncodingUtil.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export declare class EncodingUtil { - encode(value: string, encode: EncodeType): string; - decode(value: string, encode: EncodeType): string; - fromBase64(value: string): string; - toBase64(value: string): string; - fromHex(value: string): string; - toHex(value: string): string; -} -export declare enum EncodeType { - BASE64 = "base64", - HEX = "hex", - ASCII = "ascii", - BINARY = "binary", - UTF8 = "utf8" -} diff --git a/TypeScript/22CustomSptCommand/types/utils/HashUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/HashUtil.d.ts deleted file mode 100644 index 427c186..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/HashUtil.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/// -/// -import crypto from "node:crypto"; -import fs from "node:fs"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class HashUtil { - protected timeUtil: TimeUtil; - constructor(timeUtil: TimeUtil); - /** - * Create a 24 character id using the sha256 algorithm + current timestamp - * @returns 24 character hash - */ - generate(): string; - generateMd5ForData(data: string): string; - generateSha1ForData(data: string): string; - generateCRC32ForFile(filePath: fs.PathLike): number; - /** - * Create a hash for the data parameter - * @param algorithm algorithm to use to hash - * @param data data to be hashed - * @returns hash value - */ - generateHashForData(algorithm: string, data: crypto.BinaryLike): string; - generateAccountId(): number; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/HttpFileUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/HttpFileUtil.d.ts deleted file mode 100644 index cc0d9ef..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/HttpFileUtil.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -import { ServerResponse } from "node:http"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -export declare class HttpFileUtil { - protected httpServerHelper: HttpServerHelper; - constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/HttpResponseUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/HttpResponseUtil.d.ts deleted file mode 100644 index 865c8e5..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/HttpResponseUtil.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { BackendErrorCodes } from "@spt/models/enums/BackendErrorCodes"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -export declare class HttpResponseUtil { - protected jsonUtil: JsonUtil; - protected localisationService: LocalisationService; - constructor(jsonUtil: JsonUtil, localisationService: LocalisationService); - protected clearString(s: string): any; - /** - * Return passed in data as JSON string - * @param data - * @returns - */ - noBody(data: any): any; - /** - * Game client needs server responses in a particular format - * @param data - * @param err - * @param errmsg - * @returns - */ - getBody(data: T, err?: number, errmsg?: any, sanitize?: boolean): IGetBodyResponseData; - getUnclearedBody(data: any, err?: number, errmsg?: any): string; - emptyResponse(): IGetBodyResponseData; - nullResponse(): INullResponseData; - emptyArrayResponse(): IGetBodyResponseData; - /** - * Add an error into the 'warnings' array of the client response message - * @param output IItemEventRouterResponse - * @param message Error message - * @param errorCode Error code - * @returns IItemEventRouterResponse - */ - appendErrorToOutput(output: IItemEventRouterResponse, message?: string, errorCode?: BackendErrorCodes): IItemEventRouterResponse; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/ImporterUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/ImporterUtil.d.ts deleted file mode 100644 index c36bcb5..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/ImporterUtil.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class ImporterUtil { - protected vfs: VFS; - protected jsonUtil: JsonUtil; - constructor(vfs: VFS, jsonUtil: JsonUtil); - /** - * Load files into js objects recursively (asynchronous) - * @param filepath Path to folder with files - * @returns Promise return T type associated with this class - */ - loadRecursiveAsync(filepath: string, onReadCallback?: (fileWithPath: string, data: string) => void, onObjectDeserialized?: (fileWithPath: string, object: any) => void): Promise; - /** - * Load files into js objects recursively (synchronous) - * @param filepath Path to folder with files - * @returns - */ - loadRecursive(filepath: string, onReadCallback?: (fileWithPath: string, data: string) => void, onObjectDeserialized?: (fileWithPath: string, object: any) => void): T; - loadAsync(filepath: string, strippablePath?: string, onReadCallback?: (fileWithPath: string, data: string) => void, onObjectDeserialized?: (fileWithPath: string, object: any) => void): Promise; - protected placeObject(fileDeserialized: any, strippedFilePath: string, result: T, strippablePath: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/JsonUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/JsonUtil.d.ts deleted file mode 100644 index b59b0f9..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/JsonUtil.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { IParseOptions, IStringifyOptions, Reviver } from "jsonc/lib/interfaces"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class JsonUtil { - protected vfs: VFS; - protected hashUtil: HashUtil; - protected logger: ILogger; - protected fileHashes: any; - protected jsonCacheExists: boolean; - protected jsonCachePath: string; - constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); - /** - * From object to string - * @param data object to turn into JSON - * @param prettify Should output be prettified - * @returns string - */ - serialize(data: any, prettify?: boolean): string; - /** - * From object to string - * @param data object to turn into JSON - * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @returns string - */ - serializeAdvanced(data: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - /** - * From object to string - * @param data object to turn into JSON - * @param filename Name of file being serialized - * @param options Stringify options or a replacer. - * @returns The string converted from the JavaScript value - */ - serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; - serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; - /** - * From string to object - * @param jsonString json string to turn into object - * @param filename Name of file being deserialized - * @returns object - */ - deserialize(jsonString: string, filename?: string): T; - /** - * From string to object - * @param jsonString json string to turn into object - * @param filename Name of file being deserialized - * @param options Parsing options - * @returns object - */ - deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; - deserializeJson5(jsonString: string, filename?: string): T; - deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; - /** - * From json string to object - * @param jsonString String to turn into object - * @param filePath Path to json file being processed - * @returns Object - */ - deserializeWithCacheCheck(jsonString: string, filePath: string): T; - /** - * Create file if nothing found - * @param jsonCachePath path to cache - */ - protected ensureJsonCacheExists(jsonCachePath: string): void; - /** - * Read contents of json cache and add to class field - * @param jsonCachePath Path to cache - */ - protected hydrateJsonCache(jsonCachePath: string): void; - /** - * Convert into string and back into object to clone object - * @param objectToClone Item to clone - * @returns Cloned parameter - * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner - */ - clone(objectToClone: T): T; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/MathUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/MathUtil.d.ts deleted file mode 100644 index 4acfeaf..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/MathUtil.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -export declare class MathUtil { - /** - * Helper to create the sum of all array elements - * @param {array} values The array with numbers of which to calculate the sum - * @return {number} sum(values) - */ - arraySum(values: number[]): number; - /** - * Helper to create the cumulative sum of all array elements - * arrayCumsum([1, 2, 3, 4]) = [1, 3, 6, 10] - * @param {array} values The array with numbers of which to calculate the cumulative sum - * @return {array} cumsum(values) - */ - arrayCumsum(values: number[]): number[]; - /** - * Helper to create the product of each element times factor - * @param {array} values The array of numbers which shall be multiplied by the factor - * @return {array} array times factor - */ - arrayProd(values: number[], factor: number): number[]; - /** - * Helper to add a constant to all array elements - * @param {array} values The array of numbers to which the summand should be added - * @return {array} array plus summand - */ - arrayAdd(values: number[], summand: number): number[]; - /** - * Map a value from an input range to an output range linearly - * - * Example: - * a_min = 0; a_max=1; - * b_min = 1; b_max=3; - * MathUtil.mapToRange(0.5, a_min, a_max, b_min, b_max) // returns 2 - * - * @param {number} x The value from input range to be mapped to output range - * @param {number} minIn min of input range - * @param {number} maxIn max of input range - * @param {number} minOut min of output range - * @param {number} maxOut max of outout range - * @return {number} the result of the mapping - */ - mapToRange(x: number, minIn: number, maxIn: number, minOut: number, maxOut: number): number; - /** - * Linear interpolation - * e.g. used to do a continuous integration for quest rewards which are defined for specific support centers of pmcLevel - * - * @param {string} xp the point of x at which to interpolate - * @param {array} x support points in x (of same length as y) - * @param {array} y support points in y (of same length as x) - * @return {number} y(xp) - */ - interp1(xp: number, x: number[], y: number[]): number; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/ObjectId.d.ts b/TypeScript/22CustomSptCommand/types/utils/ObjectId.d.ts deleted file mode 100644 index 91f64d3..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/ObjectId.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { TimeUtil } from "@spt/utils/TimeUtil"; -export declare class ObjectId { - protected timeUtil: TimeUtil; - constructor(timeUtil: TimeUtil); - protected randomBytes: Buffer; - protected constglobalCounter: number; - protected consttime: number; - protected globalCounter: number; - protected time: number; - incGlobalCounter(): number; - toHexString(byteArray: string | any[] | Buffer): string; - generate(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/RagfairOfferHolder.d.ts b/TypeScript/22CustomSptCommand/types/utils/RagfairOfferHolder.d.ts deleted file mode 100644 index 20f54a9..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/RagfairOfferHolder.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -export declare class RagfairOfferHolder { - protected maxOffersPerTemplate: number; - protected ragfairServerHelper: RagfairServerHelper; - protected offersById: Map; - protected offersByTemplate: Map>; - protected offersByTrader: Map>; - constructor(maxOffersPerTemplate: number, ragfairServerHelper: RagfairServerHelper); - getOfferById(id: string): IRagfairOffer; - getOffersByTemplate(templateId: string): Array; - getOffersByTrader(traderId: string): Array; - getOffers(): Array; - addOffers(offers: Array): void; - addOffer(offer: IRagfairOffer): void; - /** - * Purge offer from offer cache - * @param offer Offer to remove - */ - removeOffer(offer: IRagfairOffer): void; - removeOffers(offers: Array): void; - removeAllOffersByTrader(traderId: string): void; - /** - * Get an array of stale offers that are still shown to player - * @returns IRagfairOffer array - */ - getStaleOffers(time: number): Array; - protected addOfferByTemplates(template: string, offer: IRagfairOffer): void; - protected addOfferByTrader(trader: string, offer: IRagfairOffer): void; - protected isStale(offer: IRagfairOffer, time: number): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/RandomUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/RandomUtil.d.ts deleted file mode 100644 index 1cee659..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/RandomUtil.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -/** - * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects - * based on the relative probability of each of its elements. - * The probabilities of the contained element is not required to be normalized. - * - * Example: - * po = new ProbabilityObjectArray( - * new ProbabilityObject("a", 5), - * new ProbabilityObject("b", 1), - * new ProbabilityObject("c", 1) - * ); - * res = po.draw(10000); - * // count the elements which should be distributed according to the relative probabilities - * res.filter(x => x==="b").reduce((sum, x) => sum + 1 , 0) - */ -export declare class ProbabilityObjectArray extends Array> { - private mathUtil; - private cloner; - constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); - filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; - /** - * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 - * @param {array} probValues The relative probability values of which to calculate the normalized cumulative sum - * @returns {array} Cumulative Sum normalized to 1 - */ - cumulativeProbability(probValues: number[]): number[]; - /** - * Clone this ProbabilitObjectArray - * @returns {ProbabilityObjectArray} Deep Copy of this ProbabilityObjectArray - */ - clone(): ProbabilityObjectArray; - /** - * Drop an element from the ProbabilityObjectArray - * - * @param {string} key The key of the element to drop - * @returns {ProbabilityObjectArray} ProbabilityObjectArray without the dropped element - */ - drop(key: K): ProbabilityObjectArray; - /** - * Return the data field of a element of the ProbabilityObjectArray - * @param {string} key The key of the element whose data shall be retrieved - * @returns {object} The data object - */ - data(key: K): V; - /** - * Get the relative probability of an element by its key - * - * Example: - * po = new ProbabilityObjectArray(new ProbabilityObject("a", 5), new ProbabilityObject("b", 1)) - * po.maxProbability() // returns 5 - * - * @param {string} key The key of the element whose relative probability shall be retrieved - * @return {number} The relative probability - */ - probability(key: K): number; - /** - * Get the maximum relative probability out of a ProbabilityObjectArray - * - * Example: - * po = new ProbabilityObjectArray(new ProbabilityObject("a", 5), new ProbabilityObject("b", 1)) - * po.maxProbability() // returns 5 - * - * @return {number} the maximum value of all relative probabilities in this ProbabilityObjectArray - */ - maxProbability(): number; - /** - * Get the minimum relative probability out of a ProbabilityObjectArray - * - * Example: - * po = new ProbabilityObjectArray(new ProbabilityObject("a", 5), new ProbabilityObject("b", 1)) - * po.minProbability() // returns 1 - * - * @return {number} the minimum value of all relative probabilities in this ProbabilityObjectArray - */ - minProbability(): number; - /** - * Draw random element of the ProbabilityObject N times to return an array of N keys. - * Drawing can be with or without replacement - * @param count The number of times we want to draw - * @param replacement Draw with or without replacement from the input dict (true = dont remove after drawing) - * @param locklist list keys which shall be replaced even if drawing without replacement - * @returns Array consisting of N random keys for this ProbabilityObjectArray - */ - draw(count?: number, replacement?: boolean, locklist?: Array): K[]; -} -/** - * A ProbabilityObject which is use as an element to the ProbabilityObjectArray array - * It contains a key, the relative probability as well as optional data. - */ -export declare class ProbabilityObject { - key: K; - relativeProbability: number; - data: V; - /** - * Constructor for the ProbabilityObject - * @param {string} key The key of the element - * @param {number} relativeProbability The relative probability of this element - * @param {any} data Optional data attached to the element - */ - constructor(key: K, relativeProbability: number, data?: V); -} -export declare class RandomUtil { - protected cloner: ICloner; - protected logger: ILogger; - constructor(cloner: ICloner, logger: ILogger); - getInt(min: number, max: number): number; - getIntEx(max: number): number; - getFloat(min: number, max: number): number; - getBool(): boolean; - getPercentOfValue(percent: number, number: number, toFixed?: number): number; - /** - * Reduce a value by a percentage - * @param number Value to reduce - * @param percentage Percentage to reduce value by - * @returns Reduced value - */ - reduceValueByPercent(number: number, percentage: number): number; - /** - * Check if number passes a check out of 100 - * @param chancePercent value check needs to be above - * @returns true if value passes check - */ - getChance100(chancePercent: number): boolean; - getStringArrayValue(arr: string[]): string; - getArrayValue(arr: T[]): T; - getKey(node: any): string; - getKeyValue(node: { - [x: string]: any; - }): any; - /** - * Generate a normally distributed random number - * Uses the Box-Muller transform - * @param {number} mean Mean of the normal distribution - * @param {number} sigma Standard deviation of the normal distribution - * @returns {number} The value drawn - */ - getNormallyDistributedRandomNumber(mean: number, sigma: number, attempt?: number): number; - /** - * Draw Random integer low inclusive, high exclusive - * if high is not set we draw from 0 to low (exclusive) - * @param {integer} low Lower bound inclusive, when high is not set, this is high - * @param {integer} high Higher bound exclusive - * @returns {integer} The random integer in [low, high) - */ - randInt(low: number, high?: number): number; - /** - * Draw a random element of the provided list N times to return an array of N random elements - * Drawing can be with or without replacement - * @param {array} list The array we want to draw randomly from - * @param {integer} count The number of times we want to draw - * @param {boolean} replacement Draw with or without replacement from the input array(default true) - * @return {array} Array consisting of N random elements - */ - drawRandomFromList(originalList: Array, count?: number, replacement?: boolean): Array; - /** - * Draw a random (top level) element of the provided dictionary N times to return an array of N random dictionary keys - * Drawing can be with or without replacement - * @param {any} dict The dictionary we want to draw randomly from - * @param {integer} count The number of times we want to draw - * @param {boolean} replacement Draw with ot without replacement from the input dict - * @return {array} Array consisting of N random keys of the dictionary - */ - drawRandomFromDict(dict: any, count?: number, replacement?: boolean): any[]; - getBiasedRandomNumber(min: number, max: number, shift: number, n: number): number; - /** - * Fisher-Yates shuffle an array - * @param array Array to shuffle - * @returns Shuffled array - */ - shuffle(array: Array): Array; - /** - * Rolls for a probability based on chance - * @param number Probability Chance as float (0-1) - * @returns If roll succeed or not - * @example - * rollForChanceProbability(0.25); // returns true 25% probability - */ - rollForChanceProbability(probabilityChance: number): boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/TimeUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/TimeUtil.d.ts deleted file mode 100644 index 2b844ba..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/TimeUtil.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Utility class to handle time related operations. - */ -export declare class TimeUtil { - static readonly ONE_HOUR_AS_SECONDS = 3600; - /** - * Pads a number with a leading zero if it is less than 10. - * - * @param {number} number - The number to pad. - * @returns {string} The padded number as a string. - */ - protected pad(number: number): string; - /** - * Formats the time part of a date as a UTC string. - * - * @param {Date} date - The date to format in UTC. - * @returns {string} The formatted time as 'HH-MM-SS'. - */ - formatTime(date: Date): string; - /** - * Formats the date part of a date as a UTC string. - * - * @param {Date} date - The date to format in UTC. - * @returns {string} The formatted date as 'YYYY-MM-DD'. - */ - formatDate(date: Date): string; - /** - * Gets the current date as a formatted UTC string. - * - * @returns {string} The current date as 'YYYY-MM-DD'. - */ - getDate(): string; - /** - * Gets the current time as a formatted UTC string. - * - * @returns {string} The current time as 'HH-MM-SS'. - */ - getTime(): string; - /** - * Gets the current timestamp in seconds in UTC. - * - * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. - */ - getTimestamp(): number; - /** - * Gets the current time in UTC in a format suitable for mail in EFT. - * - * @returns {string} The current time as 'HH:MM' in UTC. - */ - getTimeMailFormat(): string; - /** - * Gets the current date in UTC in a format suitable for emails in EFT. - * - * @returns {string} The current date as 'DD.MM.YYYY' in UTC. - */ - getDateMailFormat(): string; - /** - * Converts a number of hours into seconds. - * - * @param {number} hours - The number of hours to convert. - * @returns {number} The equivalent number of seconds. - */ - getHoursAsSeconds(hours: number): number; - getTimestampOfNextHour(): number; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/VFS.d.ts b/TypeScript/22CustomSptCommand/types/utils/VFS.d.ts deleted file mode 100644 index 20f428a..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/VFS.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/// -/// -import "reflect-metadata"; -import fs from "node:fs"; -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -export declare class VFS { - protected asyncQueue: IAsyncQueue; - accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; - copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; - mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { - recursive: true; - }) => Promise; - readFilePromisify: (path: fs.PathLike) => Promise; - writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; - readdirPromisify: (path: fs.PathLike, options?: BufferEncoding | { - encoding: BufferEncoding; - withFileTypes?: false; - }) => Promise; - statPromisify: (path: fs.PathLike, options?: fs.StatOptions & { - bigint?: false; - }) => Promise; - unlinkPromisify: (path: fs.PathLike) => Promise; - rmdirPromisify: (path: fs.PathLike) => Promise; - renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; - constructor(asyncQueue: IAsyncQueue); - exists(filepath: fs.PathLike): boolean; - existsAsync(filepath: fs.PathLike): Promise; - copyFile(filepath: fs.PathLike, target: fs.PathLike): void; - copyAsync(filepath: fs.PathLike, target: fs.PathLike): Promise; - createDir(filepath: string): void; - createDirAsync(filepath: string): Promise; - copyDir(filepath: string, target: string, fileExtensions?: string | string[]): void; - copyDirAsync(filepath: string, target: string, fileExtensions: string | string[]): Promise; - readFile(...args: Parameters): string; - readFileAsync(path: fs.PathLike): Promise; - private isBuffer; - writeFile(filepath: any, data?: string, append?: boolean, atomic?: boolean): void; - writeFileAsync(filepath: any, data?: string, append?: boolean, atomic?: boolean): Promise; - getFiles(filepath: string): string[]; - getFilesAsync(filepath: string): Promise; - getDirs(filepath: string): string[]; - getDirsAsync(filepath: string): Promise; - removeFile(filepath: string): void; - removeFileAsync(filepath: string): Promise; - removeDir(filepath: string): void; - removeDirAsync(filepath: string): Promise; - rename(oldPath: string, newPath: string): void; - renameAsync(oldPath: string, newPath: string): Promise; - protected lockFileSync(filepath: any): () => void; - protected checkFileSync(filepath: any): boolean; - protected unlockFileSync(filepath: any): void; - getFileExtension(filepath: string): string; - stripExtension(filepath: string): string; - minifyAllJsonInDirRecursive(filepath: string): Promise; - minifyAllJsonInDirRecursiveAsync(filepath: string): Promise; - getFilesOfType(directory: string, fileType: string, files?: string[]): string[]; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/Watermark.d.ts b/TypeScript/22CustomSptCommand/types/utils/Watermark.d.ts deleted file mode 100644 index 27b5b03..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/Watermark.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -export declare class WatermarkLocale { - protected localisationService: LocalisationService; - protected description: string[]; - protected warning: string[]; - protected modding: string[]; - constructor(localisationService: LocalisationService); - getDescription(): string[]; - getWarning(): string[]; - getModding(): string[]; -} -export declare class Watermark { - protected logger: ILogger; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; - protected watermarkLocale?: WatermarkLocale; - protected sptConfig: ICoreConfig; - protected text: string[]; - protected versionLabel: string; - constructor(logger: ILogger, configServer: ConfigServer, localisationService: LocalisationService, watermarkLocale?: WatermarkLocale); - initialize(): void; - /** - * Get a version string (x.x.x) or (x.x.x-BLEEDINGEDGE) OR (X.X.X (18xxx)) - * @param withEftVersion Include the eft version this spt version was made for - * @returns string - */ - getVersionTag(withEftVersion?: boolean): string; - /** - * Handle singleplayer/settings/version - * Get text shown in game on screen, can't be translated as it breaks bsgs client when certian characters are used - * @returns string - */ - getInGameVersionLabel(): string; - /** Set window title */ - protected setTitle(): void; - /** Reset console cursor to top */ - protected resetCursor(): void; - /** Draw the watermark */ - protected draw(): void; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/cloners/ICloner.d.ts b/TypeScript/22CustomSptCommand/types/utils/cloners/ICloner.d.ts deleted file mode 100644 index 77c0541..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/cloners/ICloner.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICloner { - clone(obj: T): T; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/cloners/JsonCloner.d.ts b/TypeScript/22CustomSptCommand/types/utils/cloners/JsonCloner.d.ts deleted file mode 100644 index 130dadb..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/cloners/JsonCloner.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class JsonCloner implements ICloner { - clone(obj: T): T; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/22CustomSptCommand/types/utils/cloners/RecursiveCloner.d.ts deleted file mode 100644 index 9ea2882..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/cloners/RecursiveCloner.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class RecursiveCloner implements ICloner { - private static primitives; - clone(obj: T): T; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/22CustomSptCommand/types/utils/cloners/StructuredCloner.d.ts deleted file mode 100644 index 6401443..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/cloners/StructuredCloner.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class StructuredCloner implements ICloner { - clone(obj: T): T; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/collections/lists/LinkedList.d.ts b/TypeScript/22CustomSptCommand/types/utils/collections/lists/LinkedList.d.ts deleted file mode 100644 index 6a084fa..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/collections/lists/LinkedList.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export declare class LinkedList { - private head?; - private tail?; - private _length; - get length(): number; - private set length(value); - constructor(); - /** - * Adds an element to the start of the list. - */ - prepend(value: T): void; - /** - * Adds an element at the given index to the list. - */ - insertAt(value: T, idx: number): void; - /** - * Adds an element to the end of the list. - */ - append(value: T): void; - /** - * Returns the first element's value. - */ - getHead(): T; - /** - * Finds the element from the list at the given index and returns it's value. - */ - get(idx: number): T; - /** - * Returns the last element's value. - */ - getTail(): T; - /** - * Finds and removes the first element from a list that has a value equal to the given value, returns it's value if it successfully removed it. - */ - remove(value: T): T; - /** - * Removes the first element from the list and returns it's value. If the list is empty, undefined is returned and the list is not modified. - */ - shift(): T; - /** - * Removes the element from the list at the given index and returns it's value. - */ - removeAt(idx: number): T; - /** - * Removes the last element from the list and returns it's value. If the list is empty, undefined is returned and the list is not modified. - */ - pop(): T; - /** - * Returns an iterable of index, value pairs for every entry in the list. - */ - entries(): IterableIterator<[number, T]>; - /** - * Returns an iterable of values in the list. - */ - values(): IterableIterator; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/collections/lists/Nodes.d.ts b/TypeScript/22CustomSptCommand/types/utils/collections/lists/Nodes.d.ts deleted file mode 100644 index 8e29e59..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/collections/lists/Nodes.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class LinkedListNode { - value: T; - prev?: LinkedListNode; - next?: LinkedListNode; - constructor(value: T, prev?: LinkedListNode, next?: LinkedListNode); -} diff --git a/TypeScript/22CustomSptCommand/types/utils/collections/queue/Queue.d.ts b/TypeScript/22CustomSptCommand/types/utils/collections/queue/Queue.d.ts deleted file mode 100644 index 8ea3d32..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/collections/queue/Queue.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export declare class Queue { - private list; - get length(): number; - constructor(); - /** - * Adds an element to the end of the queue. - */ - enqueue(element: T): void; - /** - * Iterates over the elements received and adds each one to the end of the queue. - */ - enqueueAll(elements: T[]): void; - /** - * Removes the first element from the queue and returns it's value. If the queue is empty, undefined is returned and the queue is not modified. - */ - dequeue(): T; - /** - * Returns the first element's value. - */ - peek(): T; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/22CustomSptCommand/types/utils/logging/AbstractWinstonLogger.d.ts deleted file mode 100644 index 7098f85..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/logging/AbstractWinstonLogger.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/// -import fs from "node:fs"; -import winston from "winston"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; -import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; -import { SptLogger } from "@spt/models/spt/logging/SptLogger"; -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -export declare abstract class AbstractWinstonLogger implements ILogger { - protected asyncQueue: IAsyncQueue; - protected showDebugInConsole: boolean; - protected filePath: string; - protected logLevels: { - levels: { - error: number; - warn: number; - succ: number; - info: number; - custom: number; - debug: number; - }; - colors: { - error: string; - warn: string; - succ: string; - info: string; - custom: string; - debug: string; - }; - bgColors: { - default: string; - blackBG: string; - redBG: string; - greenBG: string; - yellowBG: string; - blueBG: string; - magentaBG: string; - cyanBG: string; - whiteBG: string; - }; - }; - protected logger: winston.Logger & SptLogger; - protected writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; - constructor(asyncQueue: IAsyncQueue); - protected abstract isLogToFile(): boolean; - protected abstract isLogToConsole(): boolean; - protected abstract isLogExceptions(): boolean; - protected abstract getFilePath(): string; - protected abstract getFileName(): string; - protected getLogFrequency(): string; - protected getLogMaxSize(): string; - protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; - log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; - error(data: string | Record): Promise; - warning(data: string | Record): Promise; - success(data: string | Record): Promise; - info(data: string | Record): Promise; - /** - * Log to console text with a customisable text and background color. Background defaults to black - * @param data text to log - * @param textColor color of text - * @param backgroundColor color of background - */ - logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): Promise; - debug(data: string | Record, onlyShowInConsole?: boolean): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/logging/WinstonMainLogger.d.ts b/TypeScript/22CustomSptCommand/types/utils/logging/WinstonMainLogger.d.ts deleted file mode 100644 index 8a634b2..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/logging/WinstonMainLogger.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { AbstractWinstonLogger } from "@spt/utils/logging/AbstractWinstonLogger"; -export declare class WinstonMainLogger extends AbstractWinstonLogger { - protected asyncQueue: IAsyncQueue; - constructor(asyncQueue: IAsyncQueue); - protected isLogExceptions(): boolean; - protected isLogToFile(): boolean; - protected isLogToConsole(): boolean; - protected getFilePath(): string; - protected getFileName(): string; -} diff --git a/TypeScript/22CustomSptCommand/types/utils/logging/WinstonRequestLogger.d.ts b/TypeScript/22CustomSptCommand/types/utils/logging/WinstonRequestLogger.d.ts deleted file mode 100644 index 0988b6f..0000000 --- a/TypeScript/22CustomSptCommand/types/utils/logging/WinstonRequestLogger.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { AbstractWinstonLogger } from "@spt/utils/logging/AbstractWinstonLogger"; -export declare class WinstonRequestLogger extends AbstractWinstonLogger { - protected asyncQueue: IAsyncQueue; - constructor(asyncQueue: IAsyncQueue); - protected isLogExceptions(): boolean; - protected isLogToFile(): boolean; - protected isLogToConsole(): boolean; - protected getFilePath(): string; - protected getFileName(): string; - protected getLogMaxSize(): string; -} diff --git a/TypeScript/23CustomAbstractChatBot/README.md b/TypeScript/23CustomAbstractChatBot/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/23CustomAbstractChatBot/README.md +++ b/TypeScript/23CustomAbstractChatBot/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/23CustomAbstractChatBot/package.json b/TypeScript/23CustomAbstractChatBot/package.json index c27d491..140bb8e 100644 --- a/TypeScript/23CustomAbstractChatBot/package.json +++ b/TypeScript/23CustomAbstractChatBot/package.json @@ -1,7 +1,7 @@ { "name": "CustomAbstractChatBot", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/23CustomAbstractChatBot/src/AnotherCoolCommand.ts b/TypeScript/23CustomAbstractChatBot/src/AnotherCoolCommand.ts index c1afe5e..b598ea7 100644 --- a/TypeScript/23CustomAbstractChatBot/src/AnotherCoolCommand.ts +++ b/TypeScript/23CustomAbstractChatBot/src/AnotherCoolCommand.ts @@ -1,9 +1,9 @@ import { inject, injectable } from "tsyringe"; -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { MailSendService } from "@spt/services/MailSendService"; +import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MailSendService } from "@spt-aki/services/MailSendService"; // \/ dont forger this annotation here! @injectable() diff --git a/TypeScript/23CustomAbstractChatBot/src/CustomSimpleChatBot.ts b/TypeScript/23CustomAbstractChatBot/src/CustomSimpleChatBot.ts index 2e9eaf7..d8fe7aa 100644 --- a/TypeScript/23CustomAbstractChatBot/src/CustomSimpleChatBot.ts +++ b/TypeScript/23CustomAbstractChatBot/src/CustomSimpleChatBot.ts @@ -1,11 +1,11 @@ import { inject, injectAll, injectable } from "tsyringe"; -import { AbstractDialogueChatBot } from "@spt/helpers/Dialogue/AbstractDialogueChatBot"; -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { MailSendService } from "@spt/services/MailSendService"; +import { AbstractDialogueChatBot } from "@spt-aki/helpers/Dialogue/AbstractDialogueChatBot"; +import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { MailSendService } from "@spt-aki/services/MailSendService"; // \/ dont forger this annotation here! @injectable() diff --git a/TypeScript/23CustomAbstractChatBot/src/MyCoolCommand.ts b/TypeScript/23CustomAbstractChatBot/src/MyCoolCommand.ts index 44ef6b0..49696e2 100644 --- a/TypeScript/23CustomAbstractChatBot/src/MyCoolCommand.ts +++ b/TypeScript/23CustomAbstractChatBot/src/MyCoolCommand.ts @@ -1,9 +1,9 @@ import { inject, injectable } from "tsyringe"; -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { MailSendService } from "@spt/services/MailSendService"; +import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MailSendService } from "@spt-aki/services/MailSendService"; // \/ dont forger this annotation here! @injectable() diff --git a/TypeScript/23CustomAbstractChatBot/src/mod.ts b/TypeScript/23CustomAbstractChatBot/src/mod.ts index f13cd80..cea8a8c 100644 --- a/TypeScript/23CustomAbstractChatBot/src/mod.ts +++ b/TypeScript/23CustomAbstractChatBot/src/mod.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { DialogueController } from "@spt/controllers/DialogueController"; +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { DialogueController } from "@spt-aki/controllers/DialogueController"; import { CustomSimpleChatBot } from "./CustomSimpleChatBot"; import { MyCoolCommand } from "./MyCoolCommand"; import { AnotherCoolCommand } from "./AnotherCoolCommand"; diff --git a/TypeScript/23CustomAbstractChatBot/tsconfig.json b/TypeScript/23CustomAbstractChatBot/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/23CustomAbstractChatBot/tsconfig.json +++ b/TypeScript/23CustomAbstractChatBot/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/23CustomAbstractChatBot/types/ErrorHandler.d.ts b/TypeScript/23CustomAbstractChatBot/types/ErrorHandler.d.ts index 33c0de6..69b0bcd 100644 --- a/TypeScript/23CustomAbstractChatBot/types/ErrorHandler.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/ErrorHandler.d.ts @@ -2,5 +2,5 @@ export declare class ErrorHandler { private logger; private readLine; constructor(); - handleCriticalError(err: Error): void; + handleCriticalError(err: any): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/Program.d.ts b/TypeScript/23CustomAbstractChatBot/types/Program.d.ts index f2b65df..afe5216 100644 --- a/TypeScript/23CustomAbstractChatBot/types/Program.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/Program.d.ts @@ -1,5 +1,5 @@ export declare class Program { private errorHandler; constructor(); - start(): Promise; + start(): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/AchievementCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/AchievementCallbacks.d.ts deleted file mode 100644 index 4fb7125..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/AchievementCallbacks.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { AchievementController } from "@spt/controllers/AchievementController"; -import { ProfileController } from "@spt/controllers/ProfileController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ICompletedAchievementsResponse } from "@spt/models/eft/profile/ICompletedAchievementsResponse"; -import { IGetAchievementsResponse } from "@spt/models/eft/profile/IGetAchievementsResponse"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class AchievementCallbacks { - protected achievementController: AchievementController; - protected profileController: ProfileController; - protected httpResponse: HttpResponseUtil; - constructor(achievementController: AchievementController, profileController: ProfileController, httpResponse: HttpResponseUtil); - /** - * Handle client/achievement/list - */ - getAchievements(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/achievement/statistic - */ - statistic(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/BotCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/BotCallbacks.d.ts index 43abcfc..d406147 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/BotCallbacks.d.ts @@ -1,10 +1,9 @@ -import { BotController } from "@spt/controllers/BotController"; -import { IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { Difficulties } from "@spt/models/eft/common/tables/IBotType"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { BotController } from "@spt-aki/controllers/BotController"; +import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class BotCallbacks { protected botController: BotController; protected httpResponse: HttpResponseUtil; @@ -20,16 +19,11 @@ export declare class BotCallbacks { * @returns string */ getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; - /** - * Handle singleplayer/settings/bot/difficulties - * @returns dictionary of every bot and its diffiulty settings - */ - getAllBotDifficulties(url: string, info: IEmptyRequestData, sessionID: string): Record; /** * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/BuildsCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/BuildsCallbacks.d.ts deleted file mode 100644 index 79fee87..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/BuildsCallbacks.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { BuildController } from "@spt/controllers/BuildController"; -import { ISetMagazineRequest } from "@spt/models/eft/builds/ISetMagazineRequest"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IPresetBuildActionRequestData } from "@spt/models/eft/presetBuild/IPresetBuildActionRequestData"; -import { IRemoveBuildRequestData } from "@spt/models/eft/presetBuild/IRemoveBuildRequestData"; -import { IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export declare class BuildsCallbacks { - protected httpResponse: HttpResponseUtil; - protected buildController: BuildController; - constructor(httpResponse: HttpResponseUtil, buildController: BuildController); - /** - * Handle client/builds/list - */ - getBuilds(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/builds/magazine/save - */ - createMagazineTemplate(url: string, request: ISetMagazineRequest, sessionID: string): INullResponseData; - /** - * Handle client/builds/weapon/save - */ - setWeapon(url: string, info: IPresetBuildActionRequestData, sessionID: string): INullResponseData; - /** - * Handle client/builds/equipment/save - */ - setEquipment(url: string, info: IPresetBuildActionRequestData, sessionID: string): INullResponseData; - /** - * Handle client/builds/delete - */ - deleteBuild(url: string, info: IRemoveBuildRequestData, sessionID: string): INullResponseData; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/BundleCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/BundleCallbacks.d.ts index 3e579dc..a49b8ec 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/BundleCallbacks.d.ts @@ -1,13 +1,18 @@ -import { BundleLoader } from "@spt/loaders/BundleLoader"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class BundleCallbacks { + protected logger: ILogger; protected httpResponse: HttpResponseUtil; + protected httpFileUtil: HttpFileUtil; protected bundleLoader: BundleLoader; protected configServer: ConfigServer; protected httpConfig: IHttpConfig; - constructor(httpResponse: HttpResponseUtil, bundleLoader: BundleLoader, configServer: ConfigServer); + constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer); + sendBundle(sessionID: string, req: any, resp: any, body: any): void; /** * Handle singleplayer/bundles */ diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/ClientLogCallbacks.d.ts index bfeb9a4..8414b49 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/ClientLogCallbacks.d.ts @@ -1,28 +1,14 @@ -import { ClientLogController } from "@spt/controllers/ClientLogController"; -import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IClientLogRequest } from "@spt/models/spt/logging/IClientLogRequest"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { ClientLogController } from "@spt-aki/controllers/ClientLogController"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IClientLogRequest } from "@spt-aki/models/spt/logging/IClientLogRequest"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; /** Handle client logging related events */ export declare class ClientLogCallbacks { protected httpResponse: HttpResponseUtil; protected clientLogController: ClientLogController; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; - protected modLoadOrder: ModLoadOrder; - constructor(httpResponse: HttpResponseUtil, clientLogController: ClientLogController, configServer: ConfigServer, localisationService: LocalisationService, modLoadOrder: ModLoadOrder); + constructor(httpResponse: HttpResponseUtil, clientLogController: ClientLogController); /** * Handle /singleplayer/log */ clientLog(url: string, info: IClientLogRequest, sessionID: string): INullResponseData; - /** - * Handle /singleplayer/release - */ - releaseNotes(): string; - /** - * Handle /singleplayer/enableBSGlogging - */ - bsgLogging(): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/CustomizationCallbacks.d.ts index 3541343..9ea8faa 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/CustomizationCallbacks.d.ts @@ -1,14 +1,14 @@ -import { CustomizationController } from "@spt/controllers/CustomizationController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISuit } from "@spt/models/eft/common/tables/ITrader"; -import { IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData"; -import { IGetSuitsResponse } from "@spt/models/eft/customization/IGetSuitsResponse"; -import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { CustomizationController } from "@spt-aki/controllers/CustomizationController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISuit } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IBuyClothingRequestData } from "@spt-aki/models/eft/customization/IBuyClothingRequestData"; +import { IGetSuitsResponse } from "@spt-aki/models/eft/customization/IGetSuitsResponse"; +import { IWearClothingRequestData } from "@spt-aki/models/eft/customization/IWearClothingRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class CustomizationCallbacks { protected customizationController: CustomizationController; protected saveServer: SaveServer; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/DataCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/DataCallbacks.d.ts index 41a5a41..fbac60b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/DataCallbacks.d.ts @@ -1,18 +1,18 @@ -import { HideoutController } from "@spt/controllers/HideoutController"; -import { RagfairController } from "@spt/controllers/RagfairController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem"; -import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; -import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { HideoutController } from "@spt-aki/controllers/HideoutController"; +import { RagfairController } from "@spt-aki/controllers/RagfairController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGlobals } from "@spt-aki/models/eft/common/IGlobals"; +import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; +import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; +import { IGetItemPricesResponse } from "@spt-aki/models/eft/game/IGetItemPricesResponse"; +import { IHideoutArea } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase"; +import { IHideoutSettingsBase } from "@spt-aki/models/eft/hideout/IHideoutSettingsBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { ISettingsBase } from "@spt-aki/models/spt/server/ISettingsBase"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; /** * Handle client requests */ diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/DialogueCallbacks.d.ts index f37f487..7ed60b9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/DialogueCallbacks.d.ts @@ -1,36 +1,31 @@ -import { DialogueController } from "@spt/controllers/DialogueController"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt/models/eft/dialog/IAcceptFriendRequestData"; -import { IAddUserGroupMailRequest } from "@spt/models/eft/dialog/IAddUserGroupMailRequest"; -import { IChangeGroupMailOwnerRequest } from "@spt/models/eft/dialog/IChangeGroupMailOwnerRequest"; -import { IChatServer } from "@spt/models/eft/dialog/IChatServer"; -import { IClearMailMessageRequest } from "@spt/models/eft/dialog/IClearMailMessageRequest"; -import { ICreateGroupMailRequest } from "@spt/models/eft/dialog/ICreateGroupMailRequest"; -import { IDeleteFriendRequest } from "@spt/models/eft/dialog/IDeleteFriendRequest"; -import { IFriendRequestData } from "@spt/models/eft/dialog/IFriendRequestData"; -import { IFriendRequestSendResponse } from "@spt/models/eft/dialog/IFriendRequestSendResponse"; -import { IGetAllAttachmentsRequestData } from "@spt/models/eft/dialog/IGetAllAttachmentsRequestData"; -import { IGetAllAttachmentsResponse } from "@spt/models/eft/dialog/IGetAllAttachmentsResponse"; -import { IGetChatServerListRequestData } from "@spt/models/eft/dialog/IGetChatServerListRequestData"; -import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendListDataResponse"; -import { IGetMailDialogInfoRequestData } from "@spt/models/eft/dialog/IGetMailDialogInfoRequestData"; -import { IGetMailDialogListRequestData } from "@spt/models/eft/dialog/IGetMailDialogListRequestData"; -import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; -import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; -import { IPinDialogRequestData } from "@spt/models/eft/dialog/IPinDialogRequestData"; -import { IRemoveDialogRequestData } from "@spt/models/eft/dialog/IRemoveDialogRequestData"; -import { IRemoveMailMessageRequest } from "@spt/models/eft/dialog/IRemoveMailMessageRequest"; -import { IRemoveUserGroupMailRequest } from "@spt/models/eft/dialog/IRemoveUserGroupMailRequest"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueController } from "@spt-aki/controllers/DialogueController"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; +import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; +import { IGetAllAttachmentsRequestData } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsRequestData"; +import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; +import { IGetChatServerListRequestData } from "@spt-aki/models/eft/dialog/IGetChatServerListRequestData"; +import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; +import { IGetMailDialogInfoRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogInfoRequestData"; +import { IGetMailDialogListRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogListRequestData"; +import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; +import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewResponseData"; +import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; +import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; +import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { DialogueInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class DialogueCallbacks implements OnUpdate { protected hashUtil: HashUtil; protected timeUtil: TimeUtil; @@ -78,18 +73,10 @@ export declare class DialogueCallbacks implements OnUpdate { * Handle client/friend/request/send */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/friend/request/accept-all - */ - acceptAllFriendRequests(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; /** * Handle client/friend/request/accept */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/friend/request/decline - */ - declineFriendRequest(url: string, request: IDeclineFriendRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/friend/request/cancel */ @@ -97,15 +84,15 @@ export declare class DialogueCallbacks implements OnUpdate { /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; /** Handle client/friend/ignore/set */ - ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): INullResponseData; /** Handle client/friend/ignore/remove */ - unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; - createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; - changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; - addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; - removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/GameCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/GameCallbacks.d.ts index b41454f..09124c6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/GameCallbacks.d.ts @@ -1,25 +1,23 @@ -import { GameController } from "@spt/controllers/GameController"; -import { OnLoad } from "@spt/di/OnLoad"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { ICheckVersionResponse } from "@spt/models/eft/game/ICheckVersionResponse"; -import { ICurrentGroupResponse } from "@spt/models/eft/game/ICurrentGroupResponse"; -import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; -import { IGameEmptyCrcRequestData } from "@spt/models/eft/game/IGameEmptyCrcRequestData"; -import { IGameKeepAliveResponse } from "@spt/models/eft/game/IGameKeepAliveResponse"; -import { IGameLogoutResponseData } from "@spt/models/eft/game/IGameLogoutResponseData"; -import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData"; -import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; -import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; -import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; -import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; -import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; -import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { Watermark } from "@spt/utils/Watermark"; +import { GameController } from "@spt-aki/controllers/GameController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; +import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; +import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; +import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; +import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; +import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; +import { IReportNicknameRequestData } from "@spt-aki/models/eft/game/IReportNicknameRequestData"; +import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; +import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { Watermark } from "@spt-aki/utils/Watermark"; export declare class GameCallbacks implements OnLoad { protected httpResponse: HttpResponseUtil; protected watermark: Watermark; @@ -49,11 +47,6 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/game/mode - * @returns IGameModeResponse - */ - getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ @@ -76,10 +69,10 @@ export declare class GameCallbacks implements OnLoad { * @returns string */ getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; - reportNickname(url: string, info: IUIDRequestData, sessionID: string): INullResponseData; + reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData; /** - * Handle singleplayer/settings/getRaidTime - * @returns string - */ + * Handle singleplayer/settings/getRaidTime + * @returns string + */ getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): IGetRaidTimeResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/HandbookCallbacks.d.ts index 61819de..0a099e9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/HandbookCallbacks.d.ts @@ -1,5 +1,5 @@ -import { HandbookController } from "@spt/controllers/HandbookController"; -import { OnLoad } from "@spt/di/OnLoad"; +import { HandbookController } from "@spt-aki/controllers/HandbookController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; export declare class HandbookCallbacks implements OnLoad { protected handbookController: HandbookController; constructor(handbookController: HandbookController); diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/HealthCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/HealthCallbacks.d.ts index 840c9b1..24b633b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/HealthCallbacks.d.ts @@ -1,21 +1,21 @@ -import { HealthController } from "@spt/controllers/HealthController"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; -import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; -import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { HealthController } from "@spt-aki/controllers/HealthController"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHealthTreatmentRequestData } from "@spt-aki/models/eft/health/IHealthTreatmentRequestData"; +import { IOffraidEatRequestData } from "@spt-aki/models/eft/health/IOffraidEatRequestData"; +import { IOffraidHealRequestData } from "@spt-aki/models/eft/health/IOffraidHealRequestData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { IWorkoutData } from "@spt-aki/models/eft/health/IWorkoutData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class HealthCallbacks { protected httpResponse: HttpResponseUtil; protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); /** - * Custom spt server request found in modules/HealthSynchronizer.cs + * Custom aki server request found in modules/HealthSynchronizer.cs * @param url * @param info HealthListener.Instance.CurrentHealth class * @param sessionID session id @@ -23,7 +23,7 @@ export declare class HealthCallbacks { */ syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** - * Custom spt server request found in modules/QTEPatch.cs + * Custom aki server request found in modules/QTEPatch.cs * @param url * @param info HealthListener.Instance.CurrentHealth class * @param sessionID session id diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/HideoutCallbacks.d.ts index fadab9b..65c989a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/HideoutCallbacks.d.ts @@ -1,22 +1,22 @@ -import { HideoutController } from "@spt/controllers/HideoutController"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutImproveAreaRequestData } from "@spt/models/eft/hideout/IHideoutImproveAreaRequestData"; -import { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData"; -import { IHideoutScavCaseStartRequestData } from "@spt/models/eft/hideout/IHideoutScavCaseStartRequestData"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; -import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; -import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { HideoutController } from "@spt-aki/controllers/HideoutController"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHandleQTEEventRequestData } from "@spt-aki/models/eft/hideout/IHandleQTEEventRequestData"; +import { IHideoutCancelProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutCancelProductionRequestData"; +import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; +import { IHideoutImproveAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutImproveAreaRequestData"; +import { IHideoutPutItemInRequestData } from "@spt-aki/models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCaseStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutScavCaseStartRequestData"; +import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData"; +import { IHideoutTakeItemOutRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeItemOutRequestData"; +import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData"; +import { IHideoutToggleAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; +import { IHideoutUpgradeRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeRequestData"; +import { IRecordShootingRangePoints } from "@spt-aki/models/eft/hideout/IRecordShootingRangePoints"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class HideoutCallbacks implements OnUpdate { protected hideoutController: HideoutController; protected configServer: ConfigServer; @@ -26,11 +26,11 @@ export declare class HideoutCallbacks implements OnUpdate { /** * Handle HideoutUpgrade event */ - upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; /** * Handle HideoutUpgradeComplete event */ - upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; /** * Handle HideoutPutItemsInAreaSlots */ @@ -62,11 +62,11 @@ export declare class HideoutCallbacks implements OnUpdate { /** * Handle HideoutQuickTimeEvent */ - handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string): IItemEventRouterResponse; /** * Handle client/game/profile/items/moving - RecordShootingRangePoints */ - recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string): IItemEventRouterResponse; /** * Handle client/game/profile/items/moving - RecordShootingRangePoints */ diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/HttpCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/HttpCallbacks.d.ts index 11b2db5..060301a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/HttpCallbacks.d.ts @@ -1,5 +1,5 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { HttpServer } from "@spt/servers/HttpServer"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { HttpServer } from "@spt-aki/servers/HttpServer"; export declare class HttpCallbacks implements OnLoad { protected httpServer: HttpServer; constructor(httpServer: HttpServer); diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/InraidCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/InraidCallbacks.d.ts index a058b99..ea77d62 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/InraidCallbacks.d.ts @@ -1,10 +1,8 @@ -import { InraidController } from "@spt/controllers/InraidController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IItemDeliveryRequestData } from "@spt/models/eft/inRaid/IItemDeliveryRequestData"; -import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { InraidController } from "@spt-aki/controllers/InraidController"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; /** * Handle client requests */ @@ -39,24 +37,14 @@ export declare class InraidCallbacks { * @returns JSON as string */ getRaidMenuSettings(): string; + /** + * Handle singleplayer/settings/weapon/durability + * @returns + */ + getWeaponDurability(): string; /** * Handle singleplayer/airdrop/config * @returns JSON as string */ getAirdropConfig(): string; - /** - * Handle singleplayer/btr/config - * @returns JSON as string - */ - getBTRConfig(): string; - /** - * Handle singleplayer/traderServices/getTraderServices - */ - getTraderServices(url: string, info: IEmptyRequestData, sessionId: string): string; - /** - * Handle singleplayer/traderServices/itemDelivery - */ - itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; - getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; - getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/InsuranceCallbacks.d.ts index 888f128..1c57629 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/InsuranceCallbacks.d.ts @@ -1,15 +1,15 @@ -import { InsuranceController } from "@spt/controllers/InsuranceController"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsuranceCostRequestData"; -import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; -import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { InsuranceService } from "@spt/services/InsuranceService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { InsuranceController } from "@spt-aki/controllers/InsuranceController"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData"; +import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData"; +import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { InsuranceService } from "@spt-aki/services/InsuranceService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class InsuranceCallbacks implements OnUpdate { protected insuranceController: InsuranceController; protected insuranceService: InsuranceService; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/InventoryCallbacks.d.ts index e0968e6..ddbb070 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/InventoryCallbacks.d.ts @@ -1,61 +1,51 @@ -import { InventoryController } from "@spt/controllers/InventoryController"; -import { QuestController } from "@spt/controllers/QuestController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; -import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; -import { IInventoryDeleteMarkerRequestData } from "@spt/models/eft/inventory/IInventoryDeleteMarkerRequestData"; -import { IInventoryEditMarkerRequestData } from "@spt/models/eft/inventory/IInventoryEditMarkerRequestData"; -import { IInventoryExamineRequestData } from "@spt/models/eft/inventory/IInventoryExamineRequestData"; -import { IInventoryFoldRequestData } from "@spt/models/eft/inventory/IInventoryFoldRequestData"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryReadEncyclopediaRequestData } from "@spt/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySortRequestData } from "@spt/models/eft/inventory/IInventorySortRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventorySwapRequestData } from "@spt/models/eft/inventory/IInventorySwapRequestData"; -import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTagRequestData"; -import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; -import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; -import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; +import { InventoryController } from "@spt-aki/controllers/InventoryController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IInventoryBindRequestData } from "@spt-aki/models/eft/inventory/IInventoryBindRequestData"; +import { IInventoryCreateMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryCreateMarkerRequestData"; +import { IInventoryDeleteMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryDeleteMarkerRequestData"; +import { IInventoryEditMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryEditMarkerRequestData"; +import { IInventoryExamineRequestData } from "@spt-aki/models/eft/inventory/IInventoryExamineRequestData"; +import { IInventoryFoldRequestData } from "@spt-aki/models/eft/inventory/IInventoryFoldRequestData"; +import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData"; +import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData"; +import { IInventoryReadEncyclopediaRequestData } from "@spt-aki/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; +import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData"; +import { IInventorySortRequestData } from "@spt-aki/models/eft/inventory/IInventorySortRequestData"; +import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData"; +import { IInventorySwapRequestData } from "@spt-aki/models/eft/inventory/IInventorySwapRequestData"; +import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInventoryTagRequestData"; +import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData"; +import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData"; +import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { protected inventoryController: InventoryController; - protected questController: QuestController; - constructor(inventoryController: InventoryController, questController: QuestController); - /** Handle client/game/profile/items/moving Move event */ - moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + constructor(inventoryController: InventoryController); + /** Handle Move event */ + moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; /** Handle Remove event */ - removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; /** Handle Split event */ - splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - transferItem(pmcData: IPmcData, request: IInventoryTransferRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse; + mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse; + transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse; /** Handle Swap */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse; toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse; tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - unbindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + unbindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse; /** Handle ReadEncyclopedia */ readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse; /** Handle ApplyInventoryChanges */ - sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; + createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; /** Handle OpenRandomLootContainer */ - openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - setFavoriteItem(pmcData: IPmcData, body: ISetFavoriteItems, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * TODO - MOVE INTO QUEST CODE - * Handle game/profile/items/moving - QuestFail - */ - failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse; + redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/ItemEventCallbacks.d.ts index 2d42ae3..b040607 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/ItemEventCallbacks.d.ts @@ -1,19 +1,13 @@ -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { Warning } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; -import { IItemEventRouterRequest } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ItemEventRouter } from "@spt/routers/ItemEventRouter"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { Warning } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; +import { IItemEventRouterRequest } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ItemEventRouter } from "@spt-aki/routers/ItemEventRouter"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; - /** - * Return true if the passed in list of warnings contains critical issues - * @param warnings The list of warnings to check for critical errors - * @returns - */ - private isCriticalError; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; protected getErrorCode(warnings: Warning[]): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/LauncherCallbacks.d.ts index 46fb3f4..b452291 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/LauncherCallbacks.d.ts @@ -1,12 +1,12 @@ -import { LauncherController } from "@spt/controllers/LauncherController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; -import { IRemoveProfileData } from "@spt/models/eft/launcher/IRemoveProfileData"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { Watermark } from "@spt/utils/Watermark"; +import { LauncherController } from "@spt-aki/controllers/LauncherController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IChangeRequestData } from "@spt-aki/models/eft/launcher/IChangeRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; +import { IRegisterData } from "@spt-aki/models/eft/launcher/IRegisterData"; +import { IRemoveProfileData } from "@spt-aki/models/eft/launcher/IRemoveProfileData"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { Watermark } from "@spt-aki/utils/Watermark"; export declare class LauncherCallbacks { protected httpResponse: HttpResponseUtil; protected launcherController: LauncherController; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/LocationCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/LocationCallbacks.d.ts index 2825050..a370219 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/LocationCallbacks.d.ts @@ -1,10 +1,10 @@ -import { LocationController } from "@spt/controllers/LocationController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { LocationController } from "@spt-aki/controllers/LocationController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILocationsGenerateAllResponse } from "@spt-aki/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetLocationRequestData } from "@spt-aki/models/eft/location/IGetLocationRequestData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class LocationCallbacks { protected httpResponse: HttpResponseUtil; protected locationController: LocationController; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/MatchCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/MatchCallbacks.d.ts index f002178..a6f2ccf 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/MatchCallbacks.d.ts @@ -1,24 +1,27 @@ -import { MatchController } from "@spt/controllers/MatchController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IEndOfflineRaidRequestData } from "@spt/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { IMatchGroupCurrentResponse } from "@spt/models/eft/match/IMatchGroupCurrentResponse"; -import { IMatchGroupInviteSendRequest } from "@spt/models/eft/match/IMatchGroupInviteSendRequest"; -import { IMatchGroupPlayerRemoveRequest } from "@spt/models/eft/match/IMatchGroupPlayerRemoveRequest"; -import { IMatchGroupStartGameRequest } from "@spt/models/eft/match/IMatchGroupStartGameRequest"; -import { IMatchGroupStatusRequest } from "@spt/models/eft/match/IMatchGroupStatusRequest"; -import { IMatchGroupStatusResponse } from "@spt/models/eft/match/IMatchGroupStatusResponse"; -import { IMatchGroupTransferRequest } from "@spt/models/eft/match/IMatchGroupTransferRequest"; -import { IProfileStatusResponse } from "@spt/models/eft/match/IProfileStatusResponse"; -import { IPutMetricsRequestData } from "@spt/models/eft/match/IPutMetricsRequestData"; -import { IRequestIdRequest } from "@spt/models/eft/match/IRequestIdRequest"; -import { IUpdatePingRequestData } from "@spt/models/eft/match/IUpdatePingRequestData"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; +import { MatchController } from "@spt-aki/controllers/MatchController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; +import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; +import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; +import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData"; +import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; +import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; +import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; +import { IGetProfileRequestData } from "@spt-aki/models/eft/match/IGetProfileRequestData"; +import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; +import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; +import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; +import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; +import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; +import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class MatchCallbacks { protected httpResponse: HttpResponseUtil; protected jsonUtil: JsonUtil; @@ -30,47 +33,42 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; - groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; - /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; + transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; + /** Handle raid/profile/list */ + getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** - * Called periodically while in a group + * @deprecated - not called on raid start/end or game start/exit * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/create */ + createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; + removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; - /** Handle client/raid/configuration-by-profile */ - getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; - /** Handle client/match/group/raid/ready */ - raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; - /** Handle client/match/group/raid/not-ready */ - notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/ModCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/ModCallbacks.d.ts index a0df59f..6af1e68 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/ModCallbacks.d.ts @@ -1,20 +1,20 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { PostSptModLoader } from "@spt/loaders/PostSptModLoader"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpFileUtil } from "@spt/utils/HttpFileUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { PostAkiModLoader } from "@spt-aki/loaders/PostAkiModLoader"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class ModCallbacks implements OnLoad { protected logger: ILogger; protected httpResponse: HttpResponseUtil; protected httpFileUtil: HttpFileUtil; - protected postSptModLoader: PostSptModLoader; + protected postAkiModLoader: PostAkiModLoader; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected httpConfig: IHttpConfig; - constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postSptModLoader: PostSptModLoader, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/NoteCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/NoteCallbacks.d.ts index d078171..a60d3bb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/NoteCallbacks.d.ts @@ -1,7 +1,7 @@ -import { NoteController } from "@spt/controllers/NoteController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; +import { NoteController } from "@spt-aki/controllers/NoteController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { INoteActionData } from "@spt-aki/models/eft/notes/INoteActionData"; export declare class NoteCallbacks { protected noteController: NoteController; constructor(noteController: NoteController); diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/NotifierCallbacks.d.ts index 0436e12..59faade 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/NotifierCallbacks.d.ts @@ -1,12 +1,12 @@ -import { NotifierController } from "@spt/controllers/NotifierController"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INotifierChannel } from "@spt/models/eft/notifier/INotifier"; -import { ISelectProfileResponse } from "@spt/models/eft/notifier/ISelectProfileResponse"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; +import { NotifierController } from "@spt-aki/controllers/NotifierController"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; +import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData"; +import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class NotifierCallbacks { protected httpServerHelper: HttpServerHelper; protected httpResponse: HttpResponseUtil; @@ -29,6 +29,6 @@ export declare class NotifierCallbacks { * Handle client/game/profile/select * @returns ISelectProfileResponse */ - selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData; + selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; notify(url: string, info: any, sessionID: string): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/PresetBuildCallbacks.d.ts new file mode 100644 index 0000000..f5a4c49 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/PresetBuildCallbacks.d.ts @@ -0,0 +1,26 @@ +import { PresetBuildController } from "@spt-aki/controllers/PresetBuildController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData"; +import { IRemoveBuildRequestData } from "@spt-aki/models/eft/presetBuild/IRemoveBuildRequestData"; +import { IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +export declare class PresetBuildCallbacks { + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; + constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); + /** Handle client/handbook/builds/my/list */ + getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle SaveWeaponBuild event */ + saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle removeBuild event*/ + removeBuild(pmcData: IPmcData, body: IRemoveBuildRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveWeaponBuild event*/ + removeWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle SaveEquipmentBuild event */ + saveEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveEquipmentBuild event*/ + removeEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/PresetCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/PresetCallbacks.d.ts index 24edfa2..2741094 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/PresetCallbacks.d.ts @@ -1,5 +1,5 @@ -import { PresetController } from "@spt/controllers/PresetController"; -import { OnLoad } from "@spt/di/OnLoad"; +import { PresetController } from "@spt-aki/controllers/PresetController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; export declare class PresetCallbacks implements OnLoad { protected presetController: PresetController; constructor(presetController: PresetController); diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/ProfileCallbacks.d.ts index 3db4ed8..2e1db38 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/ProfileCallbacks.d.ts @@ -1,30 +1,26 @@ -import { ProfileController } from "@spt/controllers/ProfileController"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IGetMiniProfileRequestData } from "@spt/models/eft/launcher/IGetMiniProfileRequestData"; -import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData"; -import { ICreateProfileResponse } from "@spt/models/eft/profile/ICreateProfileResponse"; -import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest"; -import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse"; -import { IGetProfileSettingsRequest } from "@spt/models/eft/profile/IGetProfileSettingsRequest"; -import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData"; -import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData"; -import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData"; -import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData"; -import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileController } from "@spt-aki/controllers/ProfileController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IGetMiniProfileRequestData } from "@spt-aki/models/eft/launcher/IGetMiniProfileRequestData"; +import { GetProfileStatusResponseData } from "@spt-aki/models/eft/profile/GetProfileStatusResponseData"; +import { ICreateProfileResponse } from "@spt-aki/models/eft/profile/ICreateProfileResponse"; +import { IGetProfileSettingsRequest } from "@spt-aki/models/eft/profile/IGetProfileSettingsRequest"; +import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData"; +import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData"; +import { IProfileCreateRequestData } from "@spt-aki/models/eft/profile/IProfileCreateRequestData"; +import { ISearchFriendRequestData } from "@spt-aki/models/eft/profile/ISearchFriendRequestData"; +import { ISearchFriendResponse } from "@spt-aki/models/eft/profile/ISearchFriendResponse"; +import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** Handle profile related client events */ export declare class ProfileCallbacks { protected httpResponse: HttpResponseUtil; protected timeUtil: TimeUtil; protected profileController: ProfileController; - protected profileHelper: ProfileHelper; - constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController, profileHelper: ProfileHelper); + constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); /** * Handle client/game/profile/create */ @@ -66,11 +62,6 @@ export declare class ProfileCallbacks { * Called when creating a character when choosing a character face/voice */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - /** - * Handle client/profile/view - * Called when viewing another players profile - */ - getOtherProfile(url: string, request: IGetOtherProfileRequest, sessionID: string): IGetBodyResponseData; /** * Handle client/profile/settings */ diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/QuestCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/QuestCallbacks.d.ts index dec034e..b5c5275 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/QuestCallbacks.d.ts @@ -1,17 +1,17 @@ -import { QuestController } from "@spt/controllers/QuestController"; -import { RepeatableQuestController } from "@spt/controllers/RepeatableQuestController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuest } from "@spt/models/eft/common/tables/IQuest"; -import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; -import { IHandoverQuestRequestData } from "@spt/models/eft/quests/IHandoverQuestRequestData"; -import { IListQuestsRequestData } from "@spt/models/eft/quests/IListQuestsRequestData"; -import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { QuestController } from "@spt-aki/controllers/QuestController"; +import { RepeatableQuestController } from "@spt-aki/controllers/RepeatableQuestController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt-aki/models/eft/quests/ICompleteQuestRequestData"; +import { IHandoverQuestRequestData } from "@spt-aki/models/eft/quests/IHandoverQuestRequestData"; +import { IListQuestsRequestData } from "@spt-aki/models/eft/quests/IListQuestsRequestData"; +import { IRepeatableQuestChangeRequest } from "@spt-aki/models/eft/quests/IRepeatableQuestChangeRequest"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class QuestCallbacks { protected httpResponse: HttpResponseUtil; protected questController: QuestController; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/RagfairCallbacks.d.ts index 1e92996..bad2ce0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/RagfairCallbacks.d.ts @@ -1,38 +1,40 @@ -import { RagfairController } from "@spt/controllers/RagfairController"; -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAddOfferRequestData } from "@spt/models/eft/ragfair/IAddOfferRequestData"; -import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; -import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; -import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; -import { IGetOffersResult } from "@spt/models/eft/ragfair/IGetOffersResult"; -import { IGetRagfairOfferByIdRequest } from "@spt/models/eft/ragfair/IGetRagfairOfferByIdRequest"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRemoveOfferRequestData } from "@spt/models/eft/ragfair/IRemoveOfferRequestData"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { ISendRagfairReportRequestData } from "@spt/models/eft/ragfair/ISendRagfairReportRequestData"; -import { IStorePlayerOfferTaxAmountRequestData } from "@spt/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { RagfairTaxService } from "@spt/services/RagfairTaxService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { RagfairController } from "@spt-aki/controllers/RagfairController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAddOfferRequestData } from "@spt-aki/models/eft/ragfair/IAddOfferRequestData"; +import { IExtendOfferRequestData } from "@spt-aki/models/eft/ragfair/IExtendOfferRequestData"; +import { IGetItemPriceResult } from "@spt-aki/models/eft/ragfair/IGetItemPriceResult"; +import { IGetMarketPriceRequestData } from "@spt-aki/models/eft/ragfair/IGetMarketPriceRequestData"; +import { IGetOffersResult } from "@spt-aki/models/eft/ragfair/IGetOffersResult"; +import { IGetRagfairOfferByIdRequest } from "@spt-aki/models/eft/ragfair/IGetRagfairOfferByIdRequest"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { IRemoveOfferRequestData } from "@spt-aki/models/eft/ragfair/IRemoveOfferRequestData"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { ISendRagfairReportRequestData } from "@spt-aki/models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "@spt-aki/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { RagfairServer } from "@spt-aki/servers/RagfairServer"; +import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; @@ -45,7 +47,7 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; /** Handle RagFairAddOffer event */ addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; - /** Handle RagFairRemoveOffer event */ + /** \Handle RagFairRemoveOffer event */ removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairRenewOffer event */ extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/RepairCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/RepairCallbacks.d.ts index 930708e..c8587dc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/RepairCallbacks.d.ts @@ -1,8 +1,8 @@ -import { RepairController } from "@spt/controllers/RepairController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepairActionDataRequest } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { RepairController } from "@spt-aki/controllers/RepairController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRepairActionDataRequest } from "@spt-aki/models/eft/repair/IRepairActionDataRequest"; +import { ITraderRepairActionDataRequest } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { protected repairController: RepairController; constructor(repairController: RepairController); diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/SaveCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/SaveCallbacks.d.ts index 8f836cb..74d463f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/SaveCallbacks.d.ts @@ -1,8 +1,8 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; export declare class SaveCallbacks implements OnLoad, OnUpdate { protected saveServer: SaveServer; protected configServer: ConfigServer; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/TradeCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/TradeCallbacks.d.ts index 0f8ebe3..bfa72b0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/TradeCallbacks.d.ts @@ -1,9 +1,9 @@ -import { TradeController } from "@spt/controllers/TradeController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -import { IProcessRagfairTradeRequestData } from "@spt/models/eft/trade/IProcessRagfairTradeRequestData"; -import { ISellScavItemsToFenceRequestData } from "@spt/models/eft/trade/ISellScavItemsToFenceRequestData"; +import { TradeController } from "@spt-aki/controllers/TradeController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; +import { IProcessRagfairTradeRequestData } from "@spt-aki/models/eft/trade/IProcessRagfairTradeRequestData"; +import { ISellScavItemsToFenceRequestData } from "@spt-aki/models/eft/trade/ISellScavItemsToFenceRequestData"; export declare class TradeCallbacks { protected tradeController: TradeController; constructor(tradeController: TradeController); diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/TraderCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/TraderCallbacks.d.ts index c081a9b..3002b62 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/TraderCallbacks.d.ts @@ -1,15 +1,14 @@ -import { TraderController } from "@spt/controllers/TraderController"; -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { TraderController } from "@spt-aki/controllers/TraderController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { ITraderAssort, ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; protected traderController: TraderController; - constructor(httpResponse: HttpResponseUtil, // TODO: delay required - traderController: TraderController); + constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): Promise; onUpdate(): Promise; getRoute(): string; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/WeatherCallbacks.d.ts index 5ba5aab..2c6fdf6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/WeatherCallbacks.d.ts @@ -1,8 +1,8 @@ -import { WeatherController } from "@spt/controllers/WeatherController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { WeatherController } from "@spt-aki/controllers/WeatherController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IWeatherData } from "@spt-aki/models/eft/weather/IWeatherData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class WeatherCallbacks { protected httpResponse: HttpResponseUtil; protected weatherController: WeatherController; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/WishlistCallbacks.d.ts index f5b500f..29c3e44 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/WishlistCallbacks.d.ts @@ -1,7 +1,7 @@ -import { WishlistController } from "@spt/controllers/WishlistController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IWishlistActionData } from "@spt/models/eft/wishlist/IWishlistActionData"; +import { WishlistController } from "@spt-aki/controllers/WishlistController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IWishlistActionData } from "@spt-aki/models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); diff --git a/TypeScript/23CustomAbstractChatBot/types/context/ApplicationContext.d.ts b/TypeScript/23CustomAbstractChatBot/types/context/ApplicationContext.d.ts index 4818e3a..5eea16e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/context/ApplicationContext.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/context/ApplicationContext.d.ts @@ -1,17 +1,18 @@ -import { ContextVariable } from "@spt/context/ContextVariable"; -import { ContextVariableType } from "@spt/context/ContextVariableType"; +import { ContextVariable } from "@spt-aki/context/ContextVariable"; +import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; export declare class ApplicationContext { private variables; private static holderMaxSize; /** * Called like: - * ``` + * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION).getValue(); - * ``` + * @param type + * @returns */ getLatestValue(type: ContextVariableType): ContextVariable; getValues(type: ContextVariableType): ContextVariable[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/context/ContextVariable.d.ts b/TypeScript/23CustomAbstractChatBot/types/context/ContextVariable.d.ts index 246be85..21bf7ef 100644 --- a/TypeScript/23CustomAbstractChatBot/types/context/ContextVariable.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/context/ContextVariable.d.ts @@ -1,4 +1,4 @@ -import { ContextVariableType } from "@spt/context/ContextVariableType"; +import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; export declare class ContextVariable { private value; private timestamp; diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/AchievementController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/AchievementController.d.ts deleted file mode 100644 index 14a32c6..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/AchievementController.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ICompletedAchievementsResponse } from "@spt/models/eft/profile/ICompletedAchievementsResponse"; -import { IGetAchievementsResponse } from "@spt/models/eft/profile/IGetAchievementsResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -/** - * Logic for handling In Raid callbacks - */ -export declare class AchievementController { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Get base achievements - * @param sessionID Session id - */ - getAchievements(sessionID: string): IGetAchievementsResponse; - /** - * Shows % of 'other' players who've completed each achievement - * @param sessionId Session id - * @returns ICompletedAchievementsResponse - */ - getAchievementStatistics(sessionId: string): ICompletedAchievementsResponse; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/BotController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/BotController.d.ts index 25f7c29..f7ba1aa 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/BotController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/BotController.d.ts @@ -1,26 +1,21 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { BotGenerator } from "@spt/generators/BotGenerator"; -import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { MinMax } from "@spt/models/common/MinMax"; -import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; -import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotGenerationCacheService } from "@spt/services/BotGenerationCacheService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { BotGenerator } from "@spt-aki/generators/BotGenerator"; +import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; +import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BotController { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -30,94 +25,42 @@ export declare class BotController { protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; - protected seasonalEventService: SeasonalEventService; protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; - protected randomUtil: RandomUtil; - protected cloner: ICloner; + protected jsonUtil: JsonUtil; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil); /** - * Return the number of bot load-out varieties to be generated - * @param type bot Type we want the load-out gen count for + * Return the number of bot loadout varieties to be generated + * @param type bot Type we want the loadout gen count for * @returns number of bots to generate */ getBotPresetGenerationLimit(type: string): number; /** * Handle singleplayer/settings/bot/difficulty - * Get the core.json difficulty settings from database/bots + * Get the core.json difficulty settings from database\bots * @returns IBotCore */ getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings - * Adjust PMC settings to ensure they engage the correct bot types + * adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for - * @param diffLevel difficulty level server requested settings for - * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored + * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; - getAllBotDifficulties(): Record; + getBotDifficulty(type: string, difficulty: string): Difficulty; /** * Generate bot profiles and store in cache * @param sessionId Session id * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): Promise; + generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; /** - * On first bot generation bots are generated and stored inside a cache, ready to be used later - * @param request Bot generation request object - * @param pmcProfile Player profile - * @param sessionId Session id - * @returns - */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; - /** - * Create a BotGenerationDetails for the bot generator to use - * @param condition Client data defining bot type and difficulty - * @param pmcProfile Player who is generating bots - * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player - * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within - * @param botCountToGenerate How many bots to generate - * @param generateAsPmc Force bot being generated a PMC - * @returns BotGenerationDetails - */ - protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; - /** - * Get players profile level - * @param pmcProfile Profile to get level from - * @returns Level as number - */ - protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; - /** - * Generate many bots and store then on the cache - * @param condition the condition details to generate the bots with - * @param botGenerationDetails the bot details to generate the bot with - * @param sessionId Session id - * @returns A promise for the bots to be done generating - */ - protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; - /** - * Generate a single bot and store it in the cache - * @param botGenerationDetails the bot details to generate the bot with - * @param sessionId Session id - * @param cacheKey the cache key to store the bot with - * @returns A promise for the bot to be stored - */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; - /** - * Pull a single bot out of cache and return, if cache is empty add bots to it and then return - * @param sessionId Session id - * @param request Bot generation request object - * @returns Single IBotBase object - */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; - /** - * Get the difficulty passed in, if its not "asonline", get selected difficulty from config + * Get the difficulty passed in, if its not "asoline", get selected difficulty from config * @param requestedDifficulty * @returns */ diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/BuildController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/BuildController.d.ts deleted file mode 100644 index 7b8957e..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/BuildController.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ISetMagazineRequest } from "@spt/models/eft/builds/ISetMagazineRequest"; -import { IPresetBuildActionRequestData } from "@spt/models/eft/presetBuild/IPresetBuildActionRequestData"; -import { IRemoveBuildRequestData } from "@spt/models/eft/presetBuild/IRemoveBuildRequestData"; -import { IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class BuildController { - protected logger: ILogger; - protected hashUtil: HashUtil; - protected eventOutputHolder: EventOutputHolder; - protected databaseServer: DatabaseServer; - protected profileHelper: ProfileHelper; - protected localisationService: LocalisationService; - protected itemHelper: ItemHelper; - protected saveServer: SaveServer; - protected cloner: ICloner; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, localisationService: LocalisationService, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); - /** Handle client/handbook/builds/my/list */ - getUserBuilds(sessionID: string): IUserBuilds; - /** Handle client/builds/weapon/save */ - saveWeaponBuild(sessionId: string, body: IPresetBuildActionRequestData): void; - /** Handle client/builds/equipment/save event */ - saveEquipmentBuild(sessionID: string, request: IPresetBuildActionRequestData): void; - /** Handle client/builds/delete */ - removeBuild(sessionID: string, request: IRemoveBuildRequestData): void; - protected removePlayerBuild(idToRemove: string, sessionID: string): void; - /** - * Handle client/builds/magazine/save - */ - createMagazineTemplate(sessionId: string, request: ISetMagazineRequest): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/ClientLogController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/ClientLogController.d.ts index 6356c03..5d70ba4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/ClientLogController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/ClientLogController.d.ts @@ -1,5 +1,5 @@ -import { IClientLogRequest } from "@spt/models/spt/logging/IClientLogRequest"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IClientLogRequest } from "@spt-aki/models/spt/logging/IClientLogRequest"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; export declare class ClientLogController { protected logger: ILogger; constructor(logger: ILogger); diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/CustomizationController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/CustomizationController.d.ts index 613dac9..27de49a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/CustomizationController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/CustomizationController.d.ts @@ -1,14 +1,14 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISuit } from "@spt/models/eft/common/tables/ITrader"; -import { ClothingItem, IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData"; -import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISuit } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ClothingItem, IBuyClothingRequestData } from "@spt-aki/models/eft/customization/IBuyClothingRequestData"; +import { IWearClothingRequestData } from "@spt-aki/models/eft/customization/IWearClothingRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class CustomizationController { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/DialogueController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/DialogueController.d.ts index 4a94359..8d47886 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/DialogueController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/DialogueController.d.ts @@ -1,30 +1,26 @@ -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { IFriendRequestData } from "@spt/models/eft/dialog/IFriendRequestData"; -import { IFriendRequestSendResponse } from "@spt/models/eft/dialog/IFriendRequestSendResponse"; -import { IGetAllAttachmentsResponse } from "@spt/models/eft/dialog/IGetAllAttachmentsResponse"; -import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendListDataResponse"; -import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; -import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; +import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; +import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; +import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewResponseData"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { Dialogue, DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class DialogueController { protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; protected mailSendService: MailSendService; - protected localisationService: LocalisationService; protected configServer: ConfigServer; protected dialogueChatBots: IDialogueChatBot[]; - constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, mailSendService: MailSendService, localisationService: LocalisationService, configServer: ConfigServer, dialogueChatBots: IDialogueChatBot[]); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, mailSendService: MailSendService, configServer: ConfigServer, dialogueChatBots: IDialogueChatBot[]); registerChatBot(chatBot: IDialogueChatBot): void; /** Handle onUpdate spt event */ update(): void; @@ -72,14 +68,14 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile * @param dialogUsers The participants of the mail * @returns IUserDialogInfo array */ - protected getProfilesForMail(fullProfile: ISptProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -114,7 +110,7 @@ export declare class DialogueController { * Get all uncollected items attached to mail in a particular dialog * @param dialogueId Dialog to get mail attachments from * @param sessionId Session id - * @returns IGetAllAttachmentsResponse + * @returns */ getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; /** client/mail/msg/send */ @@ -149,6 +145,4 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; - /** Handle client/friend/request/send */ - sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts index 6325d37..d2a978b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts @@ -1,49 +1,46 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ICheckVersionResponse } from "@spt/models/eft/game/ICheckVersionResponse"; -import { ICurrentGroupResponse } from "@spt/models/eft/game/ICurrentGroupResponse"; -import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; -import { IGameKeepAliveResponse } from "@spt/models/eft/game/IGameKeepAliveResponse"; -import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData"; -import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; -import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; -import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; -import { GiftService } from "@spt/services/GiftService"; -import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { OpenZoneService } from "@spt/services/OpenZoneService"; -import { ProfileActivityService } from "@spt/services/ProfileActivityService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; +import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; +import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; +import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; +import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt-aki/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { CustomLocationWaveService } from "@spt-aki/services/CustomLocationWaveService"; +import { GiftService } from "@spt-aki/services/GiftService"; +import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { OpenZoneService } from "@spt-aki/services/OpenZoneService"; +import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; - protected preSptModLoader: PreSptModLoader; + protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; protected randomUtil: RandomUtil; protected hideoutHelper: HideoutHelper; @@ -56,43 +53,33 @@ export declare class GameController { protected itemBaseClassService: ItemBaseClassService; protected giftService: GiftService; protected raidTimeAdjustmentService: RaidTimeAdjustmentService; - protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; - protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; - protected hideoutConfig: IHideoutConfig; protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; - protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, applicationContext: ApplicationContext, configServer: ConfigServer); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - protected adjustHideoutCraftTimes(): void; - protected adjustHideoutBuildTimes(): void; - protected adjustLocationBotValues(): void; /** * Out of date/incorrectly made trader mods forget this data */ protected checkTraderRepairValuesExist(): void; protected addCustomLooseLootPositions(): void; protected adjustLooseLootSpawnProbabilities(): void; + protected setHideoutAreasAndCraftsTo40Secs(): void; /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ protected adjustMapBotLimits(): void; /** * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; - /** - * Handle client/game/mode - */ - getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ @@ -125,7 +112,8 @@ export declare class GameController { protected flagAllItemsInDbAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer - * @param pmcProfile Profile to adjust values for + * TODO - add body part HP regen + * @param pmcProfile */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; /** @@ -142,17 +130,16 @@ export declare class GameController { */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ - protected saveActiveModsToProfile(fullProfile: ISptProfile): void; + protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json */ protected validateQuestAssortUnlocksExist(): void; /** @@ -164,7 +151,7 @@ export declare class GameController { * Check for a dialog with the key 'undefined', and remove it * @param fullProfile Profile to check for dialog in */ - protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; + protected checkForAndRemoveUndefinedDialogs(fullProfile: IAkiProfile): void; /** * Blank out the "test" mail message from prapor */ @@ -173,5 +160,5 @@ export declare class GameController { * Make non-trigger-spawned raiders spawn earlier + always */ protected adjustLabsRaiderSpawnRate(): void; - protected logProfileDetails(fullProfile: ISptProfile): void; + protected logProfileDetails(fullProfile: IAkiProfile): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/HandbookController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/HandbookController.d.ts index 0743d30..4820f21 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/HandbookController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/HandbookController.d.ts @@ -1,5 +1,5 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; export declare class HandbookController { protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/HealthController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/HealthController.d.ts index 5482283..5206cba 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/HealthController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/HealthController.d.ts @@ -1,21 +1,22 @@ -import { HealthHelper } from "@spt/helpers/HealthHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; -import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; -import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { HealthHelper } from "@spt-aki/helpers/HealthHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHealthTreatmentRequestData } from "@spt-aki/models/eft/health/IHealthTreatmentRequestData"; +import { IOffraidEatRequestData } from "@spt-aki/models/eft/health/IOffraidEatRequestData"; +import { IOffraidHealRequestData } from "@spt-aki/models/eft/health/IOffraidHealRequestData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { IWorkoutData } from "@spt-aki/models/eft/health/IWorkoutData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -23,8 +24,7 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - protected cloner: ICloner; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/HideoutController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/HideoutController.d.ts index 7d2510d..5595648 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/HideoutController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/HideoutController.d.ts @@ -1,45 +1,43 @@ -import { ScavCaseRewardGenerator } from "@spt/generators/ScavCaseRewardGenerator"; -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -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 } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; -import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutImproveAreaRequestData } from "@spt/models/eft/hideout/IHideoutImproveAreaRequestData"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData"; -import { IHideoutScavCaseStartRequestData } from "@spt/models/eft/hideout/IHideoutScavCaseStartRequestData"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; -import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; -import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { ProfileActivityService } from "@spt/services/ProfileActivityService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ScavCaseRewardGenerator } from "@spt-aki/generators/ScavCaseRewardGenerator"; +import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { HideoutArea, Product } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { HideoutUpgradeCompleteRequestData } from "@spt-aki/models/eft/hideout/HideoutUpgradeCompleteRequestData"; +import { IHandleQTEEventRequestData } from "@spt-aki/models/eft/hideout/IHandleQTEEventRequestData"; +import { IHideoutArea, Stage } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutCancelProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutCancelProductionRequestData"; +import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; +import { IHideoutImproveAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutImproveAreaRequestData"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutPutItemInRequestData } from "@spt-aki/models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCaseStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutScavCaseStartRequestData"; +import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData"; +import { IHideoutTakeItemOutRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeItemOutRequestData"; +import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData"; +import { IHideoutToggleAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeRequestData"; +import { IQteData } from "@spt-aki/models/eft/hideout/IQteData"; +import { IRecordShootingRangePoints } from "@spt-aki/models/eft/hideout/IRecordShootingRangePoints"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas"; +import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { protected logger: ILogger; protected hashUtil: HashUtil; @@ -47,7 +45,6 @@ export declare class HideoutController { protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected inventoryHelper: InventoryHelper; - protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected playerService: PlayerService; protected presetHelper: PresetHelper; @@ -58,32 +55,30 @@ export declare class HideoutController { protected hideoutHelper: HideoutHelper; protected scavCaseRewardGenerator: ScavCaseRewardGenerator; protected localisationService: LocalisationService; - protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; protected fenceService: FenceService; - protected cloner: ICloner; - /** Key used in TaskConditionCounters array */ - protected static nameTaskConditionCountersCrafting: string; + protected static nameBackendCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); /** * Handle HideoutUpgrade event * Start a hideout area upgrade * @param pmcData Player profile * @param request upgrade start request * @param sessionID Session id - * @param output Client response + * @returns IItemEventRouterResponse */ - startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string, output: IItemEventRouterResponse): void; + startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; /** * Handle HideoutUpgradeComplete event * Complete a hideout area upgrade * @param pmcData Player profile * @param request Completed upgrade request * @param sessionID Session id - * @param output Client response + * @returns IItemEventRouterResponse */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -207,23 +202,26 @@ export declare class HideoutController { * @param pmcData Player profile * @param request Remove production from area request * @param output Output object to update + * @returns IItemEventRouterResponse */ - protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): void; - /** - * Get the "CounterHoursCrafting" TaskConditionCounter from a profile - * @param pmcData Profile to get counter from - * @param recipe Recipe being crafted - * @returns ITaskConditionCounter - */ - protected getHoursCraftingTaskConditionCounter(pmcData: IPmcData, recipe: IHideoutProduction): ITaskConditionCounter; + protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Handles generating case rewards and sending to player inventory * @param sessionID Session id * @param pmcData Player profile * @param request Get rewards from scavcase craft request * @param output Output object to update + * @returns IItemEventRouterResponse */ - protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): void; + protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + /** + * Start area production for item by adding production to profiles' Hideout.Production array + * @param pmcData Player profile + * @param request Start production request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + registerProduction(pmcData: IPmcData, request: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** * Get quick time event list for hideout * // TODO - implement this @@ -238,7 +236,7 @@ export declare class HideoutController { * @param pmcData Profile to adjust * @param request QTE result object */ - handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData): IItemEventRouterResponse; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id @@ -246,7 +244,7 @@ export declare class HideoutController { * @param request shooting range score request * @returns IItemEventRouterResponse */ - recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): void; + recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): IItemEventRouterResponse; /** * Handle client/game/profile/items/moving - HideoutImproveArea * @param sessionId Session id diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/InraidController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/InraidController.d.ts index f252a7e..8ec13ba 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/InraidController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/InraidController.d.ts @@ -1,42 +1,33 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; -import { HealthHelper } from "@spt/helpers/HealthHelper"; -import { InRaidHelper } from "@spt/helpers/InRaidHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState"; -import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { IBTRConfig } from "@spt/models/spt/config/IBTRConfig"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { InsuranceService } from "@spt/services/InsuranceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; -import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; -import { TraderServicesService } from "@spt/services/TraderServicesService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { PlayerScavGenerator } from "@spt-aki/generators/PlayerScavGenerator"; +import { HealthHelper } from "@spt-aki/helpers/HealthHelper"; +import { InRaidHelper } from "@spt-aki/helpers/InRaidHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "@spt-aki/models/enums/PlayerRaidEndState"; +import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { InsuranceService } from "@spt-aki/services/InsuranceService"; +import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; +import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Logic for handling In Raid callbacks */ export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -47,22 +38,13 @@ export declare class InraidController { protected playerScavGenerator: PlayerScavGenerator; protected healthHelper: HealthHelper; protected traderHelper: TraderHelper; - protected traderServicesService: TraderServicesService; - protected localisationService: LocalisationService; protected insuranceService: InsuranceService; protected inRaidHelper: InRaidHelper; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; - protected mailSendService: MailSendService; - protected randomUtil: RandomUtil; protected airdropConfig: IAirdropConfig; - protected btrConfig: IBTRConfig; - protected inRaidConfig: IInRaidConfig; - protected traderConfig: ITraderConfig; - protected locationConfig: ILocationConfig; - protected ragfairConfig: IRagfairConfig; - protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + protected inraidConfig: IInRaidConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id @@ -84,8 +66,8 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, postRaidRequest: ISaveProgressRequestData): void; /** - * Make changes to PMC profile after they've died in raid, - * Alter body part hp, handle insurance, delete inventory items, remove carried quest items + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items * @param postRaidSaveRequest Post-raid save request * @param pmcData Pmc profile * @param sessionID Session id @@ -93,7 +75,7 @@ export declare class InraidController { */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, sessionID: string): IPmcData; /** - * Adjust player characters body part hp post-raid + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ @@ -101,29 +83,15 @@ export declare class InraidController { /** * Reduce body part hp to % of max * @param pmcData profile to edit - * @param multiplier multiplier to apply to max health + * @param multipler multipler to apply to max health */ - protected reducePmcHealthToPercent(pmcData: IPmcData, multiplier: number): void; + protected reducePmcHealthToPercent(pmcData: IPmcData, multipler: number): void; /** * Handle updating the profile post-pscav raid * @param sessionID Session id * @param postRaidRequest Post-raid data of raid */ protected savePlayerScavProgress(sessionID: string, postRaidRequest: ISaveProgressRequestData): void; - /** - * merge two dictionaries together - * Prioritise pair that has true as a value - * @param primary main dictionary - * @param secondary Secondary dictionary - */ - protected mergePmcAndScavEncyclopedias(primary: IPmcData, secondary: IPmcData): void; - /** - * Post-scav-raid any charisma increase must be propigated into PMC profile - * @param postRaidServerScavProfile Scav profile after adjustments made from raid - * @param postRaidServerPmcProfile Pmc profile after raid - * @param preRaidScavCharismaProgress charisma progress value pre-raid - */ - protected updatePmcCharismaSkillPostScavRaid(postRaidServerScavProfile: IPmcData, postRaidServerPmcProfile: IPmcData, preRaidScavCharismaProgress: number): void; /** * Does provided profile contain any condition counters * @param profile Profile to check for condition counters @@ -160,9 +128,8 @@ export declare class InraidController { * Update profile with scav karma values based on in-raid actions * @param pmcData Pmc profile * @param offraidData Post-raid save request - * @param scavData Scav profile */ - protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData): void; + protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config @@ -173,20 +140,4 @@ export declare class InraidController { * @returns Airdrop config */ getAirdropConfig(): IAirdropConfig; - /** - * Get BTR config from configs/btr.json - * @returns Airdrop config - */ - getBTRConfig(): IBTRConfig; - /** - * Handle singleplayer/traderServices/getTraderServices - * @returns Trader services data - */ - getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; - /** - * Handle singleplayer/traderServices/itemDelivery - */ - itemDelivery(sessionId: string, traderId: string, items: Item[]): void; - getTraitorScavHostileChance(url: string, sessionID: string): number; - getSandboxMaxPatrolValue(url: string, sessionID: string): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts index cfb05e4..64c2ae8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts @@ -1,35 +1,28 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsuranceCostRequestData"; -import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; -import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; -import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { InsuranceService } from "@spt/services/InsuranceService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData"; +import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData"; +import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ISystemData, Insurance } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { InsuranceService } from "@spt-aki/services/InsuranceService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; - protected mathUtil: MathUtil; - protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; protected saveServer: SaveServer; @@ -37,17 +30,14 @@ export declare class InsuranceController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected dialogueHelper: DialogueHelper; - protected weightedRandomHelper: WeightedRandomHelper; protected traderHelper: TraderHelper; protected paymentService: PaymentService; protected insuranceService: InsuranceService; protected mailSendService: MailSendService; - protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; - protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * @@ -76,12 +66,6 @@ export declare class InsuranceController { * @returns void */ protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; - /** - * Count all items in all insurance packages. - * @param insurance - * @returns - */ - protected countAllInsuranceItems(insurance: Insurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -89,35 +73,31 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, packageInfo: ISystemData): void; /** * Finds the items that should be deleted based on the given Insurance object. * - * @param rootItemParentID - The ID that should be assigned to all "hideout"/root items. - * @param insured - The insurance object containing the items to evaluate for deletion. + * @param insured The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(insured: Insurance): Set; + /** + * Populate a Map object of items for quick lookup by their ID. + * + * @param insured The insurance object containing the items to populate the map with. + * @returns A Map where the keys are the item IDs and the values are the corresponding Item objects. + */ + protected populateItemsMap(insured: Insurance): Map; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, * not the backpack that the gun is located in (the gun's parent). * - * @param rootItemParentID - The ID that should be assigned to all "hideout"/root items. * @param insured - The insurance object containing the items to evaluate. * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; - /** - * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments - * remain, the parent is removed from the map as well. - * - * @param parentAttachmentsMap - A Map object containing parent item IDs to arrays of their attachment items. - * @param itemsMap - A Map object for quick item look-up by item ID. - * @returns A Map object containing parent item IDs to arrays of their attachment items which are not moddable in-raid. - */ - protected removeNonModdableAttachments(parentAttachmentsMap: Map, itemsMap: Map): Map; + protected populateParentAttachmentsMap(insured: Insurance, itemsMap: Map): Map; /** * Process "regular" insurance items. Any insured item that is not an attached, attachment is considered a "regular" * item. This method iterates over them, preforming item deletion rolls to see if they should be deleted. If so, @@ -125,13 +105,15 @@ export declare class InsuranceController { * * @param insured The insurance object containing the items to evaluate. * @param toDelete A Set to keep track of items marked for deletion. - * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: Insurance, toDelete: Set): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * + * This method iterates over a map of parent items to their attachments and performs evaluations on each. + * It marks items for deletion based on certain conditions and updates the toDelete Set accordingly. + * * @param mainParentToAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @param itemsMap A Map object for quick item look-up by item ID. * @param traderId The trader ID from the Insurance object. @@ -150,15 +132,35 @@ export declare class InsuranceController { * @returns void */ protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set): void; - protected logAttachmentsBeingRemoved(attachmentIdsToRemove: string[], attachments: Item[], attachmentPrices: Record): void; - protected weightAttachmentsByPrice(attachments: Item[]): Record; /** - * Get count of items to remove from weapon (take into account trader + price of attachment) - * @param weightedAttachmentByPrice Dict of item Tpls and thier rouble price - * @param traderId Trader attachment insured against - * @returns Attachment count to remove + * Sorts the attachment items by their max price in descending order. + * + * @param attachments The array of attachments items. + * @returns An array of items enriched with their max price and common locale-name. */ - protected getAttachmentCountToRemove(weightedAttachmentByPrice: Record, traderId: string): number; + protected sortAttachmentsByPrice(attachments: Item[]): EnrichedItem[]; + /** + * Logs the details of each attachment item. + * + * @param attachments The array of attachment items. + */ + protected logAttachmentsDetails(attachments: EnrichedItem[]): void; + /** + * Counts the number of successful rolls for the attachment items. + * + * @param attachments The array of attachment items. + * @param traderId The ID of the trader that has insured these attachments. + * @returns The number of successful rolls. + */ + protected countSuccessfulRolls(attachments: Item[], traderId: string): number; + /** + * Marks the most valuable attachments for deletion based on the number of successful rolls made. + * + * @param attachments The array of attachment items. + * @param successfulRolls The number of successful rolls. + * @param toDelete The array that accumulates the IDs of the items to be deleted. + */ + protected attachmentDeletionByValue(attachments: EnrichedItem[], successfulRolls: number, toDelete: Set): void; /** * Remove items from the insured items that should not be returned to the player. * @@ -167,23 +169,40 @@ export declare class InsuranceController { * @returns void */ protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + /** + * Adopts orphaned items by resetting them as base-level items. Helpful in situations where a parent has been + * deleted from insurance, but any insured items within the parent should remain. This method will remove the + * reference from the children to the parent and set item properties to main-level values. + * + * @param insured Insurance object containing items. + */ + protected adoptOrphanedItems(insured: Insurance): void; + /** + * Fetches the parentId property of an item with a slotId "hideout". Not sure if this is actually dynamic, but this + * method should be a reliable way to fetch it, if it ever does change. + * + * @param items Array of items to search through. + * @returns The parentId of an item with slotId 'hideout'. Empty string if not found. + */ + protected fetchHideoutItemParent(items: Item[]): string; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * * @param sessionID The session ID that should receive the insurance message. * @param insurance The context of insurance to use. + * @param noItems Whether or not there are any items to return to the player. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: Insurance, noItems: boolean): void; /** - * Determines whether an insured item should be removed from the player's inventory based on a random roll and + * Determines whether a insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. * * @param traderId The ID of the trader who insured the item. * @param insuredItem Optional. The item to roll for. Only used for logging. - * @returns true if the insured item should be removed from inventory, false otherwise, or null on error. + * @returns true if the insured item should be removed from inventory, false otherwise. */ - protected rollForDelete(traderId: string, insuredItem?: Item): boolean | null; + protected rollForDelete(traderId: string, insuredItem?: Item): boolean; /** * Handle Insure event * Add insurance to an item @@ -204,3 +223,8 @@ export declare class InsuranceController { */ cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData; } +interface EnrichedItem extends Item { + name: string; + maxPrice: number; +} +export {}; diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/InventoryController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/InventoryController.d.ts index 04ddea9..02e2127 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/InventoryController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/InventoryController.d.ts @@ -1,47 +1,45 @@ -import { LootGenerator } from "@spt/generators/LootGenerator"; -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; -import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; -import { IInventoryDeleteMarkerRequestData } from "@spt/models/eft/inventory/IInventoryDeleteMarkerRequestData"; -import { IInventoryEditMarkerRequestData } from "@spt/models/eft/inventory/IInventoryEditMarkerRequestData"; -import { IInventoryExamineRequestData } from "@spt/models/eft/inventory/IInventoryExamineRequestData"; -import { IInventoryFoldRequestData } from "@spt/models/eft/inventory/IInventoryFoldRequestData"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryReadEncyclopediaRequestData } from "@spt/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySortRequestData } from "@spt/models/eft/inventory/IInventorySortRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventorySwapRequestData } from "@spt/models/eft/inventory/IInventorySwapRequestData"; -import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTagRequestData"; -import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; -import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; -import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { LootGenerator } from "@spt-aki/generators/LootGenerator"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IInventoryBindRequestData } from "@spt-aki/models/eft/inventory/IInventoryBindRequestData"; +import { IInventoryCreateMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryCreateMarkerRequestData"; +import { IInventoryDeleteMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryDeleteMarkerRequestData"; +import { IInventoryEditMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryEditMarkerRequestData"; +import { IInventoryExamineRequestData } from "@spt-aki/models/eft/inventory/IInventoryExamineRequestData"; +import { IInventoryFoldRequestData } from "@spt-aki/models/eft/inventory/IInventoryFoldRequestData"; +import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData"; +import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData"; +import { IInventoryReadEncyclopediaRequestData } from "@spt-aki/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; +import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData"; +import { IInventorySortRequestData } from "@spt-aki/models/eft/inventory/IInventorySortRequestData"; +import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData"; +import { IInventorySwapRequestData } from "@spt-aki/models/eft/inventory/IInventorySwapRequestData"; +import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInventoryTagRequestData"; +import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData"; +import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData"; +import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -49,7 +47,6 @@ export declare class InventoryController { protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; protected questHelper: QuestHelper; - protected hideoutHelper: HideoutHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -58,8 +55,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - protected cloner: ICloner; - constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -68,52 +64,55 @@ export declare class InventoryController { * @param pmcData Profile * @param moveRequest Move request data * @param sessionID Session id - * @param output Client response + * @returns IItemEventRouterResponse */ - moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string, output: IItemEventRouterResponse): void; + moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; /** * Get a event router response with inventory trader message * @param output Item event router response * @returns Item event router response */ - protected appendTraderExploitErrorResponse(output: IItemEventRouterResponse): void; + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; + /** + * Remove Item from Profile + * Deep tree item deletion, also removes items from insurance list + */ + removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; /** * Handle Remove event * Implements functionality "Discard" from Main menu (Stash etc.) * Removes item from PMC Profile */ - discardItem(pmcData: IPmcData, request: IInventoryRemoveRequestData, sessionID: string, output: IItemEventRouterResponse): void; + discardItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; /** * Split Item * spliting 1 stack into 2 * @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile) * @param request Split request * @param sessionID Session/player id - * @param output Client response * @returns IItemEventRouterResponse */ - splitItem(pmcData: IPmcData, request: IInventorySplitRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + splitItem(pmcData: IPmcData, request: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse; /** * Fully merge 2 inventory stacks together into one stack (merging where both stacks remain is called 'transfer') * Deletes item from `body.item` and adding number of stacks into `body.with` * @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile) * @param body Merge request * @param sessionID Player id - * @param output Client response * @returns IItemEventRouterResponse */ - mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse; /** * TODO: Adds no data to output to send to client, is this by design? + * TODO: should make use of getOwnerInventoryItems(), stack being transferred may not always be on pmc * Transfer items from one stack into another while keeping original stack * Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload" * @param pmcData Player profile * @param body Transfer request * @param sessionID Session id - * @param output Client response * @returns IItemEventRouterResponse */ - transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse; /** * Swap Item * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment @@ -123,7 +122,7 @@ export declare class InventoryController { /** * Handles folding of Weapons */ - foldItem(pmcData: IPmcData, request: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse; + foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse; /** * Toggles "Toggleable" items like night vision goggles and face shields. * @param pmcData player profile @@ -148,37 +147,31 @@ export declare class InventoryController { * @param sessionID Session id * @returns IItemEventRouterResponse */ - bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): void; + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Unbind an inventory item from quick access menu at bottom of player screen * Handle unbind event * @param pmcData Player profile * @param bindRequest Request object * @param sessionID Session id - * @param output Client response + * @returns IItemEventRouterResponse */ - unbindItem(pmcData: IPmcData, request: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): void; + unbindItem(pmcData: IPmcData, request: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile * @param body request object * @param sessionID session id - * @param output Client response * @returns response */ - examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Flag an item as seen in profiles encyclopedia + add inspect xp to profile - * @param itemTpls Inspected item tpls - * @param fullProfile Profile to add xp to - */ - protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], fullProfile: ISptProfile): void; + examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse; + protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], pmcProfile: IPmcData): void; /** * Get the tplid of an item from the examine request object - * @param request Response request - * @returns tplId + * @param body response request + * @returns tplid */ - protected getExaminedItemTpl(request: IInventoryExamineRequestData): string; + protected getExaminedItemTpl(body: IInventoryExamineRequestData): string; readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse; /** * Handle ApplyInventoryChanges @@ -186,33 +179,33 @@ export declare class InventoryController { * @param pmcData Player profile * @param request sort request * @param sessionID Session id + * @returns IItemEventRouterResponse */ - sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): void; + sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; /** * Add note to a map * @param pmcData Player profile * @param request Add marker request * @param sessionID Session id - * @param output Client response * @returns IItemEventRouterResponse */ - createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void; + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; /** * Delete a map marker * @param pmcData Player profile * @param request Delete marker request * @param sessionID Session id - * @param output Client response + * @returns IItemEventRouterResponse */ - deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void; + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; /** * Edit an existing map marker * @param pmcData Player profile * @param request Edit marker request * @param sessionID Session id - * @param output Client response + * @returns IItemEventRouterResponse */ - editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void; + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; /** * Strip out characters from note string that are not: letter/numbers/unicode/spaces * @param mapNoteText Marker text to sanitise @@ -223,11 +216,10 @@ export declare class InventoryController { * Handle OpenRandomLootContainer event * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data - * @param body Open loot container request data + * @param body open loot container request data * @param sessionID Session id - * @param output Client response + * @returns IItemEventRouterResponse */ - openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; - redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; - setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse; + redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/LauncherController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/LauncherController.d.ts index 58bc7b2..5de2416 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/LauncherController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/LauncherController.d.ts @@ -1,35 +1,31 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; -import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { IChangeRequestData } from "@spt-aki/models/eft/launcher/IChangeRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; +import { IRegisterData } from "@spt-aki/models/eft/launcher/IRegisterData"; +import { Info, ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class LauncherController { protected logger: ILogger; protected hashUtil: HashUtil; - protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; protected saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; - protected preSptModLoader: PreSptModLoader; + protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preSptModLoader: PreSptModLoader, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer); connect(): IConnectResponse; /** * Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness" @@ -40,15 +36,8 @@ export declare class LauncherController { login(info: ILoginRequestData): string; register(info: IRegisterData): string; protected createAccount(info: IRegisterData): string; - protected generateProfileId(): string; - protected formatID(timeStamp: number, counter: number): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; - /** - * Handle launcher requesting profile be wiped - * @param info IRegisterData - * @returns Session id - */ wipe(info: IRegisterData): string; getCompatibleTarkovVersion(): string; /** diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/LocationController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/LocationController.d.ts index f1d5e0c..eb4144a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/LocationController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/LocationController.d.ts @@ -1,26 +1,26 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { LocationGenerator } from "@spt/generators/LocationGenerator"; -import { LootGenerator } from "@spt/generators/LootGenerator"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; -import { IAirdropLootResult } from "@spt/models/eft/location/IAirdropLootResult"; -import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; -import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { LocationGenerator } from "@spt-aki/generators/LocationGenerator"; +import { LootGenerator } from "@spt-aki/generators/LootGenerator"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILocationsGenerateAllResponse } from "@spt-aki/models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "@spt-aki/models/eft/location/IAirdropLootResult"; +import { IGetLocationRequestData } from "@spt-aki/models/eft/location/IGetLocationRequestData"; +import { AirdropTypeEnum } from "@spt-aki/models/enums/AirdropType"; +import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { LootRequest } from "@spt-aki/models/spt/services/LootRequest"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { + protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -28,16 +28,14 @@ export declare class LocationController { protected locationGenerator: LocationGenerator; protected localisationService: LocalisationService; protected raidTimeAdjustmentService: RaidTimeAdjustmentService; - protected itemFilterService: ItemFilterService; protected lootGenerator: LootGenerator; protected databaseServer: DatabaseServer; protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; - protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); + constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data @@ -61,7 +59,7 @@ export declare class LocationController { generateAll(sessionId: string): ILocationsGenerateAllResponse; /** * Handle client/location/getAirdropLoot - * Get loot for an airdrop container + * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/MatchController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/MatchController.d.ts index c08ebb0..ca950b1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/MatchController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/MatchController.d.ts @@ -1,29 +1,31 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { LootGenerator } from "@spt/generators/LootGenerator"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IEndOfflineRaidRequestData } from "@spt/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { IMatchGroupStartGameRequest } from "@spt/models/eft/match/IMatchGroupStartGameRequest"; -import { IMatchGroupStatusRequest } from "@spt/models/eft/match/IMatchGroupStatusRequest"; -import { IMatchGroupStatusResponse } from "@spt/models/eft/match/IMatchGroupStatusResponse"; -import { IProfileStatusResponse } from "@spt/models/eft/match/IProfileStatusResponse"; -import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig"; -import { IMatchConfig } from "@spt/models/spt/config/IMatchConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { BotGenerationCacheService } from "@spt/services/BotGenerationCacheService"; -import { BotLootCacheService } from "@spt/services/BotLootCacheService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { LootGenerator } from "@spt-aki/generators/LootGenerator"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData"; +import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; +import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; +import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; +import { IGetProfileRequestData } from "@spt-aki/models/eft/match/IGetProfileRequestData"; +import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; +import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; +import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheService"; +import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { MatchLocationService } from "@spt-aki/services/MatchLocationService"; +import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; @@ -41,17 +43,21 @@ export declare class MatchController { protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; - protected inRaidConfig: IInRaidConfig; + protected inraidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; + /** Handle raid/profile/list */ + getProfile(info: IGetProfileRequestData): IPmcData[]; + /** Handle client/match/group/create */ + createGroup(sessionID: string, info: ICreateGroupRequestData): any; /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; + joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; /** Handle client/match/group/status */ - getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; + getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request @@ -75,11 +81,10 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence - * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/NoteController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/NoteController.d.ts index a46a0aa..ef07d6d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/NoteController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/NoteController.d.ts @@ -1,7 +1,7 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { INoteActionData } from "@spt-aki/models/eft/notes/INoteActionData"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; export declare class NoteController { protected eventOutputHolder: EventOutputHolder; constructor(eventOutputHolder: EventOutputHolder); diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/NotifierController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/NotifierController.d.ts index 8939bee..ad3d025 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/NotifierController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/NotifierController.d.ts @@ -1,7 +1,7 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { NotifierHelper } from "@spt/helpers/NotifierHelper"; -import { INotifierChannel } from "@spt/models/eft/notifier/INotifier"; -import { NotificationService } from "@spt/services/NotificationService"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper"; +import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; +import { NotificationService } from "@spt-aki/services/NotificationService"; export declare class NotifierController { protected notifierHelper: NotifierHelper; protected httpServerHelper: HttpServerHelper; diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/PresetBuildController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/PresetBuildController.d.ts new file mode 100644 index 0000000..7aa10e1 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/PresetBuildController.d.ts @@ -0,0 +1,36 @@ +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData"; +import { IRemoveBuildRequestData } from "@spt-aki/models/eft/presetBuild/IRemoveBuildRequestData"; +import { IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +export declare class PresetBuildController { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected eventOutputHolder: EventOutputHolder; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer); + /** Handle client/handbook/builds/my/list */ + getUserBuilds(sessionID: string): IUserBuilds; + /** Handle SaveWeaponBuild event */ + saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionId: string): IItemEventRouterResponse; + /** Handle SaveEquipmentBuild event */ + saveEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + protected saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string, buildType: string): IItemEventRouterResponse; + /** Handle RemoveWeaponBuild event*/ + removeBuild(pmcData: IPmcData, body: IRemoveBuildRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveWeaponBuild event*/ + removeWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveEquipmentBuild event*/ + removeEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + protected removePlayerBuild(pmcData: IPmcData, id: string, sessionID: string): IItemEventRouterResponse; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/PresetController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/PresetController.d.ts index 0098a41..c1ae523 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/PresetController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/PresetController.d.ts @@ -1,10 +1,8 @@ -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; export declare class PresetController { - protected logger: ILogger; protected presetHelper: PresetHelper; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, presetHelper: PresetHelper, databaseServer: DatabaseServer); + constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/ProfileController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/ProfileController.d.ts index e39a632..b1b7b8b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/ProfileController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/ProfileController.d.ts @@ -1,32 +1,28 @@ -import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IMiniProfile } from "@spt/models/eft/launcher/IMiniProfile"; -import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData"; -import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest"; -import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse"; -import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData"; -import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData"; -import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData"; -import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData"; -import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { PlayerScavGenerator } from "@spt-aki/generators/PlayerScavGenerator"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IMiniProfile } from "@spt-aki/models/eft/launcher/IMiniProfile"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData"; +import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData"; +import { IProfileCreateRequestData } from "@spt-aki/models/eft/profile/IProfileCreateRequestData"; +import { ISearchFriendRequestData } from "@spt-aki/models/eft/profile/ISearchFriendRequestData"; +import { ISearchFriendResponse } from "@spt-aki/models/eft/profile/ISearchFriendResponse"; +import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class ProfileController { protected logger: ILogger; protected hashUtil: HashUtil; @@ -36,7 +32,6 @@ export declare class ProfileController { protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; - protected seasonalEventService: SeasonalEventService; protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; @@ -44,7 +39,7 @@ export declare class ProfileController { protected dialogueHelper: DialogueHelper; protected questHelper: QuestHelper; protected profileHelper: ProfileHelper; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper); /** * Handle /launcher/profiles */ @@ -64,11 +59,6 @@ export declare class ProfileController { * @returns Profiles _id value */ createProfile(info: IProfileCreateRequestData, sessionID: string): string; - /** - * make profiles pmcData.Inventory.equipment unique - * @param pmcData Profile to update - */ - protected updateInventoryEquipmentId(pmcData: IPmcData): void; /** * Delete a profile * @param sessionID Id of profile to delete @@ -81,7 +71,7 @@ export declare class ProfileController { * @param sessionID Session id * @param response Event router response */ - protected givePlayerStartingQuestRewards(profileDetails: ISptProfile, sessionID: string, response: IItemEventRouterResponse): void; + protected givePlayerStartingQuestRewards(profileDetails: IAkiProfile, sessionID: string, response: IItemEventRouterResponse): void; /** * For each trader reset their state to what a level 1 player would see * @param sessionID Session id of profile to reset @@ -111,9 +101,4 @@ export declare class ProfileController { * Handle client/game/profile/search */ getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[]; - /** - * Handle client/profile/status - */ - getProfileStatus(sessionId: string): GetProfileStatusResponseData; - getOtherProfile(sessionId: string, request: IGetOtherProfileRequest): IGetOtherProfileResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/QuestController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/QuestController.d.ts index 0a32b05..140573b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/QuestController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/QuestController.d.ts @@ -1,35 +1,35 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; -import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; -import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; -import { IHandoverQuestRequestData } from "@spt/models/eft/quests/IHandoverQuestRequestData"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { AvailableForConditions, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt-aki/models/eft/quests/ICompleteQuestRequestData"; +import { IHandoverQuestRequestData } from "@spt-aki/models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; + protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -45,9 +45,8 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; - protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** * Handle client/quest/list * Get all quests visible to player @@ -69,6 +68,12 @@ export declare class QuestController { * @returns true = show to player */ protected showEventQuestToPlayer(questId: string): boolean; + /** + * Is the quest for the opposite side the player is on + * @param playerSide Player side (usec/bear) + * @param questId QuestId to check + */ + protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,12 +113,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; /** * Remove a quest entirely from a profile * @param sessionId Player id @@ -134,7 +133,7 @@ export declare class QuestController { * @param completedQuestId Completed quest id * @param questRewards Rewards given to player */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Item[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile * @param pmcData Player profile to update @@ -142,6 +141,12 @@ export declare class QuestController { * @param completedQuestId Quest just completed */ protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status @@ -174,7 +179,7 @@ export declare class QuestController { * @param output Response to send to user * @returns IItemEventRouterResponse */ - protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: IQuestCondition, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: AvailableForConditions, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Increment a backend counter stored value by an amount, * Create counter if it does not exist @@ -183,13 +188,5 @@ export declare class QuestController { * @param questId quest id counter is associated with * @param counterValue value to increment the backend counter with */ - protected updateProfileTaskConditionCounterValue(pmcData: IPmcData, conditionId: string, questId: string, counterValue: number): void; - /** - * Handle /client/game/profile/items/moving - QuestFail - * @param pmcData Pmc profile - * @param request Fail qeust request - * @param sessionID Session id - * @returns IItemEventRouterResponse - */ - failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected updateProfileBackendCounterValue(pmcData: IPmcData, conditionId: string, questId: string, counterValue: number): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/RagfairController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/RagfairController.d.ts index 9567d62..71cbbbc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/RagfairController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/RagfairController.d.ts @@ -1,44 +1,43 @@ -import { RagfairOfferGenerator } from "@spt/generators/RagfairOfferGenerator"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RagfairHelper } from "@spt/helpers/RagfairHelper"; -import { RagfairOfferHelper } from "@spt/helpers/RagfairOfferHelper"; -import { RagfairSellHelper } from "@spt/helpers/RagfairSellHelper"; -import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; -import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; -import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; -import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; -import { IGetOffersResult } from "@spt/models/eft/ragfair/IGetOffersResult"; -import { IGetRagfairOfferByIdRequest } from "@spt/models/eft/ragfair/IGetRagfairOfferByIdRequest"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRemoveOfferRequestData } from "@spt/models/eft/ragfair/IRemoveOfferRequestData"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; -import { RagfairTaxService } from "@spt/services/RagfairTaxService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { RagfairHelper } from "@spt-aki/helpers/RagfairHelper"; +import { RagfairOfferHelper } from "@spt-aki/helpers/RagfairOfferHelper"; +import { RagfairSellHelper } from "@spt-aki/helpers/RagfairSellHelper"; +import { RagfairSortHelper } from "@spt-aki/helpers/RagfairSortHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IAddOfferRequestData, Requirement } from "@spt-aki/models/eft/ragfair/IAddOfferRequestData"; +import { IExtendOfferRequestData } from "@spt-aki/models/eft/ragfair/IExtendOfferRequestData"; +import { IGetItemPriceResult } from "@spt-aki/models/eft/ragfair/IGetItemPriceResult"; +import { IGetMarketPriceRequestData } from "@spt-aki/models/eft/ragfair/IGetMarketPriceRequestData"; +import { IGetOffersResult } from "@spt-aki/models/eft/ragfair/IGetOffersResult"; +import { IGetRagfairOfferByIdRequest } from "@spt-aki/models/eft/ragfair/IGetRagfairOfferByIdRequest"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RagfairServer } from "@spt-aki/servers/RagfairServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { RagfairRequiredItemsService } from "@spt-aki/services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Handle RagfairCallback events */ @@ -70,17 +69,9 @@ export declare class RagfairController { protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); - /** - * Handles client/ragfair/find - * Returns flea offers that match required search parameters - * @param sessionID Player id - * @param searchRequest Search request data - * @returns IGetOffersResult - */ getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult; /** - * Handle client/ragfair/offer/findbyid - * Occurs when searching for `#x` on flea + * Handle client/ragfair/offer/findbyid * @param sessionId Player id * @param request Request data * @returns IRagfairOffer @@ -89,7 +80,7 @@ export declare class RagfairController { /** * Get offers for the client based on type of search being performed * @param searchRequest Client search request data - * @param itemsToAdd Comes from ragfairHelper.filterCategories() + * @param itemsToAdd comes from ragfairHelper.filterCategories() * @param traderAssorts Trader assorts * @param pmcProfile Player profile * @returns array of offers @@ -98,10 +89,18 @@ export declare class RagfairController { /** * Get categories for the type of search being performed, linked/required/all * @param searchRequest Client search request data - * @param offers Ragfair offers to get categories for - * @returns record with templates + counts + * @param offers ragfair offers to get categories for + * @returns record with tpls + counts */ protected getSpecificCategories(pmcProfile: IPmcData, searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record; + /** + * Add Required offers to offers result + * @param searchRequest Client search request data + * @param assorts + * @param pmcProfile Player profile + * @param result Result object being sent back to client + */ + protected addRequiredOffersToResult(searchRequest: ISearchRequestData, assorts: Record, pmcProfile: IPmcData, result: IGetOffersResult): void; /** * Add index to all offers passed in (0-indexed) * @param offers Offers to add index value to @@ -109,26 +108,16 @@ export declare class RagfairController { protected addIndexValueToOffers(offers: IRagfairOffer[]): void; /** * Update a trader flea offer with buy restrictions stored in the traders assort - * @param offer Flea offer to update - * @param fullProfile Players full profile + * @param offer flea offer to update + * @param profile full profile of player */ - protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, fullProfile: ISptProfile): void; + protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, profile: IAkiProfile): void; /** * Adjust ragfair offer stack count to match same value as traders assort stack count - * @param offer Flea offer to adjust stack size of + * @param offer Flea offer to adjust */ protected setTraderOfferStackSize(offer: IRagfairOffer): void; - /** - * Is the flea search being performed a 'linked' search type - * @param info Search request - * @returns True if it is a 'linked' search type - */ protected isLinkedSearch(info: ISearchRequestData): boolean; - /** - * Is the flea search being performed a 'required' search type - * @param info Search request - * @returns True if it is a 'required' search type - */ protected isRequiredSearch(info: ISearchRequestData): boolean; /** * Check all profiles and sell player offers / send player money for listing if it sold @@ -174,33 +163,25 @@ export declare class RagfairController { */ protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; /** - * Using item ids from flea offer request, find corresponding items from player inventory and return as array + * Using item ids from flea offer request, find corrispnding items from player inventory and return as array * @param pmcData Player profile * @param itemIdsFromFleaOfferRequest Ids from request + * @param errorMessage if item is not found, add error message to this parameter * @returns Array of items from player inventory */ - protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[]): { - items: Item[] | null; - errorMessage: string | null; - }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: Item[], sellInOnePiece: boolean): IRagfairOffer; + protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[], errorMessage: string): Item[]; + createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** * User requested removal of the offer, actually reduces the time to 71 seconds, * allowing for the possibility of extending the auction before it's end time - * @param removeRequest Remove offer request - * @param sessionId Players id + * @param offerId offer to 'remove' + * @param sessionID Players id * @returns IItemEventRouterResponse */ - removeOffer(removeRequest: IRemoveOfferRequestData, sessionId: string): IItemEventRouterResponse; - /** - * Extend a ragfair offers listing time - * @param extendRequest Extend offer request - * @param sessionId Players id - * @returns IItemEventRouterResponse - */ - extendOffer(extendRequest: IExtendOfferRequestData, sessionId: string): IItemEventRouterResponse; + removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse; + extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse; /** * Create a basic trader request object with price and currency type * @param currency What currency: RUB, EURO, USD diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/RepairController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/RepairController.d.ts index 61726ef..070f348 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/RepairController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/RepairController.d.ts @@ -1,17 +1,16 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { RepairHelper } from "@spt/helpers/RepairHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepairActionDataRequest } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; -import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RepairService } from "@spt/services/RepairService"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { RepairHelper } from "@spt-aki/helpers/RepairHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRepairActionDataRequest } from "@spt-aki/models/eft/repair/IRepairActionDataRequest"; +import { ITraderRepairActionDataRequest } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { RepairService } from "@spt-aki/services/RepairService"; export declare class RepairController { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -21,9 +20,8 @@ export declare class RepairController { protected paymentService: PaymentService; protected repairHelper: RepairHelper; protected repairService: RepairService; - protected profileHelper: ProfileHelper; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService, profileHelper: ProfileHelper); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService); /** * Handle TraderRepair event * Repair with trader diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/RepeatableQuestController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/RepeatableQuestController.d.ts index e0f3753..7068128 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/RepeatableQuestController.d.ts @@ -1,34 +1,36 @@ -import { RepeatableQuestGenerator } from "@spt/generators/RepeatableQuestGenerator"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; -import { ELocationName } from "@spt/models/enums/ELocationName"; -import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { PaymentService } from "@spt/services/PaymentService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { RepeatableQuestGenerator } from "@spt-aki/generators/RepeatableQuestGenerator"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRepeatableQuestChangeRequest } from "@spt-aki/models/eft/quests/IRepeatableQuestChangeRequest"; +import { IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ObjectId } from "@spt-aki/utils/ObjectId"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RepeatableQuestController { protected logger: ILogger; protected databaseServer: DatabaseServer; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; + protected ragfairServerHelper: RagfairServerHelper; protected eventOutputHolder: EventOutputHolder; protected paymentService: PaymentService; protected objectId: ObjectId; @@ -36,9 +38,8 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; - protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. @@ -61,9 +62,9 @@ export declare class RepeatableQuestController { * The new quests generated are again persisted in profile.RepeatableQuests * * @param {string} _info Request from client - * @param {string} sessionID Player's session id + * @param {string} sessionID Player's session id * - * @returns {array} Array of "repeatableQuestObjects" as described above + * @returns {array} array of "repeatableQuestObjects" as descibed above */ getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[]; /** @@ -94,20 +95,6 @@ export declare class RepeatableQuestController { */ protected generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): IQuestTypePool; protected createBaseQuestPool(repeatableConfig: IRepeatableQuestConfig): IQuestTypePool; - /** - * Return the locations this PMC is allowed to get daily quests for based on their level - * @param locations The original list of locations - * @param pmcLevel The level of the player PMC - * @returns A filtered list of locations that allow the player PMC level to access it - */ - protected getAllowedLocations(locations: Record, pmcLevel: number): Partial>; - /** - * Return true if the given pmcLevel is allowed on the given location - * @param location The location name to check - * @param pmcLevel The level of the pmc - * @returns True if the given pmc level is allowed to access the given location - */ - protected isPmcLevelAllowedOnLocation(location: string, pmcLevel: number): boolean; debugLogRepeatableQuestIds(pmcData: IPmcData): void; /** * Handle RepeatableQuestChange event diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/TradeController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/TradeController.d.ts index 9daed8c..3824e2b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/TradeController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/TradeController.d.ts @@ -1,90 +1,57 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TradeHelper } from "@spt/helpers/TradeHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -import { IOfferRequest, IProcessRagfairTradeRequestData } from "@spt/models/eft/trade/IProcessRagfairTradeRequestData"; -import { ISellScavItemsToFenceRequestData } from "@spt/models/eft/trade/ISellScavItemsToFenceRequestData"; -import { Traders } from "@spt/models/enums/Traders"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TradeHelper } from "@spt-aki/helpers/TradeHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; +import { IProcessRagfairTradeRequestData } from "@spt-aki/models/eft/trade/IProcessRagfairTradeRequestData"; +import { ISellScavItemsToFenceRequestData } from "@spt-aki/models/eft/trade/ISellScavItemsToFenceRequestData"; +import { Traders } from "@spt-aki/models/enums/Traders"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { RagfairServer } from "@spt-aki/servers/RagfairServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeController { protected logger: ILogger; - protected databaseServer: DatabaseServer; protected eventOutputHolder: EventOutputHolder; protected tradeHelper: TradeHelper; - protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; - protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; + protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; - protected mailSendService: MailSendService; protected configServer: ConfigServer; - protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ - confirmRagfairTrading(pmcData: IPmcData, request: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Buy an item off the flea sold by a trader - * @param sessionId Session id - * @param pmcData Player profile - * @param fleaOffer Offer being purchased - * @param requestOffer request data from client - * @param output Output to send back to client - */ - protected buyTraderItemFromRagfair(sessionId: string, pmcData: IPmcData, fleaOffer: IRagfairOffer, requestOffer: IOfferRequest, output: IItemEventRouterResponse): void; - /** - * Buy an item off the flea sold by a PMC - * @param sessionId Session id - * @param pmcData Player profile - * @param fleaOffer Offer being purchased - * @param requestOffer Request data from client - * @param output Output to send back to client - */ - protected buyPmcItemFromRagfair(sessionId: string, pmcData: IPmcData, fleaOffer: IRagfairOffer, requestOffer: IOfferRequest, output: IItemEventRouterResponse): void; - /** - * Does Player have necessary trader loyalty to purchase flea offer - * @param sellerIsTrader is seller trader - * @param fleaOffer FLea offer being bought - * @param pmcData Player profile - * @returns True if player can buy offer - */ - protected playerLacksTraderLoyaltyLevelToBuyOffer(fleaOffer: IRagfairOffer, pmcData: IPmcData): boolean; + confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle SellAllFromSavage event */ sellScavItemsToFence(pmcData: IPmcData, request: ISellScavItemsToFenceRequestData, sessionId: string): IItemEventRouterResponse; /** - * Send the specified rouble total to player as mail + * Sell all sellable items to a trader from inventory + * WILL DELETE ITEMS FROM INVENTORY + CHILDREN OF ITEMS SOLD * @param sessionId Session id + * @param profileWithItemsToSell Profile with items to be sold to trader + * @param profileThatGetsMoney Profile that gets the money after selling items * @param trader Trader to sell items to - * @param output IItemEventRouterResponse + * @returns IItemEventRouterResponse */ - protected mailMoneyToPlayer(sessionId: string, roublesToSend: number, trader: Traders): void; + protected sellInventoryToTrader(sessionId: string, profileWithItemsToSell: IPmcData, profileThatGetsMoney: IPmcData, trader: Traders): IItemEventRouterResponse; /** * Looks up an items children and gets total handbook price for them * @param parentItemId parent item that has children we want to sum price of @@ -94,4 +61,5 @@ export declare class TradeController { * @returns Rouble price */ protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record, traderDetails: ITraderBase): number; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/TraderController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/TraderController.d.ts index 9a85203..d85977f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/TraderController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/TraderController.d.ts @@ -1,20 +1,16 @@ -import { FenceBaseAssortGenerator } from "@spt/generators/FenceBaseAssortGenerator"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { TraderAssortService } from "@spt/services/TraderAssortService"; -import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { FenceBaseAssortGenerator } from "@spt-aki/generators/FenceBaseAssortGenerator"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { ITraderAssort, ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; +import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderController { protected logger: ILogger; - protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected traderAssortHelper: TraderAssortHelper; protected profileHelper: ProfileHelper; @@ -23,13 +19,11 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); + protected jsonUtil: JsonUtil; + constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil); /** * Runs when onLoad event is fired - * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService + * Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService * Store timestamp of next assort refresh in nextResupply property of traders .base object */ load(): void; diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts index 7d24954..e25dc16 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts @@ -1,8 +1,8 @@ -import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; -import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { WeatherGenerator } from "@spt-aki/generators/WeatherGenerator"; +import { IWeatherData } from "@spt-aki/models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/WishlistController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/WishlistController.d.ts index ee4d970..01c4465 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/WishlistController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/WishlistController.d.ts @@ -1,7 +1,7 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IWishlistActionData } from "@spt/models/eft/wishlist/IWishlistActionData"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IWishlistActionData } from "@spt-aki/models/eft/wishlist/IWishlistActionData"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; export declare class WishlistController { protected eventOutputHolder: EventOutputHolder; constructor(eventOutputHolder: EventOutputHolder); diff --git a/TypeScript/23CustomAbstractChatBot/types/di/Router.d.ts b/TypeScript/23CustomAbstractChatBot/types/di/Router.d.ts index 01ca547..b77dece 100644 --- a/TypeScript/23CustomAbstractChatBot/types/di/Router.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/di/Router.d.ts @@ -1,6 +1,6 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class Router { protected handledRoutes: HandledRoute[]; getTopLevelRoute(): string; @@ -11,20 +11,20 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): Promise; + handleStatic(url: string, info: any, sessionID: string, output: string): any; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; + handleDynamic(url: string, info: any, sessionID: string, output: string): any; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { route: string; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => Promise; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); + action: (url: string, info: any, sessionID: string, output: string) => any; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts index a74010c..2e73798 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts @@ -1,33 +1,27 @@ -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProbabilityHelper } from "@spt/helpers/ProbabilityHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Mods, ModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ModSpawn } from "@spt/models/enums/ModSpawn"; -import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; -import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; -import { BotModLimits, BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; -import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProbabilityHelper } from "@spt-aki/helpers/ProbabilityHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { Mods, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem, Slot } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { EquipmentFilterDetails, IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; +import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoolService"; +import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotEquipmentModGenerator { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -40,49 +34,39 @@ export declare class BotEquipmentModGenerator { protected botHelper: BotHelper; protected botGeneratorHelper: BotGeneratorHelper; protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; - protected weightedRandomHelper: WeightedRandomHelper; - protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; - protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to * @param parentTemplate template objet of item to add mods to + * @param modSpawnChances dictionary of mod items and their chance to spawn for this bot type + * @param botRole the bot role being generated for * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: Item[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): Item[]; - /** - * Filter a bots plate pool based on its current level - * @param settings Bot equipment generation settings - * @param modSlot Armor slot being filtered - * @param existingPlateTplPool Plates tpls to choose from - * @param armorItem - * @returns Array of plate tpls to choose from - */ - protected filterPlateModsForSlotByLevel(settings: IGenerateEquipmentProperties, modSlot: string, existingPlateTplPool: string[], armorItem: ITemplateItem): IFilterPlateModsForSlotByLevelResult; + generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[]; /** * Add mods to a weapon using the provided mod pool * @param sessionId session id * @param weapon Weapon to add mods to * @param modPool Pool of compatible mods to attach to weapon - * @param weaponId parentId of weapon + * @param weaponParentId parentId of weapon * @param parentTemplate Weapon which mods will be generated on * @param modSpawnChances Mod spawn chances * @param ammoTpl Ammo tpl to use when generating magazines/cartridges * @param botRole Role of bot weapon is generated for - * @param botLevel Level of the bot weapon is being generated for - * @param modLimits limits placed on certain mod types per gun + * @param botLevel lvel of the bot weapon is being generated for + * @param modLimits limits placed on certian mod types per gun * @param botEquipmentRole role of bot when accessing bot.json equipment config settings * @returns Weapon + mods array */ - generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number, modLimits: BotModLimits, botEquipmentRole: string): Item[]; + generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponParentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number, modLimits: BotModLimits, botEquipmentRole: string): Item[]; /** * Is this modslot a front or rear sight * @param modSlot Slot to check @@ -109,16 +93,16 @@ export declare class BotEquipmentModGenerator { * @param parentTemplate item template * @returns Slot item */ - protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): Slot; + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance * @param itemSlot slot the item sits in * @param modSlot slot the mod sits in * @param modSpawnChances Chances for various mod spawns - * @param botEquipConfig Various config settings for generating this type of bot - * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped + * @returns boolean true if it should spawn */ - protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; /** * @param modSlot Slot mod will fit into * @param isRandomisableSlot Will generate a randomised mod pool if true @@ -128,32 +112,9 @@ export declare class BotEquipmentModGenerator { * @param weapon array with only weapon tpl in it, ready for mods to be added * @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine) * @param parentTemplate Parent item the mod will go into - * @returns itemHelper.getItem() result + * @returns ITemplateItem */ - protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem, modSpawnResult: ModSpawn): [boolean, ITemplateItem]; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; - /** - * Filter mod pool down based on various criteria: - * Is slot flagged as randomisable - * Is slot required - * Is slot flagged as default mod only - * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added - * @param parentTemplate Mods parent - * @param weaponTemplate Mods root parent (weapon/equipment) - * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns - */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; - /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl - * @returns Default preset found - */ - protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; + protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem]; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible * @param weapon Weapon @@ -167,7 +128,7 @@ export declare class BotEquipmentModGenerator { * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId - * @param modTemplate Used to add additional properties in the upd object + * @param modTemplate Used to add additional properites in the upd object * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -180,22 +141,21 @@ export declare class BotEquipmentModGenerator { /** * Get a random mod from an items compatible mods Filter array * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param parentSlot item mod will go into, used to get combatible items * @param modSlot Slot to get mod to fill * @param items items to ensure picked mod is compatible with * @returns item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Check if mod exists in db + is for a required slot - * @param modToAdd Db template of mod to check - * @param slotAddedToTemplate Slot object the item will be placed as child into - * @param modSlot Slot the mod will fill - * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) + * Log errors if mod is not compatible with slot + * @param modToAdd template of mod to check + * @param itemSlot slot the item will be placed in + * @param modSlot slot the mod will fill + * @param parentTemplate template of the mods parent item * @returns true if valid */ - protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; + protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean; /** * Find mod tpls of a provided type and add to modPool * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) @@ -231,9 +191,9 @@ export declare class BotEquipmentModGenerator { */ protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; /** - * Take a record of camoras and merge the compatible shells into one array + * Take a record of camoras and merge the compatable shells into one array * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @returns string array of shells fro luitple camora sources */ protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; /** diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts index 49eb70c..8144f70 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts @@ -1,29 +1,30 @@ -import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; -import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; -import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; -import { Appearance, Health, IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { BotInventoryGenerator } from "@spt-aki/generators/BotInventoryGenerator"; +import { BotLevelGenerator } from "@spt-aki/generators/BotLevelGenerator"; +import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -35,10 +36,9 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; - protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,12 +48,12 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create x number of bots of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots - * @returns constructed bot + * @returns array of bots */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBots(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase[]; /** * Get a clone of the database\bots\base.json file * @returns IBotBase object @@ -78,12 +78,11 @@ export declare class BotGenerator { /** * Create a bot nickname * @param botJsonTemplate x.json from database - * @param botGenerationDetails + * @param isPlayerScav Will bot be player scav * @param botRole role of bot e.g. assault - * @param sessionId profile session id * @returns Nickname for bot */ - protected generateBotNickname(botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails, botRole: string, sessionId?: string): string; + protected generateBotNickname(botJsonTemplate: IBotType, isPlayerScav: boolean, botRole: string, sessionId: string): string; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client @@ -114,8 +113,8 @@ export declare class BotGenerator { * @param bot bot to update * @returns updated IBotBase object */ - protected generateId(bot: IBotBase): void; - protected generateInventoryID(profile: IBotBase): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; /** * Randomise a bots game version and account category * Chooses from all the game versions (standard, eod etc) @@ -128,5 +127,5 @@ export declare class BotGenerator { * @param bot bot to add dogtag to * @returns Bot with dogtag added */ - protected addDogtagToBot(bot: IBotBase): void; + protected generateDogtag(bot: IBotBase): IBotBase; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotInventoryGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotInventoryGenerator.d.ts index aa9c6cf..cd3609f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotInventoryGenerator.d.ts @@ -1,21 +1,21 @@ -import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; -import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; -import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; -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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotEquipmentModGenerator } from "@spt-aki/generators/BotEquipmentModGenerator"; +import { BotLootGenerator } from "@spt-aki/generators/BotLootGenerator"; +import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Chances, Generation, IBotType, Inventory, Mods } from "@spt-aki/models/eft/common/tables/IBotType"; +import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots"; +import { EquipmentFilterDetails, IBotConfig, RandomisationDetails } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoolService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotInventoryGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -51,31 +51,26 @@ export declare class BotInventoryGenerator { /** * Add equipment to a bot * @param templateInventory bot/x.json data from db - * @param wornItemChances Chances items will be added to bot + * @param equipmentChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) * @param botInventory Inventory to add equipment to * @param botLevel Level of bot */ - protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number): void; - /** - * Remove non-armored rigs from parameter data - * @param templateInventory - */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; - /** - * Remove armored rigs from parameter data - * @param templateInventory - */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected generateAndAddEquipmentToBot(templateInventory: Inventory, equipmentChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number): void; /** * Add a piece of equipment with mods to inventory from the provided pools - * @param settings Values to adjust how item is chosen and added to bot - * @returns true when item added + * @param equipmentSlot Slot to select an item for + * @param equipmentPool Possible items to choose from + * @param modPool Possible mods to apply to item chosen + * @param spawnChances Chances items will be chosen to be added + * @param botRole Role of bot e.g. assault + * @param inventory Inventory to add item into + * @param randomisationDetails settings from bot.json to adjust how item is generated */ - protected generateEquipment(settings: IGenerateEquipmentProperties): boolean; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory, randomisationDetails: RandomisationDetails): void; /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config - * @param itemTpl Item mod pool is being retrieved and filtered + * @param itemTpl Item mod pool is being retreived and filtered * @param equipmentBlacklist blacklist to filter mod pool with * @returns Filtered pool of mods */ @@ -117,20 +112,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts index 71fad1f..c8b590f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts @@ -1,10 +1,11 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; +import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLevelGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; @@ -12,26 +13,17 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails Min and max of level for bot - * @param botGenerationDetails Details to help generate a bot - * @param bot Bot the level is being generated for + * @param levelDetails min and max of level for bot + * @param botGenerationDetails Deatils to help generate a bot + * @param bot being level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot + * Get the highest level a bot can be relative to the players level, but no futher than the max size from globals.exp_table + * @param playerLevel Players current level + * @param relativeDeltaMax max delta above player level to go + * @returns highest level possible for bot */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxlevel Max level allowed - * @returns Lowest level possible for bot - */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotLootGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotLootGenerator.d.ts index 4301cea..7a4c521 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotLootGenerator.d.ts @@ -1,46 +1,40 @@ -import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -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 { 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"; -import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { IItemSpawnLimitSettings } from "@spt/models/spt/bots/IItemSpawnLimitSettings"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotLootCacheService } from "@spt/services/BotLootCacheService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotType, Inventory, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected botGeneratorHelper: BotGeneratorHelper; protected botWeaponGenerator: BotWeaponGenerator; + protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; protected weightedRandomHelper: WeightedRandomHelper; - protected botHelper: BotHelper; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; - protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); - protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); /** * Add loot to bots containers * @param sessionId Session id @@ -72,26 +66,17 @@ export declare class BotLootGenerator { */ protected getRandomisedCount(min: number, max: number, nValue: number): number; /** - * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached - * @param pool Pool of items to pick from with weight + * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached + * @param pool Pool of items to pick from * @param equipmentSlots What equipment slot will the loot items be added to * @param totalItemCount Max count of items to add * @param inventoryToAddItemsTo Bot inventory loot will be added to * @param botRole Role of the bot loot is being generated for (assault/pmcbot) - * @param itemSpawnLimits Item spawn limits the bot must adhere to + * @param useLimits Should item limit counts be used as defined in config/bot.json * @param totalValueLimitRub Total value of loot allowed in roubles * @param isPmc Is bot being generated for a pmc */ - protected addLootFromPool(pool: Record, equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, itemSpawnLimits?: IItemSpawnLimitSettings, totalValueLimitRub?: number, isPmc?: boolean, containersIdFull?: Set): void; - protected createWalletLoot(walletId: string): Item[][]; - /** - * Some items need child items to function, add them to the itemToAddChildrenTo array - * @param itemToAddTemplate Db template of item to check - * @param itemToAddChildrenTo Item to add children to - * @param isPmc Is the item being generated for a pmc (affects money/ammo stack sizes) - * @param botRole role bot has that owns item - */ - protected addRequiredChildItemsToParent(itemToAddTemplate: ITemplateItem, itemToAddChildrenTo: Item[], isPmc: boolean, botRole: string): void; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, useLimits?: boolean, totalValueLimitRub?: number, isPmc?: boolean): void; /** * Add generated weapons to inventory as loot * @param botInventory inventory to add preset to @@ -101,29 +86,45 @@ export declare class BotLootGenerator { * @param botRole bots role .e.g. pmcBot * @param isPmc are we generating for a pmc */ - protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number, containersIdFull?: Set): void; + protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; + /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool Pool of items to pick an item from + * @param isPmc Is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * Get the loot nvalue from botconfig + * @param botRole Role of bot e.g. assault/bosstagilla/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Hydrate item limit array to contain items that have a limit for a specific bot type * All values are set to 0 + * @param isPmc Is the bot a pmc * @param botRole Role the bot has * @param limitCount */ - protected initItemLimitArray(botRole: string, limitCount: Record): void; + protected initItemLimitArray(isPmc: boolean, botRole: string, limitCount: Record): void; /** * Check if an item has reached its bot-specific spawn limit * @param itemTemplate Item we check to see if its reached spawn limit * @param botRole Bot type - * @param itemSpawnLimits + * @param isPmc Is bot we're working with a pmc + * @param limitCount Spawn limits for items on bot + * @param itemSpawnLimits The limits this bot is allowed to have * @returns true if item has reached spawn limit */ - protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, itemSpawnLimits: IItemSpawnLimitSettings): boolean; + protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; /** * Randomise the stack size of a money object, uses different values for pmc or scavs - * @param botRole Role bot has that has money stack + * @param isPmc Is money on a PMC bot * @param itemTemplate item details from db * @param moneyItem Money item to randomise */ - protected randomiseMoneyStackSize(botRole: string, itemTemplate: ITemplateItem, moneyItem: Item): void; + protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void; /** * Randomise the size of an ammo stack * @param isPmc Is ammo on a PMC bot @@ -134,10 +135,11 @@ export declare class BotLootGenerator { /** * Get spawn limits for a specific bot type from bot.json config * If no limit found for a non pmc bot, fall back to defaults + * @param isPmc is the bot we want limits for a pmc * @param botRole what role does the bot have * @returns Dictionary of tplIds and limit */ - protected getItemSpawnLimitsForBotType(botRole: string): Record; + protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record; /** * Get the parentId or tplId of item inside spawnLimits object if it exists * @param itemTemplate item we want to look for in spawn limits diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotWeaponGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotWeaponGenerator.d.ts index 42618e1..125b43f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotWeaponGenerator.d.ts @@ -1,27 +1,28 @@ -import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { Inventory 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"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RepairService } from "@spt/services/RepairService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotEquipmentModGenerator } from "@spt-aki/generators/BotEquipmentModGenerator"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { GenerationData, Inventory, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { GenerateWeaponResult } from "@spt-aki/models/spt/bots/GenerateWeaponResult"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RepairService } from "@spt-aki/services/RepairService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { + protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -36,12 +37,11 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; - protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); + constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/FenceBaseAssortGenerator.d.ts index b8c9266..5eab03e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/FenceBaseAssortGenerator.d.ts @@ -1,53 +1,26 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; - protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; - protected localisationService: LocalisationService; protected configServer: ConfigServer; - protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** - * Create base fence assorts dynamically and store in memory + * Create base fence assorts dynamically and store in db */ generateFenceBaseAssorts(): void; - /** - * Check ammo in boxes + loose ammos has a penetration value above the configured value in trader.json / ammoMaxPenLimit - * @param rootItemDb Ammo box or ammo item from items.db - * @returns True if penetration value is above limit set in config - */ - protected isAmmoAbovePenetrationLimit(rootItemDb: ITemplateItem): boolean; - /** - * Get the penetration power value of an ammo, works with ammo boxes and raw ammos - * @param rootItemDb Ammo box or ammo item from items.db - * @returns Penetration power of passed in item, null if it doesnt have a power - */ - protected getAmmoPenetrationPower(rootItemDb: ITemplateItem): number; - /** - * Add soft inserts + armor plates to an armor - * @param armor Armor item array to add mods into - * @param itemDbDetails Armor items db template - */ - protected addChildrenToArmorModSlots(armor: Item[], itemDbDetails: ITemplateItem): void; /** * Check if item is valid for being added to fence assorts * @param item Item to check diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/IFilterPlateModsForSlotByLevelResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/IFilterPlateModsForSlotByLevelResult.d.ts deleted file mode 100644 index 7e1dbfd..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/generators/IFilterPlateModsForSlotByLevelResult.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface IFilterPlateModsForSlotByLevelResult { - result: Result; - plateModTpls: string[]; -} -export declare enum Result { - UNKNOWN_FAILURE = -1, - SUCCESS = 1, - NO_DEFAULT_FILTER = 2, - NOT_PLATE_HOLDING_SLOT = 3, - LACKS_PLATE_WEIGHTS = 4 -} diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/LocationGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/LocationGenerator.d.ts index 7571e14..1305af1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/LocationGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/LocationGenerator.d.ts @@ -1,20 +1,22 @@ -import { ContainerHelper } from "@spt/helpers/ContainerHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, 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 { Item } from "@spt/models/eft/common/tables/IItem"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil"; +import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { ObjectId } from "@spt-aki/utils/ObjectId"; +import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -29,8 +31,10 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; protected itemHelper: ItemHelper; protected mathUtil: MathUtil; protected seasonalEventService: SeasonalEventService; @@ -38,9 +42,8 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; - protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for @@ -144,5 +147,5 @@ export declare class LocationGenerator { * @returns Item object */ protected getItemInArray(items: Item[], chosenTpl: string): Item; - protected createStaticLootItem(chosenTpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/LootGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/LootGenerator.d.ts index 79b8183..d8e816c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/LootGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/LootGenerator.d.ts @@ -1,20 +1,20 @@ -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootItem } from "@spt/models/spt/services/LootItem"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData"; +import { ISealedAirdropContainerSettings, RewardDetails } from "@spt-aki/models/spt/config/IInventoryConfig"; +import { LootItem } from "@spt-aki/models/spt/services/LootItem"; +import { LootRequest } from "@spt-aki/models/spt/services/LootRequest"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; max: number; @@ -38,13 +38,6 @@ export declare class LootGenerator { * @returns An array of loot items */ createRandomLoot(options: LootRequest): LootItem[]; - /** - * Filter armor items by their front plates protection level - top if its a helmet - * @param armor Armor preset to check - * @param options Loot request options - armor level etc - * @returns True if item has desired armor level - */ - protected armorIsDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -72,42 +65,49 @@ export declare class LootGenerator { protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; /** * Find a random item in items.json and add to result array - * @param presetPool Presets to choose from - * @param itemTypeCounts Item limit counts - * @param itemBlacklist Items to skip - * @param result Array to add chosen preset to + * @param globalDefaultPresets presets to choose from + * @param itemTypeCounts item limit counts + * @param itemBlacklist items to skip + * @param result array to add found preset to * @returns true if preset was valid and added to pool */ - protected findAndAddRandomPresetToLoot(presetPool: IPreset[], itemTypeCounts: Record, itemBlacklist: string[], result: LootItem[]): boolean; /** * Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds) * @param containerSettings sealed weapon container settings - * @returns Array of item with children arrays + * @returns Array of items to add to player inventory */ - getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): Item[][]; + getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): AddItem[]; /** * Get non-weapon mod rewards for a sealed container * @param containerSettings Sealed weapon container settings * @param weaponDetailsDb Details for the weapon to reward player - * @returns Array of item with children arrays + * @returns AddItem array */ - protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): Item[][]; + protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): AddItem[]; /** * Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player * @param containerSettings Sealed weapon container settings * @param linkedItemsToWeapon All items that can be attached/inserted into weapon * @param chosenWeaponPreset The weapon preset given to player as reward - * @returns Array of item with children arrays + * @returns AddItem array */ - protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: IPreset): Item[][]; + protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: IPreset): AddItem[]; /** * Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards * @param rewardContainerDetails - * @returns Array of item with children arrays + * @returns AddItem array */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): Item[][]; + getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): AddItem[]; + /** + * A bug in inventoryHelper.addItem() means you cannot add the same item to the array twice with a count of 1, it causes duplication + * Default adds 1, or increments count + * @param itemTplToAdd items tpl we want to add to array + * @param resultsArray Array to add item tpl to + */ + protected addOrIncrementItemToArray(itemTplToAdd: string, resultsArray: AddItem[]): void; } export {}; diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/PMCLootGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/PMCLootGenerator.d.ts index 9f6bcdc..251bde2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/PMCLootGenerator.d.ts @@ -1,12 +1,10 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; /** * Handle the generation of dynamic PMC loot in pockets and backpacks * and the removal of blacklisted items @@ -16,25 +14,22 @@ export declare class PMCLootGenerator { protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected itemFilterService: ItemFilterService; - protected ragfairPriceService: RagfairPriceService; protected seasonalEventService: SeasonalEventService; - protected weightedRandomHelper: WeightedRandomHelper; - protected pocketLootPool: Record; - protected vestLootPool: Record; - protected backpackLootPool: Record; + protected pocketLootPool: string[]; + protected vestLootPool: string[]; + protected backpackLootPool: string[]; protected pmcConfig: IPmcConfig; - protected roubleTpl: string; - constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper); + constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService); /** * Create an array of loot items a PMC can have in their pockets * @returns string array of tpls */ - generatePMCPocketLootPool(botRole: string): Record; + generatePMCPocketLootPool(): string[]; /** * Create an array of loot items a PMC can have in their vests * @returns string array of tpls */ - generatePMCVestLootPool(botRole: string): Record; + generatePMCVestLootPool(): string[]; /** * Check if item has a width/height that lets it fit into a 2x2 slot * 1x1 / 1x2 / 2x1 / 2x2 @@ -46,5 +41,5 @@ export declare class PMCLootGenerator { * Create an array of loot items a PMC can have in their backpack * @returns string array of tpls */ - generatePMCBackpackLootPool(botRole: string): Record; + generatePMCBackpackLootPool(): string[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/PlayerScavGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/PlayerScavGenerator.d.ts index da874fc..feea27f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/PlayerScavGenerator.d.ts @@ -1,53 +1,48 @@ -import { BotGenerator } from "@spt/generators/BotGenerator"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -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, Skills, Stats } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { BotLootCacheService } from "@spt/services/BotLootCacheService"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotGenerator } from "@spt-aki/generators/BotGenerator"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Skills, Stats } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IPlayerScavConfig, KarmaLevel } from "@spt-aki/models/spt/config/IPlayerScavConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; + protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; protected botGeneratorHelper: BotGeneratorHelper; protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; + protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; - protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated * @returns profile object */ generate(sessionID: string): IPmcData; - /** - * Add items picked from `playerscav.lootItemsToAddChancePercent` - * @param possibleItemsToAdd dict of tpl + % chance to be added - * @param scavData - * @param containersToAddTo Possible slotIds to add loot to - */ - protected addAdditionalLootToPlayerScavContainers(possibleItemsToAdd: Record, scavData: IBotBase, containersToAddTo: string[]): void; /** * Get the scav karama level for a profile * Is also the fence trader rep level diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/RagfairAssortGenerator.d.ts index 4c6cf1c..26acae2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/RagfairAssortGenerator.d.ts @@ -1,50 +1,52 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { + protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; protected databaseServer: DatabaseServer; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; - protected generatedAssortItems: Item[][]; + protected generatedAssortItems: Item[]; protected ragfairConfig: IRagfairConfig; - protected ragfairItemInvalidBaseTypes: string[]; - constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** - * Get an array of arrays that can be sold on the flea - * Each sub array contains item + children (if any) - * @returns array of arrays + * Get an array of unique items that can be sold on the flea + * @returns array of unique items */ - getAssortItems(): Item[][]; + getAssortItems(): Item[]; /** * Check internal generatedAssortItems array has objects * @returns true if array has objects */ protected assortsAreGenerated(): boolean; /** - * Generate an array of arrays (item + children) the flea can sell - * @returns array of arrays (item + children) + * Generate an array of items the flea can sell + * @returns array of unique items */ - protected generateRagfairAssortItems(): Item[][]; + protected generateRagfairAssortItems(): Item[]; /** - * Get presets from globals to add to flea - * ragfairConfig.dynamic.showDefaultPresetsOnly decides if its all presets or just defaults - * @returns IPreset array + * Get presets from globals.json + * @returns Preset object array */ - protected getPresetsToAdd(): IPreset[]; + protected getPresets(): IPreset[]; + /** + * Get default presets from globals.json + * @returns Preset object array + */ + protected getDefaultPresets(): IPreset[]; /** * Create a base assort item and return it with populated values + 999999 stack count + unlimited count = true * @param tplId tplid to add to item * @param id id to add to item - * @returns Hydrated Item object + * @returns hydrated Item object */ - protected createRagfairAssortRootItem(tplId: string, id?: string): Item; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts index e0dd09f..25316c0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts @@ -1,28 +1,29 @@ -import { RagfairAssortGenerator } from "@spt/generators/RagfairAssortGenerator"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { RagfairAssortGenerator } from "@spt-aki/generators/RagfairAssortGenerator"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IRagfairOffer, OfferRequirement } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { Dynamic, IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -39,7 +40,6 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer @@ -119,28 +119,22 @@ export declare class RagfairOfferGenerator { * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers optional, expired offers to regenerate */ - generateDynamicOffers(expiredOffers?: Item[][]): Promise; + generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * @param assortItemWithChildren Item with its children to process into offers - * @param isExpiredOffer is an expired offer + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: Item[], isExpiredOffer: boolean, config: Dynamic): Promise; - /** - * iterate over an items chidren and look for plates above desired level and remove them - * @param presetWithChildren preset to check for plates - * @param plateSettings Settings - * @returns True if plate removed - */ - protected removeBannedPlatesFromPreset(presetWithChildren: Item[], plateSettings: IArmorPlateBlacklistSettings): boolean; + protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item - * @param itemWithChildren Item to create offer for + * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for @@ -150,10 +144,11 @@ export declare class RagfairOfferGenerator { * Get array of an item with its mods + condition properties (e.g durability) * Apply randomisation adjustments to condition if item base is found in ragfair.json/dynamic/condition * @param userID id of owner of item - * @param itemWithMods Item and mods, get condition of first item (only first array item is modified) + * @param itemWithMods Item and mods, get condition of first item (only first array item is used) * @param itemDetails db details of first item + * @returns */ - protected randomiseOfferItemUpdProperties(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): void; + protected randomiseItemUpdProperties(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): Item[]; /** * Get the relevant condition id if item tpl matches in ragfair.json/condition * @param tpl Item to look for matching condition object @@ -163,32 +158,24 @@ export declare class RagfairOfferGenerator { /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered - * @param itemWithMods Item to adjust condition details of + * @param item Item to adjust condition details of * @param itemDetails db item details of first item in array */ - protected randomiseItemCondition(conditionSettingsId: string, itemWithMods: Item[], itemDetails: ITemplateItem): void; + protected randomiseItemCondition(conditionSettingsId: string, item: Item, itemDetails: ITemplateItem): void; /** * Adjust an items durability/maxDurability value - * @param item item (weapon/armor) to Adjust - * @param itemDbDetails Weapon details from db - * @param maxMultiplier Value to multiply max durability by - * @param currentMultiplier Value to multiply current durability by + * @param item item (weapon/armor) to adjust + * @param multiplier Value to multiple durability by */ - protected randomiseWeaponDurability(item: Item, itemDbDetails: ITemplateItem, maxMultiplier: number, currentMultiplier: number): void; - /** - * Randomise the durabiltiy values for an armors plates and soft inserts - * @param armorWithMods Armor item with its child mods - * @param currentMultiplier Chosen multipler to use for current durability value - * @param maxMultiplier Chosen multipler to use for max durability value - */ - protected randomiseArmorDurabilityValues(armorWithMods: Item[], currentMultiplier: number, maxMultiplier: number): void; + protected randomiseDurabilityValues(item: Item, multiplier: number): void; /** * Add missing conditions to an item if needed * Durabiltiy for repairable items * HpResource for medical items * @param item item to add conditions to + * @returns Item with conditions added */ - protected addMissingConditions(item: Item): void; + protected addMissingConditions(item: Item): Item; /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer @@ -205,10 +192,10 @@ export declare class RagfairOfferGenerator { }[]; /** * Create a random currency-based barter scheme for an array of items - * @param offerWithChildren Items on offer + * @param offerItems Items on offer * @param isPackOffer Is the barter scheme being created for a pack offer * @param multipler What to multiply the resulting price by * @returns Barter scheme for offer */ - protected createCurrencyBarterScheme(offerWithChildren: Item[], isPackOffer: boolean, multipler?: number): IBarterScheme[]; + protected createCurrencyBarterScheme(offerItems: Item[], isPackOffer: boolean, multipler?: number): IBarterScheme[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestGenerator.d.ts index 2b68eef..35297fa 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestGenerator.d.ts @@ -1,34 +1,53 @@ -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 { IQuestCondition, IQuestConditionCounterCondition } from "@spt/models/eft/common/tables/IQuest"; -import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; +import { Exit } from "@spt-aki/models/eft/common/ILocationBase"; +import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { ObjectId } from "@spt-aki/utils/ObjectId"; +import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RepeatableQuestGenerator { + protected timeUtil: TimeUtil; protected logger: ILogger; protected randomUtil: RandomUtil; + protected httpResponse: HttpResponseUtil; protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected profileFixerService: ProfileFixerService; + protected handbookHelper: HandbookHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected eventOutputHolder: EventOutputHolder; protected localisationService: LocalisationService; + protected paymentService: PaymentService; protected objectId: ObjectId; + protected itemFilterService: ItemFilterService; protected repeatableQuestHelper: RepeatableQuestHelper; - protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; - protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, repeatableQuestHelper: RepeatableQuestHelper, configServer: ConfigServer); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest @@ -47,7 +66,7 @@ export declare class RepeatableQuestGenerator { * @param repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest * @returns Object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json) */ - protected generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination; /** * Get a number of kills neded to complete elimination quest * @param targetKey Target type desired e.g. anyPmc/bossBully/Savage @@ -63,7 +82,7 @@ export declare class RepeatableQuestGenerator { * @param {string} location the location on which to fulfill the elimination quest * @returns {IEliminationCondition} object of "Elimination"-location-subcondition */ - protected generateEliminationLocation(location: string[]): IQuestConditionCounterCondition; + protected generateEliminationLocation(location: string[]): IEliminationCondition; /** * Create kill condition for an elimination quest * @param target Bot type target of elimination quest e.g. "AnyPmc", "Savage" @@ -73,7 +92,7 @@ export declare class RepeatableQuestGenerator { * @param allowedWeaponCategory What category of weapon must be used - undefined = any * @returns IEliminationCondition object */ - protected generateEliminationCondition(target: string, targetedBodyParts: string[], distance: number, allowedWeapon: string, allowedWeaponCategory: string): IQuestConditionCounterCondition; + protected generateEliminationCondition(target: string, targetedBodyParts: string[], distance: number, allowedWeapon: string, allowedWeaponCategory: string): IEliminationCondition; /** * Generates a valid Completion quest * @@ -82,7 +101,7 @@ export declare class RepeatableQuestGenerator { * @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest * @returns {object} object of quest type format for "Completion" (see assets/database/templates/repeatableQuests.json) */ - protected generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): ICompletion; /** * A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json) * This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many) @@ -91,7 +110,7 @@ export declare class RepeatableQuestGenerator { * @param {integer} value amount of items of this specific type to request * @returns {object} object of "Completion"-condition */ - protected generateCompletionAvailableForFinish(itemTpl: string, value: number): IQuestCondition; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -101,15 +120,8 @@ export declare class RepeatableQuestGenerator { * @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest * @returns {object} object of quest type format for "Exploration" (see assets/database/templates/repeatableQuests.json) */ - protected generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; - /** - * Filter a maps exits to just those for the desired side - * @param locationKey Map id (e.g. factory4_day) - * @param playerSide Scav/Pmc - * @returns Array of Exit objects - */ - protected getLocationExitsForSide(locationKey: string, playerSide: string): Exit[]; - protected generatePickupQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IExploration; + protected generatePickupQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IPickup; /** * Convert a location into an quest code can read (e.g. factory4_day into 55f2d3fd4bdc2d5f408b4567) * @param locationKey e.g factory4_day @@ -123,7 +135,70 @@ export declare 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: Exit): IExplorationCondition; + /** + * Generate the reward for a mission. A reward can consist of + * - Experience + * - Money + * - Items + * - Trader Reputation + * + * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to + * experience / money / items / trader reputation can be defined in QuestConfig.js + * + * There's also a random variation of the reward the spread of which can be also defined in the config. + * + * Additonaly, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used + * + * @param {integer} pmcLevel player's level + * @param {number} difficulty a reward scaling factor goint from 0.2 to 1 + * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) + * @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest + * @returns {object} object of "Reward"-type that can be given for a repeatable mission + */ + protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards; + /** + * Should reward item have stack size increased (25% chance) + * @param item Item to possibly increase stack size of + * @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking + * @returns True if it should + */ + protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean; + /** + * Get a randomised number a reward items stack size should be based on its handbook price + * @param item Reward item to get stack size for + * @returns Stack size value + */ + protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number; + /** + * Select a number of items that have a colelctive value of the passed in parameter + * @param repeatableConfig Config + * @param roublesBudget Total value of items to return + * @returns Array of reward items that fit budget + */ + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} value Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @returns {object} Object of "Reward"-item-type + */ + protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IReward; + /** + * Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable) + * @param repeatableQuestConfig Config file + * @returns List of rewardable items [[_tpl, itemTemplate],...] + */ + protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][]; + /** + * Checks if an id is a valid item. Valid meaning that it's an item that may be a reward + * or content of bot loot. Items that are tested as valid may be in a player backpack or stash. + * @param {string} tpl template id of item to check + * @returns True if item is valid reward + */ + protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean; /** * Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json * The templates include Elimination, Completion and Extraction quest types diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts deleted file mode 100644 index ea750dd..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IQuestReward, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class RepeatableQuestRewardGenerator { - protected logger: ILogger; - protected randomUtil: RandomUtil; - protected mathUtil: MathUtil; - protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; - protected handbookHelper: HandbookHelper; - protected localisationService: LocalisationService; - protected objectId: ObjectId; - protected itemFilterService: ItemFilterService; - protected seasonalEventService: SeasonalEventService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); - /** - * Generate the reward for a mission. A reward can consist of - * - Experience - * - Money - * - Items - * - Trader Reputation - * - * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to - * experience / money / items / trader reputation can be defined in QuestConfig.js - * - * There's also a random variation of the reward the spread of which can be also defined in the config. - * - * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission - */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; - /** - * @param rewardItems List of reward items to filter - * @param roublesBudget The budget remaining for rewards - * @param minPrice The minimum priced item to include - * @returns True if any items remain in `rewardItems`, false otherwise - */ - protected filterRewardPoolWithinBudget(rewardItems: ITemplateItem[], roublesBudget: number, minPrice: number): ITemplateItem[]; - /** - * Get a randomised number a reward items stack size should be based on its handbook price - * @param item Reward item to get stack size for - * @returns Stack size value - */ - protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number; - /** - * Should reward item have stack size increased (25% chance) - * @param item Item to possibly increase stack size of - * @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking - * @returns True if it should - */ - protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean; - protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): number; - /** - * Select a number of items that have a colelctive value of the passed in parameter - * @param repeatableConfig Config - * @param roublesBudget Total value of items to return - * @returns Array of reward items that fit budget - */ - protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; - /** - * Helper to create a reward item structured as required by the client - * - * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give - * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index - * @returns {object} Object of "Reward"-item-type - */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; - /** - * Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable) - * @param repeatableQuestConfig Config file - * @returns List of rewardable items [[_tpl, itemTemplate],...] - */ - getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][]; - /** - * Checks if an id is a valid item. Valid meaning that it's an item that may be a reward - * or content of bot loot. Items that are tested as valid may be in a player backpack or stash. - * @param {string} tpl template id of item to check - * @returns True if item is valid reward - */ - protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean; - protected addMoneyReward(traderId: string, rewards: IQuestRewards, rewardRoubles: number, rewardIndex: number): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts index f22dcfc..11e1bc3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts @@ -1,18 +1,17 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { Product } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase"; +import { IScavCaseConfig } from "@spt-aki/models/spt/config/IScavCaseConfig"; +import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt-aki/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards */ @@ -21,22 +20,20 @@ export declare class ScavCaseRewardGenerator { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; - protected presetHelper: PresetHelper; protected databaseServer: DatabaseServer; protected ragfairPriceService: RagfairPriceService; - protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft * @returns Product array */ - generate(recipeId: string): Item[][]; + generate(recipeId: string): Product[]; /** * Get all db items that are not blacklisted in scavcase config or global blacklist * Store in class field @@ -75,7 +72,17 @@ export declare class ScavCaseRewardGenerator { * @param rewardItems items to convert * @returns Product array */ - protected randomiseContainerItemRewards(rewardItems: ITemplateItem[], rarity: string): Item[][]; + protected randomiseContainerItemRewards(rewardItems: ITemplateItem[], rarity: string): Product[]; + /** + * Add a randomised stack count to ammo or money items + * @param item money or ammo item + * @param resultItem money or ammo item with a randomise stack size + */ + protected addStackCountToAmmoAndMoney(item: ITemplateItem, resultItem: { + _id: string; + _tpl: string; + upd: Upd; + }, rarity: string): void; /** * @param dbItems all items from the items.json * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts index c9ca02a..5501ee6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts @@ -1,24 +1,21 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; -import { WindDirection } from "@spt/models/enums/WindDirection"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IWeather, IWeatherData } from "@spt-aki/models/eft/weather/IWeatherData"; +import { WindDirection } from "@spt-aki/models/enums/WindDirection"; +import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; - private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -31,13 +28,13 @@ export declare class WeatherGenerator { * @param currentDate current date * @returns formatted time */ - protected getBsgFormattedInRaidTime(): string; + protected getBsgFormattedInRaidTime(currentDate: Date): string; /** * Get the current in-raid time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ - getInRaidTime(): Date; + getInRaidTime(currentDate: Date): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/IInventoryMagGen.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/IInventoryMagGen.d.ts index 07bef8e..5586243 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/IInventoryMagGen.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/IInventoryMagGen.d.ts @@ -1,4 +1,4 @@ -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; export interface IInventoryMagGen { getPriority(): number; canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/InventoryMagGen.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/InventoryMagGen.d.ts index 1db9915..778ac53 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/InventoryMagGen.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/InventoryMagGen.d.ts @@ -1,6 +1,6 @@ -import { Inventory } 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"; +import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; export declare class InventoryMagGen { private magCounts; private magazineTemplate; diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts index caa4d13..3e5e708 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts @@ -1,7 +1,7 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BarrelInventoryMagGen implements IInventoryMagGen { protected randomUtil: RandomUtil; protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts index c2b496f..edc4734 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts @@ -1,25 +1,23 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExternalInventoryMagGen implements IInventoryMagGen { protected logger: ILogger; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; - protected botGeneratorHelper: BotGeneratorHelper; protected randomUtil: RandomUtil; - constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); + constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, randomUtil: RandomUtil); getPriority(): number; canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean; process(inventoryMagGen: InventoryMagGen): void; /** - * Get a random compatible external magazine for a weapon, exclude internal magazines from possible pool + * Get a random compatible external magazine for a weapon, excluses internal magazines from possible pool * @param weaponTpl Weapon to get mag for * @returns tpl of magazine */ diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts index 5ae7415..70efdb5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts @@ -1,6 +1,6 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; export declare class InternalMagazineInventoryMagGen implements IInventoryMagGen { protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper); diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts index 69d0c49..02b7748 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts @@ -1,6 +1,6 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; export declare class UbglExternalMagGen implements IInventoryMagGen { protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper); diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/AssortHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/AssortHelper.d.ts index 72d1600..52dda35 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/AssortHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/AssortHelper.d.ts @@ -1,11 +1,11 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { QuestStatus } from "@spt-aki/models/enums/QuestStatus"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class AssortHelper { protected logger: ILogger; protected itemHelper: ItemHelper; @@ -14,7 +14,7 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet (via player completing corresponding quest) + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) * @param pmcProfile Player profile * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/BotDifficultyHelper.d.ts index db6145e..84beba3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/BotDifficultyHelper.d.ts @@ -1,22 +1,22 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; - protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/BotGeneratorHelper.d.ts index bb3526f..e7f32ed 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/BotGeneratorHelper.d.ts @@ -1,34 +1,28 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -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 { Item, Repairable, Upd } from "@spt/models/eft/common/tables/IItem"; -import { Grid, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ItemAddedResult } from "@spt/models/enums/ItemAddedResult"; -import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; -import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { DurabilityLimitsHelper } from "@spt-aki/helpers/DurabilityLimitsHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGeneratorHelper { protected logger: ILogger; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected durabilityLimitsHelper: DurabilityLimitsHelper; protected itemHelper: ItemHelper; - protected inventoryHelper: InventoryHelper; - protected containerHelper: ContainerHelper; protected applicationContext: ApplicationContext; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer); /** * Adds properties to an item * e.g. Repairable / HasHinge / Foldable / MaxDurability @@ -36,7 +30,7 @@ export declare class BotGeneratorHelper { * @param botRole Used by weapons to randomize the durability values. Null for non-equipped items * @returns Item Upd object with extra properties */ - generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { + generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { upd?: Upd; }; /** @@ -68,36 +62,32 @@ export declare class BotGeneratorHelper { * @returns Repairable object */ protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; - isWeaponModIncompatibleWithCurrentMods(itemsEquipped: Item[], tplToCheck: string, modSlot: string): IChooseRandomCompatibleModResult; /** * Can item be added to another item without conflict - * @param itemsEquipped Items to check compatibilities with + * @param items Items to check compatibilities with * @param tplToCheck Tpl of the item to check for incompatibilities * @param equipmentSlot Slot the item will be placed into * @returns false if no incompatibilities, also has incompatibility reason */ - isItemIncompatibleWithCurrentItems(itemsEquipped: Item[], tplToCheck: string, equipmentSlot: string): IChooseRandomCompatibleModResult; + isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): { + incompatible: boolean; + reason: string; + }; /** * Convert a bots role to the equipment role used in config/bot.json * @param botRole Role to convert * @returns Equipment role (e.g. pmc / assault / bossTagilla) */ getBotEquipmentRole(botRole: string): string; - /** - * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots Slot to add item+children into - * @param rootItemId Root item id to use as mod items parentid - * @param rootItemTplId Root itms tpl id - * @param itemWithChildren Item to add - * @param inventory Inventory to add item+children into - * @returns ItemAddedResult result object - */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], rootItemId: string, rootItemTplId: string, itemWithChildren: Item[], inventory: Inventory, containersIdFull?: Set): ItemAddedResult; - /** - * Is the provided item allowed inside a container - * @param slotGrid Items sub-grid we want to place item inside - * @param itemTpl Item tpl being placed - * @returns True if allowed - */ - protected itemAllowedInContainer(slotGrid: Grid, itemTpl: string): boolean; +} +/** TODO - move into own class */ +export declare class ExhaustableArray { + private itemPool; + private randomUtil; + private jsonUtil; + private pool; + constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + getRandomValue(): T; + getFirstValue(): T; + hasValues(): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/BotHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/BotHelper.d.ts index 5e03638..1026070 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/BotHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/BotHelper.d.ts @@ -1,21 +1,23 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Difficulty, IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Difficulty, IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/BotWeaponGeneratorHelper.d.ts index 5ab4e59..293abb1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -1,26 +1,29 @@ -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 { 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"; -import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { Grid, ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots"; +import { ItemAddedResult } from "@spt-aki/models/enums/ItemAddedResult"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGeneratorHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected inventoryHelper: InventoryHelper; protected weightedRandomHelper: WeightedRandomHelper; - protected botGeneratorHelper: BotGeneratorHelper; protected localisationService: LocalisationService; - constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, localisationService: LocalisationService); + protected containerHelper: ContainerHelper; + constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, containerHelper: ContainerHelper); /** * Get a randomized number of bullets for a specific magazine * @param magCounts Weights of magazines @@ -62,4 +65,22 @@ export declare class BotWeaponGeneratorHelper { * @returns tpl of magazine */ getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string; + /** + * TODO - move into BotGeneratorHelper, this is not the class for it + * Adds an item with all its children into specified equipmentSlots, wherever it fits. + * @param equipmentSlots Slot to add item+children into + * @param parentId + * @param parentTpl + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into + * @returns a `boolean` indicating item was added + */ + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; + /** + * Is the provided item allowed inside a container + * @param slotGrid Items sub-grid we want to place item inside + * @param itemTpl Item tpl being placed + * @returns True if allowed + */ + protected itemAllowedInContainer(slotGrid: Grid, itemTpl: string): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/ContainerHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/ContainerHelper.d.ts index 37aef05..125fbcb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/ContainerHelper.d.ts @@ -28,12 +28,13 @@ export declare class ContainerHelper { protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; /** * Find a free slot for an item to be placed at - * @param container2D Container to place item in + * @param container2D Container to palce item in * @param x Container x size * @param y Container y size * @param itemW Items width * @param itemH Items height * @param rotate is item rotated + * @returns Location to place item */ - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): void; + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts index 9817c5b..8034dc1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts @@ -1,16 +1,16 @@ -import { IChatCommand, ICommandoCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { MailSendService } from "@spt/services/MailSendService"; +import { IChatCommand, ICommandoCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { MailSendService } from "@spt-aki/services/MailSendService"; export declare abstract class AbstractDialogueChatBot implements IDialogueChatBot { protected logger: ILogger; protected mailSendService: MailSendService; protected chatCommands: IChatCommand[] | ICommandoCommand[]; constructor(logger: ILogger, mailSendService: MailSendService, chatCommands: IChatCommand[] | ICommandoCommand[]); /** - * @deprecated As of v3.7.6. Use registerChatCommand. + * @deprecated use registerChatCommand instead */ registerCommandoCommand(chatCommand: IChatCommand | ICommandoCommand): void; registerChatCommand(chatCommand: IChatCommand | ICommandoCommand): void; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/IChatCommand.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/IChatCommand.d.ts index 754fd08..247aea7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/IChatCommand.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/IChatCommand.d.ts @@ -1,7 +1,7 @@ -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; /** - * @deprecated As of v3.7.6. Use IChatCommand. Will be removed in v3.9.0. + * @deprecated Use IChatCommand instead */ export type ICommandoCommand = IChatCommand; export interface IChatCommand { diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts index bcd2bee..8626984 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts @@ -1,8 +1,8 @@ -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class SptCommandoCommands implements IChatCommand { protected configServer: ConfigServer; protected sptCommands: ISptCommand[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts deleted file mode 100644 index a7491b5..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { SavedCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class GiveSptCommand implements ISptCommand { - protected logger: ILogger; - protected itemHelper: ItemHelper; - protected hashUtil: HashUtil; - protected presetHelper: PresetHelper; - protected mailSendService: MailSendService; - protected localeService: LocaleService; - protected databaseServer: DatabaseServer; - protected itemFilterService: ItemFilterService; - protected cloner: ICloner; - /** - * Regex to account for all these cases: - * spt give "item name" 5 - * spt give templateId 5 - * spt give en "item name in english" 5 - * spt give es "nombre en español" 5 - * spt give 5 <== this is the reply when the algo isn't sure about an item - */ - private static commandRegex; - private static acceptableConfidence; - private static excludedPresetItems; - protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); - getCommand(): string; - getCommandHelp(): string; - performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; - /** - * A "simple" function that checks if an item is supposed to be given to a player or not - * @param templateItem the template item to check - * @returns true if its obtainable, false if its not - */ - protected isItemAllowed(templateItem: ITemplateItem): boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand.d.ts deleted file mode 100644 index 5f8d3a1..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class SavedCommand { - quantity: number; - potentialItemNames: string[]; - locale: string; - constructor(quantity: number, potentialItemNames: string[], locale: string); -} diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveSptCommand.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveSptCommand.d.ts new file mode 100644 index 0000000..e7925bb --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveSptCommand.d.ts @@ -0,0 +1,37 @@ +import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/SavedCommand"; +export declare class GiveSptCommand implements ISptCommand { + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected presetHelper: PresetHelper; + protected mailSendService: MailSendService; + protected localeService: LocaleService; + protected databaseServer: DatabaseServer; + /** + * Regex to account for all these cases: + * spt give "item name" 5 + * spt give templateId 5 + * spt give en "item name in english" 5 + * spt give es "nombre en español" 5 + * spt give 5 <== this is the reply when the algo isnt sure about an item + */ + private static commandRegex; + private static maxAllowedDistance; + protected savedCommand: SavedCommand; + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + getCommand(): string; + getCommandHelp(): string; + performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts index 3c55b8e..33732c7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts @@ -1,5 +1,5 @@ -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface ISptCommand { getCommand(): string; getCommandHelp(): string; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts deleted file mode 100644 index 7d3547a..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { SavedCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class ProfileSptCommand implements ISptCommand { - protected logger: ILogger; - protected itemHelper: ItemHelper; - protected hashUtil: HashUtil; - protected presetHelper: PresetHelper; - protected mailSendService: MailSendService; - protected localeService: LocaleService; - protected databaseServer: DatabaseServer; - protected profileHelper: ProfileHelper; - /** - * Regex to account for all these cases: - * spt profile level 20 - * spt profile skill metabolism 10 - */ - private static commandRegex; - protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); - getCommand(): string; - getCommandHelp(): string; - performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; - protected handleSkillCommand(skill: string, level: number): IProfileChangeEvent; - protected handleLevelCommand(level: number): IProfileChangeEvent; -} diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/SavedCommand.d.ts similarity index 100% rename from TypeScript/22CustomSptCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand.d.ts rename to TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/SavedCommand.d.ts diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts deleted file mode 100644 index 3cfc7bd..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { SavedCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { HashUtil } from "@spt/utils/HashUtil"; -export declare class TraderSptCommand implements ISptCommand { - protected logger: ILogger; - protected itemHelper: ItemHelper; - protected hashUtil: HashUtil; - protected presetHelper: PresetHelper; - protected mailSendService: MailSendService; - protected localeService: LocaleService; - protected databaseServer: DatabaseServer; - /** - * Regex to account for all these cases: - * spt trader prapor rep 100 - * spt trader mechanic spend 1000000 - */ - private static commandRegex; - protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); - getCommand(): string; - getCommandHelp(): string; - performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts index a87bec1..391969f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts @@ -1,8 +1,8 @@ -import { AbstractDialogueChatBot } from "@spt/helpers/Dialogue/AbstractDialogueChatBot"; -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { MailSendService } from "@spt/services/MailSendService"; +import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { AbstractDialogueChatBot } from "@spt-aki/helpers/Dialogue/AbstractDialogueChatBot"; export declare class CommandoDialogueChatBot extends AbstractDialogueChatBot { constructor(logger: ILogger, mailSendService: MailSendService, chatCommands: IChatCommand[]); getChatBot(): IUserDialogInfo; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/IDialogueChatBot.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/IDialogueChatBot.d.ts index 0c72041..b585d55 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/IDialogueChatBot.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/IDialogueChatBot.d.ts @@ -1,5 +1,5 @@ -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IDialogueChatBot { getChatBot(): IUserDialogInfo; handleMessage(sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..a852dfe 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -1,13 +1,12 @@ -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { GiftService } from "@spt/services/GiftService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { GiftService } from "@spt-aki/services/GiftService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; @@ -15,7 +14,6 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - protected weatherConfig: IWeatherConfig; constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/DialogueHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/DialogueHelper.d.ts index febe696..ea1b517 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/DialogueHelper.d.ts @@ -1,13 +1,14 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; -import { NotifierHelper } from "@spt/helpers/NotifierHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; +import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { Dialogue, MessageContent, MessagePreview } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class DialogueHelper { protected logger: ILogger; protected hashUtil: HashUtil; @@ -18,6 +19,14 @@ export declare class DialogueHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * @deprecated Use MailSendService.sendMessage() or helpers + */ + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; + /** + * @deprecated Use MailSendService.sendMessage() or helpers + */ + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/DurabilityLimitsHelper.d.ts index 4cbac6b..efccdf5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,8 +1,8 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class DurabilityLimitsHelper { protected randomUtil: RandomUtil; protected botHelper: BotHelper; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/GameEventHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/GameEventHelper.d.ts index b15a15d..555cda2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ -import { ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { ISeasonalEventConfig } from "@spt-aki/models/spt/config/ISeasonalEventConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; export declare class GameEventHelper { protected databaseServer: DatabaseServer; protected configServer: ConfigServer; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/HandbookHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/HandbookHelper.d.ts index 6836875..1e7dffa 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/HandbookHelper.d.ts @@ -1,9 +1,6 @@ -import { Category } from "@spt/models/eft/common/tables/IHandbookBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IItemConfig } from "@spt/models/spt/config/IItemConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { Category } from "@spt-aki/models/eft/common/tables/IHandbookBase"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,24 +13,21 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected itemConfig: IItemConfig; + protected jsonUtil: JsonUtil; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); + constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) - * If no values found, return 0 + * If no values found, return 1 * @param tpl item tpl to look up price for * @returns price in roubles */ getTemplatePrice(tpl: string): number; - getTemplatePriceForItems(items: Item[]): number; /** * Get all items in template with the given parent category * @param parentId diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/HealthHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/HealthHelper.d.ts index 7fb646c..6aae71f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/HealthHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/HealthHelper.d.ts @@ -1,26 +1,26 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { Effects, IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { + protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; - protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); + constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id * @returns updated profile */ - resetVitality(sessionID: string): ISptProfile; + resetVitality(sessionID: string): IAkiProfile; /** * Update player profile with changes from request object * @param pmcData Player profile diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/HideoutHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/HideoutHelper.d.ts index 33a9729..0cfc649 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/HideoutHelper.d.ts @@ -1,27 +1,25 @@ -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 { Item, Upd } from "@spt/models/eft/common/tables/IItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData"; +import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData"; +import { IAddItemRequestData } from "@spt-aki/models/eft/inventory/IAddItemRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; protected hashUtil: HashUtil; @@ -33,17 +31,14 @@ export declare class HideoutHelper { protected inventoryHelper: InventoryHelper; protected playerService: PlayerService; protected localisationService: LocalisationService; - protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected cloner: ICloner; static bitcoinFarm: string; - static bitcoinProductionId: string; static waterCollector: string; - static bitcoinTpl: string; + static bitcoin: string; static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to @@ -85,16 +80,6 @@ export declare class HideoutHelper { waterCollectorHasFilter: boolean; }; protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; - /** - * Iterate over productions and update their progress timers - * @param pmcData Profile to check for productions and update - * @param hideoutProperties Hideout properties - */ - protected updateProductionTimers(pmcData: IPmcData, hideoutProperties: { - btcFarmCGs: number; - isGeneratorOn: boolean; - waterCollectorHasFilter: boolean; - }): void; /** * Update progress timer for water collector * @param pmcData profile to update @@ -106,6 +91,16 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Iterate over productions and update their progress timers + * @param pmcData Profile to check for productions and update + * @param hideoutProperties Hideout properties + */ + protected updateProductionTimers(pmcData: IPmcData, hideoutProperties: { + btcFarmCGs: number; + isGeneratorOn: boolean; + waterCollectorHasFilter: boolean; + }): void; /** * Update a productions progress value based on the amount of time that has passed * @param pmcData Player profile @@ -143,34 +138,17 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; - /** - * Decrease fuel from generator slots based on amount of time since last time this occured - * @param generatorArea Hideout area - * @param pmcData Player profile - * @param isGeneratorOn Is the generator turned on since last update - */ - protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void; - protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, hideoutProperties: { - btcFarmCGs: number; - isGeneratorOn: boolean; - waterCollectorHasFilter: boolean; - }): void; - /** - * Get craft time and make adjustments to account for dev profile + crafting skill level - * @param pmcData Player profile making craft - * @param recipeId Recipe being crafted - * @param applyHideoutManagementBonus should the hideout mgmt bonus be appled to the calculation - * @returns Items craft time with bonuses subtracted - */ - getAdjustedCraftTimeWithSkills(pmcData: IPmcData, recipeId: string, applyHideoutManagementBonus?: boolean): number; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): void; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; /** * Adjust water filter objects resourceValue or delete when they reach 0 resource * @param waterFilterArea water filter area to update * @param production production object * @param isGeneratorOn is generator enabled * @param pmcData Player profile + * @returns Updated HideoutArea object */ - protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): void; + protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; /** * Get an adjusted water filter drain rate based on time elapsed since last run, * handle edge case when craft time has gone on longer than total production time @@ -178,9 +156,9 @@ export declare class HideoutHelper { * @param totalProductionTime Total time collecting water * @param productionProgress how far water collector has progressed * @param baseFilterDrainRate Base drain rate - * @returns drain rate (adjusted) + * @returns */ - protected getTimeAdjustedWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number; + protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number; /** * Get the water filter drain rate based on hideout bonues player has * @param pmcData Player profile @@ -200,8 +178,8 @@ export declare class HideoutHelper { * @param resourceUnitsConsumed * @returns Upd */ - protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number, isFoundInRaid: boolean): Upd; - protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): void; protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; /** * Add bitcoin object to btc production products array and set progress time @@ -218,15 +196,15 @@ export declare class HideoutHelper { */ protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean, recipe?: IHideoutProduction): number; /** - * Get a count of how many possible BTC can be gathered by the profile + * Get a count of how many BTC can be gathered by the profile * @param pmcData Profile to look up - * @returns Coin slot count + * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; /** - * Get a count of how many additional bitcoins player hideout can hold with elite skill + * Get a count of bitcoins player miner can hold */ - protected getEliteSkillAdditionalBitcoinSlotCount(): number; + protected getBitcoinMinerContainerSlotSize(): number; /** * HideoutManagement skill gives a consumption bonus the higher the level * 0.5% per level per 1-51, (25.5% at max) @@ -235,21 +213,12 @@ export declare class HideoutHelper { */ protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** - * Get a multipler based on players skill level and value per level - * @param pmcData Player profile - * @param skill Player skill from profile - * @param valuePerLevel Value from globals.config.SkillsSettings - `PerLevel` - * @returns Multipler from 0 to 1 - */ - protected getSkillBonusMultipliedBySkillLevel(pmcData: IPmcData, skill: SkillTypes, valuePerLevel: number): number; - /** + * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile * @param productionTime Time to complete hideout craft in seconds - * @param skill Skill bonus to get reduction from - * @param amountPerLevel Skill bonus amount to apply - * @returns Seconds to reduce craft time by + * @returns Adjusted craft time in seconds */ - getSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number, skill: SkillTypes, amountPerLevel: number): number; + protected getCraftingSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number): number; isProduction(productive: Productive): productive is Production; /** * Gather crafted BTC from hideout area and add to inventory @@ -257,9 +226,15 @@ export declare class HideoutHelper { * @param pmcData Player profile * @param request Take production request * @param sessionId Session id - * @param output Output object to update + * @returns IItemEventRouterResponse */ - getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string, output: IItemEventRouterResponse): void; + getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string): IItemEventRouterResponse; + /** + * Create a single bitcoin request object + * @param pmcData Player profile + * @returns IAddItemRequestData + */ + protected createBitcoinRequest(pmcData: IPmcData): IAddItemRequestData; /** * Upgrade hideout wall from starting level to interactable level if necessary stations have been upgraded * @param pmcProfile Profile to upgrade wall in @@ -276,17 +251,4 @@ export declare class HideoutHelper { * @param pmcProfile Profile to adjust */ setHideoutImprovementsToCompleted(pmcProfile: IPmcData): void; - /** - * Add/remove bonus combat skill based on number of dogtags in place of fame hideout area - * @param pmcData Player profile - */ - applyPlaceOfFameDogtagBonus(pmcData: IPmcData): void; - /** - * Calculate the raw dogtag combat skill bonus for place of fame based on number of dogtags - * Reverse engineered from client code - * @param pmcData Player profile - * @param activeDogtags Active dogtags in place of fame dogtag slots - * @returns combat bonus - */ - protected getDogtagCombatSkillBonusPercent(pmcData: IPmcData, activeDogtags: Item[]): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/HttpServerHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/HttpServerHelper.d.ts index 9d5e6df..d67b4ec 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/HttpServerHelper.d.ts @@ -1,5 +1,5 @@ -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class HttpServerHelper { protected configServer: ConfigServer; protected httpConfig: IHttpConfig; @@ -17,7 +17,7 @@ export declare class HttpServerHelper { constructor(configServer: ConfigServer); getMimeText(key: string): string; /** - * Combine ip and port into address + * Combine ip and port into url * @returns url */ buildUrl(): string; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts index 45cb9c1..b2bba8c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts @@ -1,27 +1,27 @@ -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig"; -import { ILostOnDeathConfig } from "@spt/models/spt/config/ILostOnDeathConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { IPmcData, IPostRaidPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IQuestStatus, TraderInfo, Victim } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; +import { ILostOnDeathConfig } from "@spt-aki/models/spt/config/ILostOnDeathConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -31,11 +31,9 @@ export declare class InRaidHelper { protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; - protected randomUtil: RandomUtil; - protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory @@ -47,6 +45,19 @@ export declare class InRaidHelper { * @param items Items array to check */ addUpdToMoneyFromRaid(items: Item[]): void; + /** + * Add karma changes up and return the new value + * @param existingFenceStanding Current fence standing level + * @param victims Array of kills player performed + * @returns adjusted karma level after kills are taken into account + */ + calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): number; + /** + * Get the standing gain/loss for killing an npc + * @param victim Who was killed by player + * @returns a numerical standing gain or loss + */ + protected getFenceStandingChangeForKillAsScav(victim: Victim): number; /** * Reset a profile to a baseline, used post-raid * Reset points earned during session property @@ -63,7 +74,7 @@ export declare class InRaidHelper { */ protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** Check counters are correct in profile */ - protected validateTaskConditionCounters(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected validateBackendCounters(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Update various serverPMC profile values; quests/limb hp/trader standing with values post-raic * @param pmcData Server PMC profile @@ -98,12 +109,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Transfer client achievements into profile - * @param profile Player pmc profile - * @param clientAchievements Achievements from client - */ - protected updateProfileAchievements(profile: IPmcData, clientAchievements: Record): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id @@ -124,15 +129,16 @@ export declare class InRaidHelper { * @param sessionID Session id * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid + * @returns Updated profile */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData): IPmcData; /** - * Clear PMC inventory of all items except those that are exempt + * Clear pmc inventory of all items except those that are exempt * Used post-raid to remove items after death * @param pmcData Player profile - * @param sessionId Session id + * @param sessionID Session id */ - deleteInventory(pmcData: IPmcData, sessionId: string): void; + deleteInventory(pmcData: IPmcData, sessionID: string): void; /** * Get an array of items from a profile that will be lost on death * @param pmcProfile Profile to get items from diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/InventoryHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/InventoryHelper.d.ts index 48431a8..0bf2925 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/InventoryHelper.d.ts @@ -1,33 +1,29 @@ -import { ContainerHelper } from "@spt/helpers/ContainerHelper"; -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -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 { Item, Upd } from "@spt/models/eft/common/tables/IItem"; -import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; -import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -export interface IOwnerInventoryItems { +import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { AddItem, IAddItemRequestData } from "@spt-aki/models/eft/inventory/IAddItemRequestData"; +import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject"; +import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData"; +import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData"; +import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData"; +import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig, RewardDetails } from "@spt-aki/models/spt/config/IInventoryConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +export interface OwnerInventoryItems { /** Inventory items from source */ from: Item[]; /** Inventory items at destination */ @@ -37,6 +33,7 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -47,85 +44,53 @@ export declare class InventoryHelper { protected itemHelper: ItemHelper; protected containerHelper: ContainerHelper; protected profileHelper: ProfileHelper; - protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; - protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Add multiple items to player stash (assuming they all fit) - * @param sessionId Session id - * @param request IAddItemsDirectRequest request + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param request request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback Code to execute later (function) + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space + * @returns IItemEventRouterResponse + */ + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib * @param pmcData Player profile - * @param output Client response object + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed */ - addItemsToStash(sessionId: string, request: IAddItemsDirectRequest, pmcData: IPmcData, output: IItemEventRouterResponse): void; + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Add whatever is passed in `request.itemWithModsToAdd` into player inventory (if it fits) - * @param sessionId Session id - * @param request addItemDirect request - * @param pmcData Player profile - * @param output Client response object + * Add ammo to ammo boxes + * @param itemToAdd Item to check is ammo box + * @param parentId Ammo box parent id + * @param output IItemEventRouterResponse object + * @param sessionID Session id + * @param pmcData Profile to add ammobox to + * @param output object to send to client + * @param foundInRaid should ammo be FiR */ - addItemToStash(sessionId: string, request: IAddItemDirectRequest, pmcData: IPmcData, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * Set FiR status for an item + its children - * @param itemWithChildren An item - * @param foundInRaid Item was found in raid - */ - protected setFindInRaidStatusForItem(itemWithChildren: Item[], foundInRaid: boolean): void; - /** - * Remove properties from a Upd object used by a trader/ragfair that are unnecessary to a player - * @param upd Object to update - */ - protected removeTraderRagfairRelatedUpdProperties(upd: Upd): void; - /** - * Can all probided items be added into player inventory - * @param sessionId Player id - * @param itemsWithChildren array of items with children to try and fit - * @returns True all items fit - */ - canPlaceItemsInInventory(sessionId: string, itemsWithChildren: Item[][]): boolean; - /** - * Do the provided items all fit into the grid - * @param containerFS2D Container grid to fit items into - * @param itemsWithChildren items to try and fit into grid - * @returns True all fit - */ - canPlaceItemsInContainer(containerFS2D: number[][], itemsWithChildren: Item[][]): boolean; - /** - * Does an item fit into a container grid - * @param containerFS2D Container grid - * @param itemWithChildren item to check fits - * @returns True it fits - */ - canPlaceItemInContainer(containerFS2D: number[][], itemWithChildren: Item[]): boolean; - /** - * Find a free location inside a container to fit the item - * @param containerFS2D Container grid to add item to - * @param itemWithChildren Item to add to grid - * @param containerId Id of the container we're fitting item into - * @param desiredSlotId slot id value to use, default is "hideout" - */ - placeItemInContainer(containerFS2D: number[][], itemWithChildren: Item[], containerId: string, desiredSlotId?: string): void; - /** - * Find a location to place an item into inventory and place it - * @param stashFS2D 2-dimensional representation of the container slots - * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory - * @param useSortingTable Should sorting table to be used if main stash has no space - * @param output output to send back to client - */ - protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to + * @param result Array split stacks are added to */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; + protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -133,51 +98,16 @@ export declare class InventoryHelper { * @param profile Profile to remove item from (pmc or scav) * @param itemId Items id to remove * @param sessionID Session id - * @param output OPTIONAL - IItemEventRouterResponse - */ - removeItem(profile: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): void; - /** - * Delete desired item from a player profiles mail - * @param sessionId Session id - * @param removeRequest Remove request - * @param output OPTIONAL - IItemEventRouterResponse - */ - removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output?: IItemEventRouterResponse): void; - /** - * Find item by id in player inventory and remove x of its count - * @param pmcData player profile - * @param itemId Item id to decrement StackObjectsCount of - * @param countToRemove Number of item to remove - * @param sessionID Session id - * @param output IItemEventRouterResponse + * @param output Existing IItemEventRouterResponse object to append data to, creates new one by default if not supplied * @returns IItemEventRouterResponse */ - removeItemByCount(pmcData: IPmcData, itemId: string, countToRemove: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Get the height and width of an item - can have children that alter size - * @param itemTpl Item to get size of - * @param itemID Items id to get size of - * @param inventoryItems - * @returns [width, height] - */ - getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + removeItem(profile: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; + removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; + getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[]; protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; - /** - * Get a blank two-dimentional representation of a container - * @param containerH Horizontal size of container - * @param containerY Vertical size of container - * @returns Two-dimensional representation of container - */ - protected getBlankContainerMap(containerH: number, containerY: number): number[][]; - /** - * @param containerH Horizontal size of container - * @param containerV Vertical size of container - * @param itemList - * @param containerId Id of the container - * @returns Two-dimensional representation of container - */ - getContainerMap(containerH: number, containerV: number, itemList: Item[], containerId: string): number[][]; protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; + getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Return the inventory that needs to be modified (scav/pmc etc) * Changes made to result apply to character inventory @@ -186,31 +116,19 @@ export declare class InventoryHelper { * @param sessionId Session id / playerid * @returns OwnerInventoryItems with inventory of player/scav to adjust */ - getOwnerInventoryItems(request: IInventoryMoveRequestData | IInventorySplitRequestData | IInventoryMergeRequestData | IInventoryTransferRequestData, sessionId: string): IOwnerInventoryItems; + getOwnerInventoryItems(request: IInventoryMoveRequestData | IInventorySplitRequestData | IInventoryMergeRequestData, sessionId: string): OwnerInventoryItems; /** - * Get a two dimensional array to represent stash slots - * 0 value = free, 1 = taken - * @param pmcData Player profile - * @param sessionID session id - * @returns 2-dimensional array + * Made a 2d array table with 0 - free slot and 1 - used slot + * @param {Object} pmcData + * @param {string} sessionID + * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - /** - * Get a blank two-dimensional array representation of a container - * @param containerTpl Container to get data for - * @returns blank two-dimensional array - */ - getContainerSlotMap(containerTpl: string): number[][]; - /** - * Get a two-dimensional array representation of the players sorting table - * @param pmcData Player profile - * @returns two-dimensional array - */ protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; /** - * Get Players Stash Size - * @param sessionID Players id - * @returns Array of 2 values, horizontal and vertical stash size + * Get Player Stash Proper Size + * @param sessionID Playerid + * @returns Array of 2 values, x and y stash size */ protected getPlayerStashSize(sessionID: string): Record; /** @@ -254,15 +172,6 @@ export declare class InventoryHelper { */ getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; getInventoryConfig(): IInventoryConfig; - /** - * Recursively checks if the given item is - * inside the stash, that is it has the stash as - * ancestor with slotId=hideout - * @param pmcData Player profile - * @param itemToCheck Item to look for - * @returns True if item exists inside stash - */ - isItemInStash(pmcData: IPmcData, itemToCheck: Item): boolean; } declare namespace InventoryHelper { interface InventoryItemHash { diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/ItemHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/ItemHelper.d.ts index 718dcdd..c7daa8c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/ItemHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/ItemHelper.d.ts @@ -1,22 +1,20 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { IStaticAmmoDetails } from "@spt/models/eft/common/ILocation"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { InsuredItem } from "@spt/models/eft/common/tables/IBotBase"; -import { Item, Repairable, Upd } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { CompareUtil } from "@spt/utils/CompareUtil"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item, Repairable } from "@spt-aki/models/eft/common/tables/IItem"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { ObjectId } from "@spt-aki/utils/ObjectId"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ItemHelper { protected logger: ILogger; protected hashUtil: HashUtil; @@ -30,38 +28,12 @@ export declare class ItemHelper { protected itemFilterService: ItemFilterService; protected localisationService: LocalisationService; protected localeService: LocaleService; - protected compareUtil: CompareUtil; - protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); - /** - * This method will compare two items (with all its children) and see if the are equivalent. - * This method will NOT compare IDs on the items - * @param item1 first item with all its children to compare - * @param item2 second item with all its children to compare - * @param compareUpdProperties Upd properties to compare between the items - * @returns true if they are the same, false if they arent - */ - isSameItems(item1: Item[], item2: Item[], compareUpdProperties?: Set): boolean; - /** - * This method will compare two items and see if the are equivalent. - * This method will NOT compare IDs on the items - * @param item1 first item to compare - * @param item2 second item to compare - * @param compareUpdProperties Upd properties to compare between the items - * @returns true if they are the same, false if they arent - */ - isSameItem(item1: Item, item2: Item, compareUpdProperties?: Set): boolean; - /** - * Helper method to generate a Upd based on a template - * @param itemTemplate the item template to generate a Upd for - * @returns A Upd with all the default properties set - */ - generateUpdForItem(itemTemplate: ITemplateItem): Upd; + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService); /** * Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash - * @param {string} tpl the template id / tpl - * @returns boolean; true for items that may be in player possession and not quest items + * @param {string} tpl the template id / tpl + * @returns boolean; true for items that may be in player possession and not quest items */ isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean; /** @@ -79,44 +51,6 @@ export declare class ItemHelper { * @returns true if any supplied base classes match */ isOfBaseclasses(tpl: string, baseClassTpls: string[]): boolean; - /** - * Does the provided item have the chance to require soft armor inserts - * Only applies to helmets/vest/armors. - * Not all head gear needs them - * @param itemTpl item to check - * @returns Does item have the possibility ot need soft inserts - */ - armorItemCanHoldMods(itemTpl: string): boolean; - /** - * Does the provided item tpl need soft/removable inserts to function - * @param itemTpl Armor item - * @returns True if item needs some kind of insert - */ - armorItemHasRemovableOrSoftInsertSlots(itemTpl: string): boolean; - /** - * Does the pased in tpl have ability to hold removable plate items - * @param itemTpl item tpl to check for plate support - * @returns True when armor can hold plates - */ - armorItemHasRemovablePlateSlots(itemTpl: string): boolean; - /** - * Does the provided item tpl require soft inserts to become a valid armor item - * @param itemTpl Item tpl to check - * @returns True if it needs armor inserts - */ - itemRequiresSoftInserts(itemTpl: string): boolean; - /** - * Get all soft insert slot ids - * @returns An array of soft insert ids (e.g. soft_armor_back, helmet_top) - */ - getSoftInsertSlotIds(): string[]; - /** - * Returns the items total price based on the handbook or as a fallback from the prices.json if the item is not - * found in the handbook. If the price can't be found at all return 0 - * @param tpls item tpls to look up the price of - * @returns Total price in roubles - */ - getItemAndChildrenPrice(tpls: string[]): number; /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 @@ -149,6 +83,43 @@ export declare class ItemHelper { * @returns Fixed item */ fixItemStackCount(item: Item): Item; + /** + * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. + * Here's what a filled AmmoBox looks like: + * { + * "_id": "b1bbe982daa00ac841d4ae4d", + * "_tpl": "57372c89245977685d4159b1", + * "parentId": "5fe49a0e2694b0755a504876", + * "slotId": "hideout", + * "location": { + * "x": 3, + * "y": 4, + * "r": 0 + * }, + * "upd": { + * "StackObjectsCount": 1 + * } + * }, + * { + * "_id": "b997b4117199033afd274a06", + * "_tpl": "56dff061d2720bb5668b4567", + * "parentId": "b1bbe982daa00ac841d4ae4d", + * "slotId": "cartridges", + * "location": 0, + * "upd": { + * "StackObjectsCount": 30 + * } + * } + * Given the AmmoBox Item (first object) this function generates the StackSlot (second object) and returns it. + * StackSlots are only used for AmmoBoxes which only have one element in StackSlots. However, it seems to be generic + * to possibly also have more than one StackSlot. As good as possible, without seeing items having more than one + * StackSlot, this function takes account of this and creates and returns an array of StackSlotItems + * + * @param {object} item The item template of the AmmoBox as given in items.json + * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of + * @returns {array} The array of StackSlotItems + */ + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; /** * Get cloned copy of all item data from items.json * @returns array of ITemplateItem objects @@ -160,14 +131,7 @@ export declare class ItemHelper { * @returns bool - is valid + template item object as array */ getItem(tpl: string): [boolean, ITemplateItem]; - itemHasSlots(itemTpl: string): boolean; isItemInDb(tpl: string): boolean; - /** - * Calcualte the average quality of an item and its children - * @param items An offers item to process - * @returns % quality modifer between 0 and 1 - */ - getItemQualityModifierForOfferItems(items: Item[]): number; /** * get normalized value (0-1) based on item condition * @param item @@ -185,18 +149,17 @@ export declare class ItemHelper { /** * Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results * @param items Array of items (item + possible children) - * @param baseItemId Parent items id + * @param itemId Parent items id * @returns an array of strings */ - findAndReturnChildrenByItems(items: Item[], baseItemId: string): string[]; + findAndReturnChildrenByItems(items: Item[], itemId: string): string[]; /** * A variant of findAndReturnChildren where the output is list of item objects instead of their ids. - * @param items Array of items (item + possible children) - * @param baseItemId Parent items id - * @param modsOnly Include only mod items, exclude items stored inside root item + * @param items + * @param baseItemId * @returns An array of Item objects */ - findAndReturnChildrenAsItems(items: Item[], baseItemId: string, modsOnly?: boolean): Item[]; + findAndReturnChildrenAsItems(items: Item[], baseItemId: string): Item[]; /** * Find children of the item in a given assort (weapons parts for example, need recursive loop function) * @param itemIdToFind Template id of item to check for @@ -229,42 +192,28 @@ export declare class ItemHelper { */ isItemTplStackable(tpl: string): boolean; /** - * Split item stack if it exceeds its items StackMaxSize property into child items of passed in parent + * split item stack if it exceeds its items StackMaxSize property * @param itemToSplit Item to split into smaller stacks - * @returns Array of root item + children + * @returns Array of split items */ splitStack(itemToSplit: Item): Item[]; - /** - * Turn items like money into separate stacks that adhere to max stack size - * @param itemToSplit Item to split into smaller stacks - * @returns - */ - splitStackIntoSeparateItems(itemToSplit: Item): Item[][]; /** * Find Barter items from array of items * @param {string} by tpl or id - * @param {Item[]} itemsToSearch Array of items to iterate over - * @param {string} desiredBarterItemIds + * @param {Item[]} items Array of items to iterate over + * @param {string} barterItemId * @returns Array of Item objects */ - findBarterItems(by: "tpl" | "id", itemsToSearch: Item[], desiredBarterItemIds: string | string[]): Item[]; + findBarterItems(by: "tpl" | "id", items: Item[], barterItemId: string): Item[]; /** - * Regenerate all GUIDs with new IDs, for the exception of special item types (e.g. quest, sorting table, etc.) This - * function will not mutate the original items array, but will return a new array with new GUIDs. - * - * @param originalItems Items to adjust the IDs of + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) * @param pmcData Player profile - * @param insuredItems Insured items that should not have their IDs replaced - * @param fastPanel Quick slot panel + * @param items Items to adjust ID values of + * @param insuredItems insured items to not replace ids for + * @param fastPanel * @returns Item[] */ - replaceIDs(originalItems: Item[], pmcData?: IPmcData | null, insuredItems?: InsuredItem[] | null, fastPanel?: any): Item[]; - /** - * Mark the passed in array of items as found in raid. - * Modifies passed in items - * @param items The list of items to mark as FiR - */ - setFoundInRaid(items: Item[]): void; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of @@ -302,6 +251,12 @@ export declare class ItemHelper { * to traverse, where the keys are the item IDs and the values are the corresponding Item objects. This alleviates * some of the performance concerns, as it allows for quick lookups of items by ID. * + * To generate the map: + * ``` + * const itemsMap = new Map(); + * items.forEach(item => itemsMap.set(item._id, item)); + * ``` + * * @param itemId - The unique identifier of the item for which to find the main parent. * @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup. * @returns The Item object representing the top-most parent of the given item, or `null` if no such parent exists. @@ -314,22 +269,6 @@ export declare class ItemHelper { * @returns true if the item is attached attachment, otherwise false. */ isAttachmentAttached(item: Item): boolean; - /** - * Retrieves the equipment parent item for a given item. - * - * This method traverses up the hierarchy of items starting from a given `itemId`, until it finds the equipment - * parent item. In other words, if you pass it an item id of a suppressor, it will traverse up the muzzle brake, - * barrel, upper receiver, gun, nested backpack, and finally return the backpack Item that is equipped. - * - * It's important to note that traversal is expensive, so this method requires that you pass it a Map of the items - * to traverse, where the keys are the item IDs and the values are the corresponding Item objects. This alleviates - * some of the performance concerns, as it allows for quick lookups of items by ID. - * - * @param itemId - The unique identifier of the item for which to find the equipment parent. - * @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup. - * @returns The Item object representing the equipment parent of the given item, or `null` if no such parent exists. - */ - getEquipmentParent(itemId: string, itemsMap: Map): Item | null; /** * Get the inventory size of an item * @param items Item with children @@ -342,19 +281,13 @@ export declare class ItemHelper { * @param item Db item template to look up Cartridge filter values from * @returns Caliber of cartridge */ - getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string | null; + getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; /** * Add cartridges to the ammo box with correct max stack sizes * @param ammoBox Box to add cartridges to * @param ammoBoxDetails Item template from items db */ addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; - /** - * Add a single stack of cartridges to the ammo box - * @param ammoBox Box to add cartridges to - * @param ammoBoxDetails Item template from items db - */ - addSingleStackCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; /** * Check if item is stored inside of a container * @param item Item to check is inside of container @@ -370,18 +303,16 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to - * @param defaultCartridgeTpl Cartridge to use when none found - * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; /** * Add child items to a magazine of a specific cartridge - * @param magazineWithChildCartridges Magazine to add child items to + * @param magazine Magazine to add child items to * @param magTemplate Db template of magazine * @param cartridgeTpl Cartridge to add to magazine * @param minSizePercent % the magazine must be filled to */ - fillMagazineWithCartridge(magazineWithChildCartridges: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; /** * Choose a random bullet type from the list of possible a magazine has * @param magTemplate Magazine template from Db @@ -392,21 +323,18 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights - * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead - * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in * @param ammoTpl Cartridge to insert * @param stackCount Count of cartridges inside parent * @param location Location inside parent (e.g. 0, 1) - * @param foundInRaid OPTIONAL - Are cartridges found in raid (SpawnedInSession) * @returns Item */ - createCartridges(parentId: string, ammoTpl: string, stackCount: number, location: number, foundInRaid?: boolean): Item; + createCartridges(parentId: string, ammoTpl: string, stackCount: number, location: number): Item; /** * Get the size of a stack, return 1 if no stack object count property found * @param item Item to get stack size of @@ -420,71 +348,6 @@ export declare class ItemHelper { */ getItemName(itemTpl: string): string; getItemTplsOfBaseType(desiredBaseType: string): string[]; - /** - * Add child slot items to an item, chooses random child item if multiple choices exist - * @param itemToAdd array with single object (root item) - * @param itemToAddTemplate Db tempalte for root item - * @param modSpawnChanceDict Optional dictionary of mod name + % chance mod will be included in item (e.g. front_plate: 100) - * @param requiredOnly Only add required mods - * @returns Item with children - */ - addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; - /** - * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomly choose from - * @param incompatibleModTpls Incompatible tpls to not allow - * @returns Chosen tpl or null - */ - getCompatibleTplFromArray(possibleTpls: string[], incompatibleModTpls: Set): string; - /** - * Is the provided item._props.Slots._name property a plate slot - * @param slotName Name of slot (_name) of Items Slot array - * @returns True if its a slot that holds a removable palte - */ - isRemovablePlateSlot(slotName: string): boolean; - /** - * Get a list of slot names that hold removable plates - * @returns Array of slot ids (e.g. front_plate) - */ - getRemovablePlateSlotIds(): string[]; - /** - * Generate new unique ids for child items while preserving hierarchy - * @param rootItem Base/primary item - * @param itemWithChildren Primary item + children of primary item - * @returns Item array with updated IDs - */ - reparentItemAndChildren(rootItem: Item, itemWithChildren: Item[]): Item[]; - /** - * Update a root items _id property value to be unique - * @param itemWithChildren Item to update root items _id property - * @param newId Optional: new id to use - * @returns New root id - */ - remapRootItemId(itemWithChildren: Item[], newId?: string): string; - /** - * Adopts orphaned items by resetting them as root "hideout" items. Helpful in situations where a parent has been - * deleted from a group of items and there are children still referencing the missing parent. This method will - * remove the reference from the children to the parent and set item properties to root values. - * - * @param rootId The ID of the "root" of the container. - * @param items Array of Items that should be adjusted. - * @returns Array of Items that have been adopted. - */ - adoptOrphanedItems(rootId: string, items: Item[]): Item[]; - /** - * Populate a Map object of items for quick lookup using their ID. - * - * @param items An array of Items that should be added to a Map. - * @returns A Map where the keys are the item IDs and the values are the corresponding Item objects. - */ - generateItemsMap(items: Item[]): Map; - /** - * Add a blank upd object to passed in item if it does not exist already - * @param item item to add upd to - * @param warningMessageWhenMissing text to write to log when upd object was not found - * @returns True when upd object was added - */ - addUpdObjectToItem(item: Item, warningMessageWhenMissing?: string): boolean; } declare namespace ItemHelper { interface ItemSize { diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/NotificationSendHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/NotificationSendHelper.d.ts index 3a74563..5f4a533 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { SptWebSocketConnectionHandler } from "@spt/servers/ws/SptWebSocketConnectionHandler"; -import { NotificationService } from "@spt/services/NotificationService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { NotificationService } from "@spt-aki/services/NotificationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected sptWebSocketConnection: SptWebSocketConnectionHandler; + protected webSocketServer: WebSocketServer; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(sptWebSocketConnection: SptWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; + sendMessage(sessionID: string, notificationMessage: INotification): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/NotifierHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/NotifierHelper.d.ts index b947f1b..9c27224 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/NotifierHelper.d.ts @@ -1,28 +1,26 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; -import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: IWsNotificationEvent; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): IWsNotificationEvent; + getDefaultNotification(): INotification; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/PaymentHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/PaymentHelper.d.ts index 6971547..04d4163 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/PaymentHelper.d.ts @@ -1,5 +1,5 @@ -import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { IInventoryConfig } from "@spt-aki/models/spt/config/IInventoryConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class PaymentHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/PresetHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/PresetHelper.d.ts index 937e225..6722c92 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/PresetHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/PresetHelper.d.ts @@ -1,55 +1,23 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { BaseClasses } from "@spt/models/enums/BaseClasses"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class PresetHelper { + protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected itemHelper: ItemHelper; - protected cloner: ICloner; protected lookup: Record; - protected defaultEquipmentPresets: Record; - protected defaultWeaponPresets: Record; - constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); + protected defaultPresets: Record; + constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - /** - * Get default weapon and equipment presets - * @returns Dictionary - */ getDefaultPresets(): Record; - /** - * Get default weapon presets - * @returns Dictionary - */ - getDefaultWeaponPresets(): Record; - /** - * Get default equipment presets - * @returns Dictionary - */ - getDefaultEquipmentPresets(): Record; isPreset(id: string): boolean; - /** - * Checks to see if the preset is of the given base class. - * @param id The id of the preset - * @param baseClass The BaseClasses enum to check against - * @returns True if the preset is of the given base class, false otherwise - */ - isPresetBaseClass(id: string, baseClass: BaseClasses): boolean; hasPreset(templateId: string): boolean; getPreset(id: string): IPreset; - getAllPresets(): IPreset[]; getPresets(templateId: string): IPreset[]; /** - * Get the default preset for passed in item id - * @param templateId Item id to get preset for + * Get the default preset for passed in weapon id + * @param templateId Weapon id to get preset for * @returns Null if no default preset, otherwise IPreset */ getDefaultPreset(templateId: string): IPreset; getBaseItemTpl(presetId: string): string; - /** - * Return the price of the preset for the given item tpl, or for the tpl itself if no preset exists - * @param tpl The item template to get the price of - * @returns The price of the given item preset, or base item if no preset exists - */ - getDefaultPresetOrItemPrice(tpl: string): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/ProbabilityHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/ProbabilityHelper.d.ts index fa12125..8aceb67 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/ProbabilityHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/ProbabilityHelper.d.ts @@ -1,5 +1,5 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ProbabilityHelper { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/ProfileHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/ProfileHelper.d.ts index 298ec55..938c796 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/ProfileHelper.d.ts @@ -1,23 +1,20 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Common, CounterKeyValue, Stats } from "@spt/models/eft/common/tables/IBotBase"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { Watermark } from "@spt/utils/Watermark"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData"; +import { SkillTypes } from "@spt-aki/models/enums/SkillTypes"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; +import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; protected saveServer: SaveServer; @@ -25,26 +22,18 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected cloner: ICloner; - protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id * @param questConditionId Quest with condition to remove */ - removeQuestConditionFromProfile(pmcData: IPmcData, questConditionId: Record): void; + removeCompletedQuestConditionFromProfile(pmcData: IPmcData, questConditionId: Record): void; /** * Get all profiles from server * @returns Dictionary of profiles */ - getProfiles(): Record; - /** - * Get the pmc and scav profiles as an array by profile id - * @param sessionID - * @returns Array of IPmcData objects - */ + getProfiles(): Record; getCompleteProfile(sessionID: string): IPmcData[]; /** * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen @@ -56,70 +45,37 @@ export declare class ProfileHelper { * @param output pmc and scav profiles array * @param pmcProfile post-raid pmc profile * @param scavProfile post-raid scav profile - * @returns Updated profile array + * @returns updated profile array */ protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[]; /** * Check if a nickname is used by another profile loaded by the server - * @param nicknameRequest nickname request object + * @param nicknameRequest * @param sessionID Session id * @returns True if already used */ isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean; - protected profileHasInfoProperty(profile: ISptProfile): boolean; - protected stringsMatch(stringA: string, stringB: string): boolean; + protected profileHasInfoProperty(profile: IAkiProfile): boolean; + protected nicknameMatches(profileName: string, nicknameRequest: string): boolean; + protected sessionIdMatchesProfileId(profileId: string, sessionId: string): boolean; /** * Add experience to a PMC inside the players profile * @param sessionID Session id * @param experienceToAdd Experience to add to PMC character */ addExperienceToPmc(sessionID: string, experienceToAdd: number): void; - /** - * Iterate all profiles and find matching pmc profile by provided id - * @param pmcId Profile id to find - * @returns IPmcData - */ getProfileByPmcId(pmcId: string): IPmcData; - /** - * Get the experiecne for the given level - * @param level level to get xp for - * @returns Number of xp points for level - */ getExperience(level: number): number; - /** - * Get the max level a player can be - * @returns Max level - */ getMaxLevel(): number; - getDefaultSptDataObject(): any; - /** - * Get full representation of a players profile json - * @param sessionID Profile id to get - * @returns ISptProfile object - */ - getFullProfile(sessionID: string): ISptProfile; - /** - * Get a PMC profile by its session id - * @param sessionID Profile id to return - * @returns IPmcData object - */ + getDefaultAkiDataObject(): any; + getFullProfile(sessionID: string): IAkiProfile; getPmcProfile(sessionID: string): IPmcData; - /** - * Get a full profiles scav-specific sub-profile - * @param sessionID Profiles id - * @returns IPmcData object - */ getScavProfile(sessionID: string): IPmcData; /** * Get baseline counter values for a fresh profile - * @returns Default profile Stats object + * @returns Stats */ getDefaultCounters(): Stats; - /** - * is this profile flagged for data removal - * @param sessionID Profile id - * @returns True if profile is to be wiped of data/progress - */ protected isWiped(sessionID: string): boolean; protected getServerVersion(): string; /** @@ -130,7 +86,7 @@ export declare class ProfileHelper { removeSecureContainer(profile: IPmcData): IPmcData; /** * Flag a profile as having received a gift - * Store giftid in profile spt object + * Store giftid in profile aki object * @param playerId Player to add gift flag to * @param giftId Gift player received */ @@ -164,23 +120,5 @@ export declare class ProfileHelper { * @returns */ addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void; - /** - * Get a speciic common skill from supplied profile - * @param pmcData Player profile - * @param skill Skill to look up and return value from - * @returns Common skill object from desired profile - */ getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common; - /** - * Is the provided session id for a developer account - * @param sessionID Profile id ot check - * @returns True if account is developer - */ - isDeveloperAccount(sessionID: string): boolean; - /** - * Add stash row bonus to profile or increments rows given count if it already exists - * @param sessionId Profile id to give rows to - * @param rowsToAdd How many rows to give profile - */ - addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestConditionHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestConditionHelper.d.ts index c50a9c3..1e4c5f7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestConditionHelper.d.ts @@ -1,8 +1,8 @@ -import { IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; +import { AvailableForConditions } from "@spt-aki/models/eft/common/tables/IQuest"; export declare class QuestConditionHelper { - getQuestConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; - getLevelConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; - getLoyaltyConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; - getStandingConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; - protected filterConditions(q: IQuestCondition[], questType: string, furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; + getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; + getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; + getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; + getStandingConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts index 39ba2a9..2b9a531 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts @@ -1,32 +1,32 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData"; +import { IFailQuestRequestData } from "@spt-aki/models/eft/quests/IFailQuestRequestData"; +import { QuestStatus } from "@spt-aki/models/enums/QuestStatus"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -40,12 +40,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; - protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; - protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -59,7 +57,7 @@ export declare class QuestHelper { * @param condition Quest condition * @returns true if player level is greater than or equal to quest */ - doesPlayerLevelFulfilCondition(playerLevel: number, condition: IQuestCondition): boolean; + doesPlayerLevelFulfilCondition(playerLevel: number, condition: AvailableForConditions): boolean; /** * Get the quests found in both arrays (inner join) * @param before Array of quests #1 @@ -86,34 +84,28 @@ export declare class QuestHelper { * @param profile Player profile * @returns true if loyalty is high enough to fulfill quest requirement */ - traderLoyaltyLevelRequirementCheck(questProperties: IQuestCondition, profile: IPmcData): boolean; + traderLoyaltyLevelRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean; /** * Check if trader has sufficient standing to fulfill quest requirement * @param questProperties Quest props * @param profile Player profile * @returns true if standing is high enough to fulfill quest requirement */ - traderStandingRequirementCheck(questProperties: IQuestCondition, profile: IPmcData): boolean; + traderStandingRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean; protected compareAvailableForValues(current: number, required: number, compareMethod: string): boolean; /** - * Take reward item from quest and set FiR status + fix stack sizes + fix mod Ids - * @param questReward Reward item to fix + * take reward item from quest and set FiR status + fix stack sizes + fix mod Ids + * @param reward Reward item to fix * @returns Fixed rewards */ - protected processReward(questReward: IQuestReward): Item[]; - /** - * Add missing mod items to a quest armor reward - * @param originalRewardRootItem Original armor reward item from IQuestReward.items object - * @param questReward Armor reward from quest - */ - protected generateArmorRewardChildSlots(originalRewardRootItem: Item, questReward: IQuestReward): void; + protected processReward(reward: Reward): Reward[]; /** * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): Item[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus): Reward[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -128,12 +120,6 @@ export declare class QuestHelper { * @returns Quests accessible to player incuding newly unlocked quests now quest (startedQuestId) was started */ getNewlyAccessibleQuestsWhenStartingQuest(startedQuestId: string, sessionID: string): IQuest[]; - /** - * Is the quest for the opposite side the player is on - * @param playerSide Player side (usec/bear) - * @param questId QuestId to check - */ - questIsForOtherSide(playerSide: string, questId: string): boolean; /** * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player @@ -184,8 +170,9 @@ export declare class QuestHelper { * @param failRequest Fail quest request data * @param sessionID Session id * @param output Client output + * @returns Item event router response */ - failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string, output?: IItemEventRouterResponse): void; + failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; /** * Get List of All Quests from db * NOT CLONED @@ -235,7 +222,7 @@ export declare class QuestHelper { * @param questResponse Response to send back to client * @returns Array of reward objects */ - applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): Item[]; + applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): Reward[]; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -245,7 +232,7 @@ export declare class QuestHelper { * @param sessionID Session id * @param response Response to send back to client */ - protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: Reward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; /** * Get players money reward bonus from profile * @param pmcData player profile @@ -266,16 +253,4 @@ export declare class QuestHelper { */ addAllQuestsToProfile(pmcProfile: IPmcData, statuses: QuestStatus[]): void; findAndRemoveQuestFromArrayIfExists(questId: string, quests: IQuestStatus[]): void; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; - /** - * Get the hours a mails items can be collected for by profile type - * @param pmcData Profile to get hours for - * @returns Hours item will be available for - */ - getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairHelper.d.ts index cab2148..55e6fe8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairHelper.d.ts @@ -1,18 +1,19 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { UtilityHelper } from "@spt/helpers/UtilityHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; +import { UtilityHelper } from "@spt-aki/helpers/UtilityHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairHelper { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -20,9 +21,8 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; - protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts index f8f7661..778d657 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts @@ -1,33 +1,31 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RagfairHelper } from "@spt/helpers/RagfairHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { RagfairHelper } from "@spt-aki/helpers/RagfairHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { RagfairSortHelper } from "@spt-aki/helpers/RagfairSortHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; @@ -40,12 +38,10 @@ export declare class RagfairOfferHelper { protected paymentHelper: PaymentHelper; protected presetHelper: PresetHelper; protected profileHelper: ProfileHelper; - protected questHelper: QuestHelper; protected ragfairServerHelper: RagfairServerHelper; protected ragfairSortHelper: RagfairSortHelper; protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; - protected ragfairRequiredItemsService: RagfairRequiredItemsService; protected localeService: LocaleService; protected localisationService: LocalisationService; protected mailSendService: MailSendService; @@ -53,32 +49,25 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest Data from client * @param itemsToAdd ragfairHelper.filterCategories() * @param traderAssorts Trader assorts - * @param pmcData Player profile + * @param pmcProfile Player profile * @returns Offers the player should see */ - getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - /** - * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level - * @param searchRequest Search request from client - * @param pmcDataPlayer profile - * @returns Matching IRagfairOffer objects - */ - getOffersThatRequireItem(searchRequest: ISearchRequestData, pmcData: IPmcData): IRagfairOffer[]; + getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Get offers from flea/traders specifically when building weapon preset * @param searchRequest Search request data * @param itemsToAdd string array of item tpls to search for * @param traderAssorts All trader assorts player can access/buy - * @param pmcData Player profile + * @param pmcProfile Player profile * @returns IRagfairOffer array */ - getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -123,7 +112,7 @@ export declare class RagfairOfferHelper { * @param sessionId Profile to update * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) */ - increaseProfileRagfairRating(profile: ISptProfile, amountToIncrementBy: number): void; + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; /** * Return all offers a player has listed on a desired profile * @param sessionID Session id @@ -151,21 +140,6 @@ export declare class RagfairOfferHelper { * @returns Localised message text */ protected getLocalisedOfferSoldMessage(itemTpl: string, boughtAmount: number): string; - /** - * Check an offer passes the various search criteria the player requested - * @param searchRequest - * @param offer - * @param pmcData - * @returns True - */ - protected passesSearchFilterCriteria(searchRequest: ISearchRequestData, offer: IRagfairOffer, pmcData: IPmcData): boolean; - /** - * Check that the passed in offer item is functional - * @param offerRootItem The root item of the offer - * @param offer The flea offer - * @returns True if the given item is functional - */ - isItemFunctional(offerRootItem: Item, offer: IRagfairOffer): boolean; /** * Should a ragfair offer be visible to the player * @param searchRequest Search request @@ -176,7 +150,6 @@ export declare class RagfairOfferHelper { * @returns True = should be shown to player */ isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; - isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean; /** * Does the passed in item have a condition property * @param item Item to check diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairSellHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairSellHelper.d.ts index d694d6a..7a4de8a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairSellHelper.d.ts @@ -1,10 +1,10 @@ -import { SellResult } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { SellResult } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairSellHelper { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairServerHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairServerHelper.d.ts index a8133a6..4d2d4c4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairServerHelper.d.ts @@ -1,23 +1,23 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Helper class for common ragfair server actions */ @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; + protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; - protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails @@ -53,12 +53,6 @@ export declare class RagfairServerHelper { * @returns True if its blacklsited */ protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; - /** - * Is supplied parent id on the ragfair custom item category blacklist - * @param parentId Parent Id to check is blacklisted - * @returns true if blacklisted - */ - protected isItemCategoryOnCustomFleaBlacklist(itemParentId: string): boolean; /** * is supplied id a trader * @param traderId @@ -102,4 +96,11 @@ export declare class RagfairServerHelper { * @returns */ getPresetItemsByTpl(item: Item): Item[]; + /** + * Generate new unique ids for child items while preserving hierarchy + * @param rootItem Base/primary item of preset + * @param preset Primary item + children of primary item + * @returns Item array with new IDs + */ + reparentPresets(rootItem: Item, preset: Item[]): Item[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairSortHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairSortHelper.d.ts index 2de0045..5bd8f96 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairSortHelper.d.ts @@ -1,7 +1,7 @@ -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { RagfairSort } from "@spt/models/enums/RagfairSort"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { RagfairSort } from "@spt-aki/models/enums/RagfairSort"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; export declare class RagfairSortHelper { protected databaseServer: DatabaseServer; protected localeService: LocaleService; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RepairHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RepairHelper.d.ts index 4bd0577..9ef0eaa 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RepairHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RepairHelper.d.ts @@ -1,19 +1,19 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; - protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RepeatableQuestHelper.d.ts index d92657e..6e0290d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ -import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ProbabilityObject, ProbabilityObjectArray } from "@spt/utils/RandomUtil"; +import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; protected configServer: ConfigServer; - protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); + constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/SecureContainerHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/SecureContainerHelper.d.ts index b6bcffe..36b227c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/SecureContainerHelper.d.ts @@ -1,5 +1,5 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface OwnerInventoryItems { from: Item[]; to: Item[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/TradeHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/TradeHelper.d.ts index 7bb999c..bf8360d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/TradeHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/TradeHelper.d.ts @@ -1,24 +1,19 @@ -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; -import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; -import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData"; +import { IProcessSellTradeRequestData } from "@spt-aki/models/eft/trade/IProcessSellTradeRequestData"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { RagfairServer } from "@spt-aki/servers/RagfairServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; @@ -26,43 +21,43 @@ export declare class TradeHelper { protected itemHelper: ItemHelper; protected paymentService: PaymentService; protected fenceService: FenceService; - protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected inventoryHelper: InventoryHelper; protected ragfairServer: RagfairServer; - protected traderAssortHelper: TraderAssortHelper; - protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; - protected cloner: ICloner; protected traderConfig: ITraderConfig; - protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); /** * Buy item from flea or trader * @param pmcData Player profile * @param buyRequestData data from client * @param sessionID Session id * @param foundInRaid Should item be found in raid - * @param output IItemEventRouterResponse - * @returns IItemEventRouterResponse + * @param upd optional item details used when buying from flea + * @returns */ - buyItem(pmcData: IPmcData, buyRequestData: IProcessBuyTradeRequestData, sessionID: string, foundInRaid: boolean, output: IItemEventRouterResponse): void; + buyItem(pmcData: IPmcData, buyRequestData: IProcessBuyTradeRequestData, sessionID: string, foundInRaid: boolean, upd: Upd): IItemEventRouterResponse; /** * Sell item to trader * @param profileWithItemsToSell Profile to remove items from * @param profileToReceiveMoney Profile to accept the money for selling item * @param sellRequest Request data * @param sessionID Session id - * @param output IItemEventRouterResponse + * @returns IItemEventRouterResponse */ - sellItem(profileWithItemsToSell: IPmcData, profileToReceiveMoney: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string, output: IItemEventRouterResponse): void; + sellItem(profileWithItemsToSell: IPmcData, profileToReceiveMoney: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Increment the assorts buy count by number of items purchased + * Show error on screen if player attempts to buy more than what the buy max allows + * @param assortBeingPurchased assort being bought + * @param itemsPurchasedCount number of items being bought + */ + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; /** * Traders allow a limited number of purchases per refresh cycle (default 60 mins) - * @param sessionId Session id - * @param traderId Trader assort is purchased from * @param assortBeingPurchased the item from trader being bought * @param assortId Id of assort being purchased - * @param count How many of the item are being bought + * @param count How many are being bought */ - protected checkPurchaseIsWithinTraderItemLimit(sessionId: string, traderId: string, assortBeingPurchased: Item, assortId: string, count: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/TraderAssortHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/TraderAssortHelper.d.ts index 50f6933..0b6effb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/TraderAssortHelper.d.ts @@ -1,24 +1,25 @@ -import { RagfairAssortGenerator } from "@spt/generators/RagfairAssortGenerator"; -import { RagfairOfferGenerator } from "@spt/generators/RagfairOfferGenerator"; -import { AssortHelper } from "@spt/helpers/AssortHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITrader, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { TraderAssortService } from "@spt/services/TraderAssortService"; -import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { RagfairAssortGenerator } from "@spt-aki/generators/RagfairAssortGenerator"; +import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; +import { AssortHelper } from "@spt-aki/helpers/AssortHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITrader, ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; +import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -33,11 +34,10 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; - protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts @@ -48,11 +48,6 @@ export declare class TraderAssortHelper { * @returns a traders' assorts */ getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort; - /** - * Reset every traders root item `BuyRestrictionCurrent` property to 0 - * @param assortItems Items to adjust - */ - protected resetBuyRestrictionCurrentValue(assortItems: Item[]): void; /** * Create a dict of all assort id = quest id mappings used to work out what items should be shown to player based on the quests they've started/completed/failed */ diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/TraderHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/TraderHelper.d.ts index aca9d87..8d8da00 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/TraderHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/TraderHelper.d.ts @@ -1,21 +1,21 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ProfileTraderTemplate } from "@spt/models/eft/common/tables/IProfileTemplate"; -import { ITraderAssort, ITraderBase, LoyaltyLevel } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ProfileTraderTemplate } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; +import { ITraderAssort, ITraderBase, LoyaltyLevel } from "@spt-aki/models/eft/common/tables/ITrader"; +import { Traders } from "@spt-aki/models/enums/Traders"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -59,7 +59,7 @@ export declare class TraderHelper { /** * Reset a profiles trader data back to its initial state as seen by a level 1 player * Does NOT take into account different profile levels - * @param sessionID session id of player + * @param sessionID session id * @param traderID trader id to reset */ resetTrader(sessionID: string, traderID: string): void; @@ -74,13 +74,13 @@ export declare class TraderHelper { * Alter a traders unlocked status * @param traderId Trader to alter * @param status New status to use - * @param sessionId Session id of player + * @param sessionId Session id */ setTraderUnlockedState(traderId: string, status: boolean, sessionId: string): void; /** * Add standing to a trader and level them up if exp goes over level threshold - * @param sessionId Session id of player - * @param traderId Traders id to add standing to + * @param sessionId Session id + * @param traderId Traders id * @param standingToAdd Standing value to add to trader */ addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void; @@ -117,11 +117,11 @@ export declare class TraderHelper { */ addTraderPurchasesToPlayerProfile(sessionID: string, newPurchaseDetails: { items: { - itemId: string; + item_id: string; count: number; }[]; - traderId: string; - }, itemPurchased: Item): void; + tid: string; + }): void; /** * Get the highest rouble price for an item from traders * UNUSED diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/WeightedRandomHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/WeightedRandomHelper.d.ts index f3a34f3..ab42805 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/WeightedRandomHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/WeightedRandomHelper.d.ts @@ -34,11 +34,4 @@ export declare class WeightedRandomHelper { item: any; index: number; }; - /** - * Find the greated common divisor of all weights and use it on the passed in dictionary - * @param weightedDict values to reduce - */ - reduceWeightValues(weightedDict: Record): void; - protected commonDivisor(numbers: number[]): number; - protected gcd(a: number, b: number): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/23CustomAbstractChatBot/types/ide/BleedingEdgeModsEntry.d.ts deleted file mode 100644 index 62f714e..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/ide/BleedingEdgeModsEntry.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "reflect-metadata"; -import "source-map-support/register"; diff --git a/TypeScript/23CustomAbstractChatBot/types/loaders/BundleLoader.d.ts b/TypeScript/23CustomAbstractChatBot/types/loaders/BundleLoader.d.ts index e270988..8e24c5a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/loaders/BundleLoader.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/loaders/BundleLoader.d.ts @@ -1,35 +1,33 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { BundleHashCacheService } from "@spt/services/cache/BundleHashCacheService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class BundleInfo { - modpath: string; - filename: string; - crc: number; - dependencies: string[]; - constructor(modpath: string, bundle: BundleManifestEntry, bundleHash: number); +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; +declare class BundleInfo { + modPath: string; + key: string; + path: string; + filepath: string; + dependencyKeys: string[]; + constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { protected httpServerHelper: HttpServerHelper; protected vfs: VFS; protected jsonUtil: JsonUtil; - protected bundleHashCacheService: BundleHashCacheService; - protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); /** * Handle singleplayer/bundles */ - getBundles(): BundleInfo[]; - getBundle(key: string): BundleInfo; + getBundles(local: boolean): BundleInfo[]; + getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; addBundle(key: string, b: BundleInfo): void; } export interface BundleManifest { - manifest: BundleManifestEntry[]; + manifest: Array; } export interface BundleManifestEntry { key: string; - dependencyKeys: string[]; + path: string; } +export {}; diff --git a/TypeScript/23CustomAbstractChatBot/types/loaders/ModLoadOrder.d.ts b/TypeScript/23CustomAbstractChatBot/types/loaders/ModLoadOrder.d.ts index 039f648..2d03dc1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/loaders/ModLoadOrder.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/loaders/ModLoadOrder.d.ts @@ -1,6 +1,6 @@ -import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class ModLoadOrder { protected logger: ILogger; protected localisationService: LocalisationService; diff --git a/TypeScript/23CustomAbstractChatBot/types/loaders/ModTypeCheck.d.ts b/TypeScript/23CustomAbstractChatBot/types/loaders/ModTypeCheck.d.ts index f66ec45..fb4912e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/loaders/ModTypeCheck.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/loaders/ModTypeCheck.d.ts @@ -1,40 +1,40 @@ -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { IPostDBLoadModAsync } from "@spt/models/external/IPostDBLoadModAsync"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { IPostSptLoadModAsync } from "@spt/models/external/IPostSptLoadModAsync"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { IPreSptLoadModAsync } from "@spt/models/external/IPreSptLoadModAsync"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { IPostAkiLoadModAsync } from "@spt-aki/models/external/IPostAkiLoadModAsync"; +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { IPostDBLoadModAsync } from "@spt-aki/models/external/IPostDBLoadModAsync"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { IPreAkiLoadModAsync } from "@spt-aki/models/external/IPreAkiLoadModAsync"; export declare class ModTypeCheck { /** - * Use defined safe guard to check if the mod is a IPreSptLoadMod + * Use defined safe guard to check if the mod is a IPreAkiLoadMod * @returns boolean */ - isPreSptLoad(mod: any): mod is IPreSptLoadMod; + isPreAkiLoad(mod: any): mod is IPreAkiLoadMod; /** - * Use defined safe guard to check if the mod is a IPostSptLoadMod + * Use defined safe guard to check if the mod is a IPostAkiLoadMod * @returns boolean */ - isPostSptLoad(mod: any): mod is IPostSptLoadMod; + isPostAkiLoad(mod: any): mod is IPostAkiLoadMod; /** * Use defined safe guard to check if the mod is a IPostDBLoadMod * @returns boolean */ - isPostDBLoad(mod: any): mod is IPostDBLoadMod; + isPostDBAkiLoad(mod: any): mod is IPostDBLoadMod; /** - * Use defined safe guard to check if the mod is a IPreSptLoadModAsync + * Use defined safe guard to check if the mod is a IPreAkiLoadModAsync * @returns boolean */ - isPreSptLoadAsync(mod: any): mod is IPreSptLoadModAsync; + isPreAkiLoadAsync(mod: any): mod is IPreAkiLoadModAsync; /** - * Use defined safe guard to check if the mod is a IPostSptLoadModAsync + * Use defined safe guard to check if the mod is a IPostAkiLoadModAsync * @returns boolean */ - isPostSptLoadAsync(mod: any): mod is IPostSptLoadModAsync; + isPostAkiLoadAsync(mod: any): mod is IPostAkiLoadModAsync; /** * Use defined safe guard to check if the mod is a IPostDBLoadModAsync * @returns boolean */ - isPostDBLoadAsync(mod: any): mod is IPostDBLoadModAsync; + isPostDBAkiLoadAsync(mod: any): mod is IPostDBLoadModAsync; /** * Checks for mod to be compatible with 3.X+ * @returns boolean diff --git a/TypeScript/23CustomAbstractChatBot/types/loaders/PostAkiModLoader.d.ts b/TypeScript/23CustomAbstractChatBot/types/loaders/PostAkiModLoader.d.ts new file mode 100644 index 0000000..bd0731a --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/loaders/PostAkiModLoader.d.ts @@ -0,0 +1,21 @@ +import { DependencyContainer } from "tsyringe"; +import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; +import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { IModLoader } from "@spt-aki/models/spt/mod/IModLoader"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { VFS } from "@spt-aki/utils/VFS"; +export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; + protected bundleLoader: BundleLoader; + protected vfs: VFS; + protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; + protected modTypeCheck: ModTypeCheck; + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); + getModPath(mod: string): string; + load(): Promise; + protected executeMods(container: DependencyContainer): Promise; + protected addBundles(): void; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/loaders/PostDBModLoader.d.ts b/TypeScript/23CustomAbstractChatBot/types/loaders/PostDBModLoader.d.ts index b0c4bf4..d57e321 100644 --- a/TypeScript/23CustomAbstractChatBot/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/loaders/PostDBModLoader.d.ts @@ -1,21 +1,17 @@ import { DependencyContainer } from "tsyringe"; -import { OnLoad } from "@spt/di/OnLoad"; -import { BundleLoader } from "@spt/loaders/BundleLoader"; -import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class PostDBModLoader implements OnLoad { protected logger: ILogger; - protected bundleLoader: BundleLoader; - protected preSptModLoader: PreSptModLoader; + protected preAkiModLoader: PreAkiModLoader; protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - protected container: DependencyContainer; - constructor(logger: ILogger, bundleLoader: BundleLoader, preSptModLoader: PreSptModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; - protected executeModsAsync(): Promise; - protected addBundles(): void; + protected executeMods(container: DependencyContainer): Promise; } diff --git a/TypeScript/23CustomAbstractChatBot/types/loaders/PostSptModLoader.d.ts b/TypeScript/23CustomAbstractChatBot/types/loaders/PostSptModLoader.d.ts deleted file mode 100644 index fb54579..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/loaders/PostSptModLoader.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IModLoader } from "@spt/models/spt/mod/IModLoader"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -export declare class PostSptModLoader implements IModLoader { - protected logger: ILogger; - protected preSptModLoader: PreSptModLoader; - protected localisationService: LocalisationService; - protected modTypeCheck: ModTypeCheck; - protected container: DependencyContainer; - constructor(logger: ILogger, preSptModLoader: PreSptModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); - getModPath(mod: string): string; - load(): Promise; - protected executeModsAsync(): Promise; -} diff --git a/TypeScript/22CustomSptCommand/types/loaders/PreSptModLoader.d.ts b/TypeScript/23CustomAbstractChatBot/types/loaders/PreAkiModLoader.d.ts similarity index 68% rename from TypeScript/22CustomSptCommand/types/loaders/PreSptModLoader.d.ts rename to TypeScript/23CustomAbstractChatBot/types/loaders/PreAkiModLoader.d.ts index bc846c8..71fd745 100644 --- a/TypeScript/22CustomSptCommand/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/loaders/PreAkiModLoader.d.ts @@ -1,34 +1,36 @@ import { DependencyContainer } from "tsyringe"; -import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; -import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IModLoader } from "@spt/models/spt/mod/IModLoader"; -import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ModCompilerService } from "@spt/services/ModCompilerService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class PreSptModLoader implements IModLoader { +import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; +import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder"; +import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; +import { ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { IModLoader } from "@spt-aki/models/spt/mod/IModLoader"; +import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ModCompilerService } from "@spt-aki/services/ModCompilerService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; +export declare class PreAkiModLoader implements IModLoader { protected logger: ILogger; protected vfs: VFS; protected jsonUtil: JsonUtil; protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected modLoadOrder: ModLoadOrder; protected modTypeCheck: ModTypeCheck; - protected container: DependencyContainer; + protected static container: DependencyContainer; protected readonly basepath = "user/mods/"; protected readonly modOrderPath = "user/mods/order.json"; protected order: Record; protected imported: Record; - protected sptConfig: ICoreConfig; + protected akiConfig: ICoreConfig; protected serverDependencies: Record; protected skippedMods: Set; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** * Returns a list of mods with preserved load order @@ -60,15 +62,16 @@ export declare class PreSptModLoader implements IModLoader { protected getModsPackageData(mods: string[]): Map; /** * Is the passed in mod compatible with the running server version - * @param mod Mod to check compatibiltiy with SPT + * @param mod Mod to check compatibiltiy with AKI * @returns True if compatible */ - protected isModCombatibleWithSpt(mod: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; /** * Execute each mod found in this.imported + * @param container Dependence container to give to mod when it runs * @returns void promise */ - protected executeModsAsync(): Promise; + protected executeModsAsync(container: DependencyContainer): Promise; /** * Read loadorder.json (create if doesnt exist) and return sorted list of mods * @returns string array of sorted mod names diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/builds/ISetMagazineRequest.d.ts deleted file mode 100644 index 87dab41..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/builds/ISetMagazineRequest.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; -export interface ISetMagazineRequest { - Id: string; - Name: string; - Caliber: string; - Items: IMagazineTemplateAmmoItem[]; - TopCount: number; - BottomCount: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IGlobals.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IGlobals.d.ts index 2209415..276514e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IGlobals.d.ts @@ -1,11 +1,10 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; - EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } @@ -20,7 +19,6 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; - MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -31,7 +29,6 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; - GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -42,8 +39,6 @@ export interface IConfig { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - BluntDamageReduceFromSoftArmorMod: number; - BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -55,7 +50,6 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; - QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -76,10 +70,6 @@ export interface IConfig { SkillPointsBeforeFatigue: number; SkillFatigueReset: number; DiscardLimitsEnabled: boolean; - EventSettings: IEventSettings; - FavoriteItemsSettings: IFavoriteItemsSettings; - VaultingSettings: IVaultingSettings; - BTRSettings: IBTRSettings; EventType: string[]; WalkSpeed: Ixyz; SprintSpeed: Ixyz; @@ -102,39 +92,6 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } -export interface IBodyPartColliderSettings { - BackHead: IBodyPartColliderPart; - Ears: IBodyPartColliderPart; - Eyes: IBodyPartColliderPart; - HeadCommon: IBodyPartColliderPart; - Jaw: IBodyPartColliderPart; - LeftCalf: IBodyPartColliderPart; - LeftForearm: IBodyPartColliderPart; - LeftSideChestDown: IBodyPartColliderPart; - LeftSideChestUp: IBodyPartColliderPart; - LeftThigh: IBodyPartColliderPart; - LeftUpperArm: IBodyPartColliderPart; - NeckBack: IBodyPartColliderPart; - NeckFront: IBodyPartColliderPart; - ParietalHead: IBodyPartColliderPart; - Pelvis: IBodyPartColliderPart; - PelvisBack: IBodyPartColliderPart; - RibcageLow: IBodyPartColliderPart; - RibcageUp: IBodyPartColliderPart; - RightCalf: IBodyPartColliderPart; - RightForearm: IBodyPartColliderPart; - RightSideChestDown: IBodyPartColliderPart; - RightSideChestUp: IBodyPartColliderPart; - RightThigh: IBodyPartColliderPart; - RightUpperArm: IBodyPartColliderPart; - SpineDown: IBodyPartColliderPart; - SpineTop: IBodyPartColliderPart; -} -export interface IBodyPartColliderPart { - PenetrationChance: number; - PenetrationDamageMod: number; - PenetrationLevel: number; -} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -145,27 +102,6 @@ export interface IWeaponFastDrawSettings { WeaponPistolFastSwitchMaxSpeedMult: number; WeaponPistolFastSwitchMinSpeedMult: number; } -export interface IEventSettings { - EventActive: boolean; - EventTime: number; - EventWeather: IEventWeather; - ExitTimeMultiplier: number; - StaminaMultiplier: number; - SummonFailedWeather: IEventWeather; - SummonSuccessWeather: IEventWeather; - WeatherChangeTime: number; -} -export interface IEventWeather { - Cloudness: number; - Hour: number; - Minute: number; - Rain: number; - RainRandomness: number; - ScaterringFogDensity: number; - TopWindDirection: Ixyz; - Wind: number; - WindDirection: number; -} export interface IGraphicSettings { ExperimentalFogInCity: boolean; } @@ -196,7 +132,6 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; - expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -618,7 +553,6 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; - Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -722,7 +656,6 @@ export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; - EnvironmentDamageMultiplier: number; OverDamageReceivedMultiplier: number; } export interface IHealthFactorsSettings { @@ -802,7 +735,6 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; - countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -894,97 +826,6 @@ export interface IRestrictionsInRaid { TemplateId: string; Value: number; } -export interface IFavoriteItemsSettings { - WeaponStandMaxItemsCount: number; - PlaceOfFameMaxItemsCount: number; -} -export interface IVaultingSettings { - IsActive: boolean; - VaultingInputTime: number; - GridSettings: IVaultingGridSettings; - MovesSettings: IVaultingMovesSettings; -} -export interface IVaultingGridSettings { - GridSizeX: number; - GridSizeY: number; - GridSizeZ: number; - SteppingLengthX: number; - SteppingLengthY: number; - SteppingLengthZ: number; - GridOffsetX: number; - GridOffsetY: number; - GridOffsetZ: number; - OffsetFactor: number; -} -export interface IVaultingMovesSettings { - VaultSettings: IVaultingSubMoveSettings; - ClimbSettings: IVaultingSubMoveSettings; -} -export interface IVaultingSubMoveSettings { - IsActive: boolean; - MaxWithoutHandHeight: number; - SpeedRange: Ixyz; - MoveRestrictions: IMoveRestrictions; - AutoMoveRestrictions: IMoveRestrictions; -} -export interface IMoveRestrictions { - IsActive: boolean; - MinDistantToInteract: number; - MinHeight: number; - MaxHeight: number; - MinLength: number; - MaxLength: number; -} -export interface IBTRSettings { - LocationsWithBTR: string[]; - BasePriceTaxi: number; - AddPriceTaxi: number; - CleanUpPrice: number; - DeliveryPrice: number; - ModDeliveryCost: number; - BearPriceMod: number; - UsecPriceMod: number; - ScavPriceMod: number; - CoefficientDiscountCharisma: number; - DeliveryMinPrice: number; - TaxiMinPrice: number; - BotCoverMinPrice: number; - MapsConfigs: Record; - DiameterWheel: number; - HeightWheel: number; - HeightWheelMaxPosLimit: number; - HeightWheelMinPosLimit: number; - SnapToSurfaceWheelsSpeed: number; - CheckSurfaceForWheelsTimer: number; - HeightWheelOffset: number; -} -export interface IBtrMapConfig { - BtrSkin: string; - CheckSurfaceForWheelsTimer: number; - DiameterWheel: number; - HeightWheel: number; - HeightWheelMaxPosLimit: number; - HeightWheelMinPosLimit: number; - HeightWheelOffset: number; - SnapToSurfaceWheelsSpeed: number; - SuspensionDamperStiffness: number; - SuspensionRestLength: number; - SuspensionSpringStiffness: number; - SuspensionTravel: number; - SuspensionWheelRadius: number; - mapID: string; - pathsConfigurations: IPathConfig[]; -} -export interface IPathConfig { - active: boolean; - id: string; - enterPoint: string; - exitPoint: string; - pathPoints: string[]; - once: boolean; - circle: boolean; - circleCount: number; -} export interface ISquadSettings { CountOfRequestsToOnePlayer: number; SecondsForExpiredRequest: number; @@ -992,8 +833,6 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; - CoefOfSendingMessageTime: number; - CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1385,7 +1224,6 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { - ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1402,11 +1240,6 @@ export interface IFenceLevel { BotHelpChance: number; BotSpreadoutChance: number; BotStopChance: number; - PriceModTaxi: number; - PriceModDelivery: number; - PriceModCleanUp: number; - DeliveryGridSize: Ixyz; - CanInteractWithBtr: boolean; } export interface IInertia { InertiaLimits: Ixyz; @@ -1502,14 +1335,6 @@ export interface IAudioGroupPreset { OcclusionIntensity: number; OverallVolume: number; } -export interface IEnvironmentSettings { - SnowStepsVolumeMultiplier: number; - SurfaceMultipliers: ISurfaceMultiplier[]; -} -export interface ISurfaceMultiplier { - SurfaceType: string; - VolumeMult: number; -} export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; @@ -1526,7 +1351,3 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } -export interface IQuestSettings { - GlobalRewardRepModifierDailyQuestPvE: number; - GlobalRewardRepModifierQuestPvE: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocation.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocation.d.ts index bf4c58a..bba2db0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocation.d.ts @@ -1,21 +1,9 @@ -import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; export interface ILocation { - /** Map meta-data */ base: ILocationBase; - /** Loose loot postions and item weights */ looseLoot: ILooseLoot; - /** Static loot item weights */ - staticLoot: Record; - /** Static container postions and item weights */ - staticContainers: IStaticContainerDetails; - staticAmmo: Record; - /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; - /** All possible map extracts */ - allExtracts: Exit[]; } export interface IStaticContainer { containersGroups: Record; @@ -30,55 +18,3 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationBase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationBase.d.ts index 65931f8..1121e9f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationBase.d.ts @@ -1,5 +1,5 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -17,7 +17,6 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; - BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -33,7 +32,6 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; - GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -74,7 +72,6 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; - EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -135,11 +132,8 @@ export interface BossLocationSpawn { TriggerId: string; TriggerName: string; Delay?: number; - ForceSpawn?: boolean; - IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; - spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; @@ -177,7 +171,6 @@ export interface SpawnPointParam { BotZoneName: string; Categories: string[]; ColliderParams: ColliderParams; - CorePointId: number; DelayToCanSpawnSec: number; Id: string; Infiltration: string; @@ -194,11 +187,9 @@ export interface Props { Radius: number; } export interface Exit { - /** % Chance out of 100 exit will appear in raid */ Chance: number; Count: number; EntryPoints: string; - EventAvailable: boolean; ExfiltrationTime: number; ExfiltrationType: string; RequiredSlot?: string; @@ -209,7 +200,6 @@ export interface Exit { PassageRequirement: string; PlayersCount: number; RequirementTip: string; - Side?: string; } export interface MaxItemCountInLocation { TemplateId: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationsSourceDestinationBase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationsSourceDestinationBase.d.ts index e6bc8ee..1e8d80c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationsSourceDestinationBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationsSourceDestinationBase.d.ts @@ -1,4 +1,4 @@ -import { ILocations } from "@spt/models/spt/server/ILocations"; +import { ILocations } from "@spt-aki/models/spt/server/ILocations"; export interface ILocationsGenerateAllResponse { locations: ILocations; paths: Path[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILooseLoot.d.ts index b5b538c..0dce230 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILooseLoot.d.ts @@ -1,5 +1,5 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface ILooseLoot { spawnpointCount: SpawnpointCount; spawnpointsForced: SpawnpointsForced[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IPmcData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IPmcData.d.ts index 313a92c..f834822 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IPmcData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IPmcData.d.ts @@ -1,11 +1,7 @@ -import { IBotBase, IEftStats } from "@spt/models/eft/common/tables/IBotBase"; +import { IBotBase, IEftStats } from "@spt-aki/models/eft/common/tables/IBotBase"; export interface IPmcData extends IBotBase { } export interface IPostRaidPmcData extends IBotBase { - Stats: IPostRaidStats; -} -export interface IPostRaidStats { - Eft: IEftStats; /** Only found in profile we get from client post raid */ - Arena: IEftStats; + EftStats: IEftStats; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/request/IUIDRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/request/IUIDRequestData.d.ts deleted file mode 100644 index d905ad7..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/request/IUIDRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IUIDRequestData { - uid: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IAchievement.d.ts deleted file mode 100644 index 910b13d..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IAchievement.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; -export interface IAchievement { - id: string; - imageUrl: string; - assetPath: string; - rewards: IQuestRewards; - conditions: IQuestConditionTypes; - instantComplete: boolean; - showNotificationsInGame: boolean; - showProgress: boolean; - prefab: string; - rarity: string; - hidden: boolean; - showConditions: boolean; - progressBarEnabled: boolean; - side: string; - index: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts index 8c747fc..8ff3ba9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts @@ -1,11 +1,9 @@ -import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; -import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { BonusSkillType } from "@spt/models/enums/BonusSkillType"; -import { BonusType } from "@spt/models/enums/BonusType"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; +import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { QuestStatus } from "@spt-aki/models/enums/QuestStatus"; export interface IBotBase { _id: string; aid: number; @@ -19,15 +17,14 @@ export interface IBotBase { Skills: Skills; Stats: Stats; Encyclopedia: Record; - TaskConditionCounters: Record; + ConditionCounters: ConditionCounters; + BackendCounters: Record; InsuredItems: InsuredItem[]; Hideout: Hideout; Quests: IQuestStatus[]; TradersInfo: Record; UnlockedInfo: IUnlockedInfo; RagfairInfo: RagfairInfo; - /** Achievement id and timestamp */ - Achievements: Record; RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; @@ -38,13 +35,6 @@ export interface IBotBase { /** SPT specific property used during bot generation in raid */ sptIsPmc?: boolean; } -export interface ITaskConditionCounter { - id: string; - type: string; - value: number; - /** Quest id */ - sourceId: string; -} export interface IUnlockedInfo { unlockedProductionRecipe: string[]; } @@ -54,7 +44,6 @@ export interface Info { LowerNickname: string; Side: string; SquadInviteRestriction: boolean; - HasCoopExtension: boolean; Voice: string; Level: number; Experience: number; @@ -138,7 +127,6 @@ export interface Inventory { /** Key is hideout area enum numeric as string e.g. "24", value is area _id */ hideoutAreaStashes: Record; fastPanel: Record; - favoriteItems: string[]; } export interface IBaseJsonSkills { Common: Record; @@ -182,7 +170,6 @@ export interface IEftStats { LastPlayerState?: LastPlayerState; TotalInGameTime: number; SurvivorClass?: string; - sptLastRaidFenceRepChange?: number; } export interface IDroppedItem { QuestId: string; @@ -215,6 +202,14 @@ export interface CounterKeyValue { Key: string[]; Value: number; } +export interface ConditionCounters { + Counters: Counter[]; +} +export interface Counter { + id: string; + value: number; + qid: string; +} export interface Aggressor { AccountId: string; ProfileId: string; @@ -307,9 +302,6 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; - Code?: string; - Decoded?: boolean; - AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ @@ -319,8 +311,6 @@ export interface Productive { sptIsComplete?: boolean; /** Is the craft a Continuous, e.g bitcoins/water collector */ sptIsContinuous?: boolean; - /** Stores a list of tools used in this craft and whether they're FiR, to give back once the craft is done */ - sptRequiredTools?: Item[]; } export interface Production extends Productive { RecipeId: string; @@ -340,7 +330,6 @@ export interface HideoutArea { level: number; active: boolean; passiveBonusesEnabled: boolean; - /** Must be integer */ completeTime: number; constructing: boolean; slots: HideoutSlot[]; @@ -362,8 +351,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, @@ -376,7 +363,7 @@ export interface IQuestStatus { startTime: number; status: QuestStatus; statusTimers?: Record; - /** Property does not exist in live profile data, but is used by ProfileChanges.questsStatus when sent to client */ + /** Property does not exist in live profile data, but is used by ProfileChanges.questsStatus when sent to client*/ completedConditions?: string[]; availableAfter?: number; } @@ -395,7 +382,7 @@ export interface RagfairInfo { } export interface Bonus { id?: string; - type: BonusType; + type: string; templateId?: string; passive?: boolean; production?: boolean; @@ -403,7 +390,7 @@ export interface Bonus { value?: number; icon?: string; filter?: string[]; - skillType?: BonusSkillType; + skillType?: string; } export interface Note { Time: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotType.d.ts index 074a7d6..53a8021 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotType.d.ts @@ -1,5 +1,5 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Skills } from "@spt/models/eft/common/tables/IBotBase"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; export interface IBotType { appearance: Appearance; chances: Chances; @@ -15,14 +15,13 @@ export interface IBotType { export interface Appearance { body: Record; feet: Record; - hands: Record; - head: Record; - voice: Record; + hands: string[]; + head: string[]; + voice: string[]; } export interface Chances { equipment: EquipmentChances; - weaponMods: ModsChances; - equipmentMods: ModsChances; + mods: ModsChances; } export interface EquipmentChances { ArmBand: number; @@ -109,9 +108,6 @@ export interface GenerationWeightingItems { grenades: GenerationData; healing: GenerationData; drugs: GenerationData; - food: GenerationData; - drink: GenerationData; - currency: GenerationData; stims: GenerationData; backpackLoot: GenerationData; pocketLoot: GenerationData; @@ -123,7 +119,7 @@ export interface GenerationData { /** key: number of items, value: weighting */ weights: Record; /** Array of item tpls */ - whitelist: Record; + whitelist: string[]; } export interface Health { BodyParts: BodyPart[]; @@ -163,10 +159,10 @@ export interface Equipment { TacticalVest: Record; } export interface Items { - Backpack: Record; - Pockets: Record; - SecuredContainer: Record; - SpecialLoot: Record; - TacticalVest: Record; + Backpack: string[]; + Pockets: string[]; + SecuredContainer: string[]; + SpecialLoot: string[]; + TacticalVest: string[]; } export type Mods = Record>; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts index 3883765..2bab177 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -1,4 +1,4 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; export interface ICustomizationItem { _id: string; _name: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IItem.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IItem.d.ts index 8f60c4f..09a239c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IItem.d.ts @@ -33,7 +33,6 @@ export interface Upd { Foldable?: Foldable; SideEffect?: SideEffect; RepairKit?: RepairKit; - CultistAmulet?: ICultistAmulet; } export interface Buff { rarity: string; @@ -120,6 +119,3 @@ export interface SideEffect { export interface RepairKit { Resource: number; } -export interface ICultistAmulet { - NumberOfUsages: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/ILocation.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ILootBase.d.ts similarity index 58% rename from TypeScript/22CustomSptCommand/types/models/eft/common/ILocation.d.ts rename to TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ILootBase.d.ts index bf4c58a..0bbb91d 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ILootBase.d.ts @@ -1,47 +1,23 @@ -import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; -export interface ILocation { - /** Map meta-data */ - base: ILocationBase; - /** Loose loot postions and item weights */ - looseLoot: ILooseLoot; - /** Static loot item weights */ - staticLoot: Record; - /** Static container postions and item weights */ - staticContainers: IStaticContainerDetails; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +export interface ILootBase { staticAmmo: Record; - /** All possible static containers on map + their assign groupings */ - statics: IStaticContainer; - /** All possible map extracts */ - allExtracts: Exit[]; + staticContainers: Record; + staticLoot: Record; } -export interface IStaticContainer { - containersGroups: Record; - containers: Record; -} -export interface IContainerMinMax { - minContainers: number; - maxContainers: number; - current?: number; - chosenCount?: number; -} -export interface IContainerData { - groupId: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { +export interface IStaticAmmoDetails { tpl: string; relativeProbability: number; } +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} export interface IStaticPropsBase { Id: string; IsContainer: boolean; @@ -58,23 +34,6 @@ export interface IStaticPropsBase { export interface IStaticWeaponProps extends IStaticPropsBase { Items: Item[]; } -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} export interface IStaticContainerProps extends IStaticPropsBase { Items: StaticItem[]; } @@ -82,3 +41,19 @@ export interface StaticItem { _id: string; _tpl: string; } +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts index 4d73192..35db121 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,7 +1,7 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IProfileTemplates { - "Standard": IProfileSides; + Standard: IProfileSides; "Left Behind": IProfileSides; "Prepare To Escape": IProfileSides; "Edge Of Darkness": IProfileSides; @@ -11,10 +11,10 @@ export interface IProfileTemplates { } export interface IProfileSides { descriptionLocaleKey: string; - usec: ITemplateSide; - bear: ITemplateSide; + usec: TemplateSide; + bear: TemplateSide; } -export interface ITemplateSide { +export interface TemplateSide { character: IPmcData; suits: string[]; dialogues: Record; @@ -22,7 +22,7 @@ export interface ITemplateSide { trader: ProfileTraderTemplate; } export interface ProfileTraderTemplate { - initialLoyaltyLevel: Record; + initialLoyaltyLevel: number; setQuestsAvailableForStart?: boolean; setQuestsAvailableForFinish?: boolean; initialStanding: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IQuest.d.ts index 54ff191..edd9849 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IQuest.d.ts @@ -1,13 +1,13 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { QuestRewardType } from "@spt/models/enums/QuestRewardType"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -import { QuestTypeEnum } from "@spt/models/enums/QuestTypeEnum"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { QuestRewardType } from "@spt-aki/models/enums/QuestRewardType"; +import { QuestStatus } from "@spt-aki/models/enums/QuestStatus"; +import { QuestTypeEnum } from "@spt-aki/models/enums/QuestTypeEnum"; export interface IQuest { /** SPT addition - human readable quest name */ QuestName?: string; _id: string; canShowNotificationsInGame: boolean; - conditions: IQuestConditionTypes; + conditions: Conditions; description: string; failMessageText: string; name: string; @@ -24,11 +24,8 @@ export interface IQuest { secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; - declinePlayerMessage: string; - completePlayerMessage: string; templateId: string; - rewards: IQuestRewards; + rewards: Rewards; /** Becomes 'AppearStatus' inside client */ status: string | number; KeyQuest: boolean; @@ -38,24 +35,28 @@ export interface IQuest { /** Status of quest to player */ sptStatus?: QuestStatus; } -export interface IQuestConditionTypes { - Started: IQuestCondition[]; - AvailableForFinish: IQuestCondition[]; - AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; - Fail: IQuestCondition[]; +export interface Conditions { + Started: AvailableForConditions[]; + AvailableForFinish: AvailableForConditions[]; + AvailableForStart: AvailableForConditions[]; + Success: AvailableForConditions[]; + Fail: AvailableForConditions[]; } -export interface IQuestCondition { +export interface AvailableForConditions { + _parent: string; + _props: AvailableForProps; + dynamicLocale?: boolean; +} +export interface AvailableForProps { id: string; - index?: number; - compareMethod?: string; + index: number; + parentId: string; + isEncoded: boolean; dynamicLocale: boolean; - visibilityConditions?: VisibilityCondition[]; - globalQuestCounterId?: string; - parentId?: string; - target: string[] | string; value?: string | number; - type?: boolean; + compareMethod?: string; + visibilityConditions?: VisibilityCondition[]; + target?: string | string[]; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -65,87 +66,60 @@ export interface IQuestCondition { dogtagLevel?: number; maxDurability?: number; minDurability?: number; - counter?: IQuestConditionCounter; + counter?: AvailableForCounter; plantTime?: number; zoneId?: string; + type?: boolean; countInRaid?: boolean; - completeInSeconds?: number; - isEncoded?: boolean; - conditionType?: string; + globalQuestCounterId?: any; } -export interface IQuestConditionCounter { +export interface AvailableForCounter { id: string; - conditions: IQuestConditionCounterCondition[]; + conditions: CounterCondition[]; } -export interface IQuestConditionCounterCondition { +export interface CounterCondition { + _parent: string; + _props: CounterProps; +} +export interface CounterProps { id: string; - dynamicLocale: boolean; - target?: string[] | string; - completeInSeconds?: number; - energy?: IValueCompare; - exitName?: string; - hydration?: IValueCompare; - time?: IValueCompare; + target: string[] | string; compareMethod?: string; - value?: number; + value?: string; weapon?: string[]; - distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; weaponModsInclusive?: string[][]; - weaponModsExclusive?: string[][]; - enemyEquipmentInclusive?: string[][]; - enemyEquipmentExclusive?: string[][]; - weaponCaliber?: string[]; - savageRole?: string[]; status?: string[]; bodyPart?: string[]; - daytime?: IDaytimeCounter; - conditionType?: string; - enemyHealthEffects?: IEnemyHealthEffect[]; - resetOnSessionEnd?: boolean; + daytime?: DaytimeCounter; } -export interface IEnemyHealthEffect { - bodyParts: string[]; - effects: string[]; -} -export interface IValueCompare { - compareMethod: string; - value: number; -} -export interface ICounterConditionDistance { - value: number; - compareMethod: string; -} -export interface IDaytimeCounter { +export interface DaytimeCounter { from: number; to: number; } export interface VisibilityCondition { id: string; - target: string; - value?: number; - dynamicLocale?: boolean; + value: number; + dynamicLocale: boolean; oneSessionOnly: boolean; - conditionType: string; } -export interface IQuestRewards { - AvailableForStart?: IQuestReward[]; - AvailableForFinish?: IQuestReward[]; - Started?: IQuestReward[]; - Success?: IQuestReward[]; - Fail?: IQuestReward[]; - FailRestartable?: IQuestReward[]; - Expired?: IQuestReward[]; +export interface Rewards { + AvailableForStart: Reward[]; + AvailableForFinish: Reward[]; + Started: Reward[]; + Success: Reward[]; + Fail: Reward[]; + FailRestartable: Reward[]; + Expired: Reward[]; } -export interface IQuestReward { +export interface Reward extends Item { value?: string | number; - id?: string; + id: string; type: QuestRewardType; index: number; target?: string; items?: Item[]; loyaltyLevel?: number; - /** Hideout area id */ traderId?: string; unknown?: boolean; findInRaid?: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IRepeatableQuests.d.ts index 854c8ef..8101c51 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,19 +1,21 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; -export interface IRepeatableQuest extends IQuest { - changeCost: IChangeCost[]; - changeStandingCost: number; - sptRepatableGroupName: string; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +export interface IReward { + index: number; + type: string; + value: number; + target?: string; + items?: Item[]; } export interface IRepeatableQuestDatabase { - templates: IRepeatableTemplates; + templates: ITemplates; rewards: IRewardOptions; data: IOptions; samples: ISampleQuests[]; } -export interface IRepeatableTemplates { - Elimination: IQuest; - Completion: IQuest; - Exploration: IQuest; +export interface ITemplates { + Elimination: IRepeatableQuest; + Completion: IRepeatableQuest; + Exploration: IRepeatableQuest; } export interface IPmcDataRepeatableQuest { id?: string; @@ -21,8 +23,9 @@ export interface IPmcDataRepeatableQuest { activeQuests: IRepeatableQuest[]; inactiveQuests: IRepeatableQuest[]; endTime: number; - changeRequirement: Record; + changeRequirement: TChangeRequirementRecord; } +export type TChangeRequirementRecord = Record; export interface IChangeRequirement { changeCost: IChangeCost[]; changeStandingCost: number; @@ -31,6 +34,183 @@ export interface IChangeCost { templateId: string; count: number; } +export interface IRepeatableQuest { + _id: string; + traderId: string; + location: string; + image: string; + type: string; + isKey: boolean; + restartable: boolean; + instantComplete: boolean; + secretQuest: boolean; + canShowNotificationsInGame: boolean; + rewards: IRewards; + conditions: IConditions; + side: string; + questStatus: any; + name: string; + note: string; + description: string; + successMessageText: string; + failMessageText: string; + startedMessageText: string; + changeQuestMessageText: string; + acceptPlayerMessage: string; + declinePlayerMessage: string; + completePlayerMessage: string; + templateId: string; + changeCost: IChangeCost[]; + changeStandingCost: number; + sptRepatableGroupName?: string; +} +export interface IRewards { + Started: IReward[]; + Success: IReward[]; + Fail: IReward[]; +} +export interface IConditions { + AvailableForStart: any[]; + AvailableForFinish: IAvailableFor[]; + Fail: any[]; +} +export interface IAvailableFor { + _props: IAvailableForProps; + _parent: string; + dynamicLocale: boolean; +} +export interface IAvailableForProps { + id: string; + parentId: string; + dynamicLocale: boolean; + index: number; + visibilityConditions: IVisibilityCondition[]; + value: number; +} +export interface IVisibilityCondition { + id: string; + oneSessionOnly: boolean; + value: number; + index: number; + dynamicLocale: boolean; +} +export interface IAvailableForPropsCounter extends IAvailableForProps { + type: string; + oneSessionOnly: boolean; + doNotResetIfCounterCompleted: boolean; + counter?: ICounter; +} +export interface ICounter { + id: string; + conditions: ICondition[]; +} +export interface ICondition { + _props: IConditionProps; + _parent: string; +} +export interface IConditionProps { + id: string; + dynamicLocale: boolean; +} +export interface IElimination extends IRepeatableQuest { + conditions: IEliminationConditions; +} +export interface IEliminationConditions extends IConditions { + AvailableForFinish: IEliminationAvailableFor[]; +} +export interface IEliminationAvailableFor extends IAvailableFor { + _props: IEliminationAvailableForProps; +} +export interface IEliminationAvailableForProps extends IAvailableForPropsCounter { + counter: IEliminationCounter; +} +export interface IEliminationCounter extends ICounter { + conditions: IEliminationCondition[]; +} +export interface IEliminationCondition extends ICondition { + _props: ILocationConditionProps | IKillConditionProps; +} +export interface IExploration extends IRepeatableQuest { + conditions: IExplorationConditions; +} +export interface IExplorationConditions extends IConditions { + AvailableForFinish: IExplorationAvailableFor[]; +} +export interface IExplorationAvailableFor extends IAvailableFor { + _props: IExplorationAvailableForProps; +} +export interface IExplorationAvailableForProps extends IAvailableForPropsCounter { + counter: IExplorationCounter; +} +export interface IExplorationCounter extends ICounter { + conditions: IExplorationCondition[]; +} +export interface IExplorationCondition extends ICondition { + _props: ILocationConditionProps | IExitStatusConditionProps | IExitNameConditionProps; +} +export interface IPickup extends IRepeatableQuest { + conditions: IPickupConditions; +} +export interface IPickupConditions extends IConditions { + AvailableForFinish: IPickupAvailableFor[]; +} +export interface IPickupAvailableFor extends IAvailableFor { + _props: IPickupAvailableForProps; +} +export interface IPickupAvailableForProps extends IAvailableForPropsCounter { + target: string[]; + counter?: IPickupCounter; +} +export interface IPickupCounter extends ICounter { + conditions: IPickupCondition[]; +} +export interface IPickupCondition extends ICondition { + _props: IEquipmentConditionProps | ILocationConditionProps | IExitStatusConditionProps; +} +export interface ICompletion extends IRepeatableQuest { + conditions: ICompletionConditions; +} +export interface ICompletionConditions extends IConditions { + AvailableForFinish: ICompletionAvailableFor[]; +} +export interface ICompletionAvailableFor extends IAvailableFor { + _props: ICompletionAvailableForProps; +} +export interface ICompletionAvailableForProps extends IAvailableForProps { + target: string[]; + minDurability: number; + maxDurability: number; + dogtagLevel: number; + onlyFoundInRaid: boolean; +} +export interface ILocationConditionProps extends IConditionProps { + target: string[]; + weapon?: string[]; + weaponCategories?: string[]; +} +export interface IEquipmentConditionProps extends IConditionProps { + equipmentInclusive: [string[]]; + IncludeNotEquippedItems: boolean; +} +export interface IKillConditionProps extends IConditionProps { + target: string; + value: number; + savageRole?: string[]; + bodyPart?: string[]; + distance?: IDistanceCheck; + weapon?: string[]; + weaponCategories?: string[]; +} +export interface IDistanceCheck { + compareMethod: string; + value: number; +} +export interface IExitStatusConditionProps extends IConditionProps { + status: string[]; +} +export interface IExitNameConditionProps extends IConditionProps { + exitName: string; +} export interface IRewardOptions { itemsBlacklist: string[]; } @@ -60,8 +240,8 @@ export interface ISampleQuests { instantComplete: boolean; secretQuest: boolean; canShowNotificationsInGame: boolean; - rewards: IQuestRewards; - conditions: IQuestConditionTypes; + rewards: IRewards; + conditions: IConditions; name: string; note: string; description: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITemplateItem.d.ts index 32bc9fc..c17c7a0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,4 +1,4 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -63,7 +63,6 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; - RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -83,7 +82,6 @@ export interface Props { EffectiveDistance?: number; Ergonomics?: number; Velocity?: number; - WithAnimatorAiming?: boolean; RaidModdable?: boolean; ToolModdable?: boolean; UniqueAnimationModID?: number; @@ -157,8 +155,6 @@ export interface Props { BlocksArmorVest?: boolean; speedPenaltyPercent?: number; GridLayoutName?: string; - ContainerSpawnChanceModifier?: number; - SpawnExcludedFilter?: string[]; SpawnFilter?: any[]; containType?: any[]; sizeWidth?: number; @@ -174,9 +170,6 @@ export interface Props { MaxDurability?: number; armorZone?: string[]; armorClass?: string | number; - armorColliders?: string[]; - armorPlateColliders?: string[]; - bluntDamageReduceFromSoftArmor?: boolean; mousePenalty?: number; weaponErgonomicPenalty?: number; BluntThroughput?: number; @@ -186,17 +179,14 @@ export interface Props { weapUseType?: string; ammoCaliber?: string; OperatingResource?: number; - PostRecoilHorizontalRangeHandRotation?: Ixyz; - PostRecoilVerticalRangeHandRotation?: Ixyz; - ProgressRecoilAngleOnStable?: Ixyz; RepairComplexity?: number; durabSpawnMin?: number; durabSpawnMax?: number; isFastReload?: boolean; RecoilForceUp?: number; RecoilForceBack?: number; + Convergence?: number; RecoilAngle?: number; - RecoilCamera?: number; weapFireType?: string[]; RecolDispersion?: number; SingleFireRate?: number; @@ -204,7 +194,6 @@ export interface Props { bFirerate?: number; bEffDist?: number; bHearDist?: number; - blockLeftStance?: boolean; isChamberLoad?: boolean; chamberAmmoCount?: number; isBoltCatch?: boolean; @@ -213,9 +202,8 @@ export interface Props { AdjustCollimatorsToTrajectory?: boolean; shotgunDispersion?: number; Chambers?: Slot[]; + CameraRecoil?: number; CameraSnap?: number; - CameraToWeaponAngleSpeedRange?: Ixyz; - CameraToWeaponAngleStep?: number; ReloadMode?: string; AimPlane?: number; TacticalReloadStiffnes?: Ixyz; @@ -223,7 +211,6 @@ export interface Props { RecoilCenter?: Ixyz; RotationCenter?: Ixyz; RotationCenterNoStock?: Ixyz; - ShotsGroupSettings?: IShotsGroupSettings[]; FoldedSlot?: string; CompactHandling?: boolean; MinRepairDegradation?: number; @@ -255,11 +242,6 @@ export interface Props { AllowOverheat?: boolean; DoubleActionAccuracyPenalty?: number; RecoilPosZMult?: number; - RecoilReturnPathDampingHandRotation?: number; - RecoilReturnPathOffsetHandRotation?: number; - RecoilReturnSpeedHandRotation?: number; - RecoilStableAngleIncreaseStep?: number; - RecoilStableIndexShot?: number; MinRepairKitDegradation?: number; MaxRepairKitDegradation?: number; BlocksEarpiece?: boolean; @@ -353,8 +335,7 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChanceObstacle?: number; - PenetrationDamageMod?: number; + PenetrationChance?: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; @@ -405,15 +386,6 @@ export interface Props { LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; RandomLootSettings?: IRandomLootSettings; - RecoilCategoryMultiplierHandRotation?: number; - RecoilDampingHandRotation?: number; - LeanWeaponAgainstBody?: boolean; - RemoveShellAfterFire?: boolean; - RepairStrategyTypes?: string[]; - IsEncoded?: boolean; - LayoutName?: string; - Lower75Prefab?: Prefab; - MaxUsages?: number; } export interface IHealthEffect { type: string; @@ -458,10 +430,6 @@ export interface SlotProps { } export interface SlotFilter { Shift?: number; - locked?: boolean; - Plate?: string; - armorColliders?: string[]; - armorPlateColliders?: string[]; Filter: string[]; AnimationIndex?: number; } @@ -522,10 +490,3 @@ export interface IColor { b: number; a: number; } -export interface IShotsGroupSettings { - EndShotIndex: number; - ShotRecoilPositionStrength: Ixyz; - ShotRecoilRadianRange: Ixyz; - ShotRecoilRotationStrength: Ixyz; - StartShotIndex: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITrader.d.ts index 14ab409..83353de 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITrader.d.ts @@ -1,12 +1,10 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface ITrader { - assort?: ITraderAssort; + assort: ITraderAssort; base: ITraderBase; dialogue?: Record; - questassort?: Record>; + questassort: Record>; suits?: ISuit[]; - services?: ITraderServiceModel[]; } export interface ITraderBase { refreshTraderRagfairOffers: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 0913eb5..87461aa 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -2,8 +2,6 @@ export interface IAcceptFriendRequestData extends IBaseFriendRequest { } export interface ICancelFriendRequestData extends IBaseFriendRequest { } -export interface IDeclineFriendRequestData extends IBaseFriendRequest { -} export interface IBaseFriendRequest { - profileId: string; + request_id: string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts deleted file mode 100644 index d1170d1..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IAddUserGroupMailRequest { - dialogId: string; - uid: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts deleted file mode 100644 index 63b413f..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IChangeGroupMailOwnerRequest { - dialogId: string; - uid: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/ICreateGroupMailRequest.d.ts deleted file mode 100644 index 176d7f3..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/ICreateGroupMailRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ICreateGroupMailRequest { - Name: string; - Users: string[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IFriendRequestSendResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IFriendRequestSendResponse.d.ts index fc311eb..06c40f3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IFriendRequestSendResponse.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IFriendRequestSendResponse.d.ts @@ -1,5 +1,5 @@ export interface IFriendRequestSendResponse { status: number; - requestId: string; + requestid: string; retryAfter: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..2ddcf83 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,4 +1,4 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IGetAllAttachmentsResponse { messages: Message[]; profiles: any[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index a11dbb3..271be79 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,4 +1,4 @@ -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IGetFriendListDataResponse { Friends: IUserDialogInfo[]; Ignore: string[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts index 1d271e4..3a2e349 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts @@ -1,4 +1,4 @@ -import { MessageType } from "@spt/models/enums/MessageType"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; export interface IGetMailDialogViewRequestData { type: MessageType; dialogId: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..091c128 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,4 +1,4 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo, Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IGetMailDialogViewResponseData { messages: Message[]; profiles: IUserDialogInfo[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts deleted file mode 100644 index c7582f8..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IRemoveUserGroupMailRequest { - dialogId: string; - uid: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/ISendMessageRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/ISendMessageRequest.d.ts index d94c682..5a755c0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/ISendMessageRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/ISendMessageRequest.d.ts @@ -1,4 +1,4 @@ -import { MessageType } from "@spt/models/enums/MessageType"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; export interface ISendMessageRequest { dialogId: string; type: MessageType; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ICurrentGroupResponse.d.ts index eb01946..85c005b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ICurrentGroupResponse.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -1,4 +1,4 @@ -import { MemberCategory } from "@spt/models/enums/MemberCategory"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; export interface ICurrentGroupResponse { squad: ICurrentGroupSquadMember[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IGameModeRequestData.d.ts deleted file mode 100644 index 618c42d..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IGameModeRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGameModeRequestData { - sessionMode: string | null; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IGameModeResponse.d.ts deleted file mode 100644 index eaac690..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IGameModeResponse.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum ESessionMode { - REGULAR = "regular", - PVE = "pve" -} -export interface IGameModeResponse { - gameMode: ESessionMode; - backendUrl: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IReportNicknameRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IReportNicknameRequestData.d.ts new file mode 100644 index 0000000..087c58b --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IReportNicknameRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IReportNicknameRequestData { + uid: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISendReportRequest.d.ts deleted file mode 100644 index b73d95c..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISendReportRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendReportRequest { - type: string; - uid: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IOffraidEatRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IOffraidEatRequestData.d.ts index c969b08..0629f8b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IOffraidEatRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IOffraidEatRequestData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface IOffraidEatRequestData extends IBaseInteractionRequestData { Action: "Eat"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IOffraidHealRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IOffraidHealRequestData.d.ts index c2fe7ba..47b7929 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IOffraidHealRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IOffraidHealRequestData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface IOffraidHealRequestData extends IBaseInteractionRequestData { Action: "Heal"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutArea.d.ts index ca0eb07..bb00498 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutArea.d.ts @@ -1,5 +1,3 @@ -import { BonusSkillType } from "@spt/models/enums/BonusSkillType"; -import { BonusType } from "@spt/models/enums/BonusType"; export interface IHideoutArea { _id: string; type: number; @@ -68,8 +66,8 @@ export interface StageBonus { passive: boolean; production: boolean; visible: boolean; - skillType?: BonusSkillType; - type: BonusType; + skillType?: string; + type: string; filter?: string[]; icon?: string; /** CHANGES PER DUMP */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts index 7373a4f..8bed3cc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts @@ -3,7 +3,6 @@ export interface IHideoutProduction { areaType: number; requirements: Requirement[]; productionTime: number; - /** Tpl of item being crafted */ endProduct: string; isEncoded: boolean; locked: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..5c8b983 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -1,4 +1,4 @@ -import { MinMax } from "@spt/models/common/MinMax"; +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutSingleProductionStartRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutSingleProductionStartRequestData.d.ts index dfb92e2..1ed542a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutSingleProductionStartRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutSingleProductionStartRequestData.d.ts @@ -2,7 +2,6 @@ export interface IHideoutSingleProductionStartRequestData { Action: "HideoutSingleProductionStart"; recipeId: string; items: Item[]; - tools: Item[]; timestamp: number; } export interface Item { diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IQteData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IQteData.d.ts index 7f507e1..f842b84 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IQteData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IQteData.d.ts @@ -1,108 +1,38 @@ -import { Effect } from "@spt/models/eft/health/Effect"; -import { BodyPart } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { QteActivityType } from "@spt/models/enums/hideout/QteActivityType"; -import { QteEffectType } from "@spt/models/enums/hideout/QteEffectType"; -import { QteResultType } from "@spt/models/enums/hideout/QteResultType"; -import { QteRewardType } from "@spt/models/enums/hideout/QteRewardType"; -import { QteType } from "@spt/models/enums/hideout/QteType"; -import { RequirementType } from "@spt/models/enums/hideout/RequirementType"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { Traders } from "@spt/models/enums/Traders"; export interface IQteData { - id: string; - type: QteActivityType; - area: HideoutAreas; - areaLevel: number; - quickTimeEvents: IQuickTimeEvent[]; - requirements: (IAreaRequirement | IItemRequirement | ITraderUnlockRequirement | ITraderLoyaltyRequirement | ISkillRequirement | IResourceRequirement | IToolRequirement | IQuestRequirement | IHealthRequirement | IBodyPartBuffRequirement)[]; - results: Record; + Id: string; + Type: string; + Area: string; + AreaLevel: number; + QuickTimeEvents: IQuickTimeEvent[]; + Requirements: IQteRequirement[]; + Results: Record; } export interface IQuickTimeEvent { - type: QteType; - position: { - x: number; - y: number; - }; - startDelay: number; - endDelay: number; - speed: number; - successRange: { - x: number; - y: number; - }; - key: string; + Type: string; + Position: number; + StartDelay: number; + EndDelay: number; + Speed: number; + SuccessRange: string; + Key: string; } export interface IQteRequirement { - type: RequirementType; + type: string; } export interface IQteResult { - energy: number; - hydration: number; - rewardsRange: IQteEffect[]; + Energy: number; + Hydration: number; + RewardsRange: IQteEffect[]; } export interface IQteEffect { - type: QteRewardType; - skillId: number; + Type: string; + SkillId: string; levelMultipliers: ISkillLevelMultiplier[]; - time: number; - weight: number; - result: QteResultType; + Time: number; + Weight: number; + Result: string; } export interface ISkillLevelMultiplier { level: number; multiplier: number; } -export interface IAreaRequirement extends IQteRequirement { - type: RequirementType.AREA; - areaType: HideoutAreas; - requiredLevel: number; -} -export interface ITraderUnlockRequirement extends IQteRequirement { - type: RequirementType.TRADER_UNLOCK; - traderId: Traders; -} -export interface ITraderLoyaltyRequirement extends IQteRequirement { - type: RequirementType.TRADER_LOYALTY; - traderId: Traders; - loyaltyLevel: number; -} -export interface ISkillRequirement extends IQteRequirement { - type: RequirementType.SKILL; - skillName: SkillTypes; - skillLevel: number; -} -export interface IResourceRequirement extends IQteRequirement { - type: RequirementType.RESOURCE; - templateId: string; - resource: number; -} -export interface IItemRequirement extends IQteRequirement { - type: RequirementType.ITEM; - templateId: string; - count: number; - isFunctional: boolean; - isEncoded: boolean; -} -export interface IToolRequirement extends IQteRequirement { - type: RequirementType.TOOL; - templateId: string; - count: number; - isFunctional: boolean; - isEncoded: boolean; -} -export interface IQuestRequirement extends IQteRequirement { - type: RequirementType.QUEST_COMPLETE; - questId: string; -} -export interface IHealthRequirement extends IQteRequirement { - type: RequirementType.HEALTH; - energy: number; - hydration: number; -} -export interface IBodyPartBuffRequirement extends IQteRequirement { - type: RequirementType.BODY_PART_BUFF; - effectName: Effect; - bodyPart: BodyPart; - excluded: boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts deleted file mode 100644 index 451a6f2..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Item } from "../common/tables/IItem"; -export interface IItemDeliveryRequestData { - items: Item[]; - traderId: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index b654088..c658257 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,7 @@ -import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IInsuredItemsData } from "@spt/models/eft/inRaid/IInsuredItemsData"; -import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState"; +import { IPostRaidPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { IInsuredItemsData } from "@spt-aki/models/eft/inRaid/IInsuredItemsData"; +import { PlayerRaidEndState } from "@spt-aki/models/enums/PlayerRaidEndState"; export interface ISaveProgressRequestData { exit: PlayerRaidEndState; profile: IPostRaidPmcData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/insurance/IInsureRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/insurance/IInsureRequestData.d.ts index e3b018e..f739ced 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/insurance/IInsureRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/insurance/IInsureRequestData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface IInsureRequestData extends IBaseInteractionRequestData { Action: "Insure"; tid: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemDirectRequest.d.ts deleted file mode 100644 index 6459a79..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Item } from "../common/tables/IItem"; -export interface IAddItemDirectRequest { - /** Item and child mods to add to player inventory */ - itemWithModsToAdd: Item[]; - foundInRaid: boolean; - callback: (buyCount: number) => void; - useSortingTable: boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemRequestData.d.ts index 3fa86dc..24f3e31 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -5,6 +5,6 @@ export interface IAddItemRequestData { } export interface AddItem { count: number; - sptIsPreset?: boolean; + isPreset?: boolean; item_id: string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemTempObject.d.ts index 7b3a6ea..c818be6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -1,4 +1,4 @@ -import { Item, Location } from "@spt/models/eft/common/tables/IItem"; +import { Item, Location } from "@spt-aki/models/eft/common/tables/IItem"; export interface IAddItemTempObject { itemRef: Item; count: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemsDirectRequest.d.ts deleted file mode 100644 index c19ba2f..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Item } from "../common/tables/IItem"; -export interface IAddItemsDirectRequest { - /** Item and child mods to add to player inventory */ - itemsWithModsToAdd: Item[][]; - foundInRaid: boolean; - /** Runs after EACH item with children is added */ - callback: (buyCount: number) => void; - /** Should sorting table be used when no space found in stash */ - useSortingTable: boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..2b90edb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { Container, IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index cc7269c..7e67a56 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } export interface To { diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBindRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBindRequestData.d.ts index 5af9fea..efa1a43 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBindRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBindRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryBindRequestData extends IInventoryBaseActionRequestData { Action: "Bind"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..805b385 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts index e946f9f..e85f094 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryDeleteMarkerRequestData extends IInventoryBaseActionRequestData { Action: "DeleteMapMarker"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..d8080f5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionRequestData { Action: "EditMapMarker"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryExamineRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryExamineRequestData.d.ts index 58275ba..07b0c03 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryExamineRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryExamineRequestData.d.ts @@ -1,5 +1,5 @@ -import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { OwnerInfo } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryExamineRequestData extends IInventoryBaseActionRequestData { Action: "Examine"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryFoldRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryFoldRequestData.d.ts index 7937743..7623a90 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryFoldRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryFoldRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryFoldRequestData extends IInventoryBaseActionRequestData { Action: "Fold"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMergeRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMergeRequestData.d.ts index ad924ba..af4e722 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMergeRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMergeRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMergeRequestData extends IInventoryBaseActionRequestData { Action: "Merge"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..9038510 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, To } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts index ce61370..6432159 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryReadEncyclopediaRequestData extends IInventoryBaseActionRequestData { Action: "ReadEncyclopedia"; ids: string[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts index b9fa232..eda96e6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryRemoveRequestData extends IInventoryBaseActionRequestData { Action: "Remove"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySortRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySortRequestData.d.ts index d784c77..b34bb25 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySortRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySortRequestData.d.ts @@ -1,5 +1,5 @@ -import { Upd } from "@spt/models/eft/common/tables/IItem"; -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySortRequestData extends IInventoryBaseActionRequestData { Action: "ApplyInventoryChanges"; changedItems: ChangedItem[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..4d29084 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { Container, IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..b32a1f7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,5 +1,5 @@ -import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { OwnerInfo } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; +import { IInventoryBaseActionRequestData, To } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryTagRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryTagRequestData.d.ts index 5c9f651..5d88eaf 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryTagRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryTagRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryTagRequestData extends IInventoryBaseActionRequestData { Action: "Tag"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryToggleRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryToggleRequestData.d.ts index 0d8b1e4..138d987 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryToggleRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryToggleRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryToggleRequestData extends IInventoryBaseActionRequestData { Action: "Toggle"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryTransferRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryTransferRequestData.d.ts index fe0327d..e98cae6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryTransferRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryTransferRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryTransferRequestData extends IInventoryBaseActionRequestData { Action: "Transfer"; item: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index d3a4bd7..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..49a6792 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -1,7 +1,7 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActionRequestData { Action: "OpenRandomLootContainer"; - /** Container item id being opened */ + /** Container item opened */ item: string; to: To[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/ISetFavoriteItems.d.ts deleted file mode 100644 index aacbb39..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; -export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { - Action: "SetFavoriteItems"; - items: any[]; - timestamp: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts index f9165dc..f81bd59 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts @@ -1,4 +1,4 @@ -import { IItemEventRouterBase } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { IItemEventRouterBase } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; export interface IEmptyItemEventRouterResponse extends IItemEventRouterBase { profileChanges: ""; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 0c48014..a1babfd 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,9 +1,9 @@ -import { Health, IQuestStatus, Productive, Skills } 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"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { EquipmentBuildType } from "@spt/models/enums/EquipmentBuildType"; +import { Health, IQuestStatus, Productive, Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType"; export interface IItemEventRouterBase { warnings: Warning[]; profileChanges: TProfileChanges | ""; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts index d4913be..c5459ff 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts @@ -1,4 +1,3 @@ -import { IItemEventRouterBase } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; -/** An object sent back to the game client that contains alterations the client must make to ensure server/client are in sync */ +import { IItemEventRouterBase } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; export interface IItemEventRouterResponse extends IItemEventRouterBase { } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IChangeRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IChangeRequestData.d.ts index b0431d7..b1b3e94 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IChangeRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IChangeRequestData.d.ts @@ -1,4 +1,4 @@ -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; export interface IChangeRequestData extends ILoginRequestData { change: string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IMiniProfile.d.ts index b25a1e7..c12661a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IMiniProfile.d.ts @@ -7,8 +7,8 @@ export interface IMiniProfile { prevexp: number; nextlvl: number; maxlvl: number; - sptData: SPTData; + akiData: AkiData; } -export interface SPTData { +export interface AkiData { version: string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IRegisterData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IRegisterData.d.ts index 4a3c15e..b69d9ed 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IRegisterData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IRegisterData.d.ts @@ -1,4 +1,4 @@ -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; export interface IRegisterData extends ILoginRequestData { edition: string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IRemoveProfileData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IRemoveProfileData.d.ts index 59848ed..2ad9694 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IRemoveProfileData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IRemoveProfileData.d.ts @@ -1,2 +1,2 @@ -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; export type IRemoveProfileData = ILoginRequestData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..219ee7e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,4 +1,4 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { LootItem } from "@spt-aki/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; loot: LootItem[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IAcceptGroupInviteRequest.d.ts new file mode 100644 index 0000000..1a4b8f7 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IAcceptGroupInviteRequest.d.ts @@ -0,0 +1,3 @@ +export interface IAcceptGroupInviteRequest { + requestId: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IAcceptGroupInviteResponse.d.ts new file mode 100644 index 0000000..eea1ce6 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IAcceptGroupInviteResponse.d.ts @@ -0,0 +1,16 @@ +export interface IAcceptGroupInviteResponse { + _id: string; + aid: number; + Info: PlayerInviteInfo; + isLeader: boolean; + isReady: boolean; +} +export interface PlayerInviteInfo { + Nickname: string; + Side: string; + Level: number; + MemberCategory: number; + GameVersion: string; + SavageLockTime: number; + SavageNickname: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ICancelGroupInviteRequest.d.ts new file mode 100644 index 0000000..71d79c7 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ICancelGroupInviteRequest.d.ts @@ -0,0 +1,3 @@ +export interface ICancelGroupInviteRequest { + requestId: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ICreateGroupRequestData.d.ts new file mode 100644 index 0000000..322a095 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ICreateGroupRequestData.d.ts @@ -0,0 +1,6 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface ICreateGroupRequestData { + location: string; + raidMode: RaidMode; + startInGroup: boolean; +} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetGroupStatusRequestData.d.ts similarity index 54% rename from TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts rename to TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetGroupStatusRequestData.d.ts index ffac106..28b9500 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetGroupStatusRequestData.d.ts @@ -1,5 +1,5 @@ -import { RaidMode } from "@spt/models/enums/RaidMode"; -export interface IMatchGroupStatusRequest { +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IGetGroupStatusRequestData { location: string; savage: boolean; dt: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetGroupStatusResponse.d.ts new file mode 100644 index 0000000..8209ef5 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetGroupStatusResponse.d.ts @@ -0,0 +1,19 @@ +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGetGroupStatusResponse { + players: IPlayer[]; + maxPveCountExceeded: boolean; +} +export interface IPlayer { + aid: string; + _id: string; + lookingGroup: boolean; + IsLeader: boolean; + IsReady: boolean; + Info: ICurrentGroupMemberInfo; +} +export interface ICurrentGroupMemberInfo { + Nickname: string; + Side: string; + Level: string; + MemberCategory: MemberCategory; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetProfileRequestData.d.ts new file mode 100644 index 0000000..86b5bbd --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetProfileRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileRequestData { + profileId: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index 959986c..ed3dfab 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,6 +1,32 @@ -import { IRaidSettings } from "@spt/models/eft/match/IRaidSettings"; -export interface IGetRaidConfigurationRequestData extends IRaidSettings { +export interface IGetRaidConfigurationRequestData { keyId: string; - CanShowGroupPreview: boolean; - MaxGroupCount: number; + side: string; + location: string; + timeVariant: string; + raidMode: string; + metabolismDisabled: boolean; + playersSpawnPlace: string; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: string; + rainType: string; + windType: string; + fogType: string; + timeFlowType: string; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: string; +} +export interface WavesSettings { + botAmount: string; + botDifficulty: string; + isBosses: boolean; + isTaggedAndCursed: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGroupCharacter.d.ts deleted file mode 100644 index 013930a..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IGroupCharacter.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -export interface IGroupCharacter { - _id: string; - aid: number; - Info: { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; - GameVersion?: string; - SavageLockTime?: number; - SavageNickname?: string; - hasCoopExtension?: boolean; - }; - PlayerVisualRepresentation?: { - Info: { - Side: string; - Level: number; - Nickname: string; - MemberCategory: MemberCategory; - GameVersion: string; - }; - Customization: { - Head: string; - Body: string; - Feet: string; - Hands: string; - }; - Equipment: { - Id: string; - Items: Item[]; - }; - }; - isLeader: boolean; - isReady?: boolean; - region?: string; - lookingGroup?: boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IJoinMatchRequestData.d.ts new file mode 100644 index 0000000..b9b7568 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IJoinMatchRequestData.d.ts @@ -0,0 +1,9 @@ +export interface IJoinMatchRequestData { + groupid: string; + servers: Server[]; +} +export interface Server { + ping: number; + ip: string; + port: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IJoinMatchResult.d.ts new file mode 100644 index 0000000..e0e867f --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IJoinMatchResult.d.ts @@ -0,0 +1,18 @@ +export interface IJoinMatchResult { + maxPveCountExceeded: boolean; + profiles: IJoinMatchPlayerProfile[]; +} +export interface IJoinMatchPlayerProfile { + profileid: string; + profileToken: string; + status: string; + sid: string; + ip: string; + port: number; + version: string; + location: string; + raidMode: string; + mode: string; + shortid: string; + additional_info: any[]; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupCurrentResponse.d.ts deleted file mode 100644 index 23bcba4..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupCurrentResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -export interface IMatchGroupCurrentResponse { - squad: IGroupCharacter[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts deleted file mode 100644 index e03cb90..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IMatchGroupInviteSendRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts deleted file mode 100644 index 623eadb..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IMatchGroupPlayerRemoveRequest { - aidToKick: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupStartGameRequest.d.ts deleted file mode 100644 index 663ef1e..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupStartGameRequest.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IServer } from "@spt/models/eft/match/IServer"; -export interface IMatchGroupStartGameRequest { - groupId: string; - servers: IServer[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupStatusRequest.d.ts deleted file mode 100644 index ffac106..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupStatusRequest.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt/models/enums/RaidMode"; -export interface IMatchGroupStatusRequest { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupStatusResponse.d.ts deleted file mode 100644 index 7702ac7..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupStatusResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -export interface IMatchGroupStatusResponse { - players: IGroupCharacter[]; - maxPveCountExceeded: boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupTransferRequest.d.ts deleted file mode 100644 index 4476387..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IMatchGroupTransferRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IMatchGroupTransferRequest { - aidToChange: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IProfileStatusRequest.d.ts deleted file mode 100644 index 0667a99..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IProfileStatusRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IProfileStatusRequest { - groupId: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IProfileStatusResponse.d.ts deleted file mode 100644 index 8fa6186..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IProfileStatusResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ISessionStatus } from "@spt/models/eft/match/ISessionStatus"; -export interface IProfileStatusResponse { - maxPveCountExceeded: boolean; - profiles: ISessionStatus[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRaidSettings.d.ts deleted file mode 100644 index 78a0c19..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRaidSettings.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { DateTime } from "@spt/models/enums/DateTime"; -import { PlayersSpawnPlace } from "@spt/models/enums/PlayersSpawnPlace"; -import { RaidMode } from "@spt/models/enums/RaidMode"; -import { BotAmount } from "@spt/models/enums/RaidSettings/BotAmount"; -import { BotDifficulty } from "@spt/models/enums/RaidSettings/BotDifficulty"; -import { CloudinessType } from "@spt/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; -import { FogType } from "@spt/models/enums/RaidSettings/TimeAndWeather/FogType"; -import { RainType } from "@spt/models/enums/RaidSettings/TimeAndWeather/RainType"; -import { TimeFlowType } from "@spt/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; -import { WindSpeed } from "@spt/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; -import { SideType } from "@spt/models/enums/SideType"; -export interface IRaidSettings { - location: string; - timeVariant: DateTime; - raidMode: RaidMode; - metabolismDisabled: boolean; - playersSpawnPlace: PlayersSpawnPlace; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; - side: SideType; -} -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: CloudinessType; - rainType: RainType; - fogType: FogType; - windType: WindSpeed; - timeFlowType: TimeFlowType; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: BotAmount; -} -export interface WavesSettings { - botAmount: BotAmount; - botDifficulty: BotDifficulty; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts new file mode 100644 index 0000000..4877c54 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRemovePlayerFromGroupRequest { + aidToKick: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRequestIdRequest.d.ts deleted file mode 100644 index 755ca1b..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRequestIdRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRequestIdRequest { - requestId: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ISendGroupInviteRequest.d.ts new file mode 100644 index 0000000..66d3d0e --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ISendGroupInviteRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendGroupInviteRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IServer.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IServer.d.ts deleted file mode 100644 index d7c30d8..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IServer.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IServer { - ping: number; - ip: string; - port: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ISessionStatus.d.ts deleted file mode 100644 index c745cbf..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ISessionStatus.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface ISessionStatus { - profileid: string; - profileToken: string; - status: string; - ip: string; - port: number; - sid: string; - version?: string; - location?: string; - raidMode?: string; - mode?: string; - shortId?: string; - additional_info?: any[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ITransferGroupRequest.d.ts new file mode 100644 index 0000000..e17c2a8 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/ITransferGroupRequest.d.ts @@ -0,0 +1,3 @@ +export interface ITransferGroupRequest { + aidToChange: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/notes/INoteActionData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/notes/INoteActionData.d.ts index 344c40d..97575be 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/notes/INoteActionData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/notes/INoteActionData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface INoteActionData extends IBaseInteractionRequestData { Action: string; index: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/notifier/INotifier.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/notifier/INotifier.d.ts index 4ead272..74343d8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/notifier/INotifier.d.ts @@ -1,3 +1,4 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -5,3 +6,19 @@ export interface INotifierChannel { notifierServer: string; ws: string; } +export interface INotification { + type: NotificationType; + eventId: string; + dialogId?: string; + message?: Message; +} +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + /** ChatMessageReceived */ + NEW_MESSAGE = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader" +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/notifier/ISelectProfileRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/notifier/ISelectProfileRequestData.d.ts new file mode 100644 index 0000000..2bc3d1e --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/notifier/ISelectProfileRequestData.d.ts @@ -0,0 +1,3 @@ +export interface ISelectProfileRequestData { + uid: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts index f1123c1..cbda924 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts @@ -1,4 +1,4 @@ -import { Skills } from "@spt/models/eft/common/tables/IBotBase"; +import { Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; export interface IPlayerIncrementSkillLevelRequestData { _id: string; experience: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 3cb8533..d54116a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,9 +1,8 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; - Id: string; - /** name of preset given by player */ - Name: string; - Root: string; - Items: Item[]; + id: string; + name: string; + root: string; + items: Item[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/presetBuild/IRemoveBuildRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/presetBuild/IRemoveBuildRequestData.d.ts index bcbdbce..0d61c4b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/presetBuild/IRemoveBuildRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/presetBuild/IRemoveBuildRequestData.d.ts @@ -1,3 +1,4 @@ export interface IRemoveBuildRequestData { + Action: "RemoveBuild"; id: string; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IAkiProfile.d.ts similarity index 69% rename from TypeScript/22CustomSptCommand/types/models/eft/profile/ISptProfile.d.ts rename to TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IAkiProfile.d.ts index f6e6379..78302ee 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IAkiProfile.d.ts @@ -1,33 +1,29 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { EquipmentBuildType } from "@spt/models/enums/EquipmentBuildType"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; -export interface ISptProfile { +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { IProfileChangeEvent } from "@spt-aki/models/spt/dialog/ISendMessageDetails"; +export interface IAkiProfile { info: Info; characters: Characters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; dialogues: Record; - spt: Spt; + aki: Aki; vitality: Vitality; inraid: Inraid; insurance: Insurance[]; /** Assort purchases made by player since last trader refresh */ traderPurchases?: Record>; - /** Achievements earned by player */ - achievements: Record; } export declare class TraderPurchaseData { count: number; purchaseTimestamp: number; } export interface Info { - /** main profile id */ id: string; - scavId: string; aid: number; username: string; password: string; @@ -38,55 +34,38 @@ export interface Characters { pmc: IPmcData; scav: IPmcData; } -/** used by profile.userbuilds */ export interface IUserBuilds { weaponBuilds: IWeaponBuild[]; equipmentBuilds: IEquipmentBuild[]; - magazineBuilds: IMagazineBuild[]; } -export interface IUserBuild { - Id: string; - Name: string; -} -export interface IWeaponBuild extends IUserBuild { - Root: string; - Items: Item[]; -} -export interface IEquipmentBuild extends IUserBuild { - Root: string; - Items: Item[]; - BuildType: EquipmentBuildType; -} -export interface IMagazineBuild extends IUserBuild { - Caliber: string; - TopCount: number; - BottomCount: number; - Items: IMagazineTemplateAmmoItem[]; -} -export interface IMagazineTemplateAmmoItem { - TemplateId: string; - Count: number; -} -/** Used by defaultEquipmentPresets.json */ -export interface IDefaultEquipmentPreset extends IUserBuild { - Items: Item[]; - Root: string; - BuildType: EquipmentBuildType; +export interface IWeaponBuild { + id: string; + name: string; + root: string; + items: Item[]; type: string; } +export interface IEquipmentBuild { + id: string; + name: string; + root: string; + items: Item[]; + type: string; + fastPanel: Record; + buildType: EquipmentBuildType; +} export interface Dialogue { attachmentsNew: number; - new: number; type: MessageType; + new: number; + _id: string; Users?: IUserDialogInfo[]; pinned: boolean; messages: Message[]; - _id: string; } export interface IUserDialogInfo { _id: string; - aid: number; - Info: IUserDialogDetails; + info: IUserDialogDetails; } export interface IUserDialogDetails { Nickname: string; @@ -112,7 +91,6 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; - replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -120,13 +98,6 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } -export interface IReplyTo { - _id: string; - uid: string; - type: MessageType; - dt: number; - text?: string; -} export interface MessagePreview { uid: string; type: MessageType; @@ -159,7 +130,7 @@ export interface DateTime { date: string; time: string; } -export interface Spt { +export interface Aki { version: string; mods?: ModDetails[]; receivedGifts: ReceivedGift[]; @@ -169,7 +140,6 @@ export interface ModDetails { version: string; author: string; dateAdded: number; - url: string; } export interface ReceivedGift { giftId: string; @@ -225,12 +195,18 @@ export interface Inraid { export interface Insurance { scheduledTime: number; traderId: string; - maxStorageTime: number; - systemData: ISystemData; - messageType: MessageType; - messageTemplateId: string; + messageContent: MessageContent; items: Item[]; } +export interface MessageContent { + ragfair?: MessageContentRagfair; + text?: string; + templateId: string; + type: MessageType; + maxStorageTime?: number; + profileChangeEvents?: any[]; + systemData?: ISystemData; +} export interface MessageContentRagfair { offerId: string; count: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ICompletedAchievementsResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ICompletedAchievementsResponse.d.ts deleted file mode 100644 index 09275bc..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ICompletedAchievementsResponse.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICompletedAchievementsResponse { - elements: Record; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IGetAchievementsResponse.d.ts deleted file mode 100644 index a5a43cb..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IAchievement } from "../common/tables/IAchievement"; -export interface IGetAchievementsResponse { - elements: IAchievement[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IGetOtherProfileRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IGetOtherProfileRequest.d.ts deleted file mode 100644 index de3144b..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IGetOtherProfileRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetOtherProfileRequest { - accountId: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IGetOtherProfileResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IGetOtherProfileResponse.d.ts deleted file mode 100644 index 7df4eba..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/IGetOtherProfileResponse.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { OverallCounters, Skills } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -export interface IGetOtherProfileResponse { - id: string; - aid: number; - info: IOtherProfileInfo; - customization: IOtherProfileCustomization; - skills: Skills; - equipment: IOtherProfileEquipment; - achievements: Record; - favoriteItems: string[]; - pmcStats: IOtherProfileStats; - scavStats: IOtherProfileStats; -} -export interface IOtherProfileInfo { - nickname: string; - side: string; - experience: number; - memberCategory: number; - bannedState: boolean; - bannedUntil: number; - registrationDate: number; -} -export interface IOtherProfileCustomization { - head: string; - body: string; - feet: string; - hands: string; -} -export interface IOtherProfileEquipment { - Id: string; - Items: Item[]; -} -export interface IOtherProfileStats { - eft: IOtherProfileSubStats; -} -export interface IOtherProfileSubStats { - totalInGameTime: number; - overAllCounters: OverallCounters; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISearchFriendResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISearchFriendResponse.d.ts index d3cc7df..96d88b2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISearchFriendResponse.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISearchFriendResponse.d.ts @@ -1,11 +1,9 @@ export interface ISearchFriendResponse { _id: string; - aid: number; Info: Info; } export interface Info { Nickname: string; Side: string; Level: number; - MemberCategory: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISptProfile.d.ts deleted file mode 100644 index f6e6379..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISptProfile.d.ts +++ /dev/null @@ -1,238 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { EquipmentBuildType } from "@spt/models/enums/EquipmentBuildType"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; -export interface ISptProfile { - info: Info; - characters: Characters; - /** Clothing purchases */ - suits: string[]; - userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; - /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; - /** Achievements earned by player */ - achievements: Record; -} -export declare class TraderPurchaseData { - count: number; - purchaseTimestamp: number; -} -export interface Info { - /** main profile id */ - id: string; - scavId: string; - aid: number; - username: string; - password: string; - wipe: boolean; - edition: string; -} -export interface Characters { - pmc: IPmcData; - scav: IPmcData; -} -/** used by profile.userbuilds */ -export interface IUserBuilds { - weaponBuilds: IWeaponBuild[]; - equipmentBuilds: IEquipmentBuild[]; - magazineBuilds: IMagazineBuild[]; -} -export interface IUserBuild { - Id: string; - Name: string; -} -export interface IWeaponBuild extends IUserBuild { - Root: string; - Items: Item[]; -} -export interface IEquipmentBuild extends IUserBuild { - Root: string; - Items: Item[]; - BuildType: EquipmentBuildType; -} -export interface IMagazineBuild extends IUserBuild { - Caliber: string; - TopCount: number; - BottomCount: number; - Items: IMagazineTemplateAmmoItem[]; -} -export interface IMagazineTemplateAmmoItem { - TemplateId: string; - Count: number; -} -/** Used by defaultEquipmentPresets.json */ -export interface IDefaultEquipmentPreset extends IUserBuild { - Items: Item[]; - Root: string; - BuildType: EquipmentBuildType; - type: string; -} -export interface Dialogue { - attachmentsNew: number; - new: number; - type: MessageType; - Users?: IUserDialogInfo[]; - pinned: boolean; - messages: Message[]; - _id: string; -} -export interface IUserDialogInfo { - _id: string; - aid: number; - Info: IUserDialogDetails; -} -export interface IUserDialogDetails { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} -export interface DialogueInfo { - attachmentsNew: number; - new: number; - _id: string; - type: MessageType; - pinned: boolean; - Users?: IUserDialogInfo[]; - message: MessagePreview; -} -export interface Message { - _id: string; - uid: string; - type: MessageType; - dt: number; - UtcDateTime?: number; - Member?: IUpdatableChatMember; - templateId?: string; - text?: string; - replyTo?: IReplyTo; - hasRewards?: boolean; - rewardCollected: boolean; - items?: MessageItems; - maxStorageTime?: number; - systemData?: ISystemData; - profileChangeEvents?: IProfileChangeEvent[]; -} -export interface IReplyTo { - _id: string; - uid: string; - type: MessageType; - dt: number; - text?: string; -} -export interface MessagePreview { - uid: string; - type: MessageType; - dt: number; - templateId: string; - text?: string; - systemData?: ISystemData; -} -export interface MessageItems { - stash?: string; - data?: Item[]; -} -export interface ISystemData { - date?: string; - time?: string; - location?: string; - buyerNickname?: string; - soldItem?: string; - itemCount?: number; -} -export interface IUpdatableChatMember { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; - Ignored: boolean; - Banned: boolean; -} -export interface DateTime { - date: string; - time: string; -} -export interface Spt { - version: string; - mods?: ModDetails[]; - receivedGifts: ReceivedGift[]; -} -export interface ModDetails { - name: string; - version: string; - author: string; - dateAdded: number; - url: string; -} -export interface ReceivedGift { - giftId: string; - timestampAccepted: number; -} -export interface Vitality { - health: Health; - effects: Effects; -} -export interface Health { - Hydration: number; - Energy: number; - Temperature: number; - Head: number; - Chest: number; - Stomach: number; - LeftArm: number; - RightArm: number; - LeftLeg: number; - RightLeg: number; -} -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; -} -export interface Head { -} -export interface Chest { -} -export interface Stomach { -} -export interface LeftArm { - Fracture?: number; -} -export interface RightArm { - Fracture?: number; -} -export interface LeftLeg { - Fracture?: number; -} -export interface RightLeg { - Fracture?: number; -} -export interface Inraid { - location: string; - character: string; -} -export interface Insurance { - scheduledTime: number; - traderId: string; - maxStorageTime: number; - systemData: ISystemData; - messageType: MessageType; - messageTemplateId: string; - items: Item[]; -} -export interface MessageContentRagfair { - offerId: string; - count: number; - handbookId: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/quests/IFailQuestRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/quests/IFailQuestRequestData.d.ts index a1a65ea..5881d91 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/quests/IFailQuestRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/quests/IFailQuestRequestData.d.ts @@ -1,5 +1,5 @@ export interface IFailQuestRequestData { - Action: "QuestFail"; + Action: "QuestComplete"; qid: string; removeExcessItems: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IGetItemPriceResult.d.ts index a81eee6..e692b1b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,4 +1,4 @@ -import { MinMax } from "@spt/models/common/MinMax"; +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface IGetItemPriceResult extends MinMax { avg: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IGetOffersResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IGetOffersResult.d.ts index f3420fa..8b753ae 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IGetOffersResult.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IGetOffersResult.d.ts @@ -1,4 +1,4 @@ -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; export interface IGetOffersResult { categories?: Record; offers: IRagfairOffer[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts index 1741b47..043a986 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -1,5 +1,5 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; export interface IRagfairOffer { sellResult?: SellResult[]; _id: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/ISearchRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/ISearchRequestData.d.ts index 8261c5b..52cb2d4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/ISearchRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/ISearchRequestData.d.ts @@ -1,4 +1,4 @@ -import { RagfairSort } from "@spt/models/enums/RagfairSort"; +import { RagfairSort } from "@spt-aki/models/enums/RagfairSort"; export interface ISearchRequestData { page: number; limit: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..ceb3f7c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,4 +1,4 @@ -import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; +import { IBaseRepairActionDataRequest } from "@spt-aki/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; repairKitsInfo: RepairKitsInfo[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..82b83c6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -1,4 +1,4 @@ -import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; +import { IBaseRepairActionDataRequest } from "@spt-aki/models/eft/repair/IBaseRepairActionDataRequest"; export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index d64b2c9..cc4336a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "SptInsure" | "SptRepair" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessRagfairTradeRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessRagfairTradeRequestData.d.ts index 66abc0b..889dfd1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessRagfairTradeRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessRagfairTradeRequestData.d.ts @@ -1,13 +1,13 @@ export interface IProcessRagfairTradeRequestData { Action: string; - offers: IOfferRequest[]; + offers: Offer[]; } -export interface IOfferRequest { +export interface Offer { id: string; count: number; - items: IItemReqeust[]; + items: Item[]; } -export interface IItemReqeust { +export interface Item { id: string; count: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessSellTradeRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessSellTradeRequestData.d.ts index 459bd28..c0f91a0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessSellTradeRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/IProcessSellTradeRequestData.d.ts @@ -1,4 +1,4 @@ -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessSellTradeRequestData extends IProcessBaseTradeRequestData { Action: "sell_to_trader"; type: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts index 3727ce4..1fc6025 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts @@ -1,7 +1,6 @@ -import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { OwnerInfo } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface ISellScavItemsToFenceRequestData { Action: "SellAllFromSavage"; - totalValue: number; fromOwner: OwnerInfo; toOwner: OwnerInfo; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/weather/IWeatherData.d.ts index 81bc746..b47189d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/weather/IWeatherData.d.ts @@ -1,11 +1,9 @@ -import { Season } from "@spt/models/enums/Season"; -import { WindDirection } from "@spt/models/enums/WindDirection"; +import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather: IWeather; - season: Season; + weather?: IWeather; } export interface IWeather { pressure: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsAid.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsAid.d.ts deleted file mode 100644 index 310d507..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsAid.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsAid extends IWsNotificationEvent { - aid: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsAidNickname.d.ts deleted file mode 100644 index e623b19..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsAidNickname.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsAidNickname extends IWsNotificationEvent { - aid: number; - Nickname: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts deleted file mode 100644 index 217e8e5..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; -export interface IWsChatMessageReceived extends IWsNotificationEvent { - dialogId: string; - message: Message; - profiles?: IGroupCharacter[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupId.d.ts deleted file mode 100644 index 62a8c6f..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupId.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupId extends IWsNotificationEvent { - groupId: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts deleted file mode 100644 index ad176aa..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; -export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts deleted file mode 100644 index cf15409..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { - aid: number; - Nickname: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts deleted file mode 100644 index b52a49c..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { - requestId: string; - from: number; - members: IGroupCharacter[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts deleted file mode 100644 index a374183..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { - owner: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts deleted file mode 100644 index ab76918..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { - extendedProfile: IGroupCharacter; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts deleted file mode 100644 index 5fa52af..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IRaidSettings } from "@spt/models/eft/match/IRaidSettings"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { - raidSettings: IRaidSettings; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsNotificationEvent.d.ts deleted file mode 100644 index 5fc72f3..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsNotificationEvent.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IWsNotificationEvent { - type: string; - eventId: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsPing.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsPing.d.ts deleted file mode 100644 index d43aa03..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsPing.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsPing extends IWsNotificationEvent { -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsRagfairOfferSold.d.ts deleted file mode 100644 index 1c4c88e..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsRagfairOfferSold.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -export interface IWsRagfairOfferSold extends IWsNotificationEvent { - offerId: string; - count: number; - handbookId: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsUserConfirmed.d.ts deleted file mode 100644 index ac32e0d..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsUserConfirmed.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { ProfileStatus } from "@spt/models/enums/ProfileStatus"; -import { RaidMode } from "@spt/models/enums/RaidMode"; -export interface IWsUserConfirmed extends IWsNotificationEvent { - profileid: string; - profileToken: string; - status: ProfileStatus; - ip: string; - port: number; - sid: string; - version: string; - location: string; - raidMode: RaidMode; - mode: string; - shortId: string; - additional_info: any[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/AmmoTypes.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/AmmoTypes.d.ts index 51ea4bb..6aa332b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/AmmoTypes.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/AmmoTypes.d.ts @@ -216,7 +216,3 @@ export declare enum Ammo26x75 { WHITE_FLARE = "62389bc9423ed1685422dc57", YELLOW_FLARE = "62389be94d5d474bf712e709" } -export declare enum Ammo68x51 { - SIG_FMJ = "6529302b8c26af6326029fb7", - SIG_HYBRID = "6529243824cbe3c74a05e5c1" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/BackendErrorCodes.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/BackendErrorCodes.d.ts index a36e9ce..2a269b5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/BackendErrorCodes.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/BackendErrorCodes.d.ts @@ -62,12 +62,11 @@ export declare enum BackendErrorCodes { BANNEDERRORCODE = 1513, INSUFFICIENTNUMBERINSTOCK = 1516, TOOMANYITEMSTOSELL = 1517, - INCORRECTCLIENTPRICE = 1519, EXAMINATIONFAILED = 22001, ITEMALREADYEXAMINED = 22002, UNKNOWNNGINXERROR = 9000, PARSERESPONSEERROR = 9001, - UNKNOWNMATCHMAKERERROR2 = 503000,// They have two of these...why :/ + UNKNOWNMATCHMAKERERROR2 = 503000, UNKNOWNGROUPERROR = 502000, GROUPREQUESTNOTFOUND = 502002, GROUPFULL = 502004, @@ -82,6 +81,5 @@ export declare enum BackendErrorCodes { PLAYERISNOTSEARCHINGFORGROUP = 502018, PLAYERALREADYLOOKINGFORGAME = 503001, PLAYERINRAID = 503002, - LIMITFORPRESETSREACHED = 504001, - PLAYERPROFILENOTFOUND = 505001 + LIMITFORPRESETSREACHED = 504001 } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/BaseClasses.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/BaseClasses.d.ts index d98a58f..a9acb69 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/BaseClasses.d.ts @@ -2,7 +2,7 @@ export declare enum BaseClasses { WEAPON = "5422acb9af1c889c16000029", UBGL = "55818b014bdc2ddc698b456b", ARMOR = "5448e54d4bdc2dcc718b4568", - ARMORED_EQUIPMENT = "57bef4c42459772e8d35a53b", + ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", REPAIR_KITS = "616eb7aea207f41933308f46", HEADWEAR = "5a341c4086f77401f2541505", FACECOVER = "5a341c4686f77469e155819e", @@ -95,20 +95,9 @@ export declare enum BaseClasses { PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", - AUXILIARY_MOD = "5a74651486f7744e73386dd1", + AUXILARY_MOD = "5a74651486f7744e73386dd1", BIPOD = "55818afb4bdc2dde698b456d", HEADPHONES = "5645bcb74bdc2ded0b8b4578", RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", - STACKABLE_ITEM = "5661632d4bdc2d903d8b456b", - BUILT_IN_INSERTS = "65649eb40bf0ed77b8044453", - ARMOR_PLATE = "644120aa86ffbe10ee032b6f", - CULTIST_AMULET = "64b69b0c8f3be32ed22682f8", - RADIO_TRANSMITTER = "62e9103049c018f425059f38", - HANDGUARD = "55818a104bdc2db9688b4569", - PISTOL_GRIP = "55818a684bdc2ddd698b456d", - RECEIVER = "55818a304bdc2db5418b457d", - BARREL = "555ef6e44bdc2de9068b457e", - CHARGING_HANDLE = "55818a6f4bdc2db9688b456b", - COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 ", - HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba" + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/BonusSkillType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/BonusSkillType.d.ts deleted file mode 100644 index 64d9c12..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/BonusSkillType.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BonusSkillType { - PHYSICAL = "Physical", - COMBAT = "Combat", - SPECIAL = "Special", - PRACTICAL = "Practical", - MENTAL = "Mental" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/BonusType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/BonusType.d.ts deleted file mode 100644 index 466457f..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/BonusType.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export declare enum BonusType { - ENERGY_REGENERATION = "EnergyRegeneration", - HYDRATION_REGENERATION = "HydrationRegeneration", - HEALTH_REGENERATION = "HealthRegeneration", - EXPERIENCE_RATE = "ExperienceRate", - QUEST_MONEY_REWARD = "QuestMoneyReward", - SCAV_COOLDOWN_TIMER = "ScavCooldownTimer", - UNLOCK_ITEM_CRAFT = "UnlockItemCraft", - UNLOCK_ITEM_PASSIVE_CREATION = "UnlockItemPassiveCreation", - UNLOCK_RANDOM_ITEM_CREATION = "UnlockRandomItemCreation", - SKILL_LEVELING_BOOST = "SkillLevelingBoost", - DEBUFF_END_DELAY = "DebuffEndDelay", - RAGFAIR_COMMISSION = "RagfairCommission", - INSURANCE_RETURN_TIME = "InsuranceReturnTime", - UNLOCK_WEAPON_MODIFICATION = "UnlockWeaponModification", - UNLOCK_SCAV_PLAY = "UnlockScavPlay", - UNLOCK_ADD_OFFER = "UnlockAddOffer", - UNLOCK_ITEM_CHARGE = "UnlockItemCharge", - RECEIVE_ITEM_BONUS = "ReceiveItemBonus", - UNLOCK_UNIQUE_ID = "UnlockUniqueId", - INCREASE_CANISTER_SLOTS = "IncreaseCanisterSlots", - ADDITIONAL_SLOTS = "AdditionalSlots", - FUEL_CONSUMPTION = "FuelConsumption", - REPAIR_WEAPON_BONUS = "RepairWeaponBonus", - REPAIR_ARMOR_BONUS = "RepairArmorBonus", - UNLOCK_WEAPON_REPAIR = "UnlockWeaponRepair", - UNLOCK_ARMOR_REPAIR = "UnlockArmorRepair", - STASH_SIZE = "StashSize", - MAXIMUM_ENERGY_RESERVE = "MaximumEnergyReserve", - TEXT_BONUS = "TextBonus", - SKILL_GROUP_LEVELING_BOOST = "SkillGroupLevelingBoost", - STASH_ROWS = "StashRows" -} diff --git a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/BotAmount.d.ts similarity index 85% rename from TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/BotAmount.d.ts rename to TypeScript/23CustomAbstractChatBot/types/models/enums/BotAmount.d.ts index ad7b6f0..9ef9cab 100644 --- a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/BotAmount.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/BotAmount.d.ts @@ -1,6 +1,5 @@ export declare enum BotAmount { AS_ONLINE = "AsOnline", - NO_BOTS = "NoBots", LOW = "Low", MEDIUM = "Medium", HIGH = "High", diff --git a/TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/BotDifficulty.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/BotDifficulty.d.ts similarity index 100% rename from TypeScript/22CustomSptCommand/types/models/enums/RaidSettings/BotDifficulty.d.ts rename to TypeScript/23CustomAbstractChatBot/types/models/enums/BotDifficulty.d.ts diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/ConfigTypes.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/ConfigTypes.d.ts index 646fd55..27340c4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/ConfigTypes.d.ts @@ -1,29 +1,28 @@ export declare enum ConfigTypes { - AIRDROP = "spt-airdrop", - BOT = "spt-bot", - PMC = "spt-pmc", - CORE = "spt-core", - HEALTH = "spt-health", - HIDEOUT = "spt-hideout", - HTTP = "spt-http", - IN_RAID = "spt-inraid", - INSURANCE = "spt-insurance", - INVENTORY = "spt-inventory", - ITEM = "spt-item", - LOCALE = "spt-locale", - LOCATION = "spt-location", - LOOT = "spt-loot", - MATCH = "spt-match", - PLAYERSCAV = "spt-playerscav", - PMC_CHAT_RESPONSE = "spt-pmcchatresponse", - QUEST = "spt-quest", - RAGFAIR = "spt-ragfair", - REPAIR = "spt-repair", - SCAVCASE = "spt-scavcase", - TRADER = "spt-trader", - WEATHER = "spt-weather", - SEASONAL_EVENT = "spt-seasonalevents", - LOST_ON_DEATH = "spt-lostondeath", - GIFTS = "spt-gifts", - BTR = "spt-btr" + AIRDROP = "aki-airdrop", + BOT = "aki-bot", + PMC = "aki-pmc", + CORE = "aki-core", + HEALTH = "aki-health", + HIDEOUT = "aki-hideout", + HTTP = "aki-http", + IN_RAID = "aki-inraid", + INSURANCE = "aki-insurance", + INVENTORY = "aki-inventory", + ITEM = "aki-item", + LOCALE = "aki-locale", + LOCATION = "aki-location", + LOOT = "aki-loot", + MATCH = "aki-match", + PLAYERSCAV = "aki-playerscav", + PMC_CHAT_RESPONSE = "aki-pmcchatresponse", + QUEST = "aki-quest", + RAGFAIR = "aki-ragfair", + REPAIR = "aki-repair", + SCAVCASE = "aki-scavcase", + TRADER = "aki-trader", + WEATHER = "aki-weather", + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/DateTime.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/DateTime.d.ts deleted file mode 100644 index dcd1b5e..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/DateTime.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare enum DateTime { - CURR = "CURR", - PAST = "PAST" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/ELocationName.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/ELocationName.d.ts index bb05be5..c52ae87 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/ELocationName.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/ELocationName.d.ts @@ -4,7 +4,6 @@ export declare enum ELocationName { BIGMAP = "bigmap", WOODS = "Woods", SHORELINE = "Shoreline", - SANDBOX = "Sandbox", INTERCHANGE = "Interchange", LIGHTHOUSE = "Lighthouse", LABORATORY = "laboratory", diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/ItemEventActions.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/ItemEventActions.d.ts index f8a8b5a..f43d4ba 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/ItemEventActions.d.ts @@ -23,7 +23,5 @@ export declare enum ItemEventActions { REMOVE_BUILD = "RemoveBuild", SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild", REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", - REDEEM_PROFILE_REWARD = "RedeemProfileReward", - SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + REDEEM_PROFILE_REWARD = "RedeemProfileReward" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/MessageType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/MessageType.d.ts index 33cddc8..1b0c649 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/MessageType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/MessageType.d.ts @@ -12,6 +12,5 @@ export declare enum MessageType { QUEST_FAIL = 11, QUEST_SUCCESS = 12, MESSAGE_WITH_ITEMS = 13, - INITIAL_SUPPORT = 14, - BTR_ITEMS_DELIVERY = 15 + INITIAL_SUPPORT = 14 } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/ModSpawn.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/ModSpawn.d.ts deleted file mode 100644 index 445b5ab..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/ModSpawn.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum ModSpawn { - DEFAULT_MOD = 0, - SPAWN = 1, - SKIP = 2 -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/NotificationEventType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/NotificationEventType.d.ts deleted file mode 100644 index 51f0d4e..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/NotificationEventType.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export declare enum NotificationEventType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - CHAT_MESSAGE_RECEIVED = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader", - GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", - GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", - GROUP_MATCH_RAID_READY = "groupMatchRaidReady", - GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", - GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", - GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", - GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", - GROUP_MATCH_START_GAME = "groupMatchStartGame", - GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", - GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", - GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", - USER_CONFIRMED = "userConfirmed", - CHANNEL_DELETED = "channel_deleted", - FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", - FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", - FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", - FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", - YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/PlayersSpawnPlace.d.ts deleted file mode 100644 index 8a2eab6..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/PlayersSpawnPlace.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum PlayersSpawnPlace { - SAME_PLACE = "SamePlace", - DIFFERENT_PLACES = "DifferentPlaces", - AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/ProfileStatus.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/ProfileStatus.d.ts deleted file mode 100644 index 5a4419b..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/ProfileStatus.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum ProfileStatus { - FREE = "Free", - MATCH_WAIT = "MatchWait", - BUSY = "Busy", - LEAVING = "Leaving", - TRANSFER = "Transfer" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/QuestRewardType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/QuestRewardType.d.ts index 3f01040..fee0ad2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/QuestRewardType.d.ts @@ -8,6 +8,5 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows", - ACHIEVEMENT = "Achievement" + STASH_ROWS = "StashRows" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/BotAmount.d.ts deleted file mode 100644 index ad7b6f0..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/BotAmount.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - NO_BOTS = "NoBots", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/BotDifficulty.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/BotDifficulty.d.ts deleted file mode 100644 index 80e45ad..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/BotDifficulty.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum BotDifficulty { - AS_ONLINE = "AsOnline", - EASY = "Easy", - MEDIUM = "Medium", - HARD = "Hard", - IMPOSSIBLE = "Impossible", - RANDOM = "Random" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts deleted file mode 100644 index 3bd9d9c..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum CloudinessType { - CLEAR = "Clear", - PARTLY_CLOUDY = "PartlyCloudy", - CLOUDY = "Cloudy", - CLOUDY_WITH_GAPS = "CloudyWithGaps", - HEAVY_CLOUD_COVER = "HeavyCloudCover", - THUNDER_CLOUD = "Thundercloud" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts deleted file mode 100644 index 8ee3025..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum FogType { - NO_FOG = "NoFog", - FAINT = "Faint", - FOG = "Fog", - HEAVY = "Heavy", - CONTINUOUS = "Continuous" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts deleted file mode 100644 index 1e9a70e..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum RainType { - NO_RAIN = "NoRain", - DRIZZLING = "Drizzling", - RAIN = "Rain", - HEAVY = "Heavy", - SHOWER = "Shower" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts deleted file mode 100644 index b153fb5..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare enum TimeFlowType { - X0 = "x0", - X0_14 = "x0_14", - X0_25 = "x0_25", - X0_5 = "x0_5", - X1 = "x1", - X2 = "x2", - X4 = "x4", - X8 = "x8" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts deleted file mode 100644 index 6cc9973..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum WindSpeed { - LIGHT = "Light", - MODERATE = "Moderate", - STRONG = "Strong", - VERY_STRONG = "VeryStrong", - HURRICANE = "Hurricane" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/Season.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/Season.d.ts deleted file mode 100644 index b1d3662..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/Season.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum Season { - SUMMER = 0, - AUTUMN = 1, - WINTER = 2, - SPRING = 3, - STORM = 4 -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/SeasonalEventType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/SeasonalEventType.d.ts index cfea1f5..d7cf037 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/SeasonalEventType.d.ts @@ -3,6 +3,5 @@ export declare enum SeasonalEventType { CHRISTMAS = "Christmas", HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", - PROMO = "Promo", - SNOW = "Snow" + PROMO = "Promo" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/SideType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/SideType.d.ts deleted file mode 100644 index faa6ff6..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/SideType.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum SideType { - PMC = "Pmc", - SAVAGE = "Savage", - RANDOM = "Random" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/SkillTypes.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/SkillTypes.d.ts index c41ce6f..dc059a8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/SkillTypes.d.ts @@ -34,7 +34,7 @@ export declare enum SkillTypes { NIGHT_OPS = "NightOps", SILENT_OPS = "SilentOps", LOCKPICKING = "Lockpicking", - /** Also called Weapon Maintenance */ + /** Also called Weapon Maintenance*/ WEAPON_TREATMENT = "WeaponTreatment", MAG_DRILLS = "MagDrills", FREE_TRADING = "Freetrading", diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/TraderServiceType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/TraderServiceType.d.ts deleted file mode 100644 index f3586dc..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/TraderServiceType.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum TraderServiceType { - EXUSEC_LOYALTY = "ExUsecLoyalty", - ZRYACHIY_AID = "ZryachiyAid", - CULTISTS_AID = "CultistsAid", - BTR_ITEMS_DELIVERY = "BtrItemsDelivery", - PLAYER_TAXI = "PlayerTaxi", - BTR_BOT_COVER = "BtrBotCover" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/Traders.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/Traders.d.ts index f7d340a..ffea725 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/Traders.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/Traders.d.ts @@ -7,6 +7,5 @@ export declare enum Traders { MECHANIC = "5a7c2eca46aef81a7ca2145d", RAGMAN = "5ac3b934156ae10c4430e83c", JAEGER = "5c0647fdd443bc2504c2d371", - LIGHTHOUSEKEEPER = "638f541a29ffd1183d187f57", - BTR = "656f0f98d80a697f855d34b1" + LIGHTHOUSEKEEPER = "638f541a29ffd1183d187f57" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/WeaponTypes.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/WeaponTypes.d.ts index b01dd66..867b052 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/WeaponTypes.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/WeaponTypes.d.ts @@ -1,6 +1,5 @@ export declare enum Weapons127x55 { - ASH_12 = "5cadfbf7ae92152ac412eeef", - RSH_12 = "633ec7c2a6918cb895019c6c" + ASH_12 = "5cadfbf7ae92152ac412eeef" } export declare enum Weapons86x70 { MK_18 = "5fc22d7c187fea44d52eda44", @@ -8,20 +7,14 @@ export declare enum Weapons86x70 { } export declare enum Weapons9x39 { AS_VAL = "57c44b372459772d2b39b8ce", - VSS_VINTOREZ = "57838ad32459774a17445cd2", - KBP_9A_91 = "644674a13d52156624001fbc", - VSK_94 = "645e0c6b3b381ede770e1cc9" + VSS_VINTOREZ = "57838ad32459774a17445cd2" } export declare enum Weapons762x54R { SVDS = "5c46fbd72e2216398b5a8c9c", MP_18 = "61f7c9e189e6fb1a5e3ea78d", MOSIN_INFANTRY = "5bfd297f0db834001a669119", MOSIN_SNIPER = "5ae08f0a5acfc408fb1398a1", - SV_98 = "55801eed4bdc2d89578b4588", - AVT_40 = "6410733d5dd49d77bd07847e", - SVT_40 = "643ea5b23db6f9f57107d9fd", - PKM = "64637076203536ad5600c990", - PKP = "64ca3d3954fc657e230529cc" + SV_98 = "55801eed4bdc2d89578b4588" } export declare enum Weapons762x51 { VPO_101 = "5c501a4d2e221602b412b540", @@ -53,9 +46,7 @@ export declare enum Weapons762x39 { AKMSN = "5abcbc27d8ce8700182eceeb", MK47_MUTANT = "606587252535c57a13424cfd", RD_704 = "628a60ae6b1d481ff772e9c8", - VPO_136 = "59e6152586f77473dc057aa1", - RPD = "6513ef33e06849f06c0957ca", - RPDN = "65268d8ecb944ff1e90ea385" + VPO_136 = "59e6152586f77473dc057aa1" } export declare enum Weapons762x35 { MCX = "5fbcc1d9016cce60e8341ab3" @@ -70,9 +61,7 @@ export declare enum Weapons556x45 { M4A1 = "5447a9cd4bdc2dbd208b4567", SCARL_BLACK = "6184055050224f204c1da540", SCARL_FDE = "618428466ef05c2ce828f218", - TX15_DML = "5d43021ca4b9362eab4b5e25", - AUG_A1 = "62e7c4fba689e8c9c50dfc38", - AUG_A3 = "63171672192e68c5460cebc5" + TX15_DML = "5d43021ca4b9362eab4b5e25" } export declare enum Weapons545x39 { AK_105 = "5ac66d9b5acfc4001633997a", @@ -86,8 +75,7 @@ export declare enum Weapons545x39 { AKS_74UN = "583990e32459771419544dd2", SAG_AK = "628b5638ad252a16da6dd245", SAG_AK_SHORT = "628b9c37a733087d0d7fe84b", - RPK_16 = "5beed0f50db834001c062b12", - AK_12 = "6499849fc93611967b034949" + RPK_16 = "5beed0f50db834001c062b12" } export declare enum Weapons57x28FN { FN_57_BLACK = "5d3eb3b0a4b93615055e84d2", @@ -109,8 +97,7 @@ export declare enum Weapons9x33R { CR_50DS = "61a4c8884f95bc3b2c5dc96f" } export declare enum Weapons9x21 { - SR_1MP = "59f98b4986f7746f546d2cef", - SR_2M = "62e14904c2699c0ec93adc47" + SR_1MP = "59f98b4986f7746f546d2cef" } export declare enum Weapons9x19 { GLOCK_17 = "5a7ae0c351dfba0017554310", @@ -128,8 +115,7 @@ export declare enum Weapons9x19 { PP_19_01 = "59984ab886f7743e98271174", SAIGA_9 = "59f9cabd86f7743a10721f46", STM_9 = "60339954d62c9b14ed777c06", - VECTOR_9MM = "5fc3f2d5900b1d5091531e57", - GLOCK_19X = "63088377b5cd696784087147" + VECTOR_9MM = "5fc3f2d5900b1d5091531e57" } export declare enum Weapons9x18 { APB = "5abccb7dd8ce87001773e277", @@ -163,10 +149,3 @@ export declare enum Weapons20Gauge { export declare enum Weapons23x75 { KS_23M = "5e848cc2988a8701445df1e8" } -export declare enum Weapons68x51 { - MCX_SPEAR = "65290f395ae2ae97b80fdf2d" -} -export declare enum Weapons40x46 { - M32A1 = "6275303a9f372d6ea97f9ec7", - FN40GL = "5e81ebcd8e146c7080625e15" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts index 80d737e..e8a2b5e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts @@ -36,21 +36,6 @@ export declare enum WildSpawnTypeNumber { ARENAFIGHTEREVENT = 35, BOSSBOARSNIPER = 36, CRAZYASSAULTEVENT = 37, - PEACEFULLZRYACHIYEVENT = 38, - SECTACTPRIESTEVENT = 39, - RAVANGEZRYACHIYEVENT = 40, - FOLLOWERBOARCLOSE1 = 41, - FOLLOWERBOARCLOSE2 = 42, - BOSSKOLONTAY = 43, - FOLLOWERKOLONTAYASSAULT = 44, - FOLLOWERKOLONTAYSECURITY = 45, - SHOOTERBTR = 46, - SPIRITWINTER = 47, - SPIRITSPRING = 48, - PMCBEAR = 49, - PMCUSEC = 50, - skier = 51, - peacemaker = 52, - SPTUSEC = 100, - SPTBEAR = 101 + SPTUSEC = 38, + SPTBEAR = 39 } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteActivityType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteActivityType.d.ts deleted file mode 100644 index 7a08cc6..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteActivityType.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare enum QteActivityType { - GYM = 0 -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteEffectType.d.ts deleted file mode 100644 index 9ecd1a2..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteEffectType.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteResultType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteResultType.d.ts deleted file mode 100644 index 05b48b8..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteResultType.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare enum QteResultType { - NONE = "None", - EXIT = "Exit" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteRewardType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteRewardType.d.ts deleted file mode 100644 index 251c2ad..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteRewardType.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare enum QteRewardType { - SKILL = "Skill", - HEALTH_EFFECT = "HealthEffect", - MUSCLE_PAIN = "MusclePain", - GYM_ARM_TRAUMA = "GymArmTrauma" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteType.d.ts deleted file mode 100644 index 4c50c0d..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteType.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare enum QteType { - SHRINKING_CIRCLE = 0 -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/RequirementType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/RequirementType.d.ts deleted file mode 100644 index 834eabf..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/RequirementType.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare enum RequirementType { - AREA = "Area", - ITEM = "Item", - TRADER_UNLOCK = "TraderUnlock", - TRADER_LOYALTY = "TraderLoyalty", - SKILL = "Skill", - RESOURCE = "Resource", - TOOL = "Tool", - QUEST_COMPLETE = "QuestComplete", - HEALTH = "Health", - BODY_PART_BUFF = "BodyPartBuff" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostAkiLoadMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostAkiLoadMod.d.ts new file mode 100644 index 0000000..cc8f7af --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostAkiLoadMod.d.ts @@ -0,0 +1,4 @@ +import { DependencyContainer } from "@spt-aki/models/external/tsyringe"; +export interface IPostAkiLoadMod { + postAkiLoad(container: DependencyContainer): void; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostAkiLoadModAsync.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostAkiLoadModAsync.d.ts new file mode 100644 index 0000000..44700e1 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostAkiLoadModAsync.d.ts @@ -0,0 +1,4 @@ +import { DependencyContainer } from "@spt-aki/models/external/tsyringe"; +export interface IPostAkiLoadModAsync { + postAkiLoadAsync(container: DependencyContainer): Promise; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostDBLoadMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostDBLoadMod.d.ts index 8b482b6..f2f43ab 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostDBLoadMod.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostDBLoadMod.d.ts @@ -1,4 +1,4 @@ -import type { DependencyContainer } from "tsyringe"; +import { DependencyContainer } from "@spt-aki/models/external/tsyringe"; export interface IPostDBLoadMod { postDBLoad(container: DependencyContainer): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostDBLoadModAsync.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostDBLoadModAsync.d.ts index 63b55bb..ed06ed5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostDBLoadModAsync.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostDBLoadModAsync.d.ts @@ -1,4 +1,4 @@ -import type { DependencyContainer } from "tsyringe"; +import { DependencyContainer } from "@spt-aki/models/external/tsyringe"; export interface IPostDBLoadModAsync { postDBLoadAsync(container: DependencyContainer): Promise; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostSptLoadMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostSptLoadMod.d.ts deleted file mode 100644 index 5ef9766..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostSptLoadMod.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPostSptLoadMod { - postSptLoad(container: DependencyContainer): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostSptLoadModAsync.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPostSptLoadModAsync.d.ts deleted file mode 100644 index 7778d96..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/external/IPostSptLoadModAsync.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPostSptLoadModAsync { - postSptLoadAsync(container: DependencyContainer): Promise; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPreAkiLoadMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPreAkiLoadMod.d.ts new file mode 100644 index 0000000..e81b660 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/external/IPreAkiLoadMod.d.ts @@ -0,0 +1,4 @@ +import { DependencyContainer } from "@spt-aki/models/external/tsyringe"; +export interface IPreAkiLoadMod { + preAkiLoad(container: DependencyContainer): void; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPreAkiLoadModAsync.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPreAkiLoadModAsync.d.ts new file mode 100644 index 0000000..89a3e67 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/external/IPreAkiLoadModAsync.d.ts @@ -0,0 +1,4 @@ +import { DependencyContainer } from "@spt-aki/models/external/tsyringe"; +export interface IPreAkiLoadModAsync { + preAkiLoadAsync(container: DependencyContainer): Promise; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPreSptLoadMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPreSptLoadMod.d.ts deleted file mode 100644 index dc38515..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/external/IPreSptLoadMod.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPreSptLoadMod { - preSptLoad(container: DependencyContainer): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/external/IPreSptLoadModAsync.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/external/IPreSptLoadModAsync.d.ts deleted file mode 100644 index 0322434..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/external/IPreSptLoadModAsync.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPreSptLoadModAsync { - preSptLoadAsync(container: DependencyContainer): Promise; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bindings/Route.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bindings/Route.d.ts index abe8d2c..1b29d7d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bindings/Route.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/bindings/Route.d.ts @@ -1,3 +1,3 @@ export interface IRoute { - spt: any; + aki: any; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..26571a2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,4 +1,3 @@ -import { MinMax } from "@spt/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -7,20 +6,13 @@ export interface BotGenerationDetails { /** Side of bot */ side: string; /** Active players current level */ - playerLevel?: number; - playerName?: string; - /** Level specific overrides for PMC level */ - locationSpecificPmcLevelOverride?: MinMax; - /** Delta of highest level of bot e.g. 50 means 50 levels above player */ + playerLevel: number; + /** Delta of highest level of bot */ botRelativeLevelDeltaMax: number; - /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ - botRelativeLevelDeltaMin: number; /** How many to create and store */ botCountToGenerate: number; /** Desired difficulty of the bot */ botDifficulty: string; /** Will the generated bot be a player scav */ isPlayerScav: boolean; - eventRole?: string; - allPmcsHaveSameNameAsPlayer?: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts index d4a2526..f28d052 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts @@ -1,6 +1,6 @@ -import { Mods } 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"; +import { Mods } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; export declare class GenerateWeaponResult { weapon: Item[]; chosenAmmoTpl: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IBotLootCache.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IBotLootCache.d.ts index 529c2cd..58a1bd1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IBotLootCache.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IBotLootCache.d.ts @@ -1,30 +1,23 @@ +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; export interface IBotLootCache { - backpackLoot: Record; - pocketLoot: Record; - vestLoot: Record; - secureLoot: Record; - combinedPoolLoot: Record; - specialItems: Record; - healingItems: Record; - drugItems: Record; - foodItems: Record; - drinkItems: Record; - currencyItems: Record; - stimItems: Record; - grenadeItems: Record; + backpackLoot: ITemplateItem[]; + pocketLoot: ITemplateItem[]; + vestLoot: ITemplateItem[]; + combinedPoolLoot: ITemplateItem[]; + specialItems: ITemplateItem[]; + healingItems: ITemplateItem[]; + drugItems: ITemplateItem[]; + stimItems: ITemplateItem[]; + grenadeItems: ITemplateItem[]; } export declare enum LootCacheType { SPECIAL = "Special", BACKPACK = "Backpack", POCKET = "Pocket", VEST = "Vest", - SECURE = "SecuredContainer", COMBINED = "Combined", HEALING_ITEMS = "HealingItems", DRUG_ITEMS = "DrugItems", STIM_ITEMS = "StimItems", - GRENADE_ITEMS = "GrenadeItems", - FOOD_ITEMS = "FoodItems", - DRINK_ITEMS = "DrinkItems", - CURRENCY_ITEMS = "CurrencyItems" + GRENADE_ITEMS = "GrenadeItems" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IChooseRandomCompatibleModResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IChooseRandomCompatibleModResult.d.ts deleted file mode 100644 index 6ba6630..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IChooseRandomCompatibleModResult.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface IChooseRandomCompatibleModResult { - incompatible: boolean; - found?: boolean; - chosenTpl?: string; - reason: string; - slotBlocked?: boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IItemSpawnLimitSettings.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IItemSpawnLimitSettings.d.ts deleted file mode 100644 index ca3e6a6..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IItemSpawnLimitSettings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IItemSpawnLimitSettings { - currentLimits: Record; - globalLimits: Record; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IBotCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IBotCallbacks.d.ts index e49406e..02f444e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IBotCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IBotCallbacks.d.ts @@ -1,7 +1,7 @@ -import { IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; export interface IBotCallbacks { getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ICustomizationCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ICustomizationCallbacks.d.ts index 8dba3d7..f4f8877 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ICustomizationCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ICustomizationCallbacks.d.ts @@ -1,9 +1,9 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISuit } from "@spt/models/eft/common/tables/ITrader"; -import { IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData"; -import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISuit } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IBuyClothingRequestData } from "@spt-aki/models/eft/customization/IBuyClothingRequestData"; +import { IWearClothingRequestData } from "@spt-aki/models/eft/customization/IWearClothingRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export interface ICustomizationCallbacks { getSuits(url: string, info: any, sessionID: string): IGetBodyResponseData; getTraderSuits(url: string, info: any, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts index cd0adab..0651dce 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -1,11 +1,11 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGlobals } from "@spt-aki/models/eft/common/IGlobals"; +import { IHideoutArea } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase"; +import { IHideoutSettingsBase } from "@spt-aki/models/eft/hideout/IHideoutSettingsBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { ISettingsBase } from "@spt-aki/models/spt/server/ISettingsBase"; export interface IDataCallbacks { getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..0cc835b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -1,20 +1,20 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IFriendRequestData } from "@spt/models/eft/dialog/IFriendRequestData"; -import { IGetAllAttachmentsRequestData } from "@spt/models/eft/dialog/IGetAllAttachmentsRequestData"; -import { IGetAllAttachmentsResponse } from "@spt/models/eft/dialog/IGetAllAttachmentsResponse"; -import { IGetChatServerListRequestData } from "@spt/models/eft/dialog/IGetChatServerListRequestData"; -import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendListDataResponse"; -import { IGetMailDialogInfoRequestData } from "@spt/models/eft/dialog/IGetMailDialogInfoRequestData"; -import { IGetMailDialogListRequestData } from "@spt/models/eft/dialog/IGetMailDialogListRequestData"; -import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; -import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; -import { IPinDialogRequestData } from "@spt/models/eft/dialog/IPinDialogRequestData"; -import { IRemoveDialogRequestData } from "@spt/models/eft/dialog/IRemoveDialogRequestData"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IGetAllAttachmentsRequestData } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsRequestData"; +import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; +import { IGetChatServerListRequestData } from "@spt-aki/models/eft/dialog/IGetChatServerListRequestData"; +import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; +import { IGetMailDialogInfoRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogInfoRequestData"; +import { IGetMailDialogListRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogListRequestData"; +import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; +import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewResponseData"; +import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; +import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { DialogueInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IGameCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IGameCallbacks.d.ts index 21554dd..324ec31 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IGameCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IGameCallbacks.d.ts @@ -1,9 +1,9 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; -import { IGameEmptyCrcRequestData } from "@spt/models/eft/game/IGameEmptyCrcRequestData"; -import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; +import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; +import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; export interface IGameCallbacks { versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IHealthCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IHealthCallbacks.d.ts index c0244a1..0ea81a2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IHealthCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IHealthCallbacks.d.ts @@ -1,11 +1,11 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; -import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; -import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHealthTreatmentRequestData } from "@spt-aki/models/eft/health/IHealthTreatmentRequestData"; +import { IOffraidEatRequestData } from "@spt-aki/models/eft/health/IOffraidEatRequestData"; +import { IOffraidHealRequestData } from "@spt-aki/models/eft/health/IOffraidHealRequestData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IHealthCallbacks { - onLoad(sessionID: string): ISptProfile; + onLoad(sessionID: string): IAkiProfile; syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): any; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): any; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): any; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IHideoutCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IHideoutCallbacks.d.ts index 1349144..feda12e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IHideoutCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IHideoutCallbacks.d.ts @@ -1,14 +1,14 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData"; -import { IHideoutScavCaseStartRequestData } from "@spt/models/eft/hideout/IHideoutScavCaseStartRequestData"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; -import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; -import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; +import { IHideoutPutItemInRequestData } from "@spt-aki/models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCaseStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutScavCaseStartRequestData"; +import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData"; +import { IHideoutTakeItemOutRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeItemOutRequestData"; +import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData"; +import { IHideoutToggleAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; +import { IHideoutUpgradeRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export interface IHideoutCallbacks { upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInraidCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInraidCallbacks.d.ts index b267942..4754c0c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInraidCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInraidCallbacks.d.ts @@ -1,10 +1,10 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IInraidCallbacks { - onLoad(sessionID: string): ISptProfile; + onLoad(sessionID: string): IAkiProfile; registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; getRaidEndState(): string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInsuranceCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInsuranceCallbacks.d.ts index 2fae550..649039a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInsuranceCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInsuranceCallbacks.d.ts @@ -1,9 +1,9 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsuranceCostRequestData"; -import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData"; +import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IInsuranceCallbacks { - onLoad(sessionID: string): ISptProfile; + onLoad(sessionID: string): IAkiProfile; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): any; insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): any; update(secondsSinceLastRun: number): boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInventoryCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInventoryCallbacks.d.ts index 079d37b..7abe819 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInventoryCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IInventoryCallbacks.d.ts @@ -1,21 +1,21 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; -import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; -import { IInventoryDeleteMarkerRequestData } from "@spt/models/eft/inventory/IInventoryDeleteMarkerRequestData"; -import { IInventoryEditMarkerRequestData } from "@spt/models/eft/inventory/IInventoryEditMarkerRequestData"; -import { IInventoryExamineRequestData } from "@spt/models/eft/inventory/IInventoryExamineRequestData"; -import { IInventoryFoldRequestData } from "@spt/models/eft/inventory/IInventoryFoldRequestData"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryReadEncyclopediaRequestData } from "@spt/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySortRequestData } from "@spt/models/eft/inventory/IInventorySortRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventorySwapRequestData } from "@spt/models/eft/inventory/IInventorySwapRequestData"; -import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTagRequestData"; -import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IInventoryBindRequestData } from "@spt-aki/models/eft/inventory/IInventoryBindRequestData"; +import { IInventoryCreateMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryCreateMarkerRequestData"; +import { IInventoryDeleteMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryDeleteMarkerRequestData"; +import { IInventoryEditMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryEditMarkerRequestData"; +import { IInventoryExamineRequestData } from "@spt-aki/models/eft/inventory/IInventoryExamineRequestData"; +import { IInventoryFoldRequestData } from "@spt-aki/models/eft/inventory/IInventoryFoldRequestData"; +import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData"; +import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData"; +import { IInventoryReadEncyclopediaRequestData } from "@spt-aki/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; +import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData"; +import { IInventorySortRequestData } from "@spt-aki/models/eft/inventory/IInventorySortRequestData"; +import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData"; +import { IInventorySwapRequestData } from "@spt-aki/models/eft/inventory/IInventorySwapRequestData"; +import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInventoryTagRequestData"; +import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData"; +import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export interface IInventoryCallbacks { moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IItemEventCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IItemEventCallbacks.d.ts index 98fdb0b..6778e54 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IItemEventCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IItemEventCallbacks.d.ts @@ -1,6 +1,6 @@ -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterRequest } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterRequest } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export interface IItemEventCallbacks { handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ILauncherCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ILauncherCallbacks.d.ts index d01ae52..d37e58c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ILauncherCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ILauncherCallbacks.d.ts @@ -1,8 +1,8 @@ -import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"; -import { IGetMiniProfileRequestData } from "@spt/models/eft/launcher/IGetMiniProfileRequestData"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; -import { IRemoveProfileData } from "@spt/models/eft/launcher/IRemoveProfileData"; +import { IChangeRequestData } from "@spt-aki/models/eft/launcher/IChangeRequestData"; +import { IGetMiniProfileRequestData } from "@spt-aki/models/eft/launcher/IGetMiniProfileRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; +import { IRegisterData } from "@spt-aki/models/eft/launcher/IRegisterData"; +import { IRemoveProfileData } from "@spt-aki/models/eft/launcher/IRemoveProfileData"; export interface ILauncherCallbacks { connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ILocationCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ILocationCallbacks.d.ts index e51c723..a031a29 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ILocationCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ILocationCallbacks.d.ts @@ -1,7 +1,7 @@ -import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILocationsGenerateAllResponse } from "@spt-aki/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetLocationRequestData } from "@spt-aki/models/eft/location/IGetLocationRequestData"; export interface ILocationCallbacks { getLocationData(url: string, info: any, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/INoteCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/INoteCallbacks.d.ts index 5ea2c96..aec8099 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/INoteCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/INoteCallbacks.d.ts @@ -1,6 +1,6 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { INoteActionData } from "@spt-aki/models/eft/notes/INoteActionData"; export interface INoteCallbacks { addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/INotifierCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/INotifierCallbacks.d.ts index 9f1fae1..60b3695 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/INotifierCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/INotifierCallbacks.d.ts @@ -1,7 +1,7 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INotifierChannel } from "@spt/models/eft/notifier/INotifier"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; +import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData"; export interface INotifierCallbacks { /** * If we don't have anything to send, it's ok to not send anything back @@ -12,6 +12,6 @@ export interface INotifierCallbacks { sendNotification(sessionID: string, req: any, resp: any, data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData; + selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; notify(url: string, info: any, sessionID: string): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts index b0d75bd..886cc9c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts @@ -1,8 +1,8 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IPresetBuildActionRequestData } from "@spt/models/eft/presetBuild/IPresetBuildActionRequestData"; -import { IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData"; +import { IWeaponBuild } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IPresetBuildCallbacks { getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IProfileCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IProfileCallbacks.d.ts index f769cfd..f05532a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IProfileCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IProfileCallbacks.d.ts @@ -1,12 +1,12 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData"; -import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData"; -import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData"; -import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData"; -import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData"; +import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData"; +import { IProfileCreateRequestData } from "@spt-aki/models/eft/profile/IProfileCreateRequestData"; +import { ISearchFriendRequestData } from "@spt-aki/models/eft/profile/ISearchFriendRequestData"; +import { ISearchFriendResponse } from "@spt-aki/models/eft/profile/ISearchFriendResponse"; +import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData"; export interface IProfileCallbacks { onLoad(sessionID: string): any; createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IQuestCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IQuestCallbacks.d.ts index 1a688a7..546191f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IQuestCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IQuestCallbacks.d.ts @@ -1,14 +1,14 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuest } from "@spt/models/eft/common/tables/IQuest"; -import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; -import { IHandoverQuestRequestData } from "@spt/models/eft/quests/IHandoverQuestRequestData"; -import { IListQuestsRequestData } from "@spt/models/eft/quests/IListQuestsRequestData"; -import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt-aki/models/eft/quests/ICompleteQuestRequestData"; +import { IHandoverQuestRequestData } from "@spt-aki/models/eft/quests/IHandoverQuestRequestData"; +import { IListQuestsRequestData } from "@spt-aki/models/eft/quests/IListQuestsRequestData"; +import { IRepeatableQuestChangeRequest } from "@spt-aki/models/eft/quests/IRepeatableQuestChangeRequest"; export interface IQuestCallbacks { changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IRagfairCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IRagfairCallbacks.d.ts index dcad1ee..1157349 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IRagfairCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IRagfairCallbacks.d.ts @@ -1,13 +1,13 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAddOfferRequestData } from "@spt/models/eft/ragfair/IAddOfferRequestData"; -import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; -import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; -import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; -import { IRemoveOfferRequestData } from "@spt/models/eft/ragfair/IRemoveOfferRequestData"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAddOfferRequestData } from "@spt-aki/models/eft/ragfair/IAddOfferRequestData"; +import { IExtendOfferRequestData } from "@spt-aki/models/eft/ragfair/IExtendOfferRequestData"; +import { IGetItemPriceResult } from "@spt-aki/models/eft/ragfair/IGetItemPriceResult"; +import { IGetMarketPriceRequestData } from "@spt-aki/models/eft/ragfair/IGetMarketPriceRequestData"; +import { IRemoveOfferRequestData } from "@spt-aki/models/eft/ragfair/IRemoveOfferRequestData"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; export interface IRagfairCallbacks { load(): void; search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IRepairCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IRepairCallbacks.d.ts index e8d4fe1..b83fde8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IRepairCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IRepairCallbacks.d.ts @@ -1,7 +1,7 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepairActionDataRequest } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRepairActionDataRequest } from "@spt-aki/models/eft/repair/IRepairActionDataRequest"; +import { ITraderRepairActionDataRequest } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest"; export interface IRepairCallbacks { traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ITradeCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ITradeCallbacks.d.ts index 9b71d93..b6daa5d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ITradeCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ITradeCallbacks.d.ts @@ -1,7 +1,7 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -import { IProcessRagfairTradeRequestData } from "@spt/models/eft/trade/IProcessRagfairTradeRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; +import { IProcessRagfairTradeRequestData } from "@spt-aki/models/eft/trade/IProcessRagfairTradeRequestData"; export interface ITradeCallbacks { processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ITraderCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ITraderCallbacks.d.ts index 963e523..23cd532 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ITraderCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/ITraderCallbacks.d.ts @@ -1,6 +1,6 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { ITraderAssort, ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; export interface ITraderCallbacks { load(): void; getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IWeatherCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IWeatherCallbacks.d.ts index 5713469..1ba5b47 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IWeatherCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IWeatherCallbacks.d.ts @@ -1,5 +1,5 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; export interface IWeatherCallbacks { getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IWishlistCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IWishlistCallbacks.d.ts index 16f056d..3ab5c68 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IWishlistCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IWishlistCallbacks.d.ts @@ -1,6 +1,6 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IWishlistActionData } from "@spt/models/eft/wishlist/IWishlistActionData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IWishlistActionData } from "@spt-aki/models/eft/wishlist/IWishlistActionData"; export interface IWishlistCallbacks { addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IAirdropConfig.d.ts index d438f00..1975cf7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IAirdropConfig.d.ts @@ -1,8 +1,8 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt-aki/models/enums/AirdropType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { - kind: "spt-airdrop"; + kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; /** Lowest point plane will fly at */ @@ -33,14 +33,11 @@ export interface AirdropChancePercent { interchange: number; reserve: number; tarkovStreets: number; - sandbox: number; } /** Loot inside crate */ export interface AirdropLoot { /** Min/max of weapons inside crate */ - weaponPresetCount?: MinMax; - /** Min/max of armors (head/chest/rig) inside crate */ - armorPresetCount?: MinMax; + presetCount?: MinMax; /** Min/max of items inside crate */ itemCount: MinMax; /** Min/max of sealed weapon boxes inside crate */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBTRConfig.d.ts deleted file mode 100644 index 123c507..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBTRConfig.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; -export interface IBTRConfig extends IBaseConfig { - kind: "spt-btr"; - /** How fast the BTR moves */ - moveSpeed: number; - /** How long the cover fire service lasts for */ - coverFireTime: number; - /** How long the BTR waits at every point in its path */ - pointWaitTime: MinMax; - /** How long after purchasing the taxi service before the BTR leaves */ - taxiWaitTime: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBaseConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBaseConfig.d.ts index 8780d43..8b6ba88 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBaseConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBaseConfig.d.ts @@ -1,7 +1,3 @@ export interface IBaseConfig { kind: string; } -export interface IRunIntervalValues { - inRaid: number; - outOfRaid: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts index dd9c1cc..517ec27 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts @@ -1,19 +1,19 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { GenerationData } from "@spt/models/eft/common/tables/IBotType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; +import { IBotDurability } from "@spt-aki/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { - kind: "spt-bot"; + kind: "aki-bot"; /** How many variants of each bot should be generated on raid start */ presetBatch: PresetBatch; - /** Bot roles that should not have PMC types (sptBear/sptUsec) added as enemies to */ - botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ bosses: string[]; /** Control weapon/armor durability min/max values for each bot type */ durability: IBotDurability; /** Controls the percentage values of randomization item resources */ lootItemResourceRandomization: Record; + /** Control the weighting of how expensive an average loot item is on a PMC or Scav */ + lootNValue: LootNvalue; /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ revenge: Record; /** Control how many items are allowed to spawn on a bot @@ -33,12 +33,6 @@ export interface IBotConfig extends IBaseConfig { chanceAssaultScavHasPlayerScavName: number; /** How many stacks of secret ammo should a bot have in its bot secure container */ secureContainerAmmoStackCount: number; - /** Bot roles in this array will be given a dog tag on generation */ - botRolesWithDogTags: string[]; - /** Settings to control the items that get added into wallets on bots */ - walletLoot: IWalletLootSettings; - /** Currency weights, Keyed by botrole / currency */ - currencyStackSize: Record>>; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { @@ -79,14 +73,9 @@ export interface PresetBatch { sptUsec: number; sptBear: number; } -export interface IWalletLootSettings { - /** Chance wallets have loot in them */ - chancePercent: number; - itemCount: MinMax; - stackSizeWeight: Record; - currencyWeight: Record; - /** What wallets will have money in them */ - walletTplPool: string[]; +export interface LootNvalue { + scav: number; + pmc: number; } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ @@ -105,11 +94,6 @@ export interface EquipmentFilters { nvgIsActiveChanceDayPercent?: number; /** Chance NODS are down/active during the night */ nvgIsActiveChanceNightPercent?: number; - forceOnlyArmoredRigWhenNoArmor?: boolean; - /** Should plates be filtered by level */ - filterPlatesByLevel?: boolean; - /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ - weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ randomisation: RandomisationDetails[]; /** Blacklist equipment by level of bot */ @@ -121,8 +105,7 @@ export interface EquipmentFilters { /** Same as weightingAdjustments but based on player level instead of bot level */ weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ - forceStock?: boolean; - armorPlateWeighting?: IArmorPlateWeights[]; + forceStock: boolean; } export interface ModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ @@ -134,16 +117,14 @@ export interface RandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; - /** Mod slots that should be fully randomised -ignores mods from bottype.json and instaed creates a pool using items.json */ + /** Mod slots that should be fully randomisate -ignores mods from bottype.json */ randomisedWeaponModSlots?: string[]; /** Armor slots that should be randomised e.g. 'Headwear, Armband' */ randomisedArmorSlots?: string[]; /** Equipment chances */ equipment?: Record; - /** Weapon mod chances */ - weaponMods?: Record; - /** Equipment mod chances */ - equipmentMods?: Record; + /** Mod chances */ + mods?: Record; } export interface EquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ @@ -157,25 +138,22 @@ export interface WeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ - ammo?: IAdjustmentDetails; + ammo?: AdjustmentDetails; /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ - equipment?: IAdjustmentDetails; + equipment?: AdjustmentDetails; /** Key: clothing slot e.g. feet, value: item tpl + weight */ - clothing?: IAdjustmentDetails; + clothing?: AdjustmentDetails; } -export interface IAdjustmentDetails { +export interface AdjustmentDetails { add: Record>; edit: Record>; } -export interface IArmorPlateWeights extends Record { - levelRange: MinMax; -} export interface IRandomisedResourceDetails { food: IRandomisedResourceValues; meds: IRandomisedResourceValues; } export interface IRandomisedResourceValues { - /** Minimum percent of item to randomized between min and max resource */ + /** Minimum percent of item to randomized between min and max resource*/ resourcePercent: number; /** Chance for randomization to not occur */ chanceMaxResourcePercent: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotDurability.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotDurability.d.ts index 728db97..a4ff53c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotDurability.d.ts @@ -7,9 +7,6 @@ export interface IBotDurability { cursedassault: BotDurability; marksman: BotDurability; pmcbot: BotDurability; - arenafighterevent: BotDurability; - arenafighter: BotDurability; - crazyassaultevent: BotDurability; exusec: BotDurability; gifter: BotDurability; sectantpriest: BotDurability; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts index 755b308..68fbc14 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts @@ -1,15 +1,12 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { - kind: "spt-core"; - sptVersion: string; + kind: "aki-core"; + akiVersion: string; projectName: string; compatibleTarkovVersion: string; serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; - allowProfileWipe: boolean; - bsgLogging: IBsgLogging; - release: IRelease; fixes: IGameFixes; features: IServerFeatures; /** Commit hash build server was created from */ @@ -17,41 +14,10 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ buildTime?: string; } -export interface IBsgLogging { - /** - * verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals. - * complain to them about it! In all cases, better exceptions will be logged. - * WARNING: trace-info logging will quickly create log files in the megabytes. - * 0 - trace - * 1 - debug - * 2 - info - * 3 - warn - * 4 - error - * 5 - fatal - * 6 - off - */ - verbosity: number; - sendToServer: boolean; -} -export interface IRelease { - betaDisclaimerText?: string; - betaDisclaimerAcceptText: string; - serverModsLoadedText: string; - serverModsLoadedDebugText: string; - clientModsLoadedText: string; - clientModsLoadedDebugText: string; - illegalPluginsLoadedText: string; - illegalPluginsExceptionText: string; - releaseSummaryText?: string; - isBeta?: boolean; - isModdable?: boolean; - isModded: boolean; - betaDisclaimerTimeoutDelay: number; -} export interface IGameFixes { /** Shotguns use a different value than normal guns causing huge pellet dispersion */ fixShotgunDispersion: boolean; - /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ + /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IGiftsConfig.d.ts index c3c8799..b73761b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IGiftsConfig.d.ts @@ -1,12 +1,12 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { Traders } from "@spt/models/enums/Traders"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "@spt-aki/models/enums/GiftSenderType"; +import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; +import { Traders } from "@spt-aki/models/enums/Traders"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { - kind: "spt-gifts"; + kind: "aki-gifts"; gifts: Record; } export interface Gift { diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHealthConfig.d.ts index b86c208..49b405f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHealthConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { - kind: "spt-health"; + kind: "aki-health"; healthMultipliers: HealthMultipliers; save: Save; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHideoutConfig.d.ts index c1967c0..5386fb3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHideoutConfig.d.ts @@ -1,14 +1,7 @@ -import { IBaseConfig, IRunIntervalValues } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IHideoutConfig extends IBaseConfig { - kind: "spt-hideout"; - /** How many seconds should pass before hideout crafts / fuel usage is checked and procesed */ + kind: "aki-hideout"; runIntervalSeconds: number; - /** Default values used to hydrate `runIntervalSeconds` with */ - runIntervalValues: IRunIntervalValues; hoursForSkillCrafting: number; expCraftAmount: number; - overrideCraftTimeSeconds: number; - overrideBuildTimeSeconds: number; - /** Only process a profiles hideout crafts when it has been active in the last x minutes */ - updateProfileHideoutWhenActiveWithinMinutes: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHttpConfig.d.ts index 0f42e77..9007245 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHttpConfig.d.ts @@ -1,14 +1,10 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IHttpConfig extends IBaseConfig { - kind: "spt-http"; - /** Address used by webserver */ + webSocketPingDelayMs: number; + kind: "aki-http"; ip: string; port: number; - /** Address used by game client to connect to */ - backendIp: string; - backendPort: string; - webSocketPingDelayMs: number; logRequests: boolean; - /** e.g. "SPT_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "SPT_Data/Server/images/traders/NewTraderImage.png" */ + /** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */ serverImagePathOverride: Record; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInRaidConfig.d.ts index 7d6befd..5b60526 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInRaidConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { - kind: "spt-inraid"; + kind: "aki-inraid"; MIAOnRaidEnd: boolean; /** Overrides to apply to the pre-raid settings screen */ raidMenuSettings: RaidMenuSettings; @@ -16,12 +16,8 @@ export interface IInRaidConfig extends IBaseConfig { coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ scavExtractGain: number; - /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ - pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ keepFiRSecureContainerOnDeath: boolean; - /** Percentage chance a player scav hot is hostile to the player when scavving */ - playerScavHostileChancePercent: number; } export interface RaidMenuSettings { aiAmount: string; @@ -30,10 +26,9 @@ export interface RaidMenuSettings { scavWars: boolean; taggedAndCursed: boolean; enablePve: boolean; - randomWeather: boolean; - randomTime: boolean; } export interface Save { /** Should loot gained from raid be saved */ loot: boolean; + durability: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInsuranceConfig.d.ts index a5056a5..ffd0245 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,18 +1,14 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { - kind: "spt-insurance"; + kind: "aki-insurance"; /** Insurance price multiplier */ insuranceMultiplier: Record; /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; /** Item slots that should never be returned as insurance */ blacklistedEquipment: string[]; - /** Some slots should always be removed, e.g. 'cartridges' */ - slotIdsToAlwaysRemove: string[]; /** Override to control how quickly insurance is processed/returned in second */ returnTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; - minAttachmentRoublePriceToBeTaken: number; - chanceNoAttachmentsTakenPercent: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts index b489393..6f1498d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts @@ -1,15 +1,13 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IInventoryConfig extends IBaseConfig { - kind: "spt-inventory"; + kind: "aki-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; - /** Multipliers for skill gain when inside menus, NOT in-game */ - skillGainMultiplers: Record; } export interface RewardDetails { rewardCount: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IItemConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IItemConfig.d.ts index 0530278..506ee76 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IItemConfig.d.ts @@ -1,11 +1,8 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IItemConfig extends IBaseConfig { - kind: "spt-item"; + kind: "aki-item"; /** Items that should be globally blacklisted */ blacklist: string[]; - /** items that should not be given as rewards */ - rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocaleConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocaleConfig.d.ts index c3de13e..78e1cfb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocaleConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocaleConfig.d.ts @@ -1,13 +1,10 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILocaleConfig extends IBaseConfig { - kind: "spt-locale"; + kind: "aki-locale"; /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ gameLocale: string; /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ serverLocale: string; /** Languages server can be translated into */ serverSupportedLocales: string[]; - fallbacks: { - [locale: string]: string; - }; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocationConfig.d.ts index 1e113b2..5c804a4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocationConfig.d.ts @@ -1,8 +1,8 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { BossLocationSpawn, Wave } from "@spt/models/eft/common/ILocationBase"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { BossLocationSpawn, Wave } from "@spt-aki/models/eft/common/ILocationBase"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { - kind: "spt-location"; + kind: "aki-location"; /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ @@ -21,34 +21,23 @@ export interface ILocationConfig extends IBaseConfig { fitLootIntoContainerAttempts: number; /** Add all possible zones to each maps `OpenZones` property */ addOpenZonesToAllMaps: boolean; - /** Allow addition of custom bot waves designed by SPT to be added to maps - defined in configs/location.json.customWaves */ + /** Allow addition of custom bot waves designed by SPT to be added to maps - defined in configs/location.json.customWaves*/ addCustomBotWavesToMaps: boolean; /** Should the limits defined inside botTypeLimits to appled to locations on game start */ enableBotTypeLimits: boolean; - /** Add limits to a locations base.MinMaxBots array if enableBotTypeLimits is true */ + /** Add limits to a locations base.MinMaxBots array if enableBotTypeLimits is true*/ botTypeLimits: Record; /** container randomisation settings */ containerRandomisationSettings: IContainerRandomistionSettings; - /** How full must a random loose magazine be % */ + /** How full must a random loose magazine be %*/ minFillLooseMagazinePercent: number; - /** How full must a random static magazine be % */ + /** How full must a random static magazine be %*/ minFillStaticMagazinePercent: number; allowDuplicateItemsInStaticContainers: boolean; - /** Chance loose magazines have ammo in them TODO - rename to dynamicMagazineLootHasAmmoChancePercent */ - magazineLootHasAmmoChancePercent: number; - /** Chance static magazines have ammo in them */ - staticMagazineLootHasAmmoChancePercent: number; /** Key: map, value: loose loot ids to ignore */ looseLootBlacklist: Record; - /** Key: map, value: settings to control how long scav raids are */ + /** Key: map, value: settings to control how long scav raids are*/ scavRaidTimeSettings: IScavRaidTimeSettings; - /** Settings to adjust mods for lootable equipment in raid */ - equipmentLootSettings: IEquipmentLootSettings; - /** Sets the max Patrol Value of the Boxzone on the map Ground Zero */ - sandboxMaxPatrolvalue: number; -} -export interface IEquipmentLootSettings { - modSpawnChancePercent: Record; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -89,7 +78,6 @@ export interface LootMultiplier { tarkovstreets: number; terminal: number; town: number; - sandbox: number; } export interface IContainerRandomistionSettings { enabled: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILootConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILootConfig.d.ts index e22c3ea..003d6c6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILootConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILootConfig.d.ts @@ -1,7 +1,7 @@ -import { Spawnpoint } from "@spt/models/eft/common/ILooseLoot"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { Spawnpoint } from "@spt-aki/models/eft/common/ILooseLoot"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILootConfig extends IBaseConfig { - kind: "spt-loot"; + kind: "aki-loot"; /** Spawn positions to add into a map, key=mapid */ looseLoot: Record; /** Loose loot probability adjustments to apply on game start */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILostOnDeathConfig.d.ts index 8574646..ad7e7b9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILostOnDeathConfig extends IBaseConfig { - kind: "spt-lostondeath"; + kind: "aki-lostondeath"; /** What equipment in each slot should be lost on death */ equipment: Equipment; /** Should special slot items be removed from quest inventory on death e.g. wifi camera/markers */ @@ -16,7 +16,6 @@ export interface Equipment { ArmorVest: boolean; Eyewear: boolean; TacticalVest: boolean; - PocketItems: boolean; Backpack: boolean; Holster: boolean; FirstPrimaryWeapon: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IMatchConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IMatchConfig.d.ts index f6a9b4c..dc7a8cb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IMatchConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IMatchConfig.d.ts @@ -1,5 +1,5 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IMatchConfig extends IBaseConfig { - kind: "spt-match"; + kind: "aki-match"; enabled: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPlayerScavConfig.d.ts index 8834768..7f587e0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPlayerScavConfig.d.ts @@ -1,7 +1,7 @@ -import { GenerationData } from "@spt/models/eft/common/tables/IBotType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { - kind: "spt-playerscav"; + kind: "aki-playerscav"; karmaLevel: Record; } export interface KarmaLevel { @@ -9,7 +9,7 @@ export interface KarmaLevel { modifiers: Modifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; - lootItemsToAddChancePercent: Record; + labsAccessCardChancePercent: number; } export interface Modifiers { equipment: Record; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmChatResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmChatResponse.d.ts index 83fab34..50afdbc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmChatResponse.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmChatResponse.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IPmcChatResponse extends IBaseConfig { - kind: "spt-pmcchatresponse"; + kind: "aki-pmcchatresponse"; victim: IResponseSettings; killer: IResponseSettings; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts index 00fabb3..d67e6c2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts @@ -1,8 +1,8 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IPmcConfig extends IBaseConfig { - kind: "spt-pmc"; + kind: "aki-pmc"; /** What game version should the PMC have */ gameVersionWeight: Record; /** What account type should the PMC have */ @@ -13,6 +13,7 @@ export interface IPmcConfig extends IBaseConfig { pocketLoot: SlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; + dynamicLoot: DynamicLoot; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -41,14 +42,10 @@ export interface IPmcConfig extends IBaseConfig { enemyTypes: string[]; /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; - /** How many levels below player level can a PMC be */ - botRelativeLevelDeltaMin: number; /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; + addPrefixToSameNamePMCAsPlayerChance: number; allPMCsHavePlayerNameWithRandomPrefixChance: number; - locationSpecificPmcLevelOverride: Record; - /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ - addSecureContainerLootFromBotConfig: boolean; } export interface PmcTypes { usec: string; @@ -57,4 +54,8 @@ export interface PmcTypes { export interface SlotLootSettings { whitelist: string[]; blacklist: string[]; + moneyStackLimits: Record; +} +export interface DynamicLoot { + moneyStackLimits: Record; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IQuestConfig.d.ts index 362602c..c190d01 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,10 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { ELocationName } from "@spt/models/enums/ELocationName"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { ELocationName } from "@spt-aki/models/enums/ELocationName"; +import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IQuestConfig extends IBaseConfig { - kind: "spt-quest"; - mailRedeemTimeHours: Record; + kind: "aki-quest"; + redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; /** Show non-seasonal quests be shown to player */ showNonSeasonalEventQuests: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts index bb318de..14d77f1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts @@ -1,14 +1,12 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig, IRunIntervalValues } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IRagfairConfig extends IBaseConfig { - kind: "spt-ragfair"; + kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; - /** Default values used to hydrate `runIntervalSeconds` with */ - runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; - /** Trader ids + should their assorts be listed on flea */ + /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } @@ -18,8 +16,10 @@ export interface Sell { /** Settings to control chances of offer being sold */ chance: Chance; /** Settings to control how long it takes for a player offer to sell */ - time: MinMax; - /** Seconds from clicking remove to remove offer from market */ + time: Time; + /** Player offer reputation gain/loss settings */ + reputation: Reputation; + /**Seconds from clicking remove to remove offer from market */ expireSeconds: number; } export interface Chance { @@ -32,6 +32,13 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } +export interface Time extends MinMax { + base: number; +} +export interface Reputation { + gain: number; + loss: number; +} export interface Dynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ @@ -58,10 +65,6 @@ export interface Dynamic { nonStackableCount: MinMax; /** Range of rating offers for items being listed */ rating: MinMax; - /** Armor specific flea settings */ - armor: IArmorSettings; - /** A multipler to apply to individual tpls price just prior to item quality adjustment */ - itemPriceMultiplier: Record; /** Percentages to sell offers in each currency */ currencies: Record; /** Item tpls that should be forced to sell as a single item */ @@ -79,6 +82,8 @@ export interface IPriceRanges { pack: MinMax; } export interface IBarterDetails { + /** Should barter offers be generated */ + enable: boolean; /** Percentage change an offer is listed as a barter */ chancePercent: number; /** Min number of required items for a barter requirement */ @@ -93,6 +98,8 @@ export interface IBarterDetails { itemTypeBlacklist: string[]; } export interface IPackDetails { + /** Should pack offers be generated */ + enable: boolean; /** Percentage change an offer is listed as a pack */ chancePercent: number; /** Min number of required items for a pack */ @@ -112,11 +119,9 @@ export interface OfferAdjustment { /** What is the minimum rouble price to consider adjusting price of item */ priceThreshholdRub: number; } -export interface Condition { +export interface Condition extends MinMax { /** Percentage change durability is altered */ conditionChance: number; - current: MinMax; - max: MinMax; } export interface Blacklist { /** Damaged ammo packs */ @@ -129,30 +134,9 @@ export interface Blacklist { enableQuestList: boolean; /** Should trader items that are blacklisted by bsg be listed on flea */ traderItems: boolean; - /** Maximum level an armor plate can be found in a flea-listed armor item */ - armorPlate: IArmorPlateBlacklistSettings; - /** Should specific categories be blacklisted from the flea, true = use blacklist */ - enableCustomItemCategoryList: boolean; - /** Custom category blacklist for parent Ids */ - customItemCategoryList: string[]; -} -export interface IArmorPlateBlacklistSettings { - /** Max level of plates an armor can have without being removed */ - maxProtectionLevel: number; - /** Item slots to NOT remove from items on flea */ - ignoreSlots: string[]; } export interface IUnreasonableModPrices { - /** Enable a system that adjusts very high ragfair prices to be below a max multiple of items the handbook values */ enabled: boolean; - /** Multipler to start adjusting item values from, e.g. a value of 10 means any value over 10x the handbook price gets adjusted */ handbookPriceOverMultiplier: number; - /** The new multiplier for items found using above property, e.g. a value of 4 means set items price to 4x handbook price */ newPriceHandbookMultiplier: number; } -export interface IArmorSettings { - /** % chance / 100 that armor plates will be removed from an offer before listing */ - removeRemovablePlateChance: number; - /** What slots are to be removed when removeRemovablePlateChance is true */ - plateSlotIdToRemovePool: string[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..9e23cc4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRepairConfig.d.ts @@ -1,7 +1,7 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IRepairConfig extends IBaseConfig { - kind: "spt-repair"; + kind: "aki-repair"; priceMultiplier: number; applyRandomizeDurabilityLoss: boolean; weaponSkillRepairGain: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IScavCaseConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IScavCaseConfig.d.ts index c611948..92f2722 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IScavCaseConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IScavCaseConfig.d.ts @@ -1,7 +1,7 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IScavCaseConfig extends IBaseConfig { - kind: "spt-scavcase"; + kind: "aki-scavcase"; rewardItemValueRangeRub: Record; moneyRewards: MoneyRewards; ammoRewards: AmmoRewards; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts index da7070b..4ac903b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,14 +1,11 @@ -import { BossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { - kind: "spt-seasonalevents"; + kind: "aki-seasonalevents"; enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; events: ISeasonalEvent[]; - eventBotMapping: Record; - eventBossSpawns: Record>; gifterSettings: GifterSetting[]; } export interface ISeasonalEvent { diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts index a8c969c..29b3d2d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts @@ -1,38 +1,33 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; +import { LootRequest } from "@spt-aki/models/spt/services/LootRequest"; export interface ITraderConfig extends IBaseConfig { - kind: "spt-trader"; + kind: "aki-trader"; updateTime: UpdateTime[]; purchasesAreFoundInRaid: boolean; - /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ - tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; + /** Keep track of purchased trader-limited items beyond server restarts to prevent server-restart item scumming */ + persistPurchaseDataInProfile: boolean; fence: FenceConfig; } export interface UpdateTime { traderId: string; - /** Seconds between trader resets */ - seconds: MinMax; + seconds: number; } export interface FenceConfig { discountOptions: DiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; - weaponPresetMinMax: MinMax; - equipmentPresetMinMax: MinMax; + maxPresetsPercent: number; itemPriceMult: number; presetPriceMult: number; - armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; - weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + armorMaxDurabilityPercentMinMax: MinMax; + presetMaxDurabilityPercentMinMax: MinMax; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; - /** Prevent duplicate offers of items of specific categories by parentId */ - preventDuplicateOffersOfCategory: string[]; regenerateAssortsOnRefresh: boolean; /** Max rouble price before item is not listed on flea */ itemCategoryRoublePriceLimit: Record; @@ -40,15 +35,8 @@ export interface FenceConfig { presetSlotsToRemoveChancePercent: Record; /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; - /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ - ammoMaxPenLimit: number; blacklist: string[]; coopExtractGift: CoopExtractReward; - btrDeliveryExpireHours: number; -} -export interface IItemDurabilityCurrentMax { - current: MinMax; - max: MinMax; } export interface CoopExtractReward extends LootRequest { sendGift: boolean; @@ -59,6 +47,4 @@ export interface DiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; - weaponPresetMinMax: MinMax; - equipmentPresetMinMax: MinMax; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..10f5459 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IWeatherConfig.d.ts @@ -1,21 +1,10 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Season } from "@spt/models/enums/Season"; -import { WindDirection } from "@spt/models/enums/WindDirection"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { WindDirection } from "@spt-aki/models/enums/WindDirection"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { - kind: "spt-weather"; + kind: "aki-weather"; acceleration: number; weather: Weather; - seasonDates: ISeasonDateTimes[]; - overrideSeason?: Season; -} -export interface ISeasonDateTimes { - seasonType: Season; - name: string; - startDay: number; - startMonth: number; - endDay: number; - endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/controllers/IBotController.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/controllers/IBotController.d.ts index e577497..3e8e035 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/controllers/IBotController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/controllers/IBotController.d.ts @@ -1,7 +1,7 @@ -import { IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; -import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; +import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; +import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; export interface IBotController { getBotLimit(type: string): number; getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts index 379b032..2068ede 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,7 +1,7 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { Traders } from "@spt/models/enums/Traders"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { Traders } from "@spt-aki/models/enums/Traders"; export interface ISendMessageDetails { /** Player id */ recipientId: string; @@ -30,15 +30,7 @@ export interface ISendMessageDetails { } export interface IProfileChangeEvent { _id: string; - Type: ProfileChangeEventType; + Type: "TraderSalesSum" | "TraderStanding" | "ProfileLevel" | "SkillPoints" | "ExamineAllItems" | "UnlockTrader"; value: number; entity?: string; } -export declare enum ProfileChangeEventType { - TRADER_SALES_SUM = "TraderSalesSum", - TRADER_STANDING = "TraderStanding", - PROFILE_LEVEL = "ProfileLevel", - SKILL_POINTS = "SkillPoints", - EXAMINE_ALL_ITEMS = "ExamineAllItems", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/fence/ICreateFenceAssortsResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/fence/ICreateFenceAssortsResult.d.ts deleted file mode 100644 index 553f4e2..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/fence/ICreateFenceAssortsResult.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -export interface ICreateFenceAssortsResult { - sptItems: Item[][]; - barter_scheme: Record; - loyal_level_items: Record; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/fence/IFenceAssortGenerationValues.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/fence/IFenceAssortGenerationValues.d.ts deleted file mode 100644 index dea4726..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/fence/IFenceAssortGenerationValues.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IFenceAssortGenerationValues { - normal: IGenerationAssortValues; - discount: IGenerationAssortValues; -} -export interface IGenerationAssortValues { - item: number; - weaponPreset: number; - equipmentPreset: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IBotGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IBotGenerator.d.ts index e46ce24..8c0b979 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IBotGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IBotGenerator.d.ts @@ -1,5 +1,10 @@ -import { Inventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; -import { Chances, Generation, Inventory } from "@spt/models/eft/common/tables/IBotType"; +import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Chances, Generation, Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; export interface IBotGenerator { generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; } +export interface IExhaustableArray { + getRandomValue(): T; + getFirstValue(): T; + hasValues(): boolean; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/ILocationGenerator.d.ts index 2df98e7..347d5fa 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; -import { ILooseLoot, SpawnpointTemplate } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IRagfairAssortGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IRagfairAssortGenerator.d.ts index 193b685..bcd26c2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IRagfairAssortGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IRagfairAssortGenerator.d.ts @@ -1,4 +1,4 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IRagfairAssortGenerator { getAssortItems(): Item[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IRagfairOfferGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IRagfairOfferGenerator.d.ts index 66d28e9..bb5fdf9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IRagfairOfferGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/generators/IRagfairOfferGenerator.d.ts @@ -1,6 +1,6 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; export interface IRagfairOfferGenerator { createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece: boolean): IRagfairOffer; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/logging/IClientLogRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/logging/IClientLogRequest.d.ts index 71f0b38..b7e1b36 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/logging/IClientLogRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/logging/IClientLogRequest.d.ts @@ -1,4 +1,4 @@ -import { LogLevel } from "@spt/models/spt/logging/LogLevel"; +import { LogLevel } from "@spt-aki/models/spt/logging/LogLevel"; export interface IClientLogRequest { Source: string; Level: LogLevel | string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/logging/LogTextColor.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/logging/LogTextColor.d.ts index aefca2a..6c7abf3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/logging/LogTextColor.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/logging/LogTextColor.d.ts @@ -7,5 +7,5 @@ export declare enum LogTextColor { MAGENTA = "magenta", CYAN = "cyan", WHITE = "white", - GRAY = "gray" + GRAY = "" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/IPackageJsonData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/IPackageJsonData.d.ts index d21e5f1..b07d00e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/IPackageJsonData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/IPackageJsonData.d.ts @@ -5,10 +5,9 @@ export interface IPackageJsonData { dependencies?: Record; modDependencies?: Record; name: string; - url: string; author: string; version: string; - sptVersion: string; + akiVersion: string; /** We deliberately purge this data */ scripts: Record; devDependencies: Record; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..304462d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/repeatable/IQuestTypePool.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/repeatable/IQuestTypePool.d.ts index 200303b..bce68e8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/repeatable/IQuestTypePool.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/repeatable/IQuestTypePool.d.ts @@ -1,4 +1,4 @@ -import { ELocationName } from "@spt/models/enums/ELocationName"; +import { ELocationName } from "@spt-aki/models/enums/ELocationName"; export interface IQuestTypePool { types: string[]; pool: IQuestPool; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ExhaustableArray.d.ts deleted file mode 100644 index 2419acf..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ExhaustableArray.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -export declare class ExhaustableArray implements IExhaustableArray { - private itemPool; - private randomUtil; - private cloner; - private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); - getRandomValue(): T; - getFirstValue(): T; - hasValues(): boolean; -} -export interface IExhaustableArray { - getRandomValue(): T; - getFirstValue(): T; - hasValues(): boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/server/IDatabaseTables.d.ts index 3a98412..98a0dbd 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/server/IDatabaseTables.d.ts @@ -1,26 +1,26 @@ -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; -import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem"; -import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; -import { IMatch } from "@spt/models/eft/common/tables/IMatch"; -import { IProfileTemplates } from "@spt/models/eft/common/tables/IProfileTemplate"; -import { IQuest } from "@spt/models/eft/common/tables/IQuest"; -import { IRepeatableQuestDatabase } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ITrader } from "@spt/models/eft/common/tables/ITrader"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; -import { IDefaultEquipmentPreset } from "@spt/models/eft/profile/ISptProfile"; -import { ILocaleBase } from "@spt/models/spt/server/ILocaleBase"; -import { ILocations } from "@spt/models/spt/server/ILocations"; -import { IServerBase } from "@spt/models/spt/server/IServerBase"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; +import { IGlobals } from "@spt-aki/models/eft/common/IGlobals"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; +import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; +import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; +import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; +import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; +import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; +import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IRepeatableQuestDatabase } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ITrader } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IHideoutArea } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase"; +import { IHideoutSettingsBase } from "@spt-aki/models/eft/hideout/IHideoutSettingsBase"; +import { IQteData } from "@spt-aki/models/eft/hideout/IQteData"; +import { IEquipmentBuild } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILocaleBase } from "@spt-aki/models/spt/server/ILocaleBase"; +import { ILocations } from "@spt-aki/models/spt/server/ILocations"; +import { IServerBase } from "@spt-aki/models/spt/server/IServerBase"; +import { ISettingsBase } from "@spt-aki/models/spt/server/ISettingsBase"; export interface IDatabaseTables { bots?: { types: Record; @@ -36,6 +36,7 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; + loot?: ILootBase; match?: IMatch; templates?: { character: string[]; @@ -49,9 +50,7 @@ export interface IDatabaseTables { /** Flea prices of items - gathered from online flea market dump */ prices: Record; /** Default equipment loadouts that show on main inventory screen */ - defaultEquipmentPresets: IDefaultEquipmentPreset[]; - /** Achievements */ - achievements: IAchievement[]; + defaultEquipmentPresets: IEquipmentBuild[]; }; traders?: Record; globals?: IGlobals; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ILocations.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ILocations.d.ts index 500efcc..9987d8c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ILocations.d.ts @@ -1,24 +1,26 @@ -import { ILocation } from "@spt/models/eft/common/ILocation"; -import { ILocationsBase } from "@spt/models/eft/common/tables/ILocationsBase"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { ILocationsBase } from "@spt-aki/models/eft/common/tables/ILocationsBase"; export interface ILocations { - bigmap?: ILocation; - develop?: ILocation; - factory4_day?: ILocation; - factory4_night?: ILocation; - hideout?: ILocation; - interchange?: ILocation; - laboratory?: ILocation; - lighthouse?: ILocation; - privatearea?: ILocation; - rezervbase?: ILocation; - shoreline?: ILocation; - suburbs?: ILocation; - tarkovstreets?: ILocation; - terminal?: ILocation; - town?: ILocation; - woods?: ILocation; - sandbox?: ILocation; - sandbox_high?: ILocation; - /** Holds a mapping of the linkages between locations on the UI */ + bigmap?: ILocationData; + develop?: ILocationData; + factory4_day?: ILocationData; + factory4_night?: ILocationData; + hideout?: ILocationData; + interchange?: ILocationData; + laboratory?: ILocationData; + lighthouse?: ILocationData; + privatearea?: ILocationData; + rezervbase?: ILocationData; + shoreline?: ILocationData; + suburbs?: ILocationData; + tarkovstreets?: ILocationData; + terminal?: ILocationData; + town?: ILocationData; + woods?: ILocationData; base?: ILocationsBase; } +export interface ILocationData { + base: ILocationBase; + looseLoot?: ILooseLoot; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomPreset.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomPreset.d.ts index 3301a55..989c58f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomPreset.d.ts @@ -1,4 +1,4 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; export interface CustomPreset { key: string; preset: IPreset; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomTraderAssortData.d.ts index 7ad6341..289d66a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomTraderAssortData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomTraderAssortData.d.ts @@ -1,5 +1,5 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { Traders } from "@spt-aki/models/enums/Traders"; export interface CustomTraderAssortData { traderId: Traders; assorts: ITraderAssort; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/IInsuranceEquipmentPkg.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/IInsuranceEquipmentPkg.d.ts deleted file mode 100644 index 92d0565..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/IInsuranceEquipmentPkg.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -export interface IInsuranceEquipmentPkg { - sessionID: string; - pmcData: IPmcData; - itemToReturnToPlayer: Item; - traderId: string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/ITraderServiceModel.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/ITraderServiceModel.d.ts deleted file mode 100644 index 165b65c..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/ITraderServiceModel.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { TraderServiceType } from "@spt/models/enums/TraderServiceType"; -export interface ITraderServiceModel { - serviceType: TraderServiceType; - itemsToPay?: { - [key: string]: number; - }; - itemsToReceive?: string[]; - subServices?: { - [key: string]: number; - }; - requirements?: ITraderServiceRequirementsModel; -} -export interface ITraderServiceRequirementsModel { - completedQuests?: string[]; - standings?: { - [key: string]: number; - }; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootRequest.d.ts index 9f028a6..f277553 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootRequest.d.ts @@ -1,7 +1,6 @@ -import { MinMax } from "@spt/models/common/MinMax"; +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; + presetCount: MinMax; itemCount: MinMax; weaponCrateCount: MinMax; itemBlacklist: string[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/IAsyncQueue.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/IAsyncQueue.d.ts index 4bc9199..464139a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/IAsyncQueue.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/IAsyncQueue.d.ts @@ -1,4 +1,4 @@ -import { ICommand } from "@spt/models/spt/utils/ICommand"; +import { ICommand } from "@spt-aki/models/spt/utils/ICommand"; export interface IAsyncQueue { waitFor(command: ICommand): Promise; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/ILogger.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/ILogger.d.ts index 1b9726d..340f26b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/ILogger.d.ts @@ -1,6 +1,6 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; -import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; +import { Daum } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor"; +import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; export interface ILogger { writeToLogFile(data: string | Daum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/IUuidGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/IUuidGenerator.d.ts new file mode 100644 index 0000000..3870469 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/IUuidGenerator.d.ts @@ -0,0 +1,3 @@ +export interface IUUidGenerator { + generate(): string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/EventOutputHolder.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/EventOutputHolder.d.ts index a943e2b..8ee10ef 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/EventOutputHolder.d.ts @@ -1,19 +1,19 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { + protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; - protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); + constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/HttpRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/HttpRouter.d.ts index 3fdb53f..875182d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/HttpRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/HttpRouter.d.ts @@ -1,13 +1,13 @@ /// import { IncomingMessage } from "node:http"; -import { DynamicRouter, Router, StaticRouter } from "@spt/di/Router"; +import { DynamicRouter, Router, StaticRouter } from "@spt-aki/di/Router"; export declare class HttpRouter { protected staticRouters: StaticRouter[]; protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; + getResponse(req: IncomingMessage, info: any, sessionID: string): string; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/ImageRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/ImageRouter.d.ts index eb3697f..9d13b7a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/ImageRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/ImageRouter.d.ts @@ -1,8 +1,8 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { ImageRouteService } from "@spt/services/mod/image/ImageRouteService"; -import { HttpFileUtil } from "@spt/utils/HttpFileUtil"; -import { VFS } from "@spt/utils/VFS"; +import { ImageRouteService } from "@spt-aki/services/mod/image/ImageRouteService"; +import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class ImageRouter { protected vfs: VFS; protected imageRouteService: ImageRouteService; diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/ItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/ItemEventRouter.d.ts index f8043c0..6c770ec 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/ItemEventRouter.d.ts @@ -1,23 +1,21 @@ -import { ItemEventRouterDefinition } from "@spt/di/Router"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IItemEventRouterRequest } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IItemEventRouterRequest } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class ItemEventRouter { protected logger: ILogger; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - protected cloner: ICloner; - constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; + handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/BotDynamicRouter.d.ts index 9b1131d..5c54065 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { BotCallbacks } from "@spt/callbacks/BotCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { BotCallbacks } from "@spt-aki/callbacks/BotCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class BotDynamicRouter extends DynamicRouter { protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/BundleDynamicRouter.d.ts index c552c6d..c73860a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { BundleCallbacks } from "@spt/callbacks/BundleCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { BundleCallbacks } from "@spt-aki/callbacks/BundleCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/CustomizationDynamicRouter.d.ts index b7f4956..79e60e6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { CustomizationCallbacks } from "@spt/callbacks/CustomizationCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/DataDynamicRouter.d.ts index d71fde1..098748f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { DataCallbacks } from "@spt/callbacks/DataCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { DataCallbacks } from "@spt-aki/callbacks/DataCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class DataDynamicRouter extends DynamicRouter { protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/HttpDynamicRouter.d.ts index 01d1ffb..5fda392 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { DynamicRouter } from "@spt/di/Router"; -import { ImageRouter } from "@spt/routers/ImageRouter"; +import { DynamicRouter } from "@spt-aki/di/Router"; +import { ImageRouter } from "@spt-aki/routers/ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/InraidDynamicRouter.d.ts index e4cf1eb..b68282e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { InraidCallbacks } from "@spt/callbacks/InraidCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { InraidCallbacks } from "@spt-aki/callbacks/InraidCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/LocationDynamicRouter.d.ts index a52f8d6..aef354f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { LocationCallbacks } from "@spt/callbacks/LocationCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { LocationCallbacks } from "@spt-aki/callbacks/LocationCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/NotifierDynamicRouter.d.ts index c00c80e..f1c0ea7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { NotifierCallbacks } from "@spt/callbacks/NotifierCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { NotifierCallbacks } from "@spt-aki/callbacks/NotifierCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/TraderDynamicRouter.d.ts index cdd6b71..2cde752 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { TraderCallbacks } from "@spt/callbacks/TraderCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { TraderCallbacks } from "@spt-aki/callbacks/TraderCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/CustomizationItemEventRouter.d.ts index c9babf3..473c8ed 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -1,10 +1,10 @@ -import { CustomizationCallbacks } from "@spt/callbacks/CustomizationCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/HealthItemEventRouter.d.ts index 490884f..5243153 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/HealthItemEventRouter.d.ts @@ -1,10 +1,10 @@ -import { HealthCallbacks } from "@spt/callbacks/HealthCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HealthCallbacks } from "@spt-aki/callbacks/HealthCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/HideoutItemEventRouter.d.ts index 6839fee..8775212 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -1,10 +1,10 @@ -import { HideoutCallbacks } from "@spt/callbacks/HideoutCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutCallbacks } from "@spt-aki/callbacks/HideoutCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/InsuranceItemEventRouter.d.ts index af2b3dc..f2c9ab6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -1,10 +1,10 @@ -import { InsuranceCallbacks } from "@spt/callbacks/InsuranceCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { InsuranceCallbacks } from "@spt-aki/callbacks/InsuranceCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/InventoryItemEventRouter.d.ts index 660de81..cb93d29 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -1,12 +1,12 @@ -import { HideoutCallbacks } from "@spt/callbacks/HideoutCallbacks"; -import { InventoryCallbacks } from "@spt/callbacks/InventoryCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutCallbacks } from "@spt-aki/callbacks/HideoutCallbacks"; +import { InventoryCallbacks } from "@spt-aki/callbacks/InventoryCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { protected inventoryCallbacks: InventoryCallbacks; protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/NoteItemEventRouter.d.ts index b415c3a..35907cc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/NoteItemEventRouter.d.ts @@ -1,11 +1,11 @@ -import { NoteCallbacks } from "@spt/callbacks/NoteCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; +import { NoteCallbacks } from "@spt-aki/callbacks/NoteCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { INoteActionData } from "@spt-aki/models/eft/notes/INoteActionData"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/PresetBuildItemEventRouter.d.ts new file mode 100644 index 0000000..d5dbf9d --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -0,0 +1,10 @@ +import { PresetBuildCallbacks } from "@spt-aki/callbacks/PresetBuildCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { + protected presetBuildCallbacks: PresetBuildCallbacks; + constructor(presetBuildCallbacks: PresetBuildCallbacks); + getHandledRoutes(): HandledRoute[]; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/QuestItemEventRouter.d.ts index 1ce94f9..32715e5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,12 +1,12 @@ -import { QuestCallbacks } from "@spt/callbacks/QuestCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { QuestCallbacks } from "@spt-aki/callbacks/QuestCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected logger: ILogger; protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/RagfairItemEventRouter.d.ts index 09cdbf6..b8cf48c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -1,10 +1,10 @@ -import { RagfairCallbacks } from "@spt/callbacks/RagfairCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { RagfairCallbacks } from "@spt-aki/callbacks/RagfairCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/RepairItemEventRouter.d.ts index d2f857d..282c47a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/RepairItemEventRouter.d.ts @@ -1,10 +1,10 @@ -import { RepairCallbacks } from "@spt/callbacks/RepairCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { RepairCallbacks } from "@spt-aki/callbacks/RepairCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/TradeItemEventRouter.d.ts index 5617ab3..1494963 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/TradeItemEventRouter.d.ts @@ -1,10 +1,10 @@ -import { TradeCallbacks } from "@spt/callbacks/TradeCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { TradeCallbacks } from "@spt-aki/callbacks/TradeCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/WishlistItemEventRouter.d.ts index bc6d257..1d6f601 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -1,10 +1,10 @@ -import { WishlistCallbacks } from "@spt/callbacks/WishlistCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { WishlistCallbacks } from "@spt-aki/callbacks/WishlistCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/save_load/HealthSaveLoadRouter.d.ts index df04248..1ecfa44 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,6 +1,6 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/save_load/InraidSaveLoadRouter.d.ts index 3ea61fa..7cc9a08 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,6 +1,6 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index ba8cb8a..af5222a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,6 +1,6 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 77d50bd..8047834 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,6 +1,6 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/BundleSerializer.d.ts index dc71cd8..52db030 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/BundleSerializer.d.ts @@ -1,9 +1,9 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { Serializer } from "@spt/di/Serializer"; -import { BundleLoader } from "@spt/loaders/BundleLoader"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HttpFileUtil } from "@spt/utils/HttpFileUtil"; +import { Serializer } from "@spt-aki/di/Serializer"; +import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; export declare class BundleSerializer extends Serializer { protected logger: ILogger; protected bundleLoader: BundleLoader; diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/ImageSerializer.d.ts index 5c77243..3b1ff6d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/ImageSerializer.d.ts @@ -1,7 +1,7 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { Serializer } from "@spt/di/Serializer"; -import { ImageRouter } from "@spt/routers/ImageRouter"; +import { Serializer } from "@spt-aki/di/Serializer"; +import { ImageRouter } from "@spt-aki/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/NotifySerializer.d.ts index 8c07f81..f8730b6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/NotifySerializer.d.ts @@ -1,9 +1,9 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { NotifierController } from "@spt/controllers/NotifierController"; -import { Serializer } from "@spt/di/Serializer"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { JsonUtil } from "@spt/utils/JsonUtil"; +import { NotifierController } from "@spt-aki/controllers/NotifierController"; +import { Serializer } from "@spt-aki/di/Serializer"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class NotifySerializer extends Serializer { protected notifierController: NotifierController; protected jsonUtil: JsonUtil; diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/AchievementStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/AchievementStaticRouter.d.ts deleted file mode 100644 index 80e3ae6..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/AchievementStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AchievementCallbacks } from "@spt/callbacks/AchievementCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class AchievementStaticRouter extends StaticRouter { - protected achievementCallbacks: AchievementCallbacks; - constructor(achievementCallbacks: AchievementCallbacks); -} diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/BotStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/BotStaticRouter.d.ts index 2a164a5..e7e9ff5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/BotStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { BotCallbacks } from "@spt/callbacks/BotCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { BotCallbacks } from "@spt-aki/callbacks/BotCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class BotStaticRouter extends StaticRouter { protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/BuildStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/BuildStaticRouter.d.ts deleted file mode 100644 index c5c3a5e..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/BuildStaticRouter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { BuildsCallbacks } from "@spt/callbacks/BuildsCallbacks"; -import { StaticRouter } from "@spt/di/Router"; -export declare class BuildsStaticRouter extends StaticRouter { - protected buildsCallbacks: BuildsCallbacks; - constructor(buildsCallbacks: BuildsCallbacks); -} diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/BundleStaticRouter.d.ts index 070d981..62056ba 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/BundleStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { BundleCallbacks } from "@spt/callbacks/BundleCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { BundleCallbacks } from "@spt-aki/callbacks/BundleCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class BundleStaticRouter extends StaticRouter { protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/ClientLogStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/ClientLogStaticRouter.d.ts index 2df39ad..6ae3f50 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/ClientLogStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/ClientLogStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { ClientLogCallbacks } from "@spt/callbacks/ClientLogCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { ClientLogCallbacks } from "@spt-aki/callbacks/ClientLogCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class ClientLogStaticRouter extends StaticRouter { protected clientLogCallbacks: ClientLogCallbacks; constructor(clientLogCallbacks: ClientLogCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/CustomizationStaticRouter.d.ts index 5d80536..cebf043 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { CustomizationCallbacks } from "@spt/callbacks/CustomizationCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/DataStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/DataStaticRouter.d.ts index f59a136..7e84ae1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/DataStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { DataCallbacks } from "@spt/callbacks/DataCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { DataCallbacks } from "@spt-aki/callbacks/DataCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class DataStaticRouter extends StaticRouter { protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/DialogStaticRouter.d.ts index 5a17ba4..7f3ef7a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/DialogStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { DialogueCallbacks } from "@spt/callbacks/DialogueCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { DialogueCallbacks } from "@spt-aki/callbacks/DialogueCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class DialogStaticRouter extends StaticRouter { protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/GameStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/GameStaticRouter.d.ts index bf045af..878f494 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/GameStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { GameCallbacks } from "@spt/callbacks/GameCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { GameCallbacks } from "@spt-aki/callbacks/GameCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class GameStaticRouter extends StaticRouter { protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/HealthStaticRouter.d.ts index d968017..79dedea 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/HealthStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { HealthCallbacks } from "@spt/callbacks/HealthCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { HealthCallbacks } from "@spt-aki/callbacks/HealthCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class HealthStaticRouter extends StaticRouter { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/InraidStaticRouter.d.ts index 2a0da3c..eb9c3b1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/InraidStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { InraidCallbacks } from "@spt/callbacks/InraidCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { InraidCallbacks } from "@spt-aki/callbacks/InraidCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class InraidStaticRouter extends StaticRouter { protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/InsuranceStaticRouter.d.ts index 99e394f..58c1583 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { InsuranceCallbacks } from "@spt/callbacks/InsuranceCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { InsuranceCallbacks } from "@spt-aki/callbacks/InsuranceCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/ItemEventStaticRouter.d.ts index b23856d..772493a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { ItemEventCallbacks } from "@spt/callbacks/ItemEventCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { ItemEventCallbacks } from "@spt-aki/callbacks/ItemEventCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/LauncherStaticRouter.d.ts index 08312d2..46a5bd6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/LauncherStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { LauncherCallbacks } from "@spt/callbacks/LauncherCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { LauncherCallbacks } from "@spt-aki/callbacks/LauncherCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class LauncherStaticRouter extends StaticRouter { protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/LocationStaticRouter.d.ts index 9a2e16c..f577ba9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/LocationStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { LocationCallbacks } from "@spt/callbacks/LocationCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { LocationCallbacks } from "@spt-aki/callbacks/LocationCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class LocationStaticRouter extends StaticRouter { protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/MatchStaticRouter.d.ts index 955ce34..e26c8bd 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/MatchStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { MatchCallbacks } from "@spt/callbacks/MatchCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { MatchCallbacks } from "@spt-aki/callbacks/MatchCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class MatchStaticRouter extends StaticRouter { protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/NotifierStaticRouter.d.ts index 7cb4756..9427d00 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/NotifierStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { NotifierCallbacks } from "@spt/callbacks/NotifierCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { NotifierCallbacks } from "@spt-aki/callbacks/NotifierCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class NotifierStaticRouter extends StaticRouter { protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/PresetStaticRouter.d.ts new file mode 100644 index 0000000..cac8da6 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/PresetStaticRouter.d.ts @@ -0,0 +1,6 @@ +import { PresetBuildCallbacks } from "@spt-aki/callbacks/PresetBuildCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; +export declare class PresetStaticRouter extends StaticRouter { + protected presetCallbacks: PresetBuildCallbacks; + constructor(presetCallbacks: PresetBuildCallbacks); +} diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/ProfileStaticRouter.d.ts index cb6aa84..31470f3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/ProfileStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { ProfileCallbacks } from "@spt/callbacks/ProfileCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { ProfileCallbacks } from "@spt-aki/callbacks/ProfileCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class ProfileStaticRouter extends StaticRouter { protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/QuestStaticRouter.d.ts index 9c0e710..a505e5c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/QuestStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { QuestCallbacks } from "@spt/callbacks/QuestCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { QuestCallbacks } from "@spt-aki/callbacks/QuestCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class QuestStaticRouter extends StaticRouter { protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/RagfairStaticRouter.d.ts index 475e1ee..e56a9c1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/RagfairStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { RagfairCallbacks } from "@spt/callbacks/RagfairCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { RagfairCallbacks } from "@spt-aki/callbacks/RagfairCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class RagfairStaticRouter extends StaticRouter { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/TraderStaticRouter.d.ts index e7d5ee1..1b9cbd1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/TraderStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { TraderCallbacks } from "@spt/callbacks/TraderCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { TraderCallbacks } from "@spt-aki/callbacks/TraderCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class TraderStaticRouter extends StaticRouter { protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/static/WeatherStaticRouter.d.ts index d3055e6..499f911 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/static/WeatherStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { WeatherCallbacks } from "@spt/callbacks/WeatherCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { WeatherCallbacks } from "@spt-aki/callbacks/WeatherCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class WeatherStaticRouter extends StaticRouter { protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/ConfigServer.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/ConfigServer.d.ts index 6f9bc83..c932dfe 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/ConfigServer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/ConfigServer.d.ts @@ -1,7 +1,7 @@ -import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class ConfigServer { protected logger: ILogger; protected vfs: VFS; diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/DatabaseServer.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/DatabaseServer.d.ts index c198a87..fc69a61 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/DatabaseServer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/DatabaseServer.d.ts @@ -1,4 +1,4 @@ -import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables"; +import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; export declare class DatabaseServer { protected tableData: IDatabaseTables; getTables(): IDatabaseTables; diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/HttpServer.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/HttpServer.d.ts index b00fe68..20b7999 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/HttpServer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/HttpServer.d.ts @@ -1,14 +1,14 @@ /// -import { IncomingMessage, ServerResponse } from "node:http"; -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; -import { WebSocketServer } from "@spt/servers/WebSocketServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import http, { IncomingMessage, ServerResponse } from "node:http"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class HttpServer { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -19,19 +19,11 @@ export declare class HttpServer { protected applicationContext: ApplicationContext; protected webSocketServer: WebSocketServer; protected httpConfig: IHttpConfig; - protected started: boolean; constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, localisationService: LocalisationService, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext, webSocketServer: WebSocketServer); /** * Handle server loading event */ load(): void; protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; - /** - * Check against hardcoded values that determine its from a local address - * @param remoteAddress Address to check - * @returns True if its local - */ - protected isLocalRequest(remoteAddress: string): boolean; - protected getCookies(req: IncomingMessage): Record; - isStarted(): boolean; + protected getCookies(req: http.IncomingMessage): Record; } diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/RagfairServer.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/RagfairServer.d.ts index af3acf3..f6f9730 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/RagfairServer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/RagfairServer.d.ts @@ -1,15 +1,15 @@ -import { RagfairOfferGenerator } from "@spt/generators/RagfairOfferGenerator"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairCategoriesService } from "@spt/services/RagfairCategoriesService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; +import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; +import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RagfairCategoriesService } from "@spt-aki/services/RagfairCategoriesService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { RagfairRequiredItemsService } from "@spt-aki/services/RagfairRequiredItemsService"; export declare class RagfairServer { protected logger: ILogger; protected ragfairOfferGenerator: RagfairOfferGenerator; diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/SaveServer.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/SaveServer.d.ts index f71fbb2..88a9b26 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/SaveServer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/SaveServer.d.ts @@ -1,10 +1,10 @@ -import { SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile, Info } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; @@ -24,7 +24,7 @@ export declare class SaveServer { * @param id Id for save callback * @param callback Callback to execute prior to running SaveServer.saveProfile() */ - addBeforeSaveCallback(id: string, callback: (profile: Partial) => Partial): void; + addBeforeSaveCallback(id: string, callback: (profile: Partial) => Partial): void; /** * Remove a callback from being executed prior to saving profile in SaveServer.saveProfile() * @param id Id of callback to remove @@ -41,14 +41,14 @@ export declare class SaveServer { /** * Get a player profile from memory * @param sessionId Session id - * @returns ISptProfile + * @returns IAkiProfile */ - getProfile(sessionId: string): ISptProfile; + getProfile(sessionId: string): IAkiProfile; /** * Get all profiles from memory - * @returns Dictionary of ISptProfile + * @returns Dictionary of IAkiProfile */ - getProfiles(): Record; + getProfiles(): Record; /** * Delete a profile by id * @param sessionID Id of profile to remove @@ -64,7 +64,7 @@ export declare class SaveServer { * Add full profile in memory by key (info.id) * @param profileDetails Profile to save */ - addProfile(profileDetails: ISptProfile): void; + addProfile(profileDetails: IAkiProfile): void; /** * Look up profile json in user/profiles by id and store in memory * Execute saveLoadRouters callbacks after being loaded into memory @@ -75,9 +75,8 @@ export declare class SaveServer { * Save changes from in-memory profile to user/profiles json * Execute onBeforeSaveCallbacks callbacks prior to being saved to json * @param sessionID profile id (user/profiles/id.json) - * @returns time taken to save in MS */ - saveProfile(sessionID: string): number; + saveProfile(sessionID: string): void; /** * Remove a physical profile json from user/profiles * @param sessionID Profile id to remove diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/WebSocketServer.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/WebSocketServer.d.ts index b9d66ee..e0bf025 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/WebSocketServer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/WebSocketServer.d.ts @@ -1,23 +1,31 @@ /// import http, { IncomingMessage } from "node:http"; -import { WebSocket, Server } from "ws"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; +import WebSocket from "ws"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; protected localisationService: LocalisationService; + protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; - protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; - protected webSocketServer: Server; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); - getWebSocketServer(): Server; + protected profileHelper: ProfileHelper; + constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); + protected httpConfig: IHttpConfig; + protected defaultNotification: INotification; + protected webSockets: Record; + protected websocketPingHandler: any; setupWebSocket(httpServer: http.Server): void; + sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; + isConnectionWebSocket(sessionID: string): boolean; + protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/http/AkiHttpListener.d.ts similarity index 72% rename from TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts rename to TypeScript/23CustomAbstractChatBot/types/servers/http/AkiHttpListener.d.ts index ef68143..9499884 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/http/AkiHttpListener.d.ts @@ -1,14 +1,14 @@ /// /// import { IncomingMessage, ServerResponse } from "node:http"; -import { Serializer } from "@spt/di/Serializer"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HttpRouter } from "@spt/routers/HttpRouter"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -export declare class SptHttpListener implements IHttpListener { +import { Serializer } from "@spt-aki/di/Serializer"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HttpRouter } from "@spt-aki/routers/HttpRouter"; +import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +export declare class AkiHttpListener implements IHttpListener { protected httpRouter: HttpRouter; protected serializers: Serializer[]; protected logger: ILogger; @@ -19,7 +19,7 @@ export declare class SptHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class SptHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/http/IHttpListener.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/http/IHttpListener.d.ts index ff148d6..29d5fce 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/ws/IWebSocketConnectionHandler.d.ts deleted file mode 100644 index 920dad4..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/servers/ws/IWebSocketConnectionHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -import { IncomingMessage } from "node:http"; -import { WebSocket } from "ws"; -export interface IWebSocketConnectionHandler { - getSocketId(): string; - getHookUrl(): string; - onConnection(ws: WebSocket, req: IncomingMessage): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/ws/SptWebSocketConnectionHandler.d.ts deleted file mode 100644 index 10c8a74..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// -import { IncomingMessage } from "http"; -import { WebSocket } from "ws"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; -export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { - protected logger: ILogger; - protected profileHelper: ProfileHelper; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; - protected sptWebSocketMessageHandlers: ISptWebSocketMessageHandler[]; - protected httpConfig: IHttpConfig; - protected webSockets: Map; - protected defaultNotification: IWsNotificationEvent; - protected websocketPingHandler: any; - constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, sptWebSocketMessageHandlers: ISptWebSocketMessageHandler[]); - getSocketId(): string; - getHookUrl(): string; - onConnection(ws: WebSocket, req: IncomingMessage): void; - sendMessage(sessionID: string, output: IWsNotificationEvent): void; - isConnectionWebSocket(sessionID: string): boolean; - getSessionWebSocket(sessionID: string): WebSocket; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/ws/message/DefaultSptWebSocketMessageHandler.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/ws/message/DefaultSptWebSocketMessageHandler.d.ts deleted file mode 100644 index d5247ec..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/servers/ws/message/DefaultSptWebSocketMessageHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { RawData, WebSocket } from "ws"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; -export declare class DefaultSptWebSocketMessageHandler implements ISptWebSocketMessageHandler { - protected logger: ILogger; - constructor(logger: ILogger); - onSptMessage(sessionId: string, client: WebSocket, message: RawData): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/ws/message/ISptWebSocketMessageHandler.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/ws/message/ISptWebSocketMessageHandler.d.ts deleted file mode 100644 index 137bc87..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/servers/ws/message/ISptWebSocketMessageHandler.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RawData, WebSocket } from "ws"; -export interface ISptWebSocketMessageHandler { - onSptMessage(sessionID: string, client: WebSocket, message: RawData): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentFilterService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentFilterService.d.ts index 5ee2fb4..f0cc787 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentFilterService.d.ts @@ -1,10 +1,10 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; +import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class BotEquipmentFilterService { protected logger: ILogger; protected botHelper: BotHelper; @@ -95,5 +95,5 @@ export declare class BotEquipmentFilterService { * @param weightingAdjustments Weighting change to apply to bot * @param botItemPool Bot item dictionary to adjust */ - protected adjustWeighting(weightingAdjustments: IAdjustmentDetails, botItemPool: Record, showEditWarnings?: boolean): void; + protected adjustWeighting(weightingAdjustments: AdjustmentDetails, botItemPool: Record, showEditWarnings?: boolean): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentModPoolService.d.ts index c53f31b..8cca127 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentModPoolService.d.ts @@ -1,12 +1,12 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Mods } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { VFS } from "@spt/utils/VFS"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { Mods } from "@spt-aki/models/eft/common/tables/IBotType"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { VFS } from "@spt-aki/utils/VFS"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/BotGenerationCacheService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/BotGenerationCacheService.d.ts index ba27266..fb84ede 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/BotGenerationCacheService.d.ts @@ -1,16 +1,17 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; - protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache @@ -23,18 +24,6 @@ export declare class BotGenerationCacheService { * @returns IBotBase object */ getBot(key: string): IBotBase; - /** - * Cache a bot that has been sent to the client in memory for later use post-raid to determine if player killed a traitor scav - * @param botToStore Bot object to store - */ - storeUsedBot(botToStore: IBotBase): void; - /** - * Get a bot by its profileId that has been generated and sent to client for current raid - * Cache is wiped post-raid in client/match/offline/end endOfflineRaid() - * @param profileId Id of bot to get - * @returns IBotBase - */ - getUsedBot(profileId: string): IBotBase; /** * Remove all cached bot profiles from memory */ diff --git a/TypeScript/23CustomAbstractChatBot/types/services/BotLootCacheService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/BotLootCacheService.d.ts index 57d56af..a2205f3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/BotLootCacheService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/BotLootCacheService.d.ts @@ -1,23 +1,23 @@ -import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { PMCLootGenerator } from "@spt-aki/generators/PMCLootGenerator"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBotLootCache, LootCacheType } from "@spt-aki/models/spt/bots/IBotLootCache"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BotLootCacheService { protected logger: ILogger; + protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; - protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); + constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); /** * Remove cached bot loot data */ @@ -30,7 +30,7 @@ export declare class BotLootCacheService { * @param botJsonTemplate Base json db file for the bot having its loot generated * @returns ITemplateItem array */ - getLootFromCache(botRole: string, isPmc: boolean, lootType: LootCacheType, botJsonTemplate: IBotType): Record; + getLootFromCache(botRole: string, isPmc: boolean, lootType: LootCacheType, botJsonTemplate: IBotType): ITemplateItem[]; /** * Generate loot for a bot and store inside a private class property * @param botRole bots role (assault / pmcBot etc) @@ -38,13 +38,17 @@ export declare class BotLootCacheService { * @param botJsonTemplate db template for bot having its loot generated */ protected addLootToCache(botRole: string, isPmc: boolean, botJsonTemplate: IBotType): void; + /** + * Sort a pool of item objects by its flea price + * @param poolToSort pool of items to sort + */ + protected sortPoolByRagfairPrice(poolToSort: ITemplateItem[]): void; /** * Add unique items into combined pool - * @param poolToAddTo Pool of items to add to + * @param combinedItemPool Pool of items to add to * @param itemsToAdd items to add to combined pool if unique */ - protected addUniqueItemsToPool(poolToAddTo: ITemplateItem[], itemsToAdd: ITemplateItem[]): void; - protected addItemsToPool(poolToAddTo: Record, poolOfItemsToAdd: Record): void; + protected addUniqueItemsToPool(combinedItemPool: ITemplateItem[], itemsToAdd: ITemplateItem[]): void; /** * Ammo/grenades have this property * @param props @@ -69,9 +73,6 @@ export declare class BotLootCacheService { * @returns */ protected isGrenade(props: Props): boolean; - protected isFood(tpl: string): boolean; - protected isDrink(tpl: string): boolean; - protected isCurrency(tpl: string): boolean; /** * Check if a bot type exists inside the loot cache * @param botRole role to check for diff --git a/TypeScript/23CustomAbstractChatBot/types/services/BotWeaponModLimitService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/BotWeaponModLimitService.d.ts index 63c4967..cf530a9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/BotWeaponModLimitService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/BotWeaponModLimitService.d.ts @@ -1,9 +1,9 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class BotModLimits { scope: ItemCount; scopeMax: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/CustomLocationWaveService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/CustomLocationWaveService.d.ts index 728a1e8..f32c082 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/CustomLocationWaveService.d.ts @@ -1,16 +1,18 @@ -import { BossLocationSpawn, Wave } from "@spt/models/eft/common/ILocationBase"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BossLocationSpawn, Wave } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/23CustomAbstractChatBot/types/services/FenceService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/FenceService.d.ts index 0e75ae6..63cd726 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/FenceService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/FenceService.d.ts @@ -1,72 +1,55 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; -import { IFenceAssortGenerationValues, IGenerationAssortValues } from "@spt/models/spt/fence/IFenceAssortGenerationValues"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { IFenceLevel, IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Handle actions surrounding Fence * e.g. generating or refreshing assorts / get next refresh time */ export declare class FenceService { protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; + protected itemFilterService: ItemFilterService; protected localisationService: LocalisationService; protected configServer: ConfigServer; - protected cloner: ICloner; - protected traderConfig: ITraderConfig; - /** Time when some items in assort will be replaced */ - protected nextPartialRefreshTimestamp: number; /** Main assorts you see at all rep levels */ protected fenceAssort: ITraderAssort; - /** Assorts shown on a separate tab when you max out fence rep */ + /** Assorts shown on a separte tab when you max out fence rep */ protected fenceDiscountAssort: ITraderAssort; - /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ - protected desiredAssortCounts: IFenceAssortGenerationValues; - protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + protected traderConfig: ITraderConfig; + protected nextMiniRefreshTimestamp: number; + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, localisationService: LocalisationService, configServer: ConfigServer); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; /** - * Replace discount fence assort with new assort + * Replace high rep level fence assort with new assort * @param assort New assorts to replace old with */ - setDiscountFenceAssort(assort: ITraderAssort): void; - /** - * Get main fence assort - * @return ITraderAssort - */ - getMainFenceAssort(): ITraderAssort; - /** - * Get discount fence assort - * @return ITraderAssort - */ - getDiscountFenceAssort(): ITraderAssort; - /** - * Replace high rep level fence assort with new assort - * @param discountAssort New assorts to replace old with - */ - setFenceDiscountAssort(discountAssort: ITraderAssort): void; + setFenceDiscountAssort(assort: ITraderAssort): void; /** * Get assorts player can purchase * Adjust prices based on fence level of player @@ -74,33 +57,13 @@ export declare class FenceService { * @returns ITraderAssort */ getFenceAssorts(pmcProfile: IPmcData): ITraderAssort; - /** - * Adds to fence assort a single item (with its children) - * @param items the items to add with all its childrens - * @param mainItem the most parent item of the array - */ - addItemsToFenceAssort(items: Item[], mainItem: Item): void; - /** - * Calculates the overall price for an item (with all its children) - * @param itemTpl the item tpl to calculate the fence price for - * @param items the items (with its children) to calculate fence price for - * @returns the fence price of the item - */ - getItemPrice(itemTpl: string, items: Item[]): number; - /** - * Calculate the overall price for an ammo box, where only one item is - * the ammo box itself and every other items are the bullets in that box - * @param items the ammo box (and all its children ammo items) - * @returns the price of the ammo box - */ - protected getAmmoBoxPrice(items: Item[]): number; /** * Adjust all items contained inside an assort by a multiplier - * @param assort (clone)Assort that contains items with prices to adjust + * @param assort Assort that contains items with prices to adjust * @param itemMultipler multipler to use on items * @param presetMultiplier preset multipler to use on presets */ - protected adjustAssortItemPricesByConfigMultiplier(assort: ITraderAssort, itemMultipler: number, presetMultiplier: number): void; + protected adjustAssortItemPrices(assort: ITraderAssort, itemMultipler: number, presetMultiplier: number): void; /** * Merge two trader assort files together * @param firstAssort assort 1# @@ -130,35 +93,22 @@ export declare class FenceService { * Replace a percentage of fence assorts with freshly generated items */ performPartialRefresh(): void; - /** - * Handle the process of folding new assorts into existing assorts, when a new assort exists already, increment its StackObjectsCount instead - * @param newFenceAssorts Assorts to fold into existing fence assorts - * @param existingFenceAssorts Current fence assorts new assorts will be added to - */ - protected updateFenceAssorts(newFenceAssorts: ICreateFenceAssortsResult, existingFenceAssorts: ITraderAssort): void; /** * Increment fence next refresh timestamp by current timestamp + partialRefreshTimeSeconds from config */ protected incrementPartialRefreshTime(): void; /** - * Get values that will hydrate the passed in assorts back to the desired counts - * @param assortItems Current assorts after items have been removed - * @param generationValues Base counts assorts should be adjusted to - * @returns IGenerationAssortValues object with adjustments needed to reach desired state + * Compare the current fence offer count to what the config wants it to be, + * If value is lower add extra count to value to generate more items to fill gap + * @param existingItemCountToReplace count of items to generate + * @returns number of items to generate */ - protected getItemCountsToGenerate(assortItems: Item[], generationValues: IGenerationAssortValues): IGenerationAssortValues; + protected getCountOfItemsToGenerate(existingItemCountToReplace: number): number; /** - * Delete desired number of items from assort (including children) - * @param itemCountToReplace - * @param discountItemCountToReplace + * Choose an item (not mod) at random and remove from assorts + * @param assort Items to remove from */ - protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; - /** - * Choose an item at random and remove it + mods from assorts - * @param assort Trader assort to remove item from - * @param rootItems Pool of root items to pick from to remove - */ - protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; + protected removeRandomItemFromAssorts(assort: ITraderAssort): void; /** * Get an integer rounded count of items to replace based on percentrage from traderConfig value * @param totalItemCount total item count @@ -172,88 +122,23 @@ export declare class FenceService { getOfferCount(): number; /** * Create trader assorts for fence and store in fenceService cache - * Uses fence base cache generatedon server start as a base */ generateFenceAssorts(): void; - /** - * Convert the intermediary assort data generated into format client can process - * @param intermediaryAssorts Generated assorts that will be converted - * @returns ITraderAssort - */ - protected convertIntoFenceAssort(intermediaryAssorts: ICreateFenceAssortsResult): ITraderAssort; - /** - * Create object that contains calculated fence assort item values to make based on config - * Stored in this.desiredAssortCounts - */ - protected createInitialFenceAssortGenerationValues(): void; /** * Create skeleton to hold assort items * @returns ITraderAssort object */ - protected createFenceAssortSkeleton(): ITraderAssort; + protected createBaseTraderAssortItem(): ITraderAssort; /** * Hydrate assorts parameter object with generated assorts * @param assortCount Number of assorts to generate * @param assorts object to add created assorts to */ - protected createAssorts(itemCounts: IGenerationAssortValues, loyaltyLevel: number): ICreateFenceAssortsResult; - /** - * Add item assorts to existing assort data - * @param assortCount Number to add - * @param assorts Assorts data to add to - * @param baseFenceAssortClone Base data to draw from - * @param itemTypeLimits - * @param loyaltyLevel Loyalty level to set new item to - */ - protected addItemAssorts(assortCount: number, assorts: ICreateFenceAssortsResult, baseFenceAssortClone: ITraderAssort, itemTypeLimits: Record, loyaltyLevel: number): void; - /** - * Find an assort item that matches the first parameter, also matches based on upd properties - * e.g. salewa hp resource units left - * @param rootItemBeingAdded item to look for a match against - * @param itemDbDetails Db details of matching item - * @param itemsWithChildren Items to search through - * @returns Matching assort item - */ - protected getMatchingItem(rootItemBeingAdded: Item, itemDbDetails: ITemplateItem, itemsWithChildren: Item[][]): Item; - /** - * Should this item be forced into only 1 stack on fence - * @param existingItem Existing item from fence assort - * @param itemDbDetails Item we want to add db details - * @returns True item should be force stacked - */ - protected itemShouldBeForceStacked(existingItem: Item, itemDbDetails: ITemplateItem): boolean; - protected itemInPreventDupeCategoryList(tpl: string): boolean; - /** - * Adjust price of item based on what is left to buy (resource/uses left) - * @param barterSchemes All barter scheme for item having price adjusted - * @param itemRoot Root item having price adjusted - * @param itemTemplate Db template of item - */ - protected adjustItemPriceByQuality(barterSchemes: Record, itemRoot: Item, itemTemplate: ITemplateItem): void; - protected getMatchingItemLimit(itemTypeLimits: Record, itemTpl: string): { - current: number; - max: number; - }; - /** - * Find presets in base fence assort and add desired number to 'assorts' parameter - * @param desiredWeaponPresetsCount - * @param assorts Assorts to add preset to - * @param baseFenceAssort Base data to draw from - * @param loyaltyLevel Which loyalty level is required to see/buy item - */ - protected addPresetsToAssort(desiredWeaponPresetsCount: number, desiredEquipmentPresetsCount: number, assorts: ICreateFenceAssortsResult, baseFenceAssort: ITraderAssort, loyaltyLevel: number): void; - /** - * Adjust plate / soft insert durability values - * @param armor Armor item array to add mods into - * @param itemDbDetails Armor items db template - */ - protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence @@ -261,10 +146,18 @@ export declare class FenceService { */ protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** - * Remove parts of a weapon prior to being listed on flea - * @param itemAndMods Weapon to remove parts from + * Add preset weapons to fence presets + * @param assortCount how many assorts to add to assorts + * @param defaultWeaponPresets a dictionary of default weapon presets + * @param assorts object to add presets to + * @param loyaltyLevel loyalty level to requre item at */ - protected removeRandomModsOfItem(itemAndMods: Item[]): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; + /** + * Remove parts of a weapon prior to being listed on flea + * @param weaponAndMods Weapon to remove parts from + */ + protected removeRandomPartsOfWeapon(weaponAndMods: Item[]): void; /** * Roll % chance check to see if item should be removed * @param weaponMod Weapon mod being checked @@ -278,13 +171,6 @@ export declare class FenceService { * @param itemToAdjust Item being edited */ protected randomiseItemUpdProperties(itemDetails: ITemplateItem, itemToAdjust: Item): void; - /** - * Generate a randomised current and max durabiltiy value for an armor item - * @param itemDetails Item to create values for - * @param equipmentDurabilityLimits Max durabiltiy percent min/max values - * @returns Durability + MaxDurability values - */ - protected getRandomisedArmorDurabilityValues(itemDetails: ITemplateItem, equipmentDurabilityLimits: IItemDurabilityCurrentMax): Repairable; /** * Construct item limit record to hold max and current item count * @param limits limits as defined in config @@ -301,7 +187,6 @@ export declare class FenceService { getNextFenceUpdateTimestamp(): number; /** * Get fence refresh time in seconds - * @returns Refresh time in seconds */ protected getFenceRefreshTime(): number; /** @@ -311,10 +196,8 @@ export declare class FenceService { */ getFenceInfo(pmcData: IPmcData): IFenceLevel; /** - * Remove or lower stack size of an assort from fence by id - * @param assortId assort id to adjust - * @param buyCount Count of items bought + * Remove an assort from fence by id + * @param assortIdToRemove assort id to remove from fence assorts */ - amendOrRemoveFenceOffer(assortId: string, buyCount: number): void; - protected deleteOffer(assortId: string, assorts: Item[]): void; + removeFenceOffer(assortIdToRemove: string): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/GiftService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/GiftService.d.ts index aca276c..2dbf09a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/GiftService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/GiftService.d.ts @@ -1,23 +1,21 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { GiftSentResult } from "@spt/models/enums/GiftSentResult"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { Gift, IGiftsConfig } from "@spt/models/spt/config/IGiftsConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { GiftSentResult } from "@spt-aki/models/enums/GiftSentResult"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { Gift, IGiftsConfig } from "@spt-aki/models/spt/config/IGiftsConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GiftService { protected logger: ILogger; protected mailSendService: MailSendService; - protected localisationService: LocalisationService; protected hashUtil: HashUtil; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, mailSendService: MailSendService, localisationService: LocalisationService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); /** * Does a gift with a specific ID exist in db * @param giftId Gift id to check for diff --git a/TypeScript/23CustomAbstractChatBot/types/services/HashCacheService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/HashCacheService.d.ts new file mode 100644 index 0000000..0097c96 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/services/HashCacheService.d.ts @@ -0,0 +1,30 @@ +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; +export declare class HashCacheService { + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; + constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); + /** + * Return a stored hash by key + * @param modName Name of mod to get hash for + * @returns Mod hash + */ + getStoredModHash(modName: string): string; + /** + * Does the generated hash match the stored hash + * @param modName name of mod + * @param modContent + * @returns True if they match + */ + modContentMatchesStoredHash(modName: string, modContent: string): boolean; + hashMatchesStoredHash(modName: string, modHash: string): boolean; + storeModContent(modName: string, modContent: string): void; + storeModHash(modName: string, modHash: string): void; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts index 5492a56..fa13e9c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts @@ -1,34 +1,31 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { SecureContainerHelper } from "@spt/helpers/SecureContainerHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IInsuredItemsData } from "@spt/models/eft/inRaid/IInsuredItemsData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; -import { ILostOnDeathConfig } from "@spt/models/spt/config/ILostOnDeathConfig"; -import { IInsuranceEquipmentPkg } from "@spt/models/spt/services/IInsuranceEquipmentPkg"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { SecureContainerHelper } from "@spt-aki/helpers/SecureContainerHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IInsuredItemsData } from "@spt-aki/models/eft/inRaid/IInsuredItemsData"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { protected logger: ILogger; protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -38,11 +35,9 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; - protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); /** * Does player have insurance array * @param sessionId Player id @@ -70,6 +65,12 @@ export declare class InsuranceService { * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void; + /** + * Send a message to player informing them gear was lost + * @param sessionId Session id + * @param locationName name of map insurance was lost on + */ + sendLostInsuranceMessage(sessionId: string, locationName?: string): void; /** * Check all root insured items and remove location property + set slotId to 'hideout' * @param sessionId Session id @@ -84,42 +85,22 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Create insurance equipment packages that should be sent to the user. The packages should contain items that have - * been lost in a raid and should be returned to the player through the insurance system. - * - * NOTE: We do not have data on items that were dropped in a raid. This means we have to pull item data from the - * profile at the start of the raid to return to the player in insurance. Because of this, the item - * positioning may differ from the position the item was in when the player died. Apart from removing all - * positioning, this is the best we can do. >:{} - * - * @param pmcData Player profile - * @param offraidData Post-raid data - * @param preRaidGear Pre-raid data - * @param sessionID Session id - * @param playerDied Did player die in raid - * @returns Array of insured items lost in raid - */ - getGearLostInRaid(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): IInsuranceEquipmentPkg[]; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it - * @param equipmentPkg Gear to store - generated by getGearLostInRaid() + * @param pmcData player profile to store gear in + * @param offraidData post-raid request object + * @param preRaidGear gear player wore prior to raid + * @param sessionID Session id + * @param playerDied did the player die in raid */ - storeGearLostInRaidToSendLater(sessionID: string, equipmentPkg: IInsuranceEquipmentPkg[]): void; + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; /** * Take preraid item and update properties to ensure its ready to be given to player in insurance return mail * @param pmcData Player profile - * @param preRaidItemWithChildren Insured item (with children) as it was pre-raid - * @param allItemsFromClient Item data when player left raid (durability values) - * @returns Item (with children) to send to player + * @param insuredItem Insured items properties + * @param preRaidItem Insured item as it was pre-raid + * @param insuredItemFromClient Item data when player left raid (durability values) + * @returns Item object */ protected getInsuredItemDetails(pmcData: IPmcData, preRaidItem: Item, insuredItemFromClient: IInsuredItemsData): Item; /** @@ -128,6 +109,12 @@ export declare class InsuranceService { * @param itemToReturn item we will send to player as insurance return */ protected updateSlotIdValue(playerBaseInventoryEquipmentId: string, itemToReturn: Item): void; + /** + * Create a hash table for an array of items, keyed by items _id + * @param items Items to hash + * @returns Hashtable + */ + protected createItemHashTable(items: Item[]): Record; /** * Add gear item to InsuredItems array in player profile * @param sessionID Session id @@ -135,7 +122,12 @@ export declare class InsuranceService { * @param itemToReturnToPlayer item to store * @param traderId Id of trader item was insured with */ - protected addGearToSend(gear: IInsuranceEquipmentPkg): void; + protected addGearToSend(gear: { + sessionID: string; + pmcData: IPmcData; + itemToReturnToPlayer: Item; + traderId: string; + }): void; /** * Does insurance exist for a player and by trader * @param sessionId Player id (session id) @@ -153,7 +145,7 @@ export declare class InsuranceService { * Store insured item * @param sessionId Player id (session id) * @param traderId Trader item insured with - * @param itemToAdd Insured item (with children) + * @param itemToAdd Insured item */ addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; /** @@ -164,10 +156,4 @@ export declare class InsuranceService { * @returns price in roubles */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * - * @returns The ID. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ItemBaseClassService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ItemBaseClassService.d.ts index 9c6e6c8..83994ad 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/ItemBaseClassService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/ItemBaseClassService.d.ts @@ -1,7 +1,7 @@ -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; /** * Cache the baseids for each item in the tiems db inside a dictionary */ @@ -10,7 +10,6 @@ export declare class ItemBaseClassService { protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; protected itemBaseClassesCache: Record; - protected items: Record; protected cacheGenerated: boolean; constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); /** @@ -22,8 +21,9 @@ export declare class ItemBaseClassService { * Helper method, recursivly iterate through items parent items, finding and adding ids to dictionary * @param itemIdToUpdate item tpl to store base ids against in dictionary * @param item item being checked + * @param allDbItems all items in db */ - protected addBaseItems(itemIdToUpdate: string, item: ITemplateItem): void; + protected addBaseItems(itemIdToUpdate: string, item: ITemplateItem, allDbItems: Record): void; /** * Does item tpl inherit from the requested base class * @param itemTpl item to check base classes of @@ -31,12 +31,6 @@ export declare class ItemBaseClassService { * @returns true if item inherits from base class passed in */ itemHasBaseClass(itemTpl: string, baseClasses: string[]): boolean; - /** - * Check if cached item template is of type Item - * @param itemTemplateId item to check - * @returns true if item is of type Item - */ - private cachedItemIsOfItemType; /** * Get base classes item inherits from * @param itemTpl item to get base classes for diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ItemFilterService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ItemFilterService.d.ts index fde948b..791bb34 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/ItemFilterService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/ItemFilterService.d.ts @@ -1,7 +1,7 @@ -import { IItemConfig } from "@spt/models/spt/config/IItemConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; /** Centralise the handling of blacklisting items, uses blacklist found in config/item.json, stores items that should not be used by players / broken items */ export declare class ItemFilterService { protected logger: ILogger; @@ -15,17 +15,6 @@ export declare class ItemFilterService { * @returns true if blacklisted */ isItemBlacklisted(tpl: string): boolean; - /** - * Check if item is blacklisted from being a reward for player - * @param tpl item tpl to check is on blacklist - * @returns True when blacklisted - */ - isItemRewardBlacklisted(tpl: string): boolean; - /** - * Get an array of items that should never be given as a reward to player - * @returns string array of item tpls - */ - getItemRewardBlacklist(): string[]; /** * Return every template id blacklisted in config/item.json * @returns string array of blacklisted tempalte ids diff --git a/TypeScript/23CustomAbstractChatBot/types/services/LocaleService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/LocaleService.d.ts index 2326dcc..5ee5540 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/LocaleService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/LocaleService.d.ts @@ -1,7 +1,7 @@ -import { ILocaleConfig } from "@spt/models/spt/config/ILocaleConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { ILocaleConfig } from "@spt-aki/models/spt/config/ILocaleConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; /** * Handles getting locales from config or users machine */ @@ -33,26 +33,9 @@ export declare class LocaleService { * @returns array of locales e.g. en/fr/cn */ getServerSupportedLocales(): string[]; - /** - * Get array of languages supported for localisation - * @returns array of locales e.g. en/fr/cn - */ - getLocaleFallbacks(): { - [locale: string]: string; - }; - /** - * Get the full locale of the computer running the server lowercased e.g. en-gb / pt-pt - * @returns string - */ - protected getPlatformForServerLocale(): string; /** * Get the locale of the computer running the server * @returns langage part of locale e.g. 'en' part of 'en-US' */ - protected getPlatformForClientLocale(): string; - /** - * This is in a function so we can overwrite it during testing - * @returns The current platform locale - */ - protected getPlatformLocale(): Intl.Locale; + protected getPlatformLocale(): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/LocalisationService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/LocalisationService.d.ts index 42dfa4e..939db6f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/LocalisationService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/LocalisationService.d.ts @@ -1,8 +1,9 @@ import { I18n } from "i18n"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ILocaleConfig } from "@spt-aki/models/spt/config/ILocaleConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handles translating server text into different langauges */ @@ -11,6 +12,7 @@ export declare class LocalisationService { protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected localeService: LocaleService; + protected localeConfig: ILocaleConfig; protected i18n: I18n; constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localeService: LocaleService); /** diff --git a/TypeScript/23CustomAbstractChatBot/types/services/MailSendService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/MailSendService.d.ts index 176e5f8..08752bf 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/MailSendService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/MailSendService.d.ts @@ -1,19 +1,19 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; -import { NotifierHelper } from "@spt/helpers/NotifierHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, IUserDialogInfo, Message, MessageItems } from "@spt/models/eft/profile/ISptProfile"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { Traders } from "@spt/models/enums/Traders"; -import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; +import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { Traders } from "@spt-aki/models/enums/Traders"; +import { ISendMessageDetails } from "@spt-aki/models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class MailSendService { protected logger: ILogger; protected hashUtil: HashUtil; @@ -55,7 +55,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendSystemMessageToPlayer(sessionId: string, message: string, items?: Item[], maxStorageTimeSeconds?: number, profileChangeEvents?: IProfileChangeEvent[]): void; + sendSystemMessageToPlayer(sessionId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; /** * Send a message from SYSTEM to the player with or without items with localised text * @param sessionId The session ID to send the message to @@ -63,7 +63,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedSystemMessageToPlayer(sessionId: string, messageLocaleId: string, items?: Item[], profileChangeEvents?: IProfileChangeEvent[], maxStorageTimeSeconds?: number): void; + sendLocalisedSystemMessageToPlayer(sessionId: string, messageLocaleId: string, items?: Item[], profileChangeEvents?: any[], maxStorageTimeSeconds?: any): void; /** * Send a USER message to a player with or without items * @param sessionId The session ID to send the message to diff --git a/TypeScript/23CustomAbstractChatBot/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/MatchBotDetailsCacheService.d.ts index e899577..6521719 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/MatchBotDetailsCacheService.d.ts @@ -1,6 +1,6 @@ -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt ideal as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/MatchLocationService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/MatchLocationService.d.ts index dafa99a..8f7b3bf 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/MatchLocationService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/MatchLocationService.d.ts @@ -1,9 +1,9 @@ -import { SaveServer } from "@spt/servers/SaveServer"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class MatchLocationService { protected timeUtil: TimeUtil; - protected saveServer: SaveServer; protected locations: {}; - constructor(timeUtil: TimeUtil, saveServer: SaveServer); + constructor(timeUtil: TimeUtil); + createGroup(sessionID: string, info: ICreateGroupRequestData): any; deleteGroup(info: any): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ModCompilerService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ModCompilerService.d.ts index eb4298c..b8f2a37 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/ModCompilerService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/ModCompilerService.d.ts @@ -1,13 +1,13 @@ -import { CompilerOptions } from "typescript"; -import type { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ModHashCacheService } from "@spt/services/cache/ModHashCacheService"; -import { VFS } from "@spt/utils/VFS"; +import ts from "typescript"; +import type { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HashCacheService } from "@spt-aki/services/HashCacheService"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class ModCompilerService { protected logger: ILogger; - protected modHashCacheService: ModHashCacheService; + protected hashCacheService: HashCacheService; protected vfs: VFS; protected serverDependencies: string[]; - constructor(logger: ILogger, modHashCacheService: ModHashCacheService, vfs: VFS); + constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS * @param modName Name of mod @@ -21,7 +21,7 @@ export declare class ModCompilerService { * @param fileNames Paths to TS files * @param options Compiler options */ - protected compile(fileNames: string[], options: CompilerOptions): Promise; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; /** * Do the files at the provided paths exist * @param fileNames diff --git a/TypeScript/23CustomAbstractChatBot/types/services/NotificationService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/NotificationService.d.ts index 69d895a..3f25b10 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/NotificationService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: IWsNotificationEvent): void; + add(sessionID: string, message: INotification): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/23CustomAbstractChatBot/types/services/OpenZoneService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/OpenZoneService.d.ts index 1bc5f00..581975b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/OpenZoneService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/OpenZoneService.d.ts @@ -1,18 +1,20 @@ -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts index 8d77ae2..d6b22ed 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts @@ -1,21 +1,19 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; -import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData"; +import { IProcessSellTradeRequestData } from "@spt-aki/models/eft/trade/IProcessSellTradeRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class PaymentService { protected logger: ILogger; - protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -24,15 +22,15 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request - * @param pmcData Pmc profile - * @param request Buy item request - * @param sessionID Session id - * @param output Client response + * @param {IPmcData} pmcData Player profile + * @param {IProcessBuyTradeRequestData} request + * @param {string} sessionID + * @returns IItemEventRouterResponse */ - payMoney(pmcData: IPmcData, request: IProcessBuyTradeRequestData, sessionID: string, output: IItemEventRouterResponse): void; + payMoney(pmcData: IPmcData, request: IProcessBuyTradeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Get the item price of a specific traders assort * @param traderAssortId Id of assort to look up @@ -43,13 +41,19 @@ export declare class PaymentService { /** * Receive money back after selling * @param {IPmcData} pmcData - * @param {number} amountToSend - * @param {IProcessSellTradeRequestData} request + * @param {number} amount + * @param {IProcessSellTradeRequestData} body * @param {IItemEventRouterResponse} output * @param {string} sessionID * @returns IItemEventRouterResponse */ - giveProfileMoney(pmcData: IPmcData, amountToSend: number, request: IProcessSellTradeRequestData, output: IItemEventRouterResponse, sessionID: string): void; + getMoney(pmcData: IPmcData, amount: number, body: IProcessSellTradeRequestData, output: IItemEventRouterResponse, sessionID: string): IItemEventRouterResponse; + /** + * Recursively checks if the given item is + * inside the stash, that is it has the stash as + * ancestor with slotId=hideout + */ + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; /** * Remove currency from player stash/inventory and update client object with changes * @param pmcData Player profile to find and remove currency from @@ -57,10 +61,11 @@ export declare class PaymentService { * @param amountToPay money value to pay * @param sessionID Session id * @param output output object to send to client + * @returns IItemEventRouterResponse */ - addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; + addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Get all money stacks in inventory and prioritise items in stash + * Get all money stacks in inventory and prioritse items in stash * @param pmcData * @param currencyTpl * @param playerStashId Players stash id diff --git a/TypeScript/23CustomAbstractChatBot/types/services/PlayerService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/PlayerService.d.ts index ae57410..f24e0dc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/PlayerService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/PlayerService.d.ts @@ -1,8 +1,8 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class PlayerService { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/PmcChatResponseService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/PmcChatResponseService.d.ts index cc172c0..b5a0b8b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/PmcChatResponseService.d.ts @@ -1,18 +1,16 @@ -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 { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Aggressor, Victim } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IPmcChatResponse } from "@spt-aki/models/spt/config/IPmChatResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PmcChatResponseService { protected logger: ILogger; - protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; @@ -20,7 +18,7 @@ export declare class PmcChatResponseService { protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ProfileActivityService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ProfileActivityService.d.ts deleted file mode 100644 index fdc86c7..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/services/ProfileActivityService.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export declare class ProfileActivityService { - protected profileActivityTimestamps: Record; - /** - * Was the requested profile active in the last requested minutes - * @param sessionId Profile to check - * @param minutes Minutes to check for activity in - * @returns True when profile was active within past x minutes - */ - activeWithinLastMinutes(sessionId: string, minutes: number): boolean; - /** - * Get an array of profile ids that were active in the last x minutes - * @param minutes How many minutes from now to search for profiles - * @returns String array of profile ids - */ - getActiveProfileIdsWithinMinutes(minutes: number): string[]; - /** - * Update the timestamp a profile was last observed active - * @param sessionId Profile to update - */ - setActivityTimestamp(sessionId: string): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts index 18da0c0..e2e140b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts @@ -1,26 +1,24 @@ -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -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 { 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"; -import { ISptProfile, IEquipmentBuild, IMagazineBuild, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { Watermark } from "@spt/utils/Watermark"; +import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Bonus, HideoutSlot } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; +import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; @@ -35,10 +33,9 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; - protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -50,15 +47,15 @@ export declare class ProfileFixerService { */ checkForAndFixScavProfileIssues(scavProfile: IPmcData): void; protected addMissingGunStandContainerImprovements(pmcProfile: IPmcData): void; - protected addMissingHallOfFameContainerImprovements(pmcProfile: IPmcData): void; protected ensureGunStandLevelsMatch(pmcProfile: IPmcData): void; protected addHideoutAreaStashes(pmcProfile: IPmcData): void; protected addMissingHideoutWallAreas(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile */ - addMissingSptVersionTagToProfile(fullProfile: ISptProfile): void; + addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; /** * TODO - make this non-public - currently used by RepeatableQuestController * Remove unused condition counters @@ -67,11 +64,7 @@ export declare class ProfileFixerService { removeDanglingConditionCounters(pmcProfile: IPmcData): void; addLighthouseKeeperIfMissing(pmcProfile: IPmcData): void; protected addUnlockedInfoObjectIfMissing(pmcProfile: IPmcData): void; - /** - * Repeatable quests leave behind TaskConditionCounter objects that make the profile bloat with time, remove them - * @param pmcProfile Player profile to check - */ - protected removeDanglingTaskConditionCounters(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; protected addMissingBonusesProperty(pmcProfile: IPmcData): void; @@ -105,6 +98,11 @@ export declare class ProfileFixerService { */ protected addEmptyObjectsToHideoutAreaSlots(areaType: HideoutAreas, emptyItemCount: number, pmcProfile: IPmcData): void; protected addObjectsToArray(count: number, slots: HideoutSlot[]): HideoutSlot[]; + /** + * In 18876 bsg changed the pockets tplid to be one that has 3 additional special slots + * @param pmcProfile + */ + protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void; /** * Iterate over players hideout areas and find what's build, look for missing bonuses those areas give and add them if missing * @param pmcProfile Profile to update @@ -121,20 +119,7 @@ export declare class ProfileFixerService { * @param sessionId Session id * @param pmcProfile Profile to check inventory of */ - checkForOrphanedModdedItems(sessionId: string, fullProfile: ISptProfile): void; - /** - * @param buildType The type of build, used for logging only - * @param build The build to check for invalid items - * @param itemsDb The items database to use for item lookup - * @returns True if the build should be removed from the build list, false otherwise - */ - protected shouldRemoveWeaponEquipmentBuild(buildType: string, build: IWeaponBuild | IEquipmentBuild, itemsDb: Record): boolean; - /** - * @param magazineBuild The magazine build to check for validity - * @param itemsDb The items database to use for item lookup - * @returns True if the build should be removed from the build list, false otherwise - */ - protected shouldRemoveMagazineBuild(magazineBuild: IMagazineBuild, itemsDb: Record): boolean; + checkForOrphanedModdedItems(sessionId: string, fullProfile: IAkiProfile): void; /** * Attempt to fix common item issues that corrupt profiles * @param pmcProfile Profile to check items of @@ -149,7 +134,7 @@ export declare class ProfileFixerService { * Iterate over associated profile template and check all hideout areas exist, add if not * @param fullProfile Profile to update */ - addMissingHideoutAreasToProfile(fullProfile: ISptProfile): void; + addMissingHideoutAreasToProfile(fullProfile: IAkiProfile): void; /** * These used to be used for storing scav case rewards, rewards are now generated on pickup * @param pmcProfile Profile to update @@ -160,34 +145,20 @@ export declare class ProfileFixerService { * We store the old AID value in new field `sessionId` * @param fullProfile Profile to update */ - fixIncorrectAidValue(fullProfile: ISptProfile): void; + fixIncorrectAidValue(fullProfile: IAkiProfile): void; /** * Bsg nested `stats` into a sub object called 'eft' * @param fullProfile Profile to check for and migrate stats data */ - migrateStatsToNewStructure(fullProfile: ISptProfile): void; + migrateStatsToNewStructure(fullProfile: IAkiProfile): void; /** * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets * @param pmcProfile Profile to add missing IDs to */ addMissingIdsToBonuses(pmcProfile: IPmcData): void; - /** - * 3.8.0 utilized the wrong ProductionTime for bitcoin, fix it if it's found - */ - fixBitcoinProductionTime(pmcProfile: IPmcData): void; /** * At some point the property name was changed,migrate data across to new name * @param pmcProfile Profile to migrate improvements in */ protected migrateImprovements(pmcProfile: IPmcData): void; - /** - * After removing mods that add quests, the quest panel will break without removing these - * @param pmcProfile Profile to remove dead quests from - */ - protected removeOrphanedQuests(pmcProfile: IPmcData): void; - /** - * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value - * Resolve this by setting the nextResupply to 0 if it's null - */ - protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ProfileSnapshotService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ProfileSnapshotService.d.ts index 5bb718b..3f60d41 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/ProfileSnapshotService.d.ts @@ -1,21 +1,21 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); + protected jsonUtil: JsonUtil; + protected storedProfileSnapshots: Record; + constructor(jsonUtil: JsonUtil); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key * @param profile - profile to save */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; + storeProfileSnapshot(sessionID: string, profile: IAkiProfile): void; /** * Retreve a stored profile * @param sessionID key * @returns A player profile object */ - getProfileSnapshot(sessionID: string): ISptProfile; + getProfileSnapshot(sessionID: string): IAkiProfile; /** * Does a profile exists against the provided key * @param sessionID key diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RagfairCategoriesService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RagfairCategoriesService.d.ts index c1ecb2d..ef40275 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; export declare class RagfairCategoriesService { protected logger: ILogger; protected paymentHelper: PaymentHelper; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RagfairLinkedItemService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RagfairLinkedItemService.d.ts index 6011c1a..3d607ac 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RagfairLinkedItemService.d.ts @@ -1,6 +1,6 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; export declare class RagfairLinkedItemService { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RagfairOfferService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RagfairOfferService.d.ts index 04d5265..ce86ee3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RagfairOfferService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RagfairOfferService.d.ts @@ -1,17 +1,18 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RagfairOfferHolder } from "@spt/utils/RagfairOfferHolder"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { RagfairOfferHolder } from "@spt-aki/utils/RagfairOfferHolder"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferService { protected logger: ILogger; protected timeUtil: TimeUtil; @@ -24,7 +25,6 @@ export declare class RagfairOfferService { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected playerOffersLoaded: boolean; - /** Offer id + offer object */ protected expiredOffers: Record; protected ragfairConfig: IRagfairConfig; protected ragfairOfferHandler: RagfairOfferHolder; @@ -38,19 +38,12 @@ export declare class RagfairOfferService { getOffersOfType(templateId: string): IRagfairOffer[]; addOffer(offer: IRagfairOffer): void; addOfferToExpired(staleOffer: IRagfairOffer): void; - /** - * Get total count of current expired offers - * @returns Number of expired offers - */ getExpiredOfferCount(): number; /** - * Get an array of arrays of expired offer items + children - * @returns Expired offer assorts - */ - getExpiredOfferAssorts(): Item[][]; - /** - * Clear out internal expiredOffers dictionary of all items + * Get an array of expired items not yet processed into new offers + * @returns items that need to be turned into offers */ + getExpiredOfferItems(): Item[]; resetExpiredOffers(): void; /** * Does the offer exist on the ragfair @@ -83,5 +76,5 @@ export declare class RagfairOfferService { * @param staleOffer Stale offer to process */ protected processStaleOffer(staleOffer: IRagfairOffer): void; - protected returnPlayerOffer(playerOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RagfairPriceService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RagfairPriceService.d.ts index 5b8fa56..3e91d52 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RagfairPriceService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RagfairPriceService.d.ts @@ -1,20 +1,19 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -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 { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairConfig, IUnreasonableModPrices } from "@spt/models/spt/config/IRagfairConfig"; -import { IRagfairServerPrices } from "@spt/models/spt/ragfair/IRagfairServerPrices"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "@spt-aki/models/spt/ragfair/IRagfairServerPrices"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -29,6 +28,8 @@ export declare class RagfairPriceService implements OnLoad { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected generatedDynamicPrices: boolean; + protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** @@ -39,11 +40,11 @@ export declare class RagfairPriceService implements OnLoad { /** * Iterate over all items of type "Item" in db and get template price, store in cache */ - refreshStaticPrices(): void; + generateStaticPrices(): void; /** - * Copy the prices.json data into our dynamic price dictionary + * Create a dictionary and store prices from prices.json in it */ - refreshDynamicPrices(): void; + protected generateDynamicPrices(): void; /** * Get the dynamic price for an item. If value doesn't exist, use static (handbook) value. * if no static value, return 1 @@ -51,14 +52,9 @@ export declare class RagfairPriceService implements OnLoad { * @returns price in roubles */ getFleaPriceForItem(tplId: string): number; - /** - * Get the flea price for an offers items + children - * @param offerItems offer item + children to process - * @returns Rouble price - */ - getFleaPriceForOfferItems(offerItems: Item[]): number; /** * get the dynamic (flea) price for an item + * Grabs prices from prices.json and stores in class if none currently exist * @param itemTpl item template id to look up * @returns price in roubles */ @@ -70,8 +66,7 @@ export declare class RagfairPriceService implements OnLoad { */ getStaticPriceForItem(itemTpl: string): number; /** - * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing - * This will refresh the caches prior to building the output + * Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * @returns Dictionary of item tpls and rouble cost */ getAllFleaPrices(): Record; @@ -91,30 +86,12 @@ export declare class RagfairPriceService implements OnLoad { getBarterPrice(barterScheme: IBarterScheme[]): number; /** * Generate a currency cost for an item and its mods - * @param offerItems Item with mods to get price for + * @param items Item with mods to get price for * @param desiredCurrency Currency price desired in * @param isPackOffer Price is for a pack type offer * @returns cost of item in desired currency */ - getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number; - /** - * @param itemTemplateId items tpl value - * @param desiredCurrency Currency to return result in - * @param item Item object (used for weapon presets) - * @param offerItems - * @param isPackOffer - * @returns - */ - getDynamicItemPrice(itemTemplateId: string, desiredCurrency: string, item?: Item, offerItems?: Item[], isPackOffer?: boolean): number; - /** - * using data from config, adjust an items price to be relative to its handbook price - * @param handbookPrices Prices of items in handbook - * @param unreasonableItemChange Change object from config - * @param itemTpl Item being adjusted - * @param price Current price of item - * @returns Adjusted price of item - */ - protected adjustUnreasonablePrice(handbookPrices: HandbookItem[], unreasonableItemChange: IUnreasonableModPrices, itemTpl: string, price: number): number; + getDynamicOfferPriceForOffer(items: Item[], desiredCurrency: string, isPackOffer: boolean): number; /** * Get different min/max price multipliers for different offer types (preset/pack/default) * @param isPreset Offer is a preset @@ -123,7 +100,7 @@ export declare class RagfairPriceService implements OnLoad { */ protected getOfferTypeRangeValues(isPreset: boolean, isPack: boolean): MinMax; /** - * Check to see if an items price is below its handbook price and adjust according to values set to config/ragfair.json + * Check to see if an items price is below its handbook price and adjust accoring to values set to config/ragfair.json * @param itemPrice price of item * @param itemTpl item template Id being checked * @returns adjusted price value in roubles @@ -138,12 +115,12 @@ export declare class RagfairPriceService implements OnLoad { protected randomiseOfferPrice(existingPrice: number, rangeValues: MinMax): number; /** * Calculate the cost of a weapon preset by adding together the price of its mods + base price of default weapon preset - * @param weaponRootItem base weapon - * @param weaponWithChildren weapon plus mods + * @param item base weapon + * @param items weapon plus mods * @param existingPrice price of existing base weapon * @returns price of weapon in roubles */ - protected getWeaponPresetPrice(weaponRootItem: Item, weaponWithChildren: Item[], existingPrice: number): number; + protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** * Get the highest price for an item that is stored in handbook or trader assorts * @param itemTpl Item to get highest price of @@ -156,7 +133,7 @@ export declare class RagfairPriceService implements OnLoad { * @param presets weapon presets to choose from * @returns Default preset object */ - protected getWeaponPreset(weapon: Item): { + protected getWeaponPreset(presets: IPreset[], weapon: Item): { isDefault: boolean; preset: IPreset; }; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RagfairRequiredItemsService.d.ts index cfc224d..3d030c2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RagfairRequiredItemsService.d.ts @@ -1,13 +1,12 @@ -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; export declare class RagfairRequiredItemsService { protected logger: ILogger; protected paymentHelper: PaymentHelper; protected ragfairOfferService: RagfairOfferService; protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); - getRequiredItemsById(searchId: string): IRagfairOffer[]; + getRequiredItemsById(searchId: string): any; buildRequiredItemTable(): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RagfairTaxService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RagfairTaxService.d.ts index 4e4e648..e72228f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RagfairTaxService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RagfairTaxService.d.ts @@ -1,11 +1,11 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IStorePlayerOfferTaxAmountRequestData } from "@spt/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "@spt-aki/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; export declare class RagfairTaxService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -16,16 +16,6 @@ export declare class RagfairTaxService { storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void; clearStoredOfferTaxById(offerIdToRemove: string): void; getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData; - /** - // This method, along with calculateItemWorth, is trying to mirror the client-side code found in the method "CalculateTaxPrice". - // It's structured to resemble the client-side code as closely as possible - avoid making any big structure changes if it's not necessary. - * @param item Item being sold on flea - * @param pmcData player profile - * @param requirementsValue - * @param offerItemCount Number of offers being created - * @param sellInOnePiece - * @returns Tax in roubles - */ calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RaidTimeAdjustmentService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RaidTimeAdjustmentService.d.ts index e2a4237..a2a223a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RaidTimeAdjustmentService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RaidTimeAdjustmentService.d.ts @@ -1,14 +1,14 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -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 { ILocationConfig, IScavRaidTimeLocationSettings, LootMultiplier } 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"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; +import { ExtractChange, IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; +import { ILocationConfig, IScavRaidTimeLocationSettings, LootMultiplier } from "@spt-aki/models/spt/config/ILocationConfig"; +import { IRaidChanges } from "@spt-aki/models/spt/location/IRaidChanges"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RaidTimeAdjustmentService { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RepairService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RepairService.d.ts index 9203417..cb0070f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RepairService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RepairService.d.ts @@ -1,23 +1,22 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RepairHelper } from "@spt/helpers/RepairHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; -import { BonusType } from "@spt/models/enums/BonusType"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { RepairHelper } from "@spt-aki/helpers/RepairHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest"; +import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest"; +import { SkillTypes } from "@spt-aki/models/enums/SkillTypes"; +import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -83,11 +82,11 @@ export declare class RepairService { protected getKitDivisor(itemToRepairDetails: ITemplateItem, isArmor: boolean, pmcData: IPmcData): number; /** * Get the bonus multiplier for a skill from a player profile - * @param skillBonus Bonus to get multipler of + * @param skillBonusName Name of bonus to get multipler of * @param pmcData Player profile to look in for skill * @returns Multiplier value */ - protected getBonusMultiplierValue(skillBonus: BonusType, pmcData: IPmcData): number; + protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number; /** * Should a repair kit apply total durability loss on repair * @param pmcData Player profile @@ -126,12 +125,12 @@ export declare class RepairService { * @param itemTemplate Item to check for skill * @returns Skill name */ - protected getItemSkillType(itemTemplate: ITemplateItem): SkillTypes | undefined; + protected getItemSkillType(itemTemplate: ITemplateItem): SkillTypes; /** * Ensure multiplier is between 1 and 0.01 - * @param receiveDurabilityMaxPercent Max durability percent + * @param receiveDurabilityMaxPercent Max durabiltiy percent * @param receiveDurabilityPercent current durability percent - * @returns durability multiplier value + * @returns durability multipler value */ protected getDurabilityMultiplier(receiveDurabilityMaxPercent: number, receiveDurabilityPercent: number): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts index 4162e14..3e20409 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts @@ -1,19 +1,17 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IConfig } from "@spt/models/eft/common/IGlobals"; -import { Inventory } from "@spt/models/eft/common/tables/IBotType"; -import { Season } from "@spt/models/enums/Season"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { GiftService } from "@spt/services/GiftService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { DatabaseImporter } from "@spt/utils/DatabaseImporter"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; +import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { ISeasonalEvent, ISeasonalEventConfig } from "@spt-aki/models/spt/config/ISeasonalEventConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { GiftService } from "@spt-aki/services/GiftService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { DatabaseImporter } from "@spt-aki/utils/DatabaseImporter"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -26,11 +24,8 @@ export declare class SeasonalEventService { protected seasonalEventConfig: ISeasonalEventConfig; protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; - protected weatherConfig: IWeatherConfig; - protected halloweenEventActive: boolean; - protected christmasEventActive: boolean; - /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected halloweenEventActive: any; + protected christmasEventActive: any; constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -53,12 +48,11 @@ export declare class SeasonalEventService { */ itemIsSeasonalRelated(itemTpl: string): boolean; /** - * Get an array of seasonal items that should not appear - * e.g. if halloween is active, only return christmas items - * or, if halloween and christmas are inactive, return both sets of items + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active * @returns array of tpl strings */ - getInactiveSeasonalEventItems(): string[]; + getAllSeasonalEventItems(): string[]; /** * Is a seasonal event currently active * @returns true if event is active @@ -103,13 +97,12 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; - getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) - * @param botInventory Bots inventory to iterate over + * @param nodeInventory Bots inventory to iterate over * @param botRole the role of the bot being processed */ - removeChristmasItemsFromBotInventory(botInventory: Inventory, botRole: string): void; + removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in * @param sessionId Player id @@ -117,9 +110,6 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; - protected adjustZryachiyMeleeChance(): void; - protected enableHalloweenSummonEvent(): void; - protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -149,11 +139,4 @@ export declare class SeasonalEventService { * @param giftkey Key of gift to give */ protected giveGift(playerId: string, giftkey: string): void; - /** - * Get the underlying bot type for an event bot e.g. `peacefullZryachiyEvent` will return `bossZryachiy` - * @param eventBotRole Event bot role type - * @returns Bot role as string - */ - getBaseRoleForEventBot(eventBotRole: string): string; - enableSnow(): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/TraderAssortService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/TraderAssortService.d.ts index 48af0b7..9130de6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/TraderAssortService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/TraderAssortService.d.ts @@ -1,4 +1,4 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; export declare class TraderAssortService { protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/TraderPurchasePersisterService.d.ts index 0ad76c9..cd7518c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/TraderPurchasePersisterService.d.ts @@ -1,23 +1,21 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderPurchaseData } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; - protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id @@ -25,14 +23,6 @@ export declare class TraderPurchasePersisterService { * @returns Dict of assort id and count purchased */ getProfileTraderPurchases(sessionId: string, traderId: string): Record; - /** - * Get a purchase made from a trader for requested profile before the last trader reset - * @param sessionId Session id - * @param traderId Trader to loop up purchases for - * @param assortId Id of assort to get data for - * @returns TraderPurchaseData - */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/23CustomAbstractChatBot/types/services/TraderServicesService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/TraderServicesService.d.ts deleted file mode 100644 index 111c71a..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/services/TraderServicesService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class TraderServicesService { - protected profileHelper: ProfileHelper; - protected logger: ILogger; - protected databaseServer: DatabaseServer; - protected cloner: ICloner; - constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); - getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/cache/BundleHashCacheService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/cache/BundleHashCacheService.d.ts deleted file mode 100644 index f8289c2..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/services/cache/BundleHashCacheService.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class BundleHashCacheService { - protected vfs: VFS; - protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; - protected logger: ILogger; - protected bundleHashes: Record; - protected readonly bundleHashCachePath = "./user/cache/bundleHashCache.json"; - constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); - getStoredValue(key: string): number; - storeValue(key: string, value: number): void; - matchWithStoredHash(bundlePath: string, hash: number): boolean; - calculateAndMatchHash(bundlePath: string): boolean; - calculateAndStoreHash(bundlePath: string): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/cache/ModHashCacheService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/cache/ModHashCacheService.d.ts deleted file mode 100644 index 3cb8ff8..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/services/cache/ModHashCacheService.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class ModHashCacheService { - protected vfs: VFS; - protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; - protected logger: ILogger; - protected modHashes: Record; - protected readonly modCachePath = "./user/cache/modCache.json"; - constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); - getStoredValue(key: string): string; - storeValue(key: string, value: string): void; - matchWithStoredHash(modName: string, hash: string): boolean; - calculateAndCompareHash(modName: string, modContent: string): boolean; - calculateAndStoreHash(modName: string, modContent: string): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/mod/CustomItemService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/mod/CustomItemService.d.ts index 0c82e8b..29329dc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/mod/CustomItemService.d.ts @@ -1,21 +1,19 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; -import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt-aki/models/spt/mod/NewItemDetails"; +import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; - protected itemBaseClassService: ItemBaseClassService; - protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start @@ -81,11 +79,6 @@ export declare class CustomItemService { * @param fleaPriceRoubles Price of the new item */ protected addToFleaPriceDb(newItemId: string, fleaPriceRoubles: number): void; - /** - * Add a weapon to the hideout weapon shelf whitelist - * @param newItemId Weapon id to add - */ - protected addToWeaponShelf(newItemId: string): void; /** * Add a custom weapon to PMCs loadout * @param weaponTpl Custom weapon tpl to add to PMCs diff --git a/TypeScript/23CustomAbstractChatBot/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts index bb969b3..5eed5b4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts @@ -1,4 +1,4 @@ -import { DynamicRouter, RouteAction } from "@spt/di/Router"; +import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; export declare class DynamicRouterMod extends DynamicRouter { private topLevelRoute; constructor(routes: RouteAction[], topLevelRoute: string); diff --git a/TypeScript/23CustomAbstractChatBot/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts index 3c9d955..648d191 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts @@ -1,5 +1,5 @@ import { DependencyContainer } from "tsyringe"; -import { RouteAction } from "@spt/di/Router"; +import { RouteAction } from "@spt-aki/di/Router"; export declare class DynamicRouterModService { private container; constructor(container: DependencyContainer); diff --git a/TypeScript/23CustomAbstractChatBot/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/mod/httpListener/HttpListenerMod.d.ts index 75e42ee..ebfa946 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -1,10 +1,10 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; +import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; export declare class HttpListenerMod implements IHttpListener { private canHandleOverride; private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/mod/onLoad/OnLoadMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/mod/onLoad/OnLoadMod.d.ts index 6544704..2bd5a31 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/mod/onLoad/OnLoadMod.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/mod/onLoad/OnLoadMod.d.ts @@ -1,4 +1,4 @@ -import { OnLoad } from "@spt/di/OnLoad"; +import { OnLoad } from "@spt-aki/di/OnLoad"; export declare class OnLoadMod implements OnLoad { private onLoadOverride; private getRouteOverride; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/mod/onUpdate/OnUpdateMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/mod/onUpdate/OnUpdateMod.d.ts index 3a8a26f..bef1d1c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/mod/onUpdate/OnUpdateMod.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/mod/onUpdate/OnUpdateMod.d.ts @@ -1,4 +1,4 @@ -import { OnUpdate } from "@spt/di/OnUpdate"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; export declare class OnUpdateMod implements OnUpdate { private onUpdateOverride; private getRouteOverride; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/mod/staticRouter/StaticRouterMod.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/mod/staticRouter/StaticRouterMod.d.ts index 48bf4a1..e01aaab 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/mod/staticRouter/StaticRouterMod.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/mod/staticRouter/StaticRouterMod.d.ts @@ -1,4 +1,4 @@ -import { RouteAction, StaticRouter } from "@spt/di/Router"; +import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; export declare class StaticRouterMod extends StaticRouter { private topLevelRoute; constructor(routes: RouteAction[], topLevelRoute: string); diff --git a/TypeScript/23CustomAbstractChatBot/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/mod/staticRouter/StaticRouterModService.d.ts index f60432d..775caae 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,5 +1,5 @@ import { DependencyContainer } from "tsyringe"; -import { RouteAction } from "@spt/di/Router"; +import { RouteAction } from "@spt-aki/di/Router"; export declare class StaticRouterModService { protected container: DependencyContainer; constructor(container: DependencyContainer); diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/App.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/App.d.ts index 211044e..64800ce 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/App.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/App.d.ts @@ -1,24 +1,22 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { HttpServer } from "@spt/servers/HttpServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { EncodingUtil } from "@spt/utils/EncodingUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { EncodingUtil } from "@spt-aki/utils/EncodingUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected encodingUtil: EncodingUtil; - protected httpServer: HttpServer; protected onLoadComponents: OnLoad[]; protected onUpdateComponents: OnUpdate[]; protected onUpdateLastRun: {}; protected coreConfig: ICoreConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, configServer: ConfigServer, encodingUtil: EncodingUtil, httpServer: HttpServer, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, configServer: ConfigServer, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): Promise; protected update(onUpdateComponents: OnUpdate[]): Promise; protected logUpdateException(err: any, updateable: OnUpdate): void; diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/AsyncQueue.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/AsyncQueue.d.ts index a14181d..2fab517 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/AsyncQueue.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/AsyncQueue.d.ts @@ -1,5 +1,5 @@ -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { ICommand } from "@spt/models/spt/utils/ICommand"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; +import { ICommand } from "@spt-aki/models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { protected commandsQueue: ICommand[]; constructor(); diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/CompareUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/CompareUtil.d.ts deleted file mode 100644 index a5b94d5..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/utils/CompareUtil.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare class CompareUtil { - private static typesToCheckAgainst; - /** - * This function does an object comparison, equivalent to applying reflections - * and scanning for all possible properties including arrays. - * @param v1 value 1 to compare - * @param v2 value 2 to compare - * @returns true if equal, false if not - */ - recursiveCompare(v1: any, v2: any): boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/DatabaseImporter.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/DatabaseImporter.d.ts index 4005d46..f8218bf 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/DatabaseImporter.d.ts @@ -1,15 +1,15 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ImageRouter } from "@spt/routers/ImageRouter"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { EncodingUtil } from "@spt/utils/EncodingUtil"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { ImporterUtil } from "@spt/utils/ImporterUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ImageRouter } from "@spt-aki/routers/ImageRouter"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { EncodingUtil } from "@spt-aki/utils/EncodingUtil"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { ImporterUtil } from "@spt-aki/utils/ImporterUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class DatabaseImporter implements OnLoad { protected logger: ILogger; protected vfs: VFS; @@ -27,7 +27,7 @@ export declare class DatabaseImporter implements OnLoad { protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); /** - * Get path to spt data + * Get path to aki data * @returns path to data */ getSptDataPath(): string; diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/HashUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/HashUtil.d.ts index 427c186..c51fb5c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/HashUtil.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/HashUtil.d.ts @@ -1,8 +1,6 @@ /// -/// import crypto from "node:crypto"; -import fs from "node:fs"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HashUtil { protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); @@ -13,7 +11,6 @@ export declare class HashUtil { generate(): string; generateMd5ForData(data: string): string; generateSha1ForData(data: string): string; - generateCRC32ForFile(filePath: fs.PathLike): number; /** * Create a hash for the data parameter * @param algorithm algorithm to use to hash diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/HttpFileUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/HttpFileUtil.d.ts index cc0d9ef..4296fe4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/HttpFileUtil.d.ts @@ -1,8 +1,8 @@ /// import { ServerResponse } from "node:http"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFile(resp: ServerResponse, file: any): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/HttpResponseUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/HttpResponseUtil.d.ts index 865c8e5..9868c1e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/HttpResponseUtil.d.ts @@ -1,9 +1,9 @@ -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { BackendErrorCodes } from "@spt/models/enums/BackendErrorCodes"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { BackendErrorCodes } from "@spt-aki/models/enums/BackendErrorCodes"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HttpResponseUtil { protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; @@ -27,12 +27,5 @@ export declare class HttpResponseUtil { emptyResponse(): IGetBodyResponseData; nullResponse(): INullResponseData; emptyArrayResponse(): IGetBodyResponseData; - /** - * Add an error into the 'warnings' array of the client response message - * @param output IItemEventRouterResponse - * @param message Error message - * @param errorCode Error code - * @returns IItemEventRouterResponse - */ appendErrorToOutput(output: IItemEventRouterResponse, message?: string, errorCode?: BackendErrorCodes): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/ImporterUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/ImporterUtil.d.ts index c36bcb5..7ce1bdb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/ImporterUtil.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/ImporterUtil.d.ts @@ -1,5 +1,5 @@ -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class ImporterUtil { protected vfs: VFS; protected jsonUtil: JsonUtil; diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/JsonUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/JsonUtil.d.ts index b59b0f9..befc3cb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/JsonUtil.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/JsonUtil.d.ts @@ -1,7 +1,7 @@ import { IParseOptions, IStringifyOptions, Reviver } from "jsonc/lib/interfaces"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { VFS } from "@spt/utils/VFS"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class JsonUtil { protected vfs: VFS; protected hashUtil: HashUtil; @@ -72,7 +72,6 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter - * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/ObjectId.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/ObjectId.d.ts index 91f64d3..309354f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/ObjectId.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/ObjectId.d.ts @@ -1,5 +1,5 @@ /// -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class ObjectId { protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/RagfairOfferHolder.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/RagfairOfferHolder.d.ts index 20f54a9..f3c9957 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/RagfairOfferHolder.d.ts @@ -1,25 +1,18 @@ -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - protected maxOffersPerTemplate: number; - protected ragfairServerHelper: RagfairServerHelper; protected offersById: Map; protected offersByTemplate: Map>; protected offersByTrader: Map>; - constructor(maxOffersPerTemplate: number, ragfairServerHelper: RagfairServerHelper); + constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; getOffersByTrader(traderId: string): Array; getOffers(): Array; addOffers(offers: Array): void; addOffer(offer: IRagfairOffer): void; - /** - * Purge offer from offer cache - * @param offer Offer to remove - */ removeOffer(offer: IRagfairOffer): void; removeOffers(offers: Array): void; - removeAllOffersByTrader(traderId: string): void; + removeOfferByTrader(traderId: string): void; /** * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/RandomUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/RandomUtil.d.ts index 1cee659..3552fb4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/RandomUtil.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/RandomUtil.d.ts @@ -1,6 +1,6 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects * based on the relative probability of each of its elements. @@ -18,8 +18,8 @@ import { MathUtil } from "@spt/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private cloner; - constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); + private jsonUtil; + constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected cloner: ICloner; + protected jsonUtil: JsonUtil; protected logger: ILogger; - constructor(cloner: ICloner, logger: ILogger); + constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; @@ -131,13 +131,12 @@ export declare class RandomUtil { [x: string]: any; }): any; /** - * Generate a normally distributed random number - * Uses the Box-Muller transform - * @param {number} mean Mean of the normal distribution + * Draw from normal distribution + * @param {number} mu Mean of the normal distribution * @param {number} sigma Standard deviation of the normal distribution * @returns {number} The value drawn */ - getNormallyDistributedRandomNumber(mean: number, sigma: number, attempt?: number): number; + randn(mu: number, sigma: number): number; /** * Draw Random integer low inclusive, high exclusive * if high is not set we draw from 0 to low (exclusive) @@ -150,11 +149,11 @@ export declare class RandomUtil { * Draw a random element of the provided list N times to return an array of N random elements * Drawing can be with or without replacement * @param {array} list The array we want to draw randomly from - * @param {integer} count The number of times we want to draw - * @param {boolean} replacement Draw with or without replacement from the input array(default true) + * @param {integer} count The number of times we want to draw + * @param {boolean} replacement Draw with or without replacement from the input array(defult true) * @return {array} Array consisting of N random elements */ - drawRandomFromList(originalList: Array, count?: number, replacement?: boolean): Array; + drawRandomFromList(list: Array, count?: number, replacement?: boolean): Array; /** * Draw a random (top level) element of the provided dictionary N times to return an array of N random dictionary keys * Drawing can be with or without replacement @@ -171,12 +170,4 @@ export declare class RandomUtil { * @returns Shuffled array */ shuffle(array: Array): Array; - /** - * Rolls for a probability based on chance - * @param number Probability Chance as float (0-1) - * @returns If roll succeed or not - * @example - * rollForChanceProbability(0.25); // returns true 25% probability - */ - rollForChanceProbability(probabilityChance: number): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/TimeUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/TimeUtil.d.ts index 2b844ba..1367e26 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/TimeUtil.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/TimeUtil.d.ts @@ -1,65 +1,31 @@ /** - * Utility class to handle time related operations. + * Utility class to handle time related problems */ export declare class TimeUtil { - static readonly ONE_HOUR_AS_SECONDS = 3600; - /** - * Pads a number with a leading zero if it is less than 10. - * - * @param {number} number - The number to pad. - * @returns {string} The padded number as a string. - */ - protected pad(number: number): string; - /** - * Formats the time part of a date as a UTC string. - * - * @param {Date} date - The date to format in UTC. - * @returns {string} The formatted time as 'HH-MM-SS'. - */ + static readonly oneHourAsSeconds = 3600; formatTime(date: Date): string; - /** - * Formats the date part of a date as a UTC string. - * - * @param {Date} date - The date to format in UTC. - * @returns {string} The formatted date as 'YYYY-MM-DD'. - */ formatDate(date: Date): string; - /** - * Gets the current date as a formatted UTC string. - * - * @returns {string} The current date as 'YYYY-MM-DD'. - */ getDate(): string; - /** - * Gets the current time as a formatted UTC string. - * - * @returns {string} The current time as 'HH-MM-SS'. - */ getTime(): string; /** - * Gets the current timestamp in seconds in UTC. - * - * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. + * Get timestamp in seconds + * @returns */ getTimestamp(): number; /** - * Gets the current time in UTC in a format suitable for mail in EFT. - * - * @returns {string} The current time as 'HH:MM' in UTC. + * mail in eft requires time be in a specific format + * @returns current time in format: 00:00 (hh:mm) */ getTimeMailFormat(): string; /** - * Gets the current date in UTC in a format suitable for emails in EFT. - * - * @returns {string} The current date as 'DD.MM.YYYY' in UTC. + * Mail in eft requires date be in a specific format + * @returns current date in format: 00.00.0000 (dd.mm.yyyy) */ getDateMailFormat(): string; /** - * Converts a number of hours into seconds. - * - * @param {number} hours - The number of hours to convert. - * @returns {number} The equivalent number of seconds. + * Convert hours into seconds + * @param hours hours to convert to seconds + * @returns number */ getHoursAsSeconds(hours: number): number; - getTimestampOfNextHour(): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/UUidGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/UUidGenerator.d.ts new file mode 100644 index 0000000..0d9ad2f --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/utils/UUidGenerator.d.ts @@ -0,0 +1,4 @@ +import { IUUidGenerator } from "@spt-aki/models/spt/utils/IUuidGenerator"; +export declare class UUidGenerator implements IUUidGenerator { + generate(): string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/VFS.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/VFS.d.ts index 20f428a..eefcccb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/VFS.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/VFS.d.ts @@ -1,10 +1,12 @@ /// /// -import "reflect-metadata"; import fs from "node:fs"; -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; +import "reflect-metadata"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; +import { IUUidGenerator } from "@spt-aki/models/spt/utils/IUuidGenerator"; export declare class VFS { protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { @@ -22,7 +24,7 @@ export declare class VFS { unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; - constructor(asyncQueue: IAsyncQueue); + constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; copyFile(filepath: fs.PathLike, target: fs.PathLike): void; @@ -46,8 +48,8 @@ export declare class VFS { removeDirAsync(filepath: string): Promise; rename(oldPath: string, newPath: string): void; renameAsync(oldPath: string, newPath: string): Promise; - protected lockFileSync(filepath: any): () => void; - protected checkFileSync(filepath: any): boolean; + protected lockFileSync(filepath: any): void; + protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; getFileExtension(filepath: string): string; stripExtension(filepath: string): string; diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/Watermark.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/Watermark.d.ts index 27b5b03..703d7bc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/Watermark.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/Watermark.d.ts @@ -1,7 +1,7 @@ -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class WatermarkLocale { protected localisationService: LocalisationService; protected description: string[]; @@ -17,10 +17,10 @@ export declare class Watermark { protected configServer: ConfigServer; protected localisationService: LocalisationService; protected watermarkLocale?: WatermarkLocale; - protected sptConfig: ICoreConfig; + protected akiConfig: ICoreConfig; + constructor(logger: ILogger, configServer: ConfigServer, localisationService: LocalisationService, watermarkLocale?: WatermarkLocale); protected text: string[]; protected versionLabel: string; - constructor(logger: ILogger, configServer: ConfigServer, localisationService: LocalisationService, watermarkLocale?: WatermarkLocale); initialize(): void; /** * Get a version string (x.x.x) or (x.x.x-BLEEDINGEDGE) OR (X.X.X (18xxx)) @@ -40,4 +40,6 @@ export declare class Watermark { protected resetCursor(): void; /** Draw the watermark */ protected draw(): void; + /** Caculate text length */ + protected textLength(s: string): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/cloners/ICloner.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/cloners/ICloner.d.ts deleted file mode 100644 index 77c0541..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/utils/cloners/ICloner.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICloner { - clone(obj: T): T; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/cloners/JsonCloner.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/cloners/JsonCloner.d.ts deleted file mode 100644 index 130dadb..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/utils/cloners/JsonCloner.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class JsonCloner implements ICloner { - clone(obj: T): T; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/cloners/RecursiveCloner.d.ts deleted file mode 100644 index 9ea2882..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/utils/cloners/RecursiveCloner.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class RecursiveCloner implements ICloner { - private static primitives; - clone(obj: T): T; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/cloners/StructuredCloner.d.ts deleted file mode 100644 index 6401443..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/utils/cloners/StructuredCloner.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class StructuredCloner implements ICloner { - clone(obj: T): T; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/collections/lists/LinkedList.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/collections/lists/LinkedList.d.ts index 6a084fa..aca0659 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/collections/lists/LinkedList.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/collections/lists/LinkedList.d.ts @@ -1,56 +1,30 @@ export declare class LinkedList { - private head?; - private tail?; - private _length; - get length(): number; - private set length(value); - constructor(); - /** - * Adds an element to the start of the list. - */ - prepend(value: T): void; - /** - * Adds an element at the given index to the list. - */ - insertAt(value: T, idx: number): void; - /** - * Adds an element to the end of the list. - */ - append(value: T): void; - /** - * Returns the first element's value. - */ - getHead(): T; - /** - * Finds the element from the list at the given index and returns it's value. - */ - get(idx: number): T; - /** - * Returns the last element's value. - */ - getTail(): T; - /** - * Finds and removes the first element from a list that has a value equal to the given value, returns it's value if it successfully removed it. - */ - remove(value: T): T; - /** - * Removes the first element from the list and returns it's value. If the list is empty, undefined is returned and the list is not modified. - */ - shift(): T; - /** - * Removes the element from the list at the given index and returns it's value. - */ - removeAt(idx: number): T; - /** - * Removes the last element from the list and returns it's value. If the list is empty, undefined is returned and the list is not modified. - */ - pop(): T; - /** - * Returns an iterable of index, value pairs for every entry in the list. - */ - entries(): IterableIterator<[number, T]>; - /** - * Returns an iterable of values in the list. - */ - values(): IterableIterator; + private head; + private tail; + add(t: T): void; + addRange(list: T[]): void; + getHead(): LinkedListNode; + getTail(): LinkedListNode; + isEmpty(): boolean; + getSize(): number; + removeFirst(): LinkedListNode; + removeLast(): LinkedListNode; + indexOf(func: (t: T) => boolean): number; + contains(func: (t: T) => boolean): boolean; + forEachNode(func: (t: LinkedListNode) => void): void; + forEachValue(func: (t: T) => void): void; + findFirstNode(func: (t: LinkedListNode) => boolean): LinkedListNode; + findFirstValue(func: (t: T) => boolean): T; + toList(): T[]; +} +export declare class LinkedListNode { + private previous; + private value; + private next; + constructor(value: T, previous?: LinkedListNode, next?: LinkedListNode); + getValue(): T; + getNextNode(): LinkedListNode; + setNextNode(node: LinkedListNode): void; + getPreviousNode(): LinkedListNode; + setPreviousNode(node: LinkedListNode): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/collections/lists/Nodes.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/collections/lists/Nodes.d.ts deleted file mode 100644 index 8e29e59..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/utils/collections/lists/Nodes.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class LinkedListNode { - value: T; - prev?: LinkedListNode; - next?: LinkedListNode; - constructor(value: T, prev?: LinkedListNode, next?: LinkedListNode); -} diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/collections/queue/Queue.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/collections/queue/Queue.d.ts index 8ea3d32..645d462 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/collections/queue/Queue.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/collections/queue/Queue.d.ts @@ -1,21 +1,12 @@ export declare class Queue { - private list; - get length(): number; + private elements; + private head; + private tail; constructor(); - /** - * Adds an element to the end of the queue. - */ enqueue(element: T): void; - /** - * Iterates over the elements received and adds each one to the end of the queue. - */ enqueueAll(elements: T[]): void; - /** - * Removes the first element from the queue and returns it's value. If the queue is empty, undefined is returned and the queue is not modified. - */ dequeue(): T; - /** - * Returns the first element's value. - */ peek(): T; + getLength(): number; + isEmpty(): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/logging/AbstractWinstonLogger.d.ts index 7098f85..4d2eba7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,14 +1,16 @@ /// import fs from "node:fs"; import winston from "winston"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; -import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; -import { SptLogger } from "@spt/models/spt/logging/SptLogger"; -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { Daum } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor"; +import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; +import { SptLogger } from "@spt-aki/models/spt/logging/SptLogger"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IUUidGenerator } from "@spt-aki/models/spt/utils/IUuidGenerator"; export declare abstract class AbstractWinstonLogger implements ILogger { protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; protected showDebugInConsole: boolean; protected filePath: string; protected logLevels: { @@ -42,13 +44,12 @@ export declare abstract class AbstractWinstonLogger implements ILogger { }; protected logger: winston.Logger & SptLogger; protected writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; - constructor(asyncQueue: IAsyncQueue); + constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); protected abstract isLogToFile(): boolean; protected abstract isLogToConsole(): boolean; protected abstract isLogExceptions(): boolean; protected abstract getFilePath(): string; protected abstract getFileName(): string; - protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; writeToLogFile(data: string | Daum): Promise; diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/logging/WinstonMainLogger.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/logging/WinstonMainLogger.d.ts index 8a634b2..ae1b6fc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/logging/WinstonMainLogger.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/logging/WinstonMainLogger.d.ts @@ -1,8 +1,10 @@ -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { AbstractWinstonLogger } from "@spt/utils/logging/AbstractWinstonLogger"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; +import { IUUidGenerator } from "@spt-aki/models/spt/utils/IUuidGenerator"; +import { AbstractWinstonLogger } from "@spt-aki/utils/logging/AbstractWinstonLogger"; export declare class WinstonMainLogger extends AbstractWinstonLogger { protected asyncQueue: IAsyncQueue; - constructor(asyncQueue: IAsyncQueue); + protected uuidGenerator: IUUidGenerator; + constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); protected isLogExceptions(): boolean; protected isLogToFile(): boolean; protected isLogToConsole(): boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/logging/WinstonRequestLogger.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/logging/WinstonRequestLogger.d.ts index 0988b6f..be14f1b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/logging/WinstonRequestLogger.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/logging/WinstonRequestLogger.d.ts @@ -1,8 +1,10 @@ -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { AbstractWinstonLogger } from "@spt/utils/logging/AbstractWinstonLogger"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; +import { IUUidGenerator } from "@spt-aki/models/spt/utils/IUuidGenerator"; +import { AbstractWinstonLogger } from "@spt-aki/utils/logging/AbstractWinstonLogger"; export declare class WinstonRequestLogger extends AbstractWinstonLogger { protected asyncQueue: IAsyncQueue; - constructor(asyncQueue: IAsyncQueue); + protected uuidGenerator: IUUidGenerator; + constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); protected isLogExceptions(): boolean; protected isLogToFile(): boolean; protected isLogToConsole(): boolean; diff --git a/TypeScript/24WebSocket/README.md b/TypeScript/24WebSocket/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/24WebSocket/README.md +++ b/TypeScript/24WebSocket/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/24WebSocket/package.json b/TypeScript/24WebSocket/package.json index 6bbc08a..ffb76e9 100644 --- a/TypeScript/24WebSocket/package.json +++ b/TypeScript/24WebSocket/package.json @@ -1,7 +1,7 @@ { "name": "WebSocket", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/24WebSocket/src/CustomSptWebSocketMessageHandler.ts b/TypeScript/24WebSocket/src/CustomAkiWebSocketMessageHandler.ts similarity index 50% rename from TypeScript/24WebSocket/src/CustomSptWebSocketMessageHandler.ts rename to TypeScript/24WebSocket/src/CustomAkiWebSocketMessageHandler.ts index b5e6687..a817a10 100644 --- a/TypeScript/24WebSocket/src/CustomSptWebSocketMessageHandler.ts +++ b/TypeScript/24WebSocket/src/CustomAkiWebSocketMessageHandler.ts @@ -1,20 +1,20 @@ import { inject, injectable } from "tsyringe"; import { WebSocket, RawData } from "ws"; -import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; // \/ dont forger this annotation here! @injectable() -export class CustomSptWebSocketMessageHandler implements ISptWebSocketMessageHandler +export class CustomAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { constructor( @inject("WinstonLogger") protected logger: ILogger, ) {} - public onSptMessage(sessionID: string, client: WebSocket, message: RawData): void + public onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void { - this.logger.info(`Custom SPT WebSocket Message handler received a message for ${sessionID}: ${message.toString()}`); + this.logger.info(`Custom AKI WebSocket Message handler received a message for ${sessionID}: ${message.toString()}`); } } diff --git a/TypeScript/24WebSocket/src/CustomWebSocketConnectionHandler.ts b/TypeScript/24WebSocket/src/CustomWebSocketConnectionHandler.ts index 10b30e8..9dd0ec8 100644 --- a/TypeScript/24WebSocket/src/CustomWebSocketConnectionHandler.ts +++ b/TypeScript/24WebSocket/src/CustomWebSocketConnectionHandler.ts @@ -2,8 +2,8 @@ import { IncomingMessage } from "node:http"; import { inject, injectable } from "tsyringe"; import { WebSocket } from "ws"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; // \/ dont forger this annotation here! @injectable() diff --git a/TypeScript/24WebSocket/src/mod.ts b/TypeScript/24WebSocket/src/mod.ts index c330376..e1f9e1b 100644 --- a/TypeScript/24WebSocket/src/mod.ts +++ b/TypeScript/24WebSocket/src/mod.ts @@ -1,19 +1,19 @@ import { DependencyContainer } from "tsyringe"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; import { CustomWebSocketConnectionHandler } from "./CustomWebSocketConnectionHandler"; -import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; -import { CustomSptWebSocketMessageHandler } from "./CustomSptWebSocketMessageHandler"; -import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { CustomAkiWebSocketMessageHandler } from "./CustomAkiWebSocketMessageHandler"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; -class Mod implements IPreSptLoadMod { - public preSptLoad(container: DependencyContainer): void { +class Mod implements IPreAkiLoadMod { + public preAkiLoad(container: DependencyContainer): void { // We register our Custom handlers: container.register("CustomWebSocketConnectionHandler", CustomWebSocketConnectionHandler); - container.register("CustomSptWebSocketMessageHandler", CustomSptWebSocketMessageHandler); + container.register("CustomAkiWebSocketMessageHandler", CustomAkiWebSocketMessageHandler); // Here we are binding MyCoolCommand and AnotherCoolCommand to the MyCommand dependencies types container.registerType("WebSocketConnectionHandler", "CustomWebSocketConnectionHandler"); - container.registerType("SptWebSocketMessageHandler", "CustomSptWebSocketMessageHandler"); + container.registerType("AkiWebSocketMessageHandler", "CustomAkiWebSocketMessageHandler"); } } diff --git a/TypeScript/24WebSocket/tsconfig.json b/TypeScript/24WebSocket/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/24WebSocket/tsconfig.json +++ b/TypeScript/24WebSocket/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/24WebSocket/types/callbacks/AchievementCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/AchievementCallbacks.d.ts index 4fb7125..61d3cf2 100644 --- a/TypeScript/24WebSocket/types/callbacks/AchievementCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/AchievementCallbacks.d.ts @@ -1,10 +1,10 @@ -import { AchievementController } from "@spt/controllers/AchievementController"; -import { ProfileController } from "@spt/controllers/ProfileController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ICompletedAchievementsResponse } from "@spt/models/eft/profile/ICompletedAchievementsResponse"; -import { IGetAchievementsResponse } from "@spt/models/eft/profile/IGetAchievementsResponse"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { AchievementController } from "@spt-aki/controllers/AchievementController"; +import { ProfileController } from "@spt-aki/controllers/ProfileController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { ICompletedAchievementsResponse } from "@spt-aki/models/eft/profile/ICompletedAchievementsResponse"; +import { IGetAchievementsResponse } from "@spt-aki/models/eft/profile/IGetAchievementsResponse"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class AchievementCallbacks { protected achievementController: AchievementController; protected profileController: ProfileController; diff --git a/TypeScript/24WebSocket/types/callbacks/BotCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/BotCallbacks.d.ts index 43abcfc..fd0abfc 100644 --- a/TypeScript/24WebSocket/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/BotCallbacks.d.ts @@ -1,10 +1,10 @@ -import { BotController } from "@spt/controllers/BotController"; -import { IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { Difficulties } from "@spt/models/eft/common/tables/IBotType"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { BotController } from "@spt-aki/controllers/BotController"; +import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Difficulties } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class BotCallbacks { protected botController: BotController; protected httpResponse: HttpResponseUtil; diff --git a/TypeScript/24WebSocket/types/callbacks/BuildsCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/BuildsCallbacks.d.ts index 79fee87..eb8843c 100644 --- a/TypeScript/24WebSocket/types/callbacks/BuildsCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/BuildsCallbacks.d.ts @@ -1,12 +1,12 @@ -import { BuildController } from "@spt/controllers/BuildController"; -import { ISetMagazineRequest } from "@spt/models/eft/builds/ISetMagazineRequest"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IPresetBuildActionRequestData } from "@spt/models/eft/presetBuild/IPresetBuildActionRequestData"; -import { IRemoveBuildRequestData } from "@spt/models/eft/presetBuild/IRemoveBuildRequestData"; -import { IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { BuildController } from "@spt-aki/controllers/BuildController"; +import { ISetMagazineRequest } from "@spt-aki/models/eft/builds/ISetMagazineRequest"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData"; +import { IRemoveBuildRequestData } from "@spt-aki/models/eft/presetBuild/IRemoveBuildRequestData"; +import { IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class BuildsCallbacks { protected httpResponse: HttpResponseUtil; protected buildController: BuildController; diff --git a/TypeScript/24WebSocket/types/callbacks/BundleCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/BundleCallbacks.d.ts index 3e579dc..f6a664d 100644 --- a/TypeScript/24WebSocket/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/BundleCallbacks.d.ts @@ -1,7 +1,7 @@ -import { BundleLoader } from "@spt/loaders/BundleLoader"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class BundleCallbacks { protected httpResponse: HttpResponseUtil; protected bundleLoader: BundleLoader; diff --git a/TypeScript/24WebSocket/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/ClientLogCallbacks.d.ts index bfeb9a4..1fb7acc 100644 --- a/TypeScript/24WebSocket/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/ClientLogCallbacks.d.ts @@ -1,10 +1,10 @@ -import { ClientLogController } from "@spt/controllers/ClientLogController"; -import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IClientLogRequest } from "@spt/models/spt/logging/IClientLogRequest"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { ClientLogController } from "@spt-aki/controllers/ClientLogController"; +import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IClientLogRequest } from "@spt-aki/models/spt/logging/IClientLogRequest"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; /** Handle client logging related events */ export declare class ClientLogCallbacks { protected httpResponse: HttpResponseUtil; diff --git a/TypeScript/24WebSocket/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/CustomizationCallbacks.d.ts index 3541343..9ea8faa 100644 --- a/TypeScript/24WebSocket/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/CustomizationCallbacks.d.ts @@ -1,14 +1,14 @@ -import { CustomizationController } from "@spt/controllers/CustomizationController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISuit } from "@spt/models/eft/common/tables/ITrader"; -import { IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData"; -import { IGetSuitsResponse } from "@spt/models/eft/customization/IGetSuitsResponse"; -import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { CustomizationController } from "@spt-aki/controllers/CustomizationController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISuit } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IBuyClothingRequestData } from "@spt-aki/models/eft/customization/IBuyClothingRequestData"; +import { IGetSuitsResponse } from "@spt-aki/models/eft/customization/IGetSuitsResponse"; +import { IWearClothingRequestData } from "@spt-aki/models/eft/customization/IWearClothingRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class CustomizationCallbacks { protected customizationController: CustomizationController; protected saveServer: SaveServer; diff --git a/TypeScript/24WebSocket/types/callbacks/DataCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/DataCallbacks.d.ts index 41a5a41..fbac60b 100644 --- a/TypeScript/24WebSocket/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/DataCallbacks.d.ts @@ -1,18 +1,18 @@ -import { HideoutController } from "@spt/controllers/HideoutController"; -import { RagfairController } from "@spt/controllers/RagfairController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem"; -import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; -import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { HideoutController } from "@spt-aki/controllers/HideoutController"; +import { RagfairController } from "@spt-aki/controllers/RagfairController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGlobals } from "@spt-aki/models/eft/common/IGlobals"; +import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; +import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; +import { IGetItemPricesResponse } from "@spt-aki/models/eft/game/IGetItemPricesResponse"; +import { IHideoutArea } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase"; +import { IHideoutSettingsBase } from "@spt-aki/models/eft/hideout/IHideoutSettingsBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { ISettingsBase } from "@spt-aki/models/spt/server/ISettingsBase"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; /** * Handle client requests */ diff --git a/TypeScript/24WebSocket/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/DialogueCallbacks.d.ts index f37f487..f6d3079 100644 --- a/TypeScript/24WebSocket/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/DialogueCallbacks.d.ts @@ -1,36 +1,36 @@ -import { DialogueController } from "@spt/controllers/DialogueController"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt/models/eft/dialog/IAcceptFriendRequestData"; -import { IAddUserGroupMailRequest } from "@spt/models/eft/dialog/IAddUserGroupMailRequest"; -import { IChangeGroupMailOwnerRequest } from "@spt/models/eft/dialog/IChangeGroupMailOwnerRequest"; -import { IChatServer } from "@spt/models/eft/dialog/IChatServer"; -import { IClearMailMessageRequest } from "@spt/models/eft/dialog/IClearMailMessageRequest"; -import { ICreateGroupMailRequest } from "@spt/models/eft/dialog/ICreateGroupMailRequest"; -import { IDeleteFriendRequest } from "@spt/models/eft/dialog/IDeleteFriendRequest"; -import { IFriendRequestData } from "@spt/models/eft/dialog/IFriendRequestData"; -import { IFriendRequestSendResponse } from "@spt/models/eft/dialog/IFriendRequestSendResponse"; -import { IGetAllAttachmentsRequestData } from "@spt/models/eft/dialog/IGetAllAttachmentsRequestData"; -import { IGetAllAttachmentsResponse } from "@spt/models/eft/dialog/IGetAllAttachmentsResponse"; -import { IGetChatServerListRequestData } from "@spt/models/eft/dialog/IGetChatServerListRequestData"; -import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendListDataResponse"; -import { IGetMailDialogInfoRequestData } from "@spt/models/eft/dialog/IGetMailDialogInfoRequestData"; -import { IGetMailDialogListRequestData } from "@spt/models/eft/dialog/IGetMailDialogListRequestData"; -import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; -import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; -import { IPinDialogRequestData } from "@spt/models/eft/dialog/IPinDialogRequestData"; -import { IRemoveDialogRequestData } from "@spt/models/eft/dialog/IRemoveDialogRequestData"; -import { IRemoveMailMessageRequest } from "@spt/models/eft/dialog/IRemoveMailMessageRequest"; -import { IRemoveUserGroupMailRequest } from "@spt/models/eft/dialog/IRemoveUserGroupMailRequest"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueController } from "@spt-aki/controllers/DialogueController"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; +import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; +import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; +import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; +import { IGetAllAttachmentsRequestData } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsRequestData"; +import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; +import { IGetChatServerListRequestData } from "@spt-aki/models/eft/dialog/IGetChatServerListRequestData"; +import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; +import { IGetMailDialogInfoRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogInfoRequestData"; +import { IGetMailDialogListRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogListRequestData"; +import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; +import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewResponseData"; +import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; +import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; +import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { DialogueInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class DialogueCallbacks implements OnUpdate { protected hashUtil: HashUtil; protected timeUtil: TimeUtil; diff --git a/TypeScript/24WebSocket/types/callbacks/GameCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/GameCallbacks.d.ts index b41454f..f4fa0d7 100644 --- a/TypeScript/24WebSocket/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/GameCallbacks.d.ts @@ -1,25 +1,25 @@ -import { GameController } from "@spt/controllers/GameController"; -import { OnLoad } from "@spt/di/OnLoad"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { ICheckVersionResponse } from "@spt/models/eft/game/ICheckVersionResponse"; -import { ICurrentGroupResponse } from "@spt/models/eft/game/ICurrentGroupResponse"; -import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; -import { IGameEmptyCrcRequestData } from "@spt/models/eft/game/IGameEmptyCrcRequestData"; -import { IGameKeepAliveResponse } from "@spt/models/eft/game/IGameKeepAliveResponse"; -import { IGameLogoutResponseData } from "@spt/models/eft/game/IGameLogoutResponseData"; -import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData"; -import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; -import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; -import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; -import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; -import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; -import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { Watermark } from "@spt/utils/Watermark"; +import { GameController } from "@spt-aki/controllers/GameController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; +import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; +import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; +import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; +import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; +import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; +import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; +import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; +import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; +import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { Watermark } from "@spt-aki/utils/Watermark"; export declare class GameCallbacks implements OnLoad { protected httpResponse: HttpResponseUtil; protected watermark: Watermark; diff --git a/TypeScript/24WebSocket/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/HandbookCallbacks.d.ts index 61819de..0a099e9 100644 --- a/TypeScript/24WebSocket/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/HandbookCallbacks.d.ts @@ -1,5 +1,5 @@ -import { HandbookController } from "@spt/controllers/HandbookController"; -import { OnLoad } from "@spt/di/OnLoad"; +import { HandbookController } from "@spt-aki/controllers/HandbookController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; export declare class HandbookCallbacks implements OnLoad { protected handbookController: HandbookController; constructor(handbookController: HandbookController); diff --git a/TypeScript/24WebSocket/types/callbacks/HealthCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/HealthCallbacks.d.ts index 840c9b1..24b633b 100644 --- a/TypeScript/24WebSocket/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/HealthCallbacks.d.ts @@ -1,21 +1,21 @@ -import { HealthController } from "@spt/controllers/HealthController"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; -import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; -import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { HealthController } from "@spt-aki/controllers/HealthController"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHealthTreatmentRequestData } from "@spt-aki/models/eft/health/IHealthTreatmentRequestData"; +import { IOffraidEatRequestData } from "@spt-aki/models/eft/health/IOffraidEatRequestData"; +import { IOffraidHealRequestData } from "@spt-aki/models/eft/health/IOffraidHealRequestData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { IWorkoutData } from "@spt-aki/models/eft/health/IWorkoutData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class HealthCallbacks { protected httpResponse: HttpResponseUtil; protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); /** - * Custom spt server request found in modules/HealthSynchronizer.cs + * Custom aki server request found in modules/HealthSynchronizer.cs * @param url * @param info HealthListener.Instance.CurrentHealth class * @param sessionID session id @@ -23,7 +23,7 @@ export declare class HealthCallbacks { */ syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** - * Custom spt server request found in modules/QTEPatch.cs + * Custom aki server request found in modules/QTEPatch.cs * @param url * @param info HealthListener.Instance.CurrentHealth class * @param sessionID session id diff --git a/TypeScript/24WebSocket/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/HideoutCallbacks.d.ts index fadab9b..c1fa7a5 100644 --- a/TypeScript/24WebSocket/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/HideoutCallbacks.d.ts @@ -1,22 +1,22 @@ -import { HideoutController } from "@spt/controllers/HideoutController"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutImproveAreaRequestData } from "@spt/models/eft/hideout/IHideoutImproveAreaRequestData"; -import { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData"; -import { IHideoutScavCaseStartRequestData } from "@spt/models/eft/hideout/IHideoutScavCaseStartRequestData"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; -import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; -import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { HideoutController } from "@spt-aki/controllers/HideoutController"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHandleQTEEventRequestData } from "@spt-aki/models/eft/hideout/IHandleQTEEventRequestData"; +import { IHideoutCancelProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutCancelProductionRequestData"; +import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; +import { IHideoutImproveAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutImproveAreaRequestData"; +import { IHideoutPutItemInRequestData } from "@spt-aki/models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCaseStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutScavCaseStartRequestData"; +import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData"; +import { IHideoutTakeItemOutRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeItemOutRequestData"; +import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData"; +import { IHideoutToggleAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; +import { IHideoutUpgradeRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeRequestData"; +import { IRecordShootingRangePoints } from "@spt-aki/models/eft/hideout/IRecordShootingRangePoints"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class HideoutCallbacks implements OnUpdate { protected hideoutController: HideoutController; protected configServer: ConfigServer; diff --git a/TypeScript/24WebSocket/types/callbacks/HttpCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/HttpCallbacks.d.ts index 11b2db5..060301a 100644 --- a/TypeScript/24WebSocket/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/HttpCallbacks.d.ts @@ -1,5 +1,5 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { HttpServer } from "@spt/servers/HttpServer"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { HttpServer } from "@spt-aki/servers/HttpServer"; export declare class HttpCallbacks implements OnLoad { protected httpServer: HttpServer; constructor(httpServer: HttpServer); diff --git a/TypeScript/24WebSocket/types/callbacks/InraidCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/InraidCallbacks.d.ts index a058b99..2bffa77 100644 --- a/TypeScript/24WebSocket/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/InraidCallbacks.d.ts @@ -1,10 +1,10 @@ -import { InraidController } from "@spt/controllers/InraidController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IItemDeliveryRequestData } from "@spt/models/eft/inRaid/IItemDeliveryRequestData"; -import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { InraidController } from "@spt-aki/controllers/InraidController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IItemDeliveryRequestData } from "@spt-aki/models/eft/inRaid/IItemDeliveryRequestData"; +import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; /** * Handle client requests */ diff --git a/TypeScript/24WebSocket/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/InsuranceCallbacks.d.ts index 888f128..1c57629 100644 --- a/TypeScript/24WebSocket/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/InsuranceCallbacks.d.ts @@ -1,15 +1,15 @@ -import { InsuranceController } from "@spt/controllers/InsuranceController"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsuranceCostRequestData"; -import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; -import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { InsuranceService } from "@spt/services/InsuranceService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { InsuranceController } from "@spt-aki/controllers/InsuranceController"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData"; +import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData"; +import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { InsuranceService } from "@spt-aki/services/InsuranceService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class InsuranceCallbacks implements OnUpdate { protected insuranceController: InsuranceController; protected insuranceService: InsuranceService; diff --git a/TypeScript/24WebSocket/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/InventoryCallbacks.d.ts index e0968e6..5aa0cb2 100644 --- a/TypeScript/24WebSocket/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/InventoryCallbacks.d.ts @@ -1,27 +1,27 @@ -import { InventoryController } from "@spt/controllers/InventoryController"; -import { QuestController } from "@spt/controllers/QuestController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; -import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; -import { IInventoryDeleteMarkerRequestData } from "@spt/models/eft/inventory/IInventoryDeleteMarkerRequestData"; -import { IInventoryEditMarkerRequestData } from "@spt/models/eft/inventory/IInventoryEditMarkerRequestData"; -import { IInventoryExamineRequestData } from "@spt/models/eft/inventory/IInventoryExamineRequestData"; -import { IInventoryFoldRequestData } from "@spt/models/eft/inventory/IInventoryFoldRequestData"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryReadEncyclopediaRequestData } from "@spt/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySortRequestData } from "@spt/models/eft/inventory/IInventorySortRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventorySwapRequestData } from "@spt/models/eft/inventory/IInventorySwapRequestData"; -import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTagRequestData"; -import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; -import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; -import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; +import { InventoryController } from "@spt-aki/controllers/InventoryController"; +import { QuestController } from "@spt-aki/controllers/QuestController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IInventoryBindRequestData } from "@spt-aki/models/eft/inventory/IInventoryBindRequestData"; +import { IInventoryCreateMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryCreateMarkerRequestData"; +import { IInventoryDeleteMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryDeleteMarkerRequestData"; +import { IInventoryEditMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryEditMarkerRequestData"; +import { IInventoryExamineRequestData } from "@spt-aki/models/eft/inventory/IInventoryExamineRequestData"; +import { IInventoryFoldRequestData } from "@spt-aki/models/eft/inventory/IInventoryFoldRequestData"; +import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData"; +import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData"; +import { IInventoryReadEncyclopediaRequestData } from "@spt-aki/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; +import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData"; +import { IInventorySortRequestData } from "@spt-aki/models/eft/inventory/IInventorySortRequestData"; +import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData"; +import { IInventorySwapRequestData } from "@spt-aki/models/eft/inventory/IInventorySwapRequestData"; +import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInventoryTagRequestData"; +import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData"; +import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData"; +import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData"; +import { ISetFavoriteItems } from "@spt-aki/models/eft/inventory/ISetFavoriteItems"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IFailQuestRequestData } from "@spt-aki/models/eft/quests/IFailQuestRequestData"; export declare class InventoryCallbacks { protected inventoryController: InventoryController; protected questController: QuestController; diff --git a/TypeScript/24WebSocket/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/ItemEventCallbacks.d.ts index 2d42ae3..97547c6 100644 --- a/TypeScript/24WebSocket/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/ItemEventCallbacks.d.ts @@ -1,9 +1,9 @@ -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { Warning } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; -import { IItemEventRouterRequest } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ItemEventRouter } from "@spt/routers/ItemEventRouter"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { Warning } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; +import { IItemEventRouterRequest } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ItemEventRouter } from "@spt-aki/routers/ItemEventRouter"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; diff --git a/TypeScript/24WebSocket/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/LauncherCallbacks.d.ts index 46fb3f4..b452291 100644 --- a/TypeScript/24WebSocket/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/LauncherCallbacks.d.ts @@ -1,12 +1,12 @@ -import { LauncherController } from "@spt/controllers/LauncherController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; -import { IRemoveProfileData } from "@spt/models/eft/launcher/IRemoveProfileData"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { Watermark } from "@spt/utils/Watermark"; +import { LauncherController } from "@spt-aki/controllers/LauncherController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IChangeRequestData } from "@spt-aki/models/eft/launcher/IChangeRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; +import { IRegisterData } from "@spt-aki/models/eft/launcher/IRegisterData"; +import { IRemoveProfileData } from "@spt-aki/models/eft/launcher/IRemoveProfileData"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { Watermark } from "@spt-aki/utils/Watermark"; export declare class LauncherCallbacks { protected httpResponse: HttpResponseUtil; protected launcherController: LauncherController; diff --git a/TypeScript/24WebSocket/types/callbacks/LocationCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/LocationCallbacks.d.ts index 2825050..a370219 100644 --- a/TypeScript/24WebSocket/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/LocationCallbacks.d.ts @@ -1,10 +1,10 @@ -import { LocationController } from "@spt/controllers/LocationController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { LocationController } from "@spt-aki/controllers/LocationController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILocationsGenerateAllResponse } from "@spt-aki/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetLocationRequestData } from "@spt-aki/models/eft/location/IGetLocationRequestData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class LocationCallbacks { protected httpResponse: HttpResponseUtil; protected locationController: LocationController; diff --git a/TypeScript/24WebSocket/types/callbacks/MatchCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/MatchCallbacks.d.ts index f002178..4203fa1 100644 --- a/TypeScript/24WebSocket/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/MatchCallbacks.d.ts @@ -1,24 +1,24 @@ -import { MatchController } from "@spt/controllers/MatchController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IEndOfflineRaidRequestData } from "@spt/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { IMatchGroupCurrentResponse } from "@spt/models/eft/match/IMatchGroupCurrentResponse"; -import { IMatchGroupInviteSendRequest } from "@spt/models/eft/match/IMatchGroupInviteSendRequest"; -import { IMatchGroupPlayerRemoveRequest } from "@spt/models/eft/match/IMatchGroupPlayerRemoveRequest"; -import { IMatchGroupStartGameRequest } from "@spt/models/eft/match/IMatchGroupStartGameRequest"; -import { IMatchGroupStatusRequest } from "@spt/models/eft/match/IMatchGroupStatusRequest"; -import { IMatchGroupStatusResponse } from "@spt/models/eft/match/IMatchGroupStatusResponse"; -import { IMatchGroupTransferRequest } from "@spt/models/eft/match/IMatchGroupTransferRequest"; -import { IProfileStatusResponse } from "@spt/models/eft/match/IProfileStatusResponse"; -import { IPutMetricsRequestData } from "@spt/models/eft/match/IPutMetricsRequestData"; -import { IRequestIdRequest } from "@spt/models/eft/match/IRequestIdRequest"; -import { IUpdatePingRequestData } from "@spt/models/eft/match/IUpdatePingRequestData"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; +import { MatchController } from "@spt-aki/controllers/MatchController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; +import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; +import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; +import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class MatchCallbacks { protected httpResponse: HttpResponseUtil; protected jsonUtil: JsonUtil; diff --git a/TypeScript/24WebSocket/types/callbacks/ModCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/ModCallbacks.d.ts index a0df59f..6af1e68 100644 --- a/TypeScript/24WebSocket/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/ModCallbacks.d.ts @@ -1,20 +1,20 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { PostSptModLoader } from "@spt/loaders/PostSptModLoader"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpFileUtil } from "@spt/utils/HttpFileUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { PostAkiModLoader } from "@spt-aki/loaders/PostAkiModLoader"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class ModCallbacks implements OnLoad { protected logger: ILogger; protected httpResponse: HttpResponseUtil; protected httpFileUtil: HttpFileUtil; - protected postSptModLoader: PostSptModLoader; + protected postAkiModLoader: PostAkiModLoader; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected httpConfig: IHttpConfig; - constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postSptModLoader: PostSptModLoader, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; } diff --git a/TypeScript/24WebSocket/types/callbacks/NoteCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/NoteCallbacks.d.ts index d078171..a60d3bb 100644 --- a/TypeScript/24WebSocket/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/NoteCallbacks.d.ts @@ -1,7 +1,7 @@ -import { NoteController } from "@spt/controllers/NoteController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; +import { NoteController } from "@spt-aki/controllers/NoteController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { INoteActionData } from "@spt-aki/models/eft/notes/INoteActionData"; export declare class NoteCallbacks { protected noteController: NoteController; constructor(noteController: NoteController); diff --git a/TypeScript/24WebSocket/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/NotifierCallbacks.d.ts index 0436e12..2d561fa 100644 --- a/TypeScript/24WebSocket/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/NotifierCallbacks.d.ts @@ -1,12 +1,12 @@ -import { NotifierController } from "@spt/controllers/NotifierController"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INotifierChannel } from "@spt/models/eft/notifier/INotifier"; -import { ISelectProfileResponse } from "@spt/models/eft/notifier/ISelectProfileResponse"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; +import { NotifierController } from "@spt-aki/controllers/NotifierController"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; +import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class NotifierCallbacks { protected httpServerHelper: HttpServerHelper; protected httpResponse: HttpResponseUtil; diff --git a/TypeScript/24WebSocket/types/callbacks/PresetCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/PresetCallbacks.d.ts index 24edfa2..2741094 100644 --- a/TypeScript/24WebSocket/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/PresetCallbacks.d.ts @@ -1,5 +1,5 @@ -import { PresetController } from "@spt/controllers/PresetController"; -import { OnLoad } from "@spt/di/OnLoad"; +import { PresetController } from "@spt-aki/controllers/PresetController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; export declare class PresetCallbacks implements OnLoad { protected presetController: PresetController; constructor(presetController: PresetController); diff --git a/TypeScript/24WebSocket/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/ProfileCallbacks.d.ts index 3db4ed8..e3d53e9 100644 --- a/TypeScript/24WebSocket/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/ProfileCallbacks.d.ts @@ -1,23 +1,23 @@ -import { ProfileController } from "@spt/controllers/ProfileController"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IGetMiniProfileRequestData } from "@spt/models/eft/launcher/IGetMiniProfileRequestData"; -import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData"; -import { ICreateProfileResponse } from "@spt/models/eft/profile/ICreateProfileResponse"; -import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest"; -import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse"; -import { IGetProfileSettingsRequest } from "@spt/models/eft/profile/IGetProfileSettingsRequest"; -import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData"; -import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData"; -import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData"; -import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData"; -import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileController } from "@spt-aki/controllers/ProfileController"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IGetMiniProfileRequestData } from "@spt-aki/models/eft/launcher/IGetMiniProfileRequestData"; +import { GetProfileStatusResponseData } from "@spt-aki/models/eft/profile/GetProfileStatusResponseData"; +import { ICreateProfileResponse } from "@spt-aki/models/eft/profile/ICreateProfileResponse"; +import { IGetOtherProfileRequest } from "@spt-aki/models/eft/profile/IGetOtherProfileRequest"; +import { IGetOtherProfileResponse } from "@spt-aki/models/eft/profile/IGetOtherProfileResponse"; +import { IGetProfileSettingsRequest } from "@spt-aki/models/eft/profile/IGetProfileSettingsRequest"; +import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData"; +import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData"; +import { IProfileCreateRequestData } from "@spt-aki/models/eft/profile/IProfileCreateRequestData"; +import { ISearchFriendRequestData } from "@spt-aki/models/eft/profile/ISearchFriendRequestData"; +import { ISearchFriendResponse } from "@spt-aki/models/eft/profile/ISearchFriendResponse"; +import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** Handle profile related client events */ export declare class ProfileCallbacks { protected httpResponse: HttpResponseUtil; diff --git a/TypeScript/24WebSocket/types/callbacks/QuestCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/QuestCallbacks.d.ts index dec034e..b5c5275 100644 --- a/TypeScript/24WebSocket/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/QuestCallbacks.d.ts @@ -1,17 +1,17 @@ -import { QuestController } from "@spt/controllers/QuestController"; -import { RepeatableQuestController } from "@spt/controllers/RepeatableQuestController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuest } from "@spt/models/eft/common/tables/IQuest"; -import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; -import { IHandoverQuestRequestData } from "@spt/models/eft/quests/IHandoverQuestRequestData"; -import { IListQuestsRequestData } from "@spt/models/eft/quests/IListQuestsRequestData"; -import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { QuestController } from "@spt-aki/controllers/QuestController"; +import { RepeatableQuestController } from "@spt-aki/controllers/RepeatableQuestController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt-aki/models/eft/quests/ICompleteQuestRequestData"; +import { IHandoverQuestRequestData } from "@spt-aki/models/eft/quests/IHandoverQuestRequestData"; +import { IListQuestsRequestData } from "@spt-aki/models/eft/quests/IListQuestsRequestData"; +import { IRepeatableQuestChangeRequest } from "@spt-aki/models/eft/quests/IRepeatableQuestChangeRequest"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class QuestCallbacks { protected httpResponse: HttpResponseUtil; protected questController: QuestController; diff --git a/TypeScript/24WebSocket/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/RagfairCallbacks.d.ts index 1e92996..d448d6b 100644 --- a/TypeScript/24WebSocket/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/RagfairCallbacks.d.ts @@ -1,27 +1,27 @@ -import { RagfairController } from "@spt/controllers/RagfairController"; -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAddOfferRequestData } from "@spt/models/eft/ragfair/IAddOfferRequestData"; -import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; -import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; -import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; -import { IGetOffersResult } from "@spt/models/eft/ragfair/IGetOffersResult"; -import { IGetRagfairOfferByIdRequest } from "@spt/models/eft/ragfair/IGetRagfairOfferByIdRequest"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRemoveOfferRequestData } from "@spt/models/eft/ragfair/IRemoveOfferRequestData"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { ISendRagfairReportRequestData } from "@spt/models/eft/ragfair/ISendRagfairReportRequestData"; -import { IStorePlayerOfferTaxAmountRequestData } from "@spt/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { RagfairTaxService } from "@spt/services/RagfairTaxService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { RagfairController } from "@spt-aki/controllers/RagfairController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAddOfferRequestData } from "@spt-aki/models/eft/ragfair/IAddOfferRequestData"; +import { IExtendOfferRequestData } from "@spt-aki/models/eft/ragfair/IExtendOfferRequestData"; +import { IGetItemPriceResult } from "@spt-aki/models/eft/ragfair/IGetItemPriceResult"; +import { IGetMarketPriceRequestData } from "@spt-aki/models/eft/ragfair/IGetMarketPriceRequestData"; +import { IGetOffersResult } from "@spt-aki/models/eft/ragfair/IGetOffersResult"; +import { IGetRagfairOfferByIdRequest } from "@spt-aki/models/eft/ragfair/IGetRagfairOfferByIdRequest"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { IRemoveOfferRequestData } from "@spt-aki/models/eft/ragfair/IRemoveOfferRequestData"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { ISendRagfairReportRequestData } from "@spt-aki/models/eft/ragfair/ISendRagfairReportRequestData"; +import { IStorePlayerOfferTaxAmountRequestData } from "@spt-aki/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { RagfairServer } from "@spt-aki/servers/RagfairServer"; +import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; /** * Handle ragfair related callback events */ diff --git a/TypeScript/24WebSocket/types/callbacks/RepairCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/RepairCallbacks.d.ts index 930708e..c8587dc 100644 --- a/TypeScript/24WebSocket/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/RepairCallbacks.d.ts @@ -1,8 +1,8 @@ -import { RepairController } from "@spt/controllers/RepairController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepairActionDataRequest } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { RepairController } from "@spt-aki/controllers/RepairController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRepairActionDataRequest } from "@spt-aki/models/eft/repair/IRepairActionDataRequest"; +import { ITraderRepairActionDataRequest } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { protected repairController: RepairController; constructor(repairController: RepairController); diff --git a/TypeScript/24WebSocket/types/callbacks/SaveCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/SaveCallbacks.d.ts index 8f836cb..74d463f 100644 --- a/TypeScript/24WebSocket/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/SaveCallbacks.d.ts @@ -1,8 +1,8 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; export declare class SaveCallbacks implements OnLoad, OnUpdate { protected saveServer: SaveServer; protected configServer: ConfigServer; diff --git a/TypeScript/24WebSocket/types/callbacks/TradeCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/TradeCallbacks.d.ts index 0f8ebe3..bfa72b0 100644 --- a/TypeScript/24WebSocket/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/TradeCallbacks.d.ts @@ -1,9 +1,9 @@ -import { TradeController } from "@spt/controllers/TradeController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -import { IProcessRagfairTradeRequestData } from "@spt/models/eft/trade/IProcessRagfairTradeRequestData"; -import { ISellScavItemsToFenceRequestData } from "@spt/models/eft/trade/ISellScavItemsToFenceRequestData"; +import { TradeController } from "@spt-aki/controllers/TradeController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; +import { IProcessRagfairTradeRequestData } from "@spt-aki/models/eft/trade/IProcessRagfairTradeRequestData"; +import { ISellScavItemsToFenceRequestData } from "@spt-aki/models/eft/trade/ISellScavItemsToFenceRequestData"; export declare class TradeCallbacks { protected tradeController: TradeController; constructor(tradeController: TradeController); diff --git a/TypeScript/24WebSocket/types/callbacks/TraderCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/TraderCallbacks.d.ts index c081a9b..6f0929f 100644 --- a/TypeScript/24WebSocket/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/TraderCallbacks.d.ts @@ -1,10 +1,10 @@ -import { TraderController } from "@spt/controllers/TraderController"; -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { TraderController } from "@spt-aki/controllers/TraderController"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { ITraderAssort, ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; protected traderController: TraderController; diff --git a/TypeScript/24WebSocket/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/WeatherCallbacks.d.ts index 5ba5aab..2c6fdf6 100644 --- a/TypeScript/24WebSocket/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/WeatherCallbacks.d.ts @@ -1,8 +1,8 @@ -import { WeatherController } from "@spt/controllers/WeatherController"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { WeatherController } from "@spt-aki/controllers/WeatherController"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IWeatherData } from "@spt-aki/models/eft/weather/IWeatherData"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class WeatherCallbacks { protected httpResponse: HttpResponseUtil; protected weatherController: WeatherController; diff --git a/TypeScript/24WebSocket/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/WishlistCallbacks.d.ts index f5b500f..29c3e44 100644 --- a/TypeScript/24WebSocket/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/WishlistCallbacks.d.ts @@ -1,7 +1,7 @@ -import { WishlistController } from "@spt/controllers/WishlistController"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IWishlistActionData } from "@spt/models/eft/wishlist/IWishlistActionData"; +import { WishlistController } from "@spt-aki/controllers/WishlistController"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IWishlistActionData } from "@spt-aki/models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); diff --git a/TypeScript/24WebSocket/types/context/ApplicationContext.d.ts b/TypeScript/24WebSocket/types/context/ApplicationContext.d.ts index 4818e3a..22c6c0e 100644 --- a/TypeScript/24WebSocket/types/context/ApplicationContext.d.ts +++ b/TypeScript/24WebSocket/types/context/ApplicationContext.d.ts @@ -1,5 +1,5 @@ -import { ContextVariable } from "@spt/context/ContextVariable"; -import { ContextVariableType } from "@spt/context/ContextVariableType"; +import { ContextVariable } from "@spt-aki/context/ContextVariable"; +import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; export declare class ApplicationContext { private variables; private static holderMaxSize; diff --git a/TypeScript/24WebSocket/types/context/ContextVariable.d.ts b/TypeScript/24WebSocket/types/context/ContextVariable.d.ts index 246be85..21bf7ef 100644 --- a/TypeScript/24WebSocket/types/context/ContextVariable.d.ts +++ b/TypeScript/24WebSocket/types/context/ContextVariable.d.ts @@ -1,4 +1,4 @@ -import { ContextVariableType } from "@spt/context/ContextVariableType"; +import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; export declare class ContextVariable { private value; private timestamp; diff --git a/TypeScript/24WebSocket/types/controllers/AchievementController.d.ts b/TypeScript/24WebSocket/types/controllers/AchievementController.d.ts index 14a32c6..32365c8 100644 --- a/TypeScript/24WebSocket/types/controllers/AchievementController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/AchievementController.d.ts @@ -1,7 +1,7 @@ -import { ICompletedAchievementsResponse } from "@spt/models/eft/profile/ICompletedAchievementsResponse"; -import { IGetAchievementsResponse } from "@spt/models/eft/profile/IGetAchievementsResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { ICompletedAchievementsResponse } from "@spt-aki/models/eft/profile/ICompletedAchievementsResponse"; +import { IGetAchievementsResponse } from "@spt-aki/models/eft/profile/IGetAchievementsResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; /** * Logic for handling In Raid callbacks */ diff --git a/TypeScript/24WebSocket/types/controllers/BotController.d.ts b/TypeScript/24WebSocket/types/controllers/BotController.d.ts index 25f7c29..99a848f 100644 --- a/TypeScript/24WebSocket/types/controllers/BotController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/BotController.d.ts @@ -1,26 +1,26 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { BotGenerator } from "@spt/generators/BotGenerator"; -import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { MinMax } from "@spt/models/common/MinMax"; -import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; -import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotGenerationCacheService } from "@spt/services/BotGenerationCacheService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { BotGenerator } from "@spt-aki/generators/BotGenerator"; +import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; +import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/controllers/BuildController.d.ts b/TypeScript/24WebSocket/types/controllers/BuildController.d.ts index 7b8957e..22e8eb1 100644 --- a/TypeScript/24WebSocket/types/controllers/BuildController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/BuildController.d.ts @@ -1,27 +1,25 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ISetMagazineRequest } from "@spt/models/eft/builds/ISetMagazineRequest"; -import { IPresetBuildActionRequestData } from "@spt/models/eft/presetBuild/IPresetBuildActionRequestData"; -import { IRemoveBuildRequestData } from "@spt/models/eft/presetBuild/IRemoveBuildRequestData"; -import { IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { ISetMagazineRequest } from "@spt-aki/models/eft/builds/ISetMagazineRequest"; +import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData"; +import { IRemoveBuildRequestData } from "@spt-aki/models/eft/presetBuild/IRemoveBuildRequestData"; +import { IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; - protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected saveServer: SaveServer; protected cloner: ICloner; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, localisationService: LocalisationService, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/24WebSocket/types/controllers/ClientLogController.d.ts b/TypeScript/24WebSocket/types/controllers/ClientLogController.d.ts index 6356c03..5d70ba4 100644 --- a/TypeScript/24WebSocket/types/controllers/ClientLogController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/ClientLogController.d.ts @@ -1,5 +1,5 @@ -import { IClientLogRequest } from "@spt/models/spt/logging/IClientLogRequest"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IClientLogRequest } from "@spt-aki/models/spt/logging/IClientLogRequest"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; export declare class ClientLogController { protected logger: ILogger; constructor(logger: ILogger); diff --git a/TypeScript/24WebSocket/types/controllers/CustomizationController.d.ts b/TypeScript/24WebSocket/types/controllers/CustomizationController.d.ts index 613dac9..27de49a 100644 --- a/TypeScript/24WebSocket/types/controllers/CustomizationController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/CustomizationController.d.ts @@ -1,14 +1,14 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISuit } from "@spt/models/eft/common/tables/ITrader"; -import { ClothingItem, IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData"; -import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISuit } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ClothingItem, IBuyClothingRequestData } from "@spt-aki/models/eft/customization/IBuyClothingRequestData"; +import { IWearClothingRequestData } from "@spt-aki/models/eft/customization/IWearClothingRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class CustomizationController { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; diff --git a/TypeScript/24WebSocket/types/controllers/DialogueController.d.ts b/TypeScript/24WebSocket/types/controllers/DialogueController.d.ts index 4a94359..2ad90c4 100644 --- a/TypeScript/24WebSocket/types/controllers/DialogueController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/DialogueController.d.ts @@ -1,30 +1,28 @@ -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { IFriendRequestData } from "@spt/models/eft/dialog/IFriendRequestData"; -import { IFriendRequestSendResponse } from "@spt/models/eft/dialog/IFriendRequestSendResponse"; -import { IGetAllAttachmentsResponse } from "@spt/models/eft/dialog/IGetAllAttachmentsResponse"; -import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendListDataResponse"; -import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; -import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; +import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; +import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; +import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; +import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewResponseData"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { Dialogue, DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class DialogueController { protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; protected mailSendService: MailSendService; - protected localisationService: LocalisationService; protected configServer: ConfigServer; protected dialogueChatBots: IDialogueChatBot[]; - constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, mailSendService: MailSendService, localisationService: LocalisationService, configServer: ConfigServer, dialogueChatBots: IDialogueChatBot[]); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, mailSendService: MailSendService, configServer: ConfigServer, dialogueChatBots: IDialogueChatBot[]); registerChatBot(chatBot: IDialogueChatBot): void; /** Handle onUpdate spt event */ update(): void; @@ -72,14 +70,14 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile * @param dialogUsers The participants of the mail * @returns IUserDialogInfo array */ - protected getProfilesForMail(fullProfile: ISptProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id diff --git a/TypeScript/24WebSocket/types/controllers/GameController.d.ts b/TypeScript/24WebSocket/types/controllers/GameController.d.ts index 6325d37..f64e42d 100644 --- a/TypeScript/24WebSocket/types/controllers/GameController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/GameController.d.ts @@ -1,49 +1,49 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ICheckVersionResponse } from "@spt/models/eft/game/ICheckVersionResponse"; -import { ICurrentGroupResponse } from "@spt/models/eft/game/ICurrentGroupResponse"; -import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; -import { IGameKeepAliveResponse } from "@spt/models/eft/game/IGameKeepAliveResponse"; -import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData"; -import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; -import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; -import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; -import { GiftService } from "@spt/services/GiftService"; -import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { OpenZoneService } from "@spt/services/OpenZoneService"; -import { ProfileActivityService } from "@spt/services/ProfileActivityService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse"; +import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; +import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; +import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; +import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; +import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt-aki/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { CustomLocationWaveService } from "@spt-aki/services/CustomLocationWaveService"; +import { GiftService } from "@spt-aki/services/GiftService"; +import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { OpenZoneService } from "@spt-aki/services/OpenZoneService"; +import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; - protected preSptModLoader: PreSptModLoader; + protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; protected randomUtil: RandomUtil; protected hideoutHelper: HideoutHelper; @@ -68,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -150,7 +150,7 @@ export declare class GameController { * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ - protected saveActiveModsToProfile(fullProfile: ISptProfile): void; + protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; /** * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json */ @@ -164,7 +164,7 @@ export declare class GameController { * Check for a dialog with the key 'undefined', and remove it * @param fullProfile Profile to check for dialog in */ - protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; + protected checkForAndRemoveUndefinedDialogs(fullProfile: IAkiProfile): void; /** * Blank out the "test" mail message from prapor */ @@ -173,5 +173,5 @@ export declare class GameController { * Make non-trigger-spawned raiders spawn earlier + always */ protected adjustLabsRaiderSpawnRate(): void; - protected logProfileDetails(fullProfile: ISptProfile): void; + protected logProfileDetails(fullProfile: IAkiProfile): void; } diff --git a/TypeScript/24WebSocket/types/controllers/HandbookController.d.ts b/TypeScript/24WebSocket/types/controllers/HandbookController.d.ts index 0743d30..4820f21 100644 --- a/TypeScript/24WebSocket/types/controllers/HandbookController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/HandbookController.d.ts @@ -1,5 +1,5 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; export declare class HandbookController { protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; diff --git a/TypeScript/24WebSocket/types/controllers/HealthController.d.ts b/TypeScript/24WebSocket/types/controllers/HealthController.d.ts index 5482283..5b2c170 100644 --- a/TypeScript/24WebSocket/types/controllers/HealthController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/HealthController.d.ts @@ -1,19 +1,19 @@ -import { HealthHelper } from "@spt/helpers/HealthHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; -import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; -import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { HealthHelper } from "@spt-aki/helpers/HealthHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHealthTreatmentRequestData } from "@spt-aki/models/eft/health/IHealthTreatmentRequestData"; +import { IOffraidEatRequestData } from "@spt-aki/models/eft/health/IOffraidEatRequestData"; +import { IOffraidHealRequestData } from "@spt-aki/models/eft/health/IOffraidHealRequestData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { IWorkoutData } from "@spt-aki/models/eft/health/IWorkoutData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class HealthController { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; diff --git a/TypeScript/24WebSocket/types/controllers/HideoutController.d.ts b/TypeScript/24WebSocket/types/controllers/HideoutController.d.ts index 7d2510d..600c22d 100644 --- a/TypeScript/24WebSocket/types/controllers/HideoutController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/HideoutController.d.ts @@ -1,45 +1,45 @@ -import { ScavCaseRewardGenerator } from "@spt/generators/ScavCaseRewardGenerator"; -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -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 } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; -import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutImproveAreaRequestData } from "@spt/models/eft/hideout/IHideoutImproveAreaRequestData"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData"; -import { IHideoutScavCaseStartRequestData } from "@spt/models/eft/hideout/IHideoutScavCaseStartRequestData"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; -import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; -import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { ProfileActivityService } from "@spt/services/ProfileActivityService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ScavCaseRewardGenerator } from "@spt-aki/generators/ScavCaseRewardGenerator"; +import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { HideoutArea, ITaskConditionCounter, Product } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { HideoutUpgradeCompleteRequestData } from "@spt-aki/models/eft/hideout/HideoutUpgradeCompleteRequestData"; +import { IHandleQTEEventRequestData } from "@spt-aki/models/eft/hideout/IHandleQTEEventRequestData"; +import { IHideoutArea, Stage } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutCancelProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutCancelProductionRequestData"; +import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; +import { IHideoutImproveAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutImproveAreaRequestData"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutPutItemInRequestData } from "@spt-aki/models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCaseStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutScavCaseStartRequestData"; +import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData"; +import { IHideoutTakeItemOutRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeItemOutRequestData"; +import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData"; +import { IHideoutToggleAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeRequestData"; +import { IQteData } from "@spt-aki/models/eft/hideout/IQteData"; +import { IRecordShootingRangePoints } from "@spt-aki/models/eft/hideout/IRecordShootingRangePoints"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas"; +import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/controllers/InraidController.d.ts b/TypeScript/24WebSocket/types/controllers/InraidController.d.ts index f252a7e..8749ba7 100644 --- a/TypeScript/24WebSocket/types/controllers/InraidController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/InraidController.d.ts @@ -1,36 +1,35 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; -import { HealthHelper } from "@spt/helpers/HealthHelper"; -import { InRaidHelper } from "@spt/helpers/InRaidHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState"; -import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { IBTRConfig } from "@spt/models/spt/config/IBTRConfig"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { InsuranceService } from "@spt/services/InsuranceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; -import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; -import { TraderServicesService } from "@spt/services/TraderServicesService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { PlayerScavGenerator } from "@spt-aki/generators/PlayerScavGenerator"; +import { HealthHelper } from "@spt-aki/helpers/HealthHelper"; +import { InRaidHelper } from "@spt-aki/helpers/InRaidHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "@spt-aki/models/enums/PlayerRaidEndState"; +import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; +import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; +import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig"; +import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { InsuranceService } from "@spt-aki/services/InsuranceService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; +import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; +import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Logic for handling In Raid callbacks */ @@ -48,7 +47,6 @@ export declare class InraidController { protected healthHelper: HealthHelper; protected traderHelper: TraderHelper; protected traderServicesService: TraderServicesService; - protected localisationService: LocalisationService; protected insuranceService: InsuranceService; protected inRaidHelper: InRaidHelper; protected applicationContext: ApplicationContext; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts b/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts index cfb05e4..ccb5c18 100644 --- a/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts @@ -1,30 +1,30 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsuranceCostRequestData"; -import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; -import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; -import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { InsuranceService } from "@spt/services/InsuranceService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData"; +import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData"; +import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { Insurance } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { InsuranceService } from "@spt-aki/services/InsuranceService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/controllers/InventoryController.d.ts b/TypeScript/24WebSocket/types/controllers/InventoryController.d.ts index 04ddea9..0d7f5ad 100644 --- a/TypeScript/24WebSocket/types/controllers/InventoryController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/InventoryController.d.ts @@ -1,44 +1,44 @@ -import { LootGenerator } from "@spt/generators/LootGenerator"; -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; -import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; -import { IInventoryDeleteMarkerRequestData } from "@spt/models/eft/inventory/IInventoryDeleteMarkerRequestData"; -import { IInventoryEditMarkerRequestData } from "@spt/models/eft/inventory/IInventoryEditMarkerRequestData"; -import { IInventoryExamineRequestData } from "@spt/models/eft/inventory/IInventoryExamineRequestData"; -import { IInventoryFoldRequestData } from "@spt/models/eft/inventory/IInventoryFoldRequestData"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryReadEncyclopediaRequestData } from "@spt/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySortRequestData } from "@spt/models/eft/inventory/IInventorySortRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventorySwapRequestData } from "@spt/models/eft/inventory/IInventorySwapRequestData"; -import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTagRequestData"; -import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; -import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; -import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { LootGenerator } from "@spt-aki/generators/LootGenerator"; +import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IInventoryBindRequestData } from "@spt-aki/models/eft/inventory/IInventoryBindRequestData"; +import { IInventoryCreateMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryCreateMarkerRequestData"; +import { IInventoryDeleteMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryDeleteMarkerRequestData"; +import { IInventoryEditMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryEditMarkerRequestData"; +import { IInventoryExamineRequestData } from "@spt-aki/models/eft/inventory/IInventoryExamineRequestData"; +import { IInventoryFoldRequestData } from "@spt-aki/models/eft/inventory/IInventoryFoldRequestData"; +import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData"; +import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData"; +import { IInventoryReadEncyclopediaRequestData } from "@spt-aki/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; +import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData"; +import { IInventorySortRequestData } from "@spt-aki/models/eft/inventory/IInventorySortRequestData"; +import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData"; +import { IInventorySwapRequestData } from "@spt-aki/models/eft/inventory/IInventorySwapRequestData"; +import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInventoryTagRequestData"; +import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData"; +import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData"; +import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData"; +import { ISetFavoriteItems } from "@spt-aki/models/eft/inventory/ISetFavoriteItems"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; @@ -167,12 +167,7 @@ export declare class InventoryController { * @returns response */ examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; - /** - * Flag an item as seen in profiles encyclopedia + add inspect xp to profile - * @param itemTpls Inspected item tpls - * @param fullProfile Profile to add xp to - */ - protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], fullProfile: ISptProfile): void; + protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], fullProfile: IAkiProfile): void; /** * Get the tplid of an item from the examine request object * @param request Response request diff --git a/TypeScript/24WebSocket/types/controllers/LauncherController.d.ts b/TypeScript/24WebSocket/types/controllers/LauncherController.d.ts index 58bc7b2..5a5d4b7 100644 --- a/TypeScript/24WebSocket/types/controllers/LauncherController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/LauncherController.d.ts @@ -1,21 +1,21 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; -import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { IChangeRequestData } from "@spt-aki/models/eft/launcher/IChangeRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; +import { IRegisterData } from "@spt-aki/models/eft/launcher/IRegisterData"; +import { Info, ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LauncherController { protected logger: ILogger; protected hashUtil: HashUtil; @@ -26,10 +26,10 @@ export declare class LauncherController { protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; - protected preSptModLoader: PreSptModLoader; + protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preSptModLoader: PreSptModLoader, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer); connect(): IConnectResponse; /** * Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness" diff --git a/TypeScript/24WebSocket/types/controllers/LocationController.d.ts b/TypeScript/24WebSocket/types/controllers/LocationController.d.ts index f1d5e0c..1b04b2e 100644 --- a/TypeScript/24WebSocket/types/controllers/LocationController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/LocationController.d.ts @@ -1,25 +1,25 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { LocationGenerator } from "@spt/generators/LocationGenerator"; -import { LootGenerator } from "@spt/generators/LootGenerator"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; -import { IAirdropLootResult } from "@spt/models/eft/location/IAirdropLootResult"; -import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; -import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { LocationGenerator } from "@spt-aki/generators/LocationGenerator"; +import { LootGenerator } from "@spt-aki/generators/LootGenerator"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILocationsGenerateAllResponse } from "@spt-aki/models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "@spt-aki/models/eft/location/IAirdropLootResult"; +import { IGetLocationRequestData } from "@spt-aki/models/eft/location/IGetLocationRequestData"; +import { AirdropTypeEnum } from "@spt-aki/models/enums/AirdropType"; +import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { LootRequest } from "@spt-aki/models/spt/services/LootRequest"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/controllers/MatchController.d.ts b/TypeScript/24WebSocket/types/controllers/MatchController.d.ts index c08ebb0..20ed9f6 100644 --- a/TypeScript/24WebSocket/types/controllers/MatchController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/MatchController.d.ts @@ -1,29 +1,29 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { LootGenerator } from "@spt/generators/LootGenerator"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IEndOfflineRaidRequestData } from "@spt/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { IMatchGroupStartGameRequest } from "@spt/models/eft/match/IMatchGroupStartGameRequest"; -import { IMatchGroupStatusRequest } from "@spt/models/eft/match/IMatchGroupStatusRequest"; -import { IMatchGroupStatusResponse } from "@spt/models/eft/match/IMatchGroupStatusResponse"; -import { IProfileStatusResponse } from "@spt/models/eft/match/IProfileStatusResponse"; -import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig"; -import { IMatchConfig } from "@spt/models/spt/config/IMatchConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { BotGenerationCacheService } from "@spt/services/BotGenerationCacheService"; -import { BotLootCacheService } from "@spt/services/BotLootCacheService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { LootGenerator } from "@spt-aki/generators/LootGenerator"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; +import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; +import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheService"; +import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { MatchLocationService } from "@spt-aki/services/MatchLocationService"; +import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; diff --git a/TypeScript/24WebSocket/types/controllers/NoteController.d.ts b/TypeScript/24WebSocket/types/controllers/NoteController.d.ts index a46a0aa..ef07d6d 100644 --- a/TypeScript/24WebSocket/types/controllers/NoteController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/NoteController.d.ts @@ -1,7 +1,7 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { INoteActionData } from "@spt-aki/models/eft/notes/INoteActionData"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; export declare class NoteController { protected eventOutputHolder: EventOutputHolder; constructor(eventOutputHolder: EventOutputHolder); diff --git a/TypeScript/24WebSocket/types/controllers/NotifierController.d.ts b/TypeScript/24WebSocket/types/controllers/NotifierController.d.ts index 8939bee..ad3d025 100644 --- a/TypeScript/24WebSocket/types/controllers/NotifierController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/NotifierController.d.ts @@ -1,7 +1,7 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { NotifierHelper } from "@spt/helpers/NotifierHelper"; -import { INotifierChannel } from "@spt/models/eft/notifier/INotifier"; -import { NotificationService } from "@spt/services/NotificationService"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper"; +import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; +import { NotificationService } from "@spt-aki/services/NotificationService"; export declare class NotifierController { protected notifierHelper: NotifierHelper; protected httpServerHelper: HttpServerHelper; diff --git a/TypeScript/24WebSocket/types/controllers/PresetController.d.ts b/TypeScript/24WebSocket/types/controllers/PresetController.d.ts index 0098a41..2e40723 100644 --- a/TypeScript/24WebSocket/types/controllers/PresetController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/PresetController.d.ts @@ -1,6 +1,6 @@ -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; export declare class PresetController { protected logger: ILogger; protected presetHelper: PresetHelper; diff --git a/TypeScript/24WebSocket/types/controllers/ProfileController.d.ts b/TypeScript/24WebSocket/types/controllers/ProfileController.d.ts index e39a632..41d8658 100644 --- a/TypeScript/24WebSocket/types/controllers/ProfileController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/ProfileController.d.ts @@ -1,32 +1,32 @@ -import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IMiniProfile } from "@spt/models/eft/launcher/IMiniProfile"; -import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData"; -import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest"; -import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse"; -import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData"; -import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData"; -import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData"; -import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData"; -import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { PlayerScavGenerator } from "@spt-aki/generators/PlayerScavGenerator"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IMiniProfile } from "@spt-aki/models/eft/launcher/IMiniProfile"; +import { GetProfileStatusResponseData } from "@spt-aki/models/eft/profile/GetProfileStatusResponseData"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IGetOtherProfileRequest } from "@spt-aki/models/eft/profile/IGetOtherProfileRequest"; +import { IGetOtherProfileResponse } from "@spt-aki/models/eft/profile/IGetOtherProfileResponse"; +import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData"; +import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData"; +import { IProfileCreateRequestData } from "@spt-aki/models/eft/profile/IProfileCreateRequestData"; +import { ISearchFriendRequestData } from "@spt-aki/models/eft/profile/ISearchFriendRequestData"; +import { ISearchFriendResponse } from "@spt-aki/models/eft/profile/ISearchFriendResponse"; +import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class ProfileController { protected logger: ILogger; protected hashUtil: HashUtil; @@ -81,7 +81,7 @@ export declare class ProfileController { * @param sessionID Session id * @param response Event router response */ - protected givePlayerStartingQuestRewards(profileDetails: ISptProfile, sessionID: string, response: IItemEventRouterResponse): void; + protected givePlayerStartingQuestRewards(profileDetails: IAkiProfile, sessionID: string, response: IItemEventRouterResponse): void; /** * For each trader reset their state to what a level 1 player would see * @param sessionID Session id of profile to reset diff --git a/TypeScript/24WebSocket/types/controllers/QuestController.d.ts b/TypeScript/24WebSocket/types/controllers/QuestController.d.ts index 0a32b05..1d13a10 100644 --- a/TypeScript/24WebSocket/types/controllers/QuestController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/QuestController.d.ts @@ -1,32 +1,32 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; -import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; -import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; -import { IHandoverQuestRequestData } from "@spt/models/eft/quests/IHandoverQuestRequestData"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IQuest, IQuestCondition } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt-aki/models/eft/quests/ICompleteQuestRequestData"; +import { IFailQuestRequestData } from "@spt-aki/models/eft/quests/IFailQuestRequestData"; +import { IHandoverQuestRequestData } from "@spt-aki/models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/24WebSocket/types/controllers/RagfairController.d.ts b/TypeScript/24WebSocket/types/controllers/RagfairController.d.ts index 9567d62..0c01b7d 100644 --- a/TypeScript/24WebSocket/types/controllers/RagfairController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/RagfairController.d.ts @@ -1,44 +1,44 @@ -import { RagfairOfferGenerator } from "@spt/generators/RagfairOfferGenerator"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RagfairHelper } from "@spt/helpers/RagfairHelper"; -import { RagfairOfferHelper } from "@spt/helpers/RagfairOfferHelper"; -import { RagfairSellHelper } from "@spt/helpers/RagfairSellHelper"; -import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; -import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; -import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; -import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; -import { IGetOffersResult } from "@spt/models/eft/ragfair/IGetOffersResult"; -import { IGetRagfairOfferByIdRequest } from "@spt/models/eft/ragfair/IGetRagfairOfferByIdRequest"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRemoveOfferRequestData } from "@spt/models/eft/ragfair/IRemoveOfferRequestData"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; -import { RagfairTaxService } from "@spt/services/RagfairTaxService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { RagfairHelper } from "@spt-aki/helpers/RagfairHelper"; +import { RagfairOfferHelper } from "@spt-aki/helpers/RagfairOfferHelper"; +import { RagfairSellHelper } from "@spt-aki/helpers/RagfairSellHelper"; +import { RagfairSortHelper } from "@spt-aki/helpers/RagfairSortHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IAddOfferRequestData, Requirement } from "@spt-aki/models/eft/ragfair/IAddOfferRequestData"; +import { IExtendOfferRequestData } from "@spt-aki/models/eft/ragfair/IExtendOfferRequestData"; +import { IGetItemPriceResult } from "@spt-aki/models/eft/ragfair/IGetItemPriceResult"; +import { IGetMarketPriceRequestData } from "@spt-aki/models/eft/ragfair/IGetMarketPriceRequestData"; +import { IGetOffersResult } from "@spt-aki/models/eft/ragfair/IGetOffersResult"; +import { IGetRagfairOfferByIdRequest } from "@spt-aki/models/eft/ragfair/IGetRagfairOfferByIdRequest"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { IRemoveOfferRequestData } from "@spt-aki/models/eft/ragfair/IRemoveOfferRequestData"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RagfairServer } from "@spt-aki/servers/RagfairServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { RagfairRequiredItemsService } from "@spt-aki/services/RagfairRequiredItemsService"; +import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Handle RagfairCallback events */ @@ -112,7 +112,7 @@ export declare class RagfairController { * @param offer Flea offer to update * @param fullProfile Players full profile */ - protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, fullProfile: ISptProfile): void; + protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, fullProfile: IAkiProfile): void; /** * Adjust ragfair offer stack count to match same value as traders assort stack count * @param offer Flea offer to adjust stack size of diff --git a/TypeScript/24WebSocket/types/controllers/RepairController.d.ts b/TypeScript/24WebSocket/types/controllers/RepairController.d.ts index 61726ef..7ec47ff 100644 --- a/TypeScript/24WebSocket/types/controllers/RepairController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/RepairController.d.ts @@ -1,17 +1,17 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { RepairHelper } from "@spt/helpers/RepairHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepairActionDataRequest } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; -import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RepairService } from "@spt/services/RepairService"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { RepairHelper } from "@spt-aki/helpers/RepairHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRepairActionDataRequest } from "@spt-aki/models/eft/repair/IRepairActionDataRequest"; +import { ITraderRepairActionDataRequest } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { RepairService } from "@spt-aki/services/RepairService"; export declare class RepairController { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; diff --git a/TypeScript/24WebSocket/types/controllers/RepeatableQuestController.d.ts b/TypeScript/24WebSocket/types/controllers/RepeatableQuestController.d.ts index e0f3753..ed5343a 100644 --- a/TypeScript/24WebSocket/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/RepeatableQuestController.d.ts @@ -1,26 +1,26 @@ -import { RepeatableQuestGenerator } from "@spt/generators/RepeatableQuestGenerator"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; -import { ELocationName } from "@spt/models/enums/ELocationName"; -import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { PaymentService } from "@spt/services/PaymentService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { RepeatableQuestGenerator } from "@spt-aki/generators/RepeatableQuestGenerator"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRepeatableQuestChangeRequest } from "@spt-aki/models/eft/quests/IRepeatableQuestChangeRequest"; +import { ELocationName } from "@spt-aki/models/enums/ELocationName"; +import { IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { ObjectId } from "@spt-aki/utils/ObjectId"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RepeatableQuestController { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/controllers/TradeController.d.ts b/TypeScript/24WebSocket/types/controllers/TradeController.d.ts index 9daed8c..e2eadbc 100644 --- a/TypeScript/24WebSocket/types/controllers/TradeController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/TradeController.d.ts @@ -1,30 +1,30 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TradeHelper } from "@spt/helpers/TradeHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -import { IOfferRequest, IProcessRagfairTradeRequestData } from "@spt/models/eft/trade/IProcessRagfairTradeRequestData"; -import { ISellScavItemsToFenceRequestData } from "@spt/models/eft/trade/ISellScavItemsToFenceRequestData"; -import { Traders } from "@spt/models/enums/Traders"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TradeHelper } from "@spt-aki/helpers/TradeHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; +import { IOfferRequest, IProcessRagfairTradeRequestData } from "@spt-aki/models/eft/trade/IProcessRagfairTradeRequestData"; +import { ISellScavItemsToFenceRequestData } from "@spt-aki/models/eft/trade/ISellScavItemsToFenceRequestData"; +import { Traders } from "@spt-aki/models/enums/Traders"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RagfairServer } from "@spt-aki/servers/RagfairServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/controllers/TraderController.d.ts b/TypeScript/24WebSocket/types/controllers/TraderController.d.ts index 9a85203..a8826b4 100644 --- a/TypeScript/24WebSocket/types/controllers/TraderController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/TraderController.d.ts @@ -1,17 +1,17 @@ -import { FenceBaseAssortGenerator } from "@spt/generators/FenceBaseAssortGenerator"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { TraderAssortService } from "@spt/services/TraderAssortService"; -import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { FenceBaseAssortGenerator } from "@spt-aki/generators/FenceBaseAssortGenerator"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { ITraderAssort, ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; +import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts b/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts index 7d24954..e25dc16 100644 --- a/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts @@ -1,8 +1,8 @@ -import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; -import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { WeatherGenerator } from "@spt-aki/generators/WeatherGenerator"; +import { IWeatherData } from "@spt-aki/models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; diff --git a/TypeScript/24WebSocket/types/controllers/WishlistController.d.ts b/TypeScript/24WebSocket/types/controllers/WishlistController.d.ts index ee4d970..01c4465 100644 --- a/TypeScript/24WebSocket/types/controllers/WishlistController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/WishlistController.d.ts @@ -1,7 +1,7 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IWishlistActionData } from "@spt/models/eft/wishlist/IWishlistActionData"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IWishlistActionData } from "@spt-aki/models/eft/wishlist/IWishlistActionData"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; export declare class WishlistController { protected eventOutputHolder: EventOutputHolder; constructor(eventOutputHolder: EventOutputHolder); diff --git a/TypeScript/24WebSocket/types/di/Router.d.ts b/TypeScript/24WebSocket/types/di/Router.d.ts index 01ca547..437e55d 100644 --- a/TypeScript/24WebSocket/types/di/Router.d.ts +++ b/TypeScript/24WebSocket/types/di/Router.d.ts @@ -1,6 +1,6 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class Router { protected handledRoutes: HandledRoute[]; getTopLevelRoute(): string; @@ -24,7 +24,7 @@ export declare class ItemEventRouterDefinition extends Router { handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { route: string; diff --git a/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts index a74010c..f0e9f35 100644 --- a/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts @@ -1,29 +1,29 @@ -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProbabilityHelper } from "@spt/helpers/ProbabilityHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Mods, ModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ModSpawn } from "@spt/models/enums/ModSpawn"; -import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; -import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; -import { BotModLimits, BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProbabilityHelper } from "@spt-aki/helpers/ProbabilityHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { Mods, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem, Slot } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ModSpawn } from "@spt-aki/models/enums/ModSpawn"; +import { IChooseRandomCompatibleModResult } from "@spt-aki/models/spt/bots/IChooseRandomCompatibleModResult"; +import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; +import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoolService"; +import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { diff --git a/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts index 49eb70c..5825dce 100644 --- a/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts @@ -1,24 +1,24 @@ -import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; -import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; -import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; -import { Appearance, Health, IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { BotInventoryGenerator } from "@spt-aki/generators/BotInventoryGenerator"; +import { BotLevelGenerator } from "@spt-aki/generators/BotLevelGenerator"; +import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/generators/BotInventoryGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotInventoryGenerator.d.ts index aa9c6cf..4ecd672 100644 --- a/TypeScript/24WebSocket/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotInventoryGenerator.d.ts @@ -1,21 +1,21 @@ -import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; -import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; -import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; -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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotEquipmentModGenerator } from "@spt-aki/generators/BotEquipmentModGenerator"; +import { BotLootGenerator } from "@spt-aki/generators/BotLootGenerator"; +import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Chances, Generation, IBotType, Inventory, Mods } from "@spt-aki/models/eft/common/tables/IBotType"; +import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots"; +import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoolService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotInventoryGenerator { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts index 71fad1f..044c28b 100644 --- a/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts @@ -1,10 +1,10 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLevelGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/generators/BotLootGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotLootGenerator.d.ts index 4301cea..db2327d 100644 --- a/TypeScript/24WebSocket/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotLootGenerator.d.ts @@ -1,26 +1,26 @@ -import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotHelper } from "@spt/helpers/BotHelper"; -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 { 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"; -import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { IItemSpawnLimitSettings } from "@spt/models/spt/bots/IItemSpawnLimitSettings"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotLootCacheService } from "@spt/services/BotLootCacheService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotType, Inventory, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots"; +import { IItemSpawnLimitSettings } from "@spt-aki/models/spt/bots/IItemSpawnLimitSettings"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/generators/BotWeaponGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotWeaponGenerator.d.ts index 42618e1..87a50f9 100644 --- a/TypeScript/24WebSocket/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotWeaponGenerator.d.ts @@ -1,26 +1,26 @@ -import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { Inventory 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"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RepairService } from "@spt/services/RepairService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotEquipmentModGenerator } from "@spt-aki/generators/BotEquipmentModGenerator"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { GenerationData, Inventory, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { GenerateWeaponResult } from "@spt-aki/models/spt/bots/GenerateWeaponResult"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/24WebSocket/types/generators/FenceBaseAssortGenerator.d.ts index b8c9266..39df8c0 100644 --- a/TypeScript/24WebSocket/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/FenceBaseAssortGenerator.d.ts @@ -1,17 +1,16 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -21,11 +20,10 @@ export declare class FenceBaseAssortGenerator { protected presetHelper: PresetHelper; protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; - protected localisationService: LocalisationService; protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/24WebSocket/types/generators/LocationGenerator.d.ts b/TypeScript/24WebSocket/types/generators/LocationGenerator.d.ts index 7571e14..9554579 100644 --- a/TypeScript/24WebSocket/types/generators/LocationGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/LocationGenerator.d.ts @@ -1,20 +1,20 @@ -import { ContainerHelper } from "@spt/helpers/ContainerHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, 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 { Item } from "@spt/models/eft/common/tables/IItem"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil"; +import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { ObjectId } from "@spt-aki/utils/ObjectId"; +import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; diff --git a/TypeScript/24WebSocket/types/generators/LootGenerator.d.ts b/TypeScript/24WebSocket/types/generators/LootGenerator.d.ts index 79b8183..f9b40fa 100644 --- a/TypeScript/24WebSocket/types/generators/LootGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/LootGenerator.d.ts @@ -1,20 +1,20 @@ -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootItem } from "@spt/models/spt/services/LootItem"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ISealedAirdropContainerSettings, RewardDetails } from "@spt-aki/models/spt/config/IInventoryConfig"; +import { LootItem } from "@spt-aki/models/spt/services/LootItem"; +import { LootRequest } from "@spt-aki/models/spt/services/LootRequest"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; max: number; diff --git a/TypeScript/24WebSocket/types/generators/PMCLootGenerator.d.ts b/TypeScript/24WebSocket/types/generators/PMCLootGenerator.d.ts index 9f6bcdc..a7a36e9 100644 --- a/TypeScript/24WebSocket/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/PMCLootGenerator.d.ts @@ -1,12 +1,12 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; /** * Handle the generation of dynamic PMC loot in pockets and backpacks * and the removal of blacklisted items diff --git a/TypeScript/24WebSocket/types/generators/PlayerScavGenerator.d.ts b/TypeScript/24WebSocket/types/generators/PlayerScavGenerator.d.ts index da874fc..813fd17 100644 --- a/TypeScript/24WebSocket/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/PlayerScavGenerator.d.ts @@ -1,22 +1,22 @@ -import { BotGenerator } from "@spt/generators/BotGenerator"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -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, Skills, Stats } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { BotLootCacheService } from "@spt/services/BotLootCacheService"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotGenerator } from "@spt-aki/generators/BotGenerator"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IBotBase, Skills, Stats } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IPlayerScavConfig, KarmaLevel } from "@spt-aki/models/spt/config/IPlayerScavConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/24WebSocket/types/generators/RagfairAssortGenerator.d.ts index 4c6cf1c..7b1a786 100644 --- a/TypeScript/24WebSocket/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/RagfairAssortGenerator.d.ts @@ -1,12 +1,12 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class RagfairAssortGenerator { protected hashUtil: HashUtil; protected itemHelper: ItemHelper; diff --git a/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts index e0dd09f..4b4c6ea 100644 --- a/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts @@ -1,26 +1,26 @@ -import { RagfairAssortGenerator } from "@spt/generators/RagfairAssortGenerator"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { RagfairAssortGenerator } from "@spt-aki/generators/RagfairAssortGenerator"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IRagfairOffer, OfferRequirement } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/24WebSocket/types/generators/RepeatableQuestGenerator.d.ts index 2b68eef..8c9345d 100644 --- a/TypeScript/24WebSocket/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/RepeatableQuestGenerator.d.ts @@ -1,20 +1,20 @@ -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 { IQuestCondition, IQuestConditionCounterCondition } from "@spt/models/eft/common/tables/IQuest"; -import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil"; +import { RepeatableQuestRewardGenerator } from "@spt-aki/generators/RepeatableQuestRewardGenerator"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; +import { Exit } from "@spt-aki/models/eft/common/ILocationBase"; +import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IQuestCondition, IQuestConditionCounterCondition } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { ObjectId } from "@spt-aki/utils/ObjectId"; +import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/24WebSocket/types/generators/RepeatableQuestRewardGenerator.d.ts index ea750dd..a23afd3 100644 --- a/TypeScript/24WebSocket/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -1,20 +1,20 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IQuestReward, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IQuestReward, IQuestRewards } from "@spt-aki/models/eft/common/tables/IQuest"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { ObjectId } from "@spt-aki/utils/ObjectId"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts index f22dcfc..aac0f05 100644 --- a/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts @@ -1,18 +1,18 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase"; +import { IScavCaseConfig } from "@spt-aki/models/spt/config/IScavCaseConfig"; +import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt-aki/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards */ diff --git a/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts b/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts index c9ca02a..75cb541 100644 --- a/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts @@ -1,13 +1,13 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; -import { WindDirection } from "@spt/models/enums/WindDirection"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SeasonalEventService } from "@spt/services/SeasonalEventService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IWeather, IWeatherData } from "@spt-aki/models/eft/weather/IWeatherData"; +import { WindDirection } from "@spt-aki/models/enums/WindDirection"; +import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; protected logger: ILogger; diff --git a/TypeScript/24WebSocket/types/generators/weapongen/IInventoryMagGen.d.ts b/TypeScript/24WebSocket/types/generators/weapongen/IInventoryMagGen.d.ts index 07bef8e..5586243 100644 --- a/TypeScript/24WebSocket/types/generators/weapongen/IInventoryMagGen.d.ts +++ b/TypeScript/24WebSocket/types/generators/weapongen/IInventoryMagGen.d.ts @@ -1,4 +1,4 @@ -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; export interface IInventoryMagGen { getPriority(): number; canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean; diff --git a/TypeScript/24WebSocket/types/generators/weapongen/InventoryMagGen.d.ts b/TypeScript/24WebSocket/types/generators/weapongen/InventoryMagGen.d.ts index 1db9915..778ac53 100644 --- a/TypeScript/24WebSocket/types/generators/weapongen/InventoryMagGen.d.ts +++ b/TypeScript/24WebSocket/types/generators/weapongen/InventoryMagGen.d.ts @@ -1,6 +1,6 @@ -import { Inventory } 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"; +import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; export declare class InventoryMagGen { private magCounts; private magazineTemplate; diff --git a/TypeScript/24WebSocket/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts b/TypeScript/24WebSocket/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts index caa4d13..3e5e708 100644 --- a/TypeScript/24WebSocket/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts +++ b/TypeScript/24WebSocket/types/generators/weapongen/implementations/BarrelInventoryMagGen.d.ts @@ -1,7 +1,7 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BarrelInventoryMagGen implements IInventoryMagGen { protected randomUtil: RandomUtil; protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; diff --git a/TypeScript/24WebSocket/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts b/TypeScript/24WebSocket/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts index c2b496f..bc301a1 100644 --- a/TypeScript/24WebSocket/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts +++ b/TypeScript/24WebSocket/types/generators/weapongen/implementations/ExternalInventoryMagGen.d.ts @@ -1,12 +1,12 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExternalInventoryMagGen implements IInventoryMagGen { protected logger: ILogger; protected itemHelper: ItemHelper; diff --git a/TypeScript/24WebSocket/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts b/TypeScript/24WebSocket/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts index 5ae7415..70efdb5 100644 --- a/TypeScript/24WebSocket/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts +++ b/TypeScript/24WebSocket/types/generators/weapongen/implementations/InternalMagazineInventoryMagGen.d.ts @@ -1,6 +1,6 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; export declare class InternalMagazineInventoryMagGen implements IInventoryMagGen { protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper); diff --git a/TypeScript/24WebSocket/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts b/TypeScript/24WebSocket/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts index 69d0c49..02b7748 100644 --- a/TypeScript/24WebSocket/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts +++ b/TypeScript/24WebSocket/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts @@ -1,6 +1,6 @@ -import { IInventoryMagGen } from "@spt/generators/weapongen/IInventoryMagGen"; -import { InventoryMagGen } from "@spt/generators/weapongen/InventoryMagGen"; -import { BotWeaponGeneratorHelper } from "@spt/helpers/BotWeaponGeneratorHelper"; +import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; +import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; +import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; export declare class UbglExternalMagGen implements IInventoryMagGen { protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper; constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper); diff --git a/TypeScript/24WebSocket/types/helpers/AssortHelper.d.ts b/TypeScript/24WebSocket/types/helpers/AssortHelper.d.ts index 72d1600..2ed2174 100644 --- a/TypeScript/24WebSocket/types/helpers/AssortHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/AssortHelper.d.ts @@ -1,11 +1,11 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { QuestStatus } from "@spt-aki/models/enums/QuestStatus"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class AssortHelper { protected logger: ILogger; protected itemHelper: ItemHelper; diff --git a/TypeScript/24WebSocket/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/24WebSocket/types/helpers/BotDifficultyHelper.d.ts index db6145e..07c236e 100644 --- a/TypeScript/24WebSocket/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/BotDifficultyHelper.d.ts @@ -1,12 +1,12 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/24WebSocket/types/helpers/BotGeneratorHelper.d.ts index bb3526f..c756725 100644 --- a/TypeScript/24WebSocket/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/BotGeneratorHelper.d.ts @@ -1,20 +1,20 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -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 { Item, Repairable, Upd } from "@spt/models/eft/common/tables/IItem"; -import { Grid, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ItemAddedResult } from "@spt/models/enums/ItemAddedResult"; -import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; -import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; +import { DurabilityLimitsHelper } from "@spt-aki/helpers/DurabilityLimitsHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { Grid, ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ItemAddedResult } from "@spt-aki/models/enums/ItemAddedResult"; +import { IChooseRandomCompatibleModResult } from "@spt-aki/models/spt/bots/IChooseRandomCompatibleModResult"; +import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGeneratorHelper { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/helpers/BotHelper.d.ts b/TypeScript/24WebSocket/types/helpers/BotHelper.d.ts index 5e03638..eafb081 100644 --- a/TypeScript/24WebSocket/types/helpers/BotHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/BotHelper.d.ts @@ -1,12 +1,12 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Difficulty, IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Difficulty, IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt-aki/models/spt/config/IBotConfig"; +import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/24WebSocket/types/helpers/BotWeaponGeneratorHelper.d.ts index 5ab4e59..e38bebc 100644 --- a/TypeScript/24WebSocket/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -1,16 +1,16 @@ -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 { 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"; -import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGeneratorHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts index 9817c5b..b9bc597 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/AbstractDialogueChatBot.d.ts @@ -1,9 +1,9 @@ -import { IChatCommand, ICommandoCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { MailSendService } from "@spt/services/MailSendService"; +import { IChatCommand, ICommandoCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { MailSendService } from "@spt-aki/services/MailSendService"; export declare abstract class AbstractDialogueChatBot implements IDialogueChatBot { protected logger: ILogger; protected mailSendService: MailSendService; diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/IChatCommand.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/IChatCommand.d.ts index 754fd08..ade0adc 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/IChatCommand.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/IChatCommand.d.ts @@ -1,5 +1,5 @@ -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; /** * @deprecated As of v3.7.6. Use IChatCommand. Will be removed in v3.9.0. */ diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts index bcd2bee..8626984 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommandoCommands.d.ts @@ -1,8 +1,8 @@ -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class SptCommandoCommands implements IChatCommand { protected configServer: ConfigServer; protected sptCommands: ISptCommand[]; diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index a7491b5..ea765b1 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -1,17 +1,17 @@ -import { SavedCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; +import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts index 3c55b8e..33732c7 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/ISptCommand.d.ts @@ -1,5 +1,5 @@ -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface ISptCommand { getCommand(): string; getCommandHelp(): string; diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 7d3547a..191af11 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -1,16 +1,16 @@ -import { SavedCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; +import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IProfileChangeEvent } from "@spt-aki/models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index 3cfc7bd..7c05112 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -1,14 +1,14 @@ -import { SavedCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; -import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; +import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts index a87bec1..34c3a79 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/CommandoDialogueChatBot.d.ts @@ -1,8 +1,8 @@ -import { AbstractDialogueChatBot } from "@spt/helpers/Dialogue/AbstractDialogueChatBot"; -import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { MailSendService } from "@spt/services/MailSendService"; +import { AbstractDialogueChatBot } from "@spt-aki/helpers/Dialogue/AbstractDialogueChatBot"; +import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { MailSendService } from "@spt-aki/services/MailSendService"; export declare class CommandoDialogueChatBot extends AbstractDialogueChatBot { constructor(logger: ILogger, mailSendService: MailSendService, chatCommands: IChatCommand[]); getChatBot(): IUserDialogInfo; diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/IDialogueChatBot.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/IDialogueChatBot.d.ts index 0c72041..b585d55 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/IDialogueChatBot.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/IDialogueChatBot.d.ts @@ -1,5 +1,5 @@ -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IDialogueChatBot { getChatBot(): IUserDialogInfo; handleMessage(sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..f858ab8 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -1,13 +1,13 @@ -import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { GiftService } from "@spt/services/GiftService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { GiftService } from "@spt-aki/services/GiftService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/helpers/DialogueHelper.d.ts b/TypeScript/24WebSocket/types/helpers/DialogueHelper.d.ts index febe696..2ad4536 100644 --- a/TypeScript/24WebSocket/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/DialogueHelper.d.ts @@ -1,13 +1,13 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; -import { NotifierHelper } from "@spt/helpers/NotifierHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; +import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { Dialogue, MessagePreview } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class DialogueHelper { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/24WebSocket/types/helpers/DurabilityLimitsHelper.d.ts index 4cbac6b..efccdf5 100644 --- a/TypeScript/24WebSocket/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,8 +1,8 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class DurabilityLimitsHelper { protected randomUtil: RandomUtil; protected botHelper: BotHelper; diff --git a/TypeScript/24WebSocket/types/helpers/GameEventHelper.d.ts b/TypeScript/24WebSocket/types/helpers/GameEventHelper.d.ts index b15a15d..555cda2 100644 --- a/TypeScript/24WebSocket/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ -import { ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { ISeasonalEventConfig } from "@spt-aki/models/spt/config/ISeasonalEventConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; export declare class GameEventHelper { protected databaseServer: DatabaseServer; protected configServer: ConfigServer; diff --git a/TypeScript/24WebSocket/types/helpers/HandbookHelper.d.ts b/TypeScript/24WebSocket/types/helpers/HandbookHelper.d.ts index 6836875..276506a 100644 --- a/TypeScript/24WebSocket/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/HandbookHelper.d.ts @@ -1,9 +1,9 @@ -import { Category } from "@spt/models/eft/common/tables/IHandbookBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IItemConfig } from "@spt/models/spt/config/IItemConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { Category } from "@spt-aki/models/eft/common/tables/IHandbookBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -28,7 +28,7 @@ export declare class HandbookHelper { hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) - * If no values found, return 0 + * If no values found, return 1 * @param tpl item tpl to look up price for * @returns price in roubles */ diff --git a/TypeScript/24WebSocket/types/helpers/HealthHelper.d.ts b/TypeScript/24WebSocket/types/helpers/HealthHelper.d.ts index 7fb646c..7a42ef1 100644 --- a/TypeScript/24WebSocket/types/helpers/HealthHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/HealthHelper.d.ts @@ -1,12 +1,12 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { Effects, IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { protected logger: ILogger; protected timeUtil: TimeUtil; @@ -20,7 +20,7 @@ export declare class HealthHelper { * @param sessionID Session Id * @returns updated profile */ - resetVitality(sessionID: string): ISptProfile; + resetVitality(sessionID: string): IAkiProfile; /** * Update player profile with changes from request object * @param pmcData Player profile diff --git a/TypeScript/24WebSocket/types/helpers/HideoutHelper.d.ts b/TypeScript/24WebSocket/types/helpers/HideoutHelper.d.ts index 33a9729..642c999 100644 --- a/TypeScript/24WebSocket/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/HideoutHelper.d.ts @@ -1,27 +1,27 @@ -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 { Item, Upd } from "@spt/models/eft/common/tables/IItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData"; +import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { SkillTypes } from "@spt-aki/models/enums/SkillTypes"; +import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/helpers/HttpServerHelper.d.ts b/TypeScript/24WebSocket/types/helpers/HttpServerHelper.d.ts index 9d5e6df..feeaf85 100644 --- a/TypeScript/24WebSocket/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/HttpServerHelper.d.ts @@ -1,5 +1,5 @@ -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class HttpServerHelper { protected configServer: ConfigServer; protected httpConfig: IHttpConfig; diff --git a/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts b/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts index 45cb9c1..9301cf7 100644 --- a/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts @@ -1,22 +1,22 @@ -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { QuestHelper } from "@spt/helpers/QuestHelper"; -import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig"; -import { ILostOnDeathConfig } from "@spt/models/spt/config/ILostOnDeathConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; +import { IPmcData, IPostRaidPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IQuestStatus, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; +import { ILostOnDeathConfig } from "@spt-aki/models/spt/config/ILostOnDeathConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; diff --git a/TypeScript/24WebSocket/types/helpers/InventoryHelper.d.ts b/TypeScript/24WebSocket/types/helpers/InventoryHelper.d.ts index 48431a8..9e62f9d 100644 --- a/TypeScript/24WebSocket/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/InventoryHelper.d.ts @@ -1,32 +1,32 @@ -import { ContainerHelper } from "@spt/helpers/ContainerHelper"; -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -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 { Item, Upd } from "@spt/models/eft/common/tables/IItem"; -import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; -import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest"; +import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData"; +import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest"; +import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject"; +import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData"; +import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData"; +import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData"; +import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData"; +import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig, RewardDetails } from "@spt-aki/models/spt/config/IInventoryConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; diff --git a/TypeScript/24WebSocket/types/helpers/ItemHelper.d.ts b/TypeScript/24WebSocket/types/helpers/ItemHelper.d.ts index 718dcdd..0779c12 100644 --- a/TypeScript/24WebSocket/types/helpers/ItemHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/ItemHelper.d.ts @@ -1,22 +1,22 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { IStaticAmmoDetails } from "@spt/models/eft/common/ILocation"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { InsuredItem } from "@spt/models/eft/common/tables/IBotBase"; -import { Item, Repairable, Upd } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { CompareUtil } from "@spt/utils/CompareUtil"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ObjectId } from "@spt/utils/ObjectId"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { CompareUtil } from "@spt-aki/utils/CompareUtil"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { ObjectId } from "@spt-aki/utils/ObjectId"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ItemHelper { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/helpers/NotificationSendHelper.d.ts b/TypeScript/24WebSocket/types/helpers/NotificationSendHelper.d.ts index 3a74563..669cbb6 100644 --- a/TypeScript/24WebSocket/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/NotificationSendHelper.d.ts @@ -1,16 +1,16 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { SptWebSocketConnectionHandler } from "@spt/servers/ws/SptWebSocketConnectionHandler"; -import { NotificationService } from "@spt/services/NotificationService"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; +import { NotificationService } from "@spt-aki/services/NotificationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected sptWebSocketConnection: SptWebSocketConnectionHandler; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(sptWebSocketConnection: SptWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID diff --git a/TypeScript/24WebSocket/types/helpers/NotifierHelper.d.ts b/TypeScript/24WebSocket/types/helpers/NotifierHelper.d.ts index b947f1b..c691563 100644 --- a/TypeScript/24WebSocket/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/NotifierHelper.d.ts @@ -1,8 +1,8 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; -import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** diff --git a/TypeScript/24WebSocket/types/helpers/PaymentHelper.d.ts b/TypeScript/24WebSocket/types/helpers/PaymentHelper.d.ts index 6971547..04d4163 100644 --- a/TypeScript/24WebSocket/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/PaymentHelper.d.ts @@ -1,5 +1,5 @@ -import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { IInventoryConfig } from "@spt-aki/models/spt/config/IInventoryConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class PaymentHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; diff --git a/TypeScript/24WebSocket/types/helpers/PresetHelper.d.ts b/TypeScript/24WebSocket/types/helpers/PresetHelper.d.ts index 937e225..a2d3d47 100644 --- a/TypeScript/24WebSocket/types/helpers/PresetHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/PresetHelper.d.ts @@ -1,7 +1,7 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -import { BaseClasses } from "@spt/models/enums/BaseClasses"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/helpers/ProbabilityHelper.d.ts b/TypeScript/24WebSocket/types/helpers/ProbabilityHelper.d.ts index fa12125..8aceb67 100644 --- a/TypeScript/24WebSocket/types/helpers/ProbabilityHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/ProbabilityHelper.d.ts @@ -1,5 +1,5 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ProbabilityHelper { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/helpers/ProfileHelper.d.ts b/TypeScript/24WebSocket/types/helpers/ProfileHelper.d.ts index 298ec55..9e0c467 100644 --- a/TypeScript/24WebSocket/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/ProfileHelper.d.ts @@ -1,20 +1,20 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Common, CounterKeyValue, Stats } from "@spt/models/eft/common/tables/IBotBase"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { Watermark } from "@spt/utils/Watermark"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData"; +import { SkillTypes } from "@spt-aki/models/enums/SkillTypes"; +import { IInventoryConfig } from "@spt-aki/models/spt/config/IInventoryConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; +import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; protected hashUtil: HashUtil; @@ -39,7 +39,7 @@ export declare class ProfileHelper { * Get all profiles from server * @returns Dictionary of profiles */ - getProfiles(): Record; + getProfiles(): Record; /** * Get the pmc and scav profiles as an array by profile id * @param sessionID @@ -66,7 +66,7 @@ export declare class ProfileHelper { * @returns True if already used */ isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean; - protected profileHasInfoProperty(profile: ISptProfile): boolean; + protected profileHasInfoProperty(profile: IAkiProfile): boolean; protected stringsMatch(stringA: string, stringB: string): boolean; /** * Add experience to a PMC inside the players profile @@ -91,13 +91,13 @@ export declare class ProfileHelper { * @returns Max level */ getMaxLevel(): number; - getDefaultSptDataObject(): any; + getDefaultAkiDataObject(): any; /** * Get full representation of a players profile json * @param sessionID Profile id to get - * @returns ISptProfile object + * @returns IAkiProfile object */ - getFullProfile(sessionID: string): ISptProfile; + getFullProfile(sessionID: string): IAkiProfile; /** * Get a PMC profile by its session id * @param sessionID Profile id to return @@ -130,7 +130,7 @@ export declare class ProfileHelper { removeSecureContainer(profile: IPmcData): IPmcData; /** * Flag a profile as having received a gift - * Store giftid in profile spt object + * Store giftid in profile aki object * @param playerId Player to add gift flag to * @param giftId Gift player received */ diff --git a/TypeScript/24WebSocket/types/helpers/QuestConditionHelper.d.ts b/TypeScript/24WebSocket/types/helpers/QuestConditionHelper.d.ts index c50a9c3..afb76f2 100644 --- a/TypeScript/24WebSocket/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/QuestConditionHelper.d.ts @@ -1,4 +1,4 @@ -import { IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; +import { IQuestCondition } from "@spt-aki/models/eft/common/tables/IQuest"; export declare class QuestConditionHelper { getQuestConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; getLevelConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[]; diff --git a/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts b/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts index 39ba2a9..75aaf01 100644 --- a/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts @@ -1,30 +1,30 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IQuest, IQuestCondition, IQuestReward } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData"; +import { IFailQuestRequestData } from "@spt-aki/models/eft/quests/IFailQuestRequestData"; +import { QuestStatus } from "@spt-aki/models/enums/QuestStatus"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; protected timeUtil: TimeUtil; @@ -272,10 +272,4 @@ export declare class QuestHelper { * @returns array of IQuest objects */ getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; - /** - * Get the hours a mails items can be collected for by profile type - * @param pmcData Profile to get hours for - * @returns Hours item will be available for - */ - getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; } diff --git a/TypeScript/24WebSocket/types/helpers/RagfairHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RagfairHelper.d.ts index cab2148..e322b4d 100644 --- a/TypeScript/24WebSocket/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RagfairHelper.d.ts @@ -1,16 +1,16 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { UtilityHelper } from "@spt/helpers/UtilityHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; +import { UtilityHelper } from "@spt-aki/helpers/UtilityHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; protected traderAssortHelper: TraderAssortHelper; diff --git a/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts index f8f7661..31bdc05 100644 --- a/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts @@ -1,33 +1,32 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RagfairHelper } from "@spt/helpers/RagfairHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { RagfairHelper } from "@spt-aki/helpers/RagfairHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { RagfairSortHelper } from "@spt-aki/helpers/RagfairSortHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { RagfairRequiredItemsService } from "@spt-aki/services/RagfairRequiredItemsService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; @@ -40,7 +39,6 @@ export declare class RagfairOfferHelper { protected paymentHelper: PaymentHelper; protected presetHelper: PresetHelper; protected profileHelper: ProfileHelper; - protected questHelper: QuestHelper; protected ragfairServerHelper: RagfairServerHelper; protected ragfairSortHelper: RagfairSortHelper; protected ragfairHelper: RagfairHelper; @@ -53,7 +51,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest Data from client @@ -123,7 +121,7 @@ export declare class RagfairOfferHelper { * @param sessionId Profile to update * @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier) */ - increaseProfileRagfairRating(profile: ISptProfile, amountToIncrementBy: number): void; + increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void; /** * Return all offers a player has listed on a desired profile * @param sessionID Session id diff --git a/TypeScript/24WebSocket/types/helpers/RagfairSellHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RagfairSellHelper.d.ts index d694d6a..7a4de8a 100644 --- a/TypeScript/24WebSocket/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RagfairSellHelper.d.ts @@ -1,10 +1,10 @@ -import { SellResult } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { SellResult } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairSellHelper { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/helpers/RagfairServerHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RagfairServerHelper.d.ts index a8133a6..33f81d0 100644 --- a/TypeScript/24WebSocket/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RagfairServerHelper.d.ts @@ -1,23 +1,23 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { ItemFilterService } from "@spt/services/ItemFilterService"; -import { LocaleService } from "@spt/services/LocaleService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Helper class for common ragfair server actions */ diff --git a/TypeScript/24WebSocket/types/helpers/RagfairSortHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RagfairSortHelper.d.ts index 2de0045..5bd8f96 100644 --- a/TypeScript/24WebSocket/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RagfairSortHelper.d.ts @@ -1,7 +1,7 @@ -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { RagfairSort } from "@spt/models/enums/RagfairSort"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { RagfairSort } from "@spt-aki/models/enums/RagfairSort"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; export declare class RagfairSortHelper { protected databaseServer: DatabaseServer; protected localeService: LocaleService; diff --git a/TypeScript/24WebSocket/types/helpers/RepairHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RepairHelper.d.ts index 4bd0577..30a56a6 100644 --- a/TypeScript/24WebSocket/types/helpers/RepairHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RepairHelper.d.ts @@ -1,11 +1,11 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RepeatableQuestHelper.d.ts index d92657e..8f9ac7b 100644 --- a/TypeScript/24WebSocket/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RepeatableQuestHelper.d.ts @@ -1,8 +1,8 @@ -import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { ProbabilityObject, ProbabilityObjectArray } from "@spt/utils/RandomUtil"; +import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; protected configServer: ConfigServer; diff --git a/TypeScript/24WebSocket/types/helpers/SecureContainerHelper.d.ts b/TypeScript/24WebSocket/types/helpers/SecureContainerHelper.d.ts index b6bcffe..36b227c 100644 --- a/TypeScript/24WebSocket/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/SecureContainerHelper.d.ts @@ -1,5 +1,5 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface OwnerInventoryItems { from: Item[]; to: Item[]; diff --git a/TypeScript/24WebSocket/types/helpers/TradeHelper.d.ts b/TypeScript/24WebSocket/types/helpers/TradeHelper.d.ts index 7bb999c..3dc7ffb 100644 --- a/TypeScript/24WebSocket/types/helpers/TradeHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/TradeHelper.d.ts @@ -1,24 +1,24 @@ -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; -import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; -import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { RagfairServer } from "@spt/servers/RagfairServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData"; +import { IProcessSellTradeRequestData } from "@spt-aki/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt-aki/models/spt/config/IInventoryConfig"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { RagfairServer } from "@spt-aki/servers/RagfairServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class TradeHelper { protected logger: ILogger; protected eventOutputHolder: EventOutputHolder; diff --git a/TypeScript/24WebSocket/types/helpers/TraderAssortHelper.d.ts b/TypeScript/24WebSocket/types/helpers/TraderAssortHelper.d.ts index 50f6933..33c4c83 100644 --- a/TypeScript/24WebSocket/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/TraderAssortHelper.d.ts @@ -1,22 +1,22 @@ -import { RagfairAssortGenerator } from "@spt/generators/RagfairAssortGenerator"; -import { RagfairOfferGenerator } from "@spt/generators/RagfairOfferGenerator"; -import { AssortHelper } from "@spt/helpers/AssortHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITrader, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { TraderAssortService } from "@spt/services/TraderAssortService"; -import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { RagfairAssortGenerator } from "@spt-aki/generators/RagfairAssortGenerator"; +import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; +import { AssortHelper } from "@spt-aki/helpers/AssortHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITrader, ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; +import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; protected mathUtil: MathUtil; diff --git a/TypeScript/24WebSocket/types/helpers/TraderHelper.d.ts b/TypeScript/24WebSocket/types/helpers/TraderHelper.d.ts index aca9d87..256ebf8 100644 --- a/TypeScript/24WebSocket/types/helpers/TraderHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/TraderHelper.d.ts @@ -1,21 +1,21 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ProfileTraderTemplate } from "@spt/models/eft/common/tables/IProfileTemplate"; -import { ITraderAssort, ITraderBase, LoyaltyLevel } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { FenceService } from "@spt/services/FenceService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PlayerService } from "@spt/services/PlayerService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ProfileTraderTemplate } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; +import { ITraderAssort, ITraderBase, LoyaltyLevel } from "@spt-aki/models/eft/common/tables/ITrader"; +import { Traders } from "@spt-aki/models/enums/Traders"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { FenceService } from "@spt-aki/services/FenceService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PlayerService } from "@spt-aki/services/PlayerService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/loaders/BundleLoader.d.ts b/TypeScript/24WebSocket/types/loaders/BundleLoader.d.ts index e270988..fc7ee2b 100644 --- a/TypeScript/24WebSocket/types/loaders/BundleLoader.d.ts +++ b/TypeScript/24WebSocket/types/loaders/BundleLoader.d.ts @@ -1,8 +1,8 @@ -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { BundleHashCacheService } from "@spt/services/cache/BundleHashCacheService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { modpath: string; filename: string; diff --git a/TypeScript/24WebSocket/types/loaders/ModLoadOrder.d.ts b/TypeScript/24WebSocket/types/loaders/ModLoadOrder.d.ts index 039f648..2d03dc1 100644 --- a/TypeScript/24WebSocket/types/loaders/ModLoadOrder.d.ts +++ b/TypeScript/24WebSocket/types/loaders/ModLoadOrder.d.ts @@ -1,6 +1,6 @@ -import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class ModLoadOrder { protected logger: ILogger; protected localisationService: LocalisationService; diff --git a/TypeScript/24WebSocket/types/loaders/ModTypeCheck.d.ts b/TypeScript/24WebSocket/types/loaders/ModTypeCheck.d.ts index f66ec45..fb4912e 100644 --- a/TypeScript/24WebSocket/types/loaders/ModTypeCheck.d.ts +++ b/TypeScript/24WebSocket/types/loaders/ModTypeCheck.d.ts @@ -1,40 +1,40 @@ -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { IPostDBLoadModAsync } from "@spt/models/external/IPostDBLoadModAsync"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { IPostSptLoadModAsync } from "@spt/models/external/IPostSptLoadModAsync"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { IPreSptLoadModAsync } from "@spt/models/external/IPreSptLoadModAsync"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { IPostAkiLoadModAsync } from "@spt-aki/models/external/IPostAkiLoadModAsync"; +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { IPostDBLoadModAsync } from "@spt-aki/models/external/IPostDBLoadModAsync"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { IPreAkiLoadModAsync } from "@spt-aki/models/external/IPreAkiLoadModAsync"; export declare class ModTypeCheck { /** - * Use defined safe guard to check if the mod is a IPreSptLoadMod + * Use defined safe guard to check if the mod is a IPreAkiLoadMod * @returns boolean */ - isPreSptLoad(mod: any): mod is IPreSptLoadMod; + isPreAkiLoad(mod: any): mod is IPreAkiLoadMod; /** - * Use defined safe guard to check if the mod is a IPostSptLoadMod + * Use defined safe guard to check if the mod is a IPostAkiLoadMod * @returns boolean */ - isPostSptLoad(mod: any): mod is IPostSptLoadMod; + isPostAkiLoad(mod: any): mod is IPostAkiLoadMod; /** * Use defined safe guard to check if the mod is a IPostDBLoadMod * @returns boolean */ - isPostDBLoad(mod: any): mod is IPostDBLoadMod; + isPostDBAkiLoad(mod: any): mod is IPostDBLoadMod; /** - * Use defined safe guard to check if the mod is a IPreSptLoadModAsync + * Use defined safe guard to check if the mod is a IPreAkiLoadModAsync * @returns boolean */ - isPreSptLoadAsync(mod: any): mod is IPreSptLoadModAsync; + isPreAkiLoadAsync(mod: any): mod is IPreAkiLoadModAsync; /** - * Use defined safe guard to check if the mod is a IPostSptLoadModAsync + * Use defined safe guard to check if the mod is a IPostAkiLoadModAsync * @returns boolean */ - isPostSptLoadAsync(mod: any): mod is IPostSptLoadModAsync; + isPostAkiLoadAsync(mod: any): mod is IPostAkiLoadModAsync; /** * Use defined safe guard to check if the mod is a IPostDBLoadModAsync * @returns boolean */ - isPostDBLoadAsync(mod: any): mod is IPostDBLoadModAsync; + isPostDBAkiLoadAsync(mod: any): mod is IPostDBLoadModAsync; /** * Checks for mod to be compatible with 3.X+ * @returns boolean diff --git a/TypeScript/24WebSocket/types/loaders/PostAkiModLoader.d.ts b/TypeScript/24WebSocket/types/loaders/PostAkiModLoader.d.ts new file mode 100644 index 0000000..8219fc4 --- /dev/null +++ b/TypeScript/24WebSocket/types/loaders/PostAkiModLoader.d.ts @@ -0,0 +1,17 @@ +import { DependencyContainer } from "tsyringe"; +import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { IModLoader } from "@spt-aki/models/spt/mod/IModLoader"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; + protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; + protected modTypeCheck: ModTypeCheck; + protected container: DependencyContainer; + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); + getModPath(mod: string): string; + load(): Promise; + protected executeModsAsync(): Promise; +} diff --git a/TypeScript/24WebSocket/types/loaders/PostDBModLoader.d.ts b/TypeScript/24WebSocket/types/loaders/PostDBModLoader.d.ts index b0c4bf4..1adac53 100644 --- a/TypeScript/24WebSocket/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/24WebSocket/types/loaders/PostDBModLoader.d.ts @@ -1,18 +1,18 @@ import { DependencyContainer } from "tsyringe"; -import { OnLoad } from "@spt/di/OnLoad"; -import { BundleLoader } from "@spt/loaders/BundleLoader"; -import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; +import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; +import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class PostDBModLoader implements OnLoad { protected logger: ILogger; protected bundleLoader: BundleLoader; - protected preSptModLoader: PreSptModLoader; + protected preAkiModLoader: PreAkiModLoader; protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; protected container: DependencyContainer; - constructor(logger: ILogger, bundleLoader: BundleLoader, preSptModLoader: PreSptModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/24WebSocket/types/loaders/PostSptModLoader.d.ts b/TypeScript/24WebSocket/types/loaders/PostSptModLoader.d.ts deleted file mode 100644 index fb54579..0000000 --- a/TypeScript/24WebSocket/types/loaders/PostSptModLoader.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; -import { IModLoader } from "@spt/models/spt/mod/IModLoader"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -export declare class PostSptModLoader implements IModLoader { - protected logger: ILogger; - protected preSptModLoader: PreSptModLoader; - protected localisationService: LocalisationService; - protected modTypeCheck: ModTypeCheck; - protected container: DependencyContainer; - constructor(logger: ILogger, preSptModLoader: PreSptModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); - getModPath(mod: string): string; - load(): Promise; - protected executeModsAsync(): Promise; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/loaders/PreSptModLoader.d.ts b/TypeScript/24WebSocket/types/loaders/PreAkiModLoader.d.ts similarity index 78% rename from TypeScript/23CustomAbstractChatBot/types/loaders/PreSptModLoader.d.ts rename to TypeScript/24WebSocket/types/loaders/PreAkiModLoader.d.ts index bc846c8..0d297d9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/24WebSocket/types/loaders/PreAkiModLoader.d.ts @@ -1,17 +1,17 @@ import { DependencyContainer } from "tsyringe"; -import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; -import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IModLoader } from "@spt/models/spt/mod/IModLoader"; -import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ModCompilerService } from "@spt/services/ModCompilerService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class PreSptModLoader implements IModLoader { +import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder"; +import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; +import { ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { IModLoader } from "@spt-aki/models/spt/mod/IModLoader"; +import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ModCompilerService } from "@spt-aki/services/ModCompilerService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; +export declare class PreAkiModLoader implements IModLoader { protected logger: ILogger; protected vfs: VFS; protected jsonUtil: JsonUtil; @@ -25,7 +25,7 @@ export declare class PreSptModLoader implements IModLoader { protected readonly modOrderPath = "user/mods/order.json"; protected order: Record; protected imported: Record; - protected sptConfig: ICoreConfig; + protected akiConfig: ICoreConfig; protected serverDependencies: Record; protected skippedMods: Set; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck); @@ -60,10 +60,10 @@ export declare class PreSptModLoader implements IModLoader { protected getModsPackageData(mods: string[]): Map; /** * Is the passed in mod compatible with the running server version - * @param mod Mod to check compatibiltiy with SPT + * @param mod Mod to check compatibiltiy with AKI * @returns True if compatible */ - protected isModCombatibleWithSpt(mod: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; /** * Execute each mod found in this.imported * @returns void promise diff --git a/TypeScript/24WebSocket/types/loaders/PreSptModLoader.d.ts b/TypeScript/24WebSocket/types/loaders/PreSptModLoader.d.ts deleted file mode 100644 index bc846c8..0000000 --- a/TypeScript/24WebSocket/types/loaders/PreSptModLoader.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { DependencyContainer } from "tsyringe"; -import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; -import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IModLoader } from "@spt/models/spt/mod/IModLoader"; -import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ModCompilerService } from "@spt/services/ModCompilerService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; -export declare class PreSptModLoader implements IModLoader { - protected logger: ILogger; - protected vfs: VFS; - protected jsonUtil: JsonUtil; - protected modCompilerService: ModCompilerService; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected modLoadOrder: ModLoadOrder; - protected modTypeCheck: ModTypeCheck; - protected container: DependencyContainer; - protected readonly basepath = "user/mods/"; - protected readonly modOrderPath = "user/mods/order.json"; - protected order: Record; - protected imported: Record; - protected sptConfig: ICoreConfig; - protected serverDependencies: Record; - protected skippedMods: Set; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck); - load(container: DependencyContainer): Promise; - /** - * Returns a list of mods with preserved load order - * @returns Array of mod names in load order - */ - getImportedModsNames(): string[]; - getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; - getModPath(mod: string): string; - protected importModsAsync(): Promise; - protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; - /** - * Check for duplicate mods loaded, show error if any - * @param modPackageData map of mod package.json data - */ - protected checkForDuplicateMods(modPackageData: Map): void; - /** - * Returns an array of valid mods. - * - * @param mods mods to validate - * @returns array of mod folder names - */ - protected getValidMods(mods: string[]): string[]; - /** - * Get packageJson data for mods - * @param mods mods to get packageJson for - * @returns map - */ - protected getModsPackageData(mods: string[]): Map; - /** - * Is the passed in mod compatible with the running server version - * @param mod Mod to check compatibiltiy with SPT - * @returns True if compatible - */ - protected isModCombatibleWithSpt(mod: IPackageJsonData): boolean; - /** - * Execute each mod found in this.imported - * @returns void promise - */ - protected executeModsAsync(): Promise; - /** - * Read loadorder.json (create if doesnt exist) and return sorted list of mods - * @returns string array of sorted mod names - */ - sortModsLoadOrder(): string[]; - /** - * Compile mod and add into class property "imported" - * @param mod Name of mod to compile/add - */ - protected addModAsync(mod: string, pkg: IPackageJsonData): Promise; - /** - * Checks if a given mod should be loaded or skipped. - * - * @param pkg mod package.json data - * @returns - */ - protected shouldSkipMod(pkg: IPackageJsonData): boolean; - protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; - protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Map): boolean; - protected isModCompatible(mod: IPackageJsonData, loadedMods: Map): boolean; - /** - * Validate a mod passes a number of checks - * @param modName name of mod in /mods/ to validate - * @returns true if valid - */ - protected validMod(modName: string): boolean; - getContainer(): DependencyContainer; -} diff --git a/TypeScript/24WebSocket/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..4b002e8 100644 --- a/TypeScript/24WebSocket/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "../profile/IAkiProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/24WebSocket/types/models/eft/common/IGlobals.d.ts b/TypeScript/24WebSocket/types/models/eft/common/IGlobals.d.ts index 2209415..2c12570 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/IGlobals.d.ts @@ -1,5 +1,5 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; diff --git a/TypeScript/24WebSocket/types/models/eft/common/ILocation.d.ts b/TypeScript/24WebSocket/types/models/eft/common/ILocation.d.ts index bf4c58a..a2ac6d3 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/ILocation.d.ts @@ -1,5 +1,5 @@ -import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; +import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface ILocation { diff --git a/TypeScript/24WebSocket/types/models/eft/common/ILocationBase.d.ts b/TypeScript/24WebSocket/types/models/eft/common/ILocationBase.d.ts index 65931f8..68f37ae 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/ILocationBase.d.ts @@ -1,5 +1,5 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; diff --git a/TypeScript/24WebSocket/types/models/eft/common/ILocationsSourceDestinationBase.d.ts b/TypeScript/24WebSocket/types/models/eft/common/ILocationsSourceDestinationBase.d.ts index e6bc8ee..1e8d80c 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/ILocationsSourceDestinationBase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/ILocationsSourceDestinationBase.d.ts @@ -1,4 +1,4 @@ -import { ILocations } from "@spt/models/spt/server/ILocations"; +import { ILocations } from "@spt-aki/models/spt/server/ILocations"; export interface ILocationsGenerateAllResponse { locations: ILocations; paths: Path[]; diff --git a/TypeScript/24WebSocket/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/24WebSocket/types/models/eft/common/ILooseLoot.d.ts index b5b538c..0dce230 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/ILooseLoot.d.ts @@ -1,5 +1,5 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface ILooseLoot { spawnpointCount: SpawnpointCount; spawnpointsForced: SpawnpointsForced[]; diff --git a/TypeScript/24WebSocket/types/models/eft/common/IPmcData.d.ts b/TypeScript/24WebSocket/types/models/eft/common/IPmcData.d.ts index 313a92c..a9594d6 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/IPmcData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/IPmcData.d.ts @@ -1,4 +1,4 @@ -import { IBotBase, IEftStats } from "@spt/models/eft/common/tables/IBotBase"; +import { IBotBase, IEftStats } from "@spt-aki/models/eft/common/tables/IBotBase"; export interface IPmcData extends IBotBase { } export interface IPostRaidPmcData extends IBotBase { diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts index 8c747fc..bf7aa6c 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts @@ -1,11 +1,11 @@ -import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; -import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { BonusSkillType } from "@spt/models/enums/BonusSkillType"; -import { BonusType } from "@spt/models/enums/BonusType"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; +import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { BonusSkillType } from "@spt-aki/models/enums/BonusSkillType"; +import { BonusType } from "@spt-aki/models/enums/BonusType"; +import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { QuestStatus } from "@spt-aki/models/enums/QuestStatus"; export interface IBotBase { _id: string; aid: number; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotType.d.ts index 074a7d6..2a00af9 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotType.d.ts @@ -1,5 +1,5 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Skills } from "@spt/models/eft/common/tables/IBotBase"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; export interface IBotType { appearance: Appearance; chances: Chances; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/ICustomizationItem.d.ts index 3883765..2bab177 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -1,4 +1,4 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; export interface ICustomizationItem { _id: string; _name: string; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IProfileTemplate.d.ts index 4d73192..dde1a39 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IProfileTemplates { "Standard": IProfileSides; "Left Behind": IProfileSides; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IQuest.d.ts index 54ff191..74af5ef 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IQuest.d.ts @@ -1,7 +1,7 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { QuestRewardType } from "@spt/models/enums/QuestRewardType"; -import { QuestStatus } from "@spt/models/enums/QuestStatus"; -import { QuestTypeEnum } from "@spt/models/enums/QuestTypeEnum"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { QuestRewardType } from "@spt-aki/models/enums/QuestRewardType"; +import { QuestStatus } from "@spt-aki/models/enums/QuestStatus"; +import { QuestTypeEnum } from "@spt-aki/models/enums/QuestTypeEnum"; export interface IQuest { /** SPT addition - human readable quest name */ QuestName?: string; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/ITemplateItem.d.ts index 32bc9fc..0871d1a 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,4 +1,4 @@ -import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -354,7 +354,7 @@ export interface Props { casingSounds?: string; ProjectileCount?: number; PenetrationChanceObstacle?: number; - PenetrationDamageMod?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/ITrader.d.ts index 14ab409..38f2a43 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/ITrader.d.ts @@ -1,5 +1,5 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; export interface ITrader { assort?: ITraderAssort; base: ITraderBase; diff --git a/TypeScript/24WebSocket/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..2ddcf83 100644 --- a/TypeScript/24WebSocket/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,4 +1,4 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IGetAllAttachmentsResponse { messages: Message[]; profiles: any[]; diff --git a/TypeScript/24WebSocket/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index a11dbb3..271be79 100644 --- a/TypeScript/24WebSocket/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,4 +1,4 @@ -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IGetFriendListDataResponse { Friends: IUserDialogInfo[]; Ignore: string[]; diff --git a/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts index 1d271e4..3a2e349 100644 --- a/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewRequestData.d.ts @@ -1,4 +1,4 @@ -import { MessageType } from "@spt/models/enums/MessageType"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; export interface IGetMailDialogViewRequestData { type: MessageType; dialogId: string; diff --git a/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..091c128 100644 --- a/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,4 +1,4 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo, Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IGetMailDialogViewResponseData { messages: Message[]; profiles: IUserDialogInfo[]; diff --git a/TypeScript/24WebSocket/types/models/eft/dialog/ISendMessageRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/dialog/ISendMessageRequest.d.ts index d94c682..5a755c0 100644 --- a/TypeScript/24WebSocket/types/models/eft/dialog/ISendMessageRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/dialog/ISendMessageRequest.d.ts @@ -1,4 +1,4 @@ -import { MessageType } from "@spt/models/enums/MessageType"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; export interface ISendMessageRequest { dialogId: string; type: MessageType; diff --git a/TypeScript/24WebSocket/types/models/eft/game/ICurrentGroupResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/game/ICurrentGroupResponse.d.ts index eb01946..85c005b 100644 --- a/TypeScript/24WebSocket/types/models/eft/game/ICurrentGroupResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/game/ICurrentGroupResponse.d.ts @@ -1,4 +1,4 @@ -import { MemberCategory } from "@spt/models/enums/MemberCategory"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; export interface ICurrentGroupResponse { squad: ICurrentGroupSquadMember[]; } diff --git a/TypeScript/24WebSocket/types/models/eft/health/IOffraidEatRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/health/IOffraidEatRequestData.d.ts index c969b08..0629f8b 100644 --- a/TypeScript/24WebSocket/types/models/eft/health/IOffraidEatRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/health/IOffraidEatRequestData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface IOffraidEatRequestData extends IBaseInteractionRequestData { Action: "Eat"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/health/IOffraidHealRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/health/IOffraidHealRequestData.d.ts index c2fe7ba..47b7929 100644 --- a/TypeScript/24WebSocket/types/models/eft/health/IOffraidHealRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/health/IOffraidHealRequestData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface IOffraidHealRequestData extends IBaseInteractionRequestData { Action: "Heal"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutArea.d.ts index ca0eb07..212d2ab 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutArea.d.ts @@ -1,5 +1,5 @@ -import { BonusSkillType } from "@spt/models/enums/BonusSkillType"; -import { BonusType } from "@spt/models/enums/BonusType"; +import { BonusSkillType } from "@spt-aki/models/enums/BonusSkillType"; +import { BonusType } from "@spt-aki/models/enums/BonusType"; export interface IHideoutArea { _id: string; type: number; diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..5c8b983 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -1,4 +1,4 @@ -import { MinMax } from "@spt/models/common/MinMax"; +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IQteData.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IQteData.d.ts index 7f507e1..f7f674e 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IQteData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IQteData.d.ts @@ -1,14 +1,14 @@ -import { Effect } from "@spt/models/eft/health/Effect"; -import { BodyPart } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { QteActivityType } from "@spt/models/enums/hideout/QteActivityType"; -import { QteEffectType } from "@spt/models/enums/hideout/QteEffectType"; -import { QteResultType } from "@spt/models/enums/hideout/QteResultType"; -import { QteRewardType } from "@spt/models/enums/hideout/QteRewardType"; -import { QteType } from "@spt/models/enums/hideout/QteType"; -import { RequirementType } from "@spt/models/enums/hideout/RequirementType"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { Traders } from "@spt/models/enums/Traders"; +import { Effect } from "@spt-aki/models/eft/health/Effect"; +import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData"; +import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType"; +import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType"; +import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType"; +import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType"; +import { QteType } from "@spt-aki/models/enums/hideout/QteType"; +import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType"; +import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas"; +import { SkillTypes } from "@spt-aki/models/enums/SkillTypes"; +import { Traders } from "@spt-aki/models/enums/Traders"; export interface IQteData { id: string; type: QteActivityType; diff --git a/TypeScript/24WebSocket/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index b654088..c658257 100644 --- a/TypeScript/24WebSocket/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,7 @@ -import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IInsuredItemsData } from "@spt/models/eft/inRaid/IInsuredItemsData"; -import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState"; +import { IPostRaidPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { IInsuredItemsData } from "@spt-aki/models/eft/inRaid/IInsuredItemsData"; +import { PlayerRaidEndState } from "@spt-aki/models/enums/PlayerRaidEndState"; export interface ISaveProgressRequestData { exit: PlayerRaidEndState; profile: IPostRaidPmcData; diff --git a/TypeScript/24WebSocket/types/models/eft/insurance/IInsureRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/insurance/IInsureRequestData.d.ts index e3b018e..f739ced 100644 --- a/TypeScript/24WebSocket/types/models/eft/insurance/IInsureRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/insurance/IInsureRequestData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface IInsureRequestData extends IBaseInteractionRequestData { Action: "Insure"; tid: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IAddItemTempObject.d.ts index 7b3a6ea..c818be6 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -1,4 +1,4 @@ -import { Item, Location } from "@spt/models/eft/common/tables/IItem"; +import { Item, Location } from "@spt-aki/models/eft/common/tables/IItem"; export interface IAddItemTempObject { itemRef: Item; count: number; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..2b90edb 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { Container, IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index cc7269c..7e67a56 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } export interface To { diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBindRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBindRequestData.d.ts index 5af9fea..efa1a43 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBindRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBindRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryBindRequestData extends IInventoryBaseActionRequestData { Action: "Bind"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..805b385 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts index e946f9f..e85f094 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryDeleteMarkerRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryDeleteMarkerRequestData extends IInventoryBaseActionRequestData { Action: "DeleteMapMarker"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..d8080f5 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionRequestData { Action: "EditMapMarker"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryExamineRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryExamineRequestData.d.ts index 58275ba..07b0c03 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryExamineRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryExamineRequestData.d.ts @@ -1,5 +1,5 @@ -import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { OwnerInfo } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryExamineRequestData extends IInventoryBaseActionRequestData { Action: "Examine"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryFoldRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryFoldRequestData.d.ts index 7937743..7623a90 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryFoldRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryFoldRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryFoldRequestData extends IInventoryBaseActionRequestData { Action: "Fold"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMergeRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMergeRequestData.d.ts index ad924ba..af4e722 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMergeRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMergeRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMergeRequestData extends IInventoryBaseActionRequestData { Action: "Merge"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..9038510 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, To } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts index ce61370..6432159 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryReadEncyclopediaRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryReadEncyclopediaRequestData extends IInventoryBaseActionRequestData { Action: "ReadEncyclopedia"; ids: string[]; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts index b9fa232..eda96e6 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryRemoveRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryRemoveRequestData extends IInventoryBaseActionRequestData { Action: "Remove"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySortRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySortRequestData.d.ts index d784c77..b34bb25 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySortRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySortRequestData.d.ts @@ -1,5 +1,5 @@ -import { Upd } from "@spt/models/eft/common/tables/IItem"; -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySortRequestData extends IInventoryBaseActionRequestData { Action: "ApplyInventoryChanges"; changedItems: ChangedItem[]; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..4d29084 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { Container, IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..b32a1f7 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,5 +1,5 @@ -import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { OwnerInfo } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; +import { IInventoryBaseActionRequestData, To } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryTagRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryTagRequestData.d.ts index 5c9f651..5d88eaf 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryTagRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryTagRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryTagRequestData extends IInventoryBaseActionRequestData { Action: "Tag"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryToggleRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryToggleRequestData.d.ts index 0d8b1e4..138d987 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryToggleRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryToggleRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryToggleRequestData extends IInventoryBaseActionRequestData { Action: "Toggle"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryTransferRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryTransferRequestData.d.ts index fe0327d..e98cae6 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryTransferRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryTransferRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryTransferRequestData extends IInventoryBaseActionRequestData { Action: "Transfer"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts index d3a4bd7..e303acf 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { Action: "Unbind"; item: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..a7ec78b 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActionRequestData { Action: "OpenRandomLootContainer"; /** Container item id being opened */ diff --git a/TypeScript/24WebSocket/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts index f9165dc..f81bd59 100644 --- a/TypeScript/24WebSocket/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/itemEvent/IEmptyItemEventRouterResponse.d.ts @@ -1,4 +1,4 @@ -import { IItemEventRouterBase } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { IItemEventRouterBase } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; export interface IEmptyItemEventRouterResponse extends IItemEventRouterBase { profileChanges: ""; } diff --git a/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 0c48014..a1babfd 100644 --- a/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -1,9 +1,9 @@ -import { Health, IQuestStatus, Productive, Skills } 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"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { EquipmentBuildType } from "@spt/models/enums/EquipmentBuildType"; +import { Health, IQuestStatus, Productive, Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem"; +import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType"; export interface IItemEventRouterBase { warnings: Warning[]; profileChanges: TProfileChanges | ""; diff --git a/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts index d4913be..bcf26ef 100644 --- a/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterResponse.d.ts @@ -1,4 +1,4 @@ -import { IItemEventRouterBase } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { IItemEventRouterBase } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; /** An object sent back to the game client that contains alterations the client must make to ensure server/client are in sync */ export interface IItemEventRouterResponse extends IItemEventRouterBase { } diff --git a/TypeScript/24WebSocket/types/models/eft/launcher/IChangeRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/launcher/IChangeRequestData.d.ts index b0431d7..b1b3e94 100644 --- a/TypeScript/24WebSocket/types/models/eft/launcher/IChangeRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/launcher/IChangeRequestData.d.ts @@ -1,4 +1,4 @@ -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; export interface IChangeRequestData extends ILoginRequestData { change: string; } diff --git a/TypeScript/24WebSocket/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/24WebSocket/types/models/eft/launcher/IMiniProfile.d.ts index b25a1e7..c12661a 100644 --- a/TypeScript/24WebSocket/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/launcher/IMiniProfile.d.ts @@ -7,8 +7,8 @@ export interface IMiniProfile { prevexp: number; nextlvl: number; maxlvl: number; - sptData: SPTData; + akiData: AkiData; } -export interface SPTData { +export interface AkiData { version: string; } diff --git a/TypeScript/24WebSocket/types/models/eft/launcher/IRegisterData.d.ts b/TypeScript/24WebSocket/types/models/eft/launcher/IRegisterData.d.ts index 4a3c15e..b69d9ed 100644 --- a/TypeScript/24WebSocket/types/models/eft/launcher/IRegisterData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/launcher/IRegisterData.d.ts @@ -1,4 +1,4 @@ -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; export interface IRegisterData extends ILoginRequestData { edition: string; } diff --git a/TypeScript/24WebSocket/types/models/eft/launcher/IRemoveProfileData.d.ts b/TypeScript/24WebSocket/types/models/eft/launcher/IRemoveProfileData.d.ts index 59848ed..2ad9694 100644 --- a/TypeScript/24WebSocket/types/models/eft/launcher/IRemoveProfileData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/launcher/IRemoveProfileData.d.ts @@ -1,2 +1,2 @@ -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; export type IRemoveProfileData = ILoginRequestData; diff --git a/TypeScript/24WebSocket/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/24WebSocket/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..219ee7e 100644 --- a/TypeScript/24WebSocket/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,4 +1,4 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { LootItem } from "@spt-aki/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; loot: LootItem[]; diff --git a/TypeScript/24WebSocket/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index 959986c..46cb3d8 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,4 @@ -import { IRaidSettings } from "@spt/models/eft/match/IRaidSettings"; +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; CanShowGroupPreview: boolean; diff --git a/TypeScript/24WebSocket/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IGroupCharacter.d.ts index 013930a..d539afa 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IGroupCharacter.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IGroupCharacter.d.ts @@ -1,5 +1,5 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; export interface IGroupCharacter { _id: string; aid: number; diff --git a/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupCurrentResponse.d.ts index 23bcba4..7b4ad63 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupCurrentResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -1,4 +1,4 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; export interface IMatchGroupCurrentResponse { squad: IGroupCharacter[]; } diff --git a/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStartGameRequest.d.ts index 663ef1e..d932de0 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStartGameRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -1,4 +1,4 @@ -import { IServer } from "@spt/models/eft/match/IServer"; +import { IServer } from "@spt-aki/models/eft/match/IServer"; export interface IMatchGroupStartGameRequest { groupId: string; servers: IServer[]; diff --git a/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStatusRequest.d.ts index ffac106..c5fc71d 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStatusRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -1,4 +1,4 @@ -import { RaidMode } from "@spt/models/enums/RaidMode"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; export interface IMatchGroupStatusRequest { location: string; savage: boolean; diff --git a/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStatusResponse.d.ts index 7702ac7..c493650 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStatusResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -1,4 +1,4 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; export interface IMatchGroupStatusResponse { players: IGroupCharacter[]; maxPveCountExceeded: boolean; diff --git a/TypeScript/24WebSocket/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IProfileStatusResponse.d.ts index 8fa6186..ac1a324 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IProfileStatusResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IProfileStatusResponse.d.ts @@ -1,4 +1,4 @@ -import { ISessionStatus } from "@spt/models/eft/match/ISessionStatus"; +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; export interface IProfileStatusResponse { maxPveCountExceeded: boolean; profiles: ISessionStatus[]; diff --git a/TypeScript/24WebSocket/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IRaidSettings.d.ts index 78a0c19..9bf0d42 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IRaidSettings.d.ts @@ -1,14 +1,14 @@ -import { DateTime } from "@spt/models/enums/DateTime"; -import { PlayersSpawnPlace } from "@spt/models/enums/PlayersSpawnPlace"; -import { RaidMode } from "@spt/models/enums/RaidMode"; -import { BotAmount } from "@spt/models/enums/RaidSettings/BotAmount"; -import { BotDifficulty } from "@spt/models/enums/RaidSettings/BotDifficulty"; -import { CloudinessType } from "@spt/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; -import { FogType } from "@spt/models/enums/RaidSettings/TimeAndWeather/FogType"; -import { RainType } from "@spt/models/enums/RaidSettings/TimeAndWeather/RainType"; -import { TimeFlowType } from "@spt/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; -import { WindSpeed } from "@spt/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; -import { SideType } from "@spt/models/enums/SideType"; +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; export interface IRaidSettings { location: string; timeVariant: DateTime; diff --git a/TypeScript/24WebSocket/types/models/eft/notes/INoteActionData.d.ts b/TypeScript/24WebSocket/types/models/eft/notes/INoteActionData.d.ts index 344c40d..97575be 100644 --- a/TypeScript/24WebSocket/types/models/eft/notes/INoteActionData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/notes/INoteActionData.d.ts @@ -1,4 +1,4 @@ -import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface INoteActionData extends IBaseInteractionRequestData { Action: string; index: number; diff --git a/TypeScript/24WebSocket/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts index f1123c1..cbda924 100644 --- a/TypeScript/24WebSocket/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/player/IPlayerIncrementSkillLevelRequestData.d.ts @@ -1,4 +1,4 @@ -import { Skills } from "@spt/models/eft/common/tables/IBotBase"; +import { Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; export interface IPlayerIncrementSkillLevelRequestData { _id: string; experience: number; diff --git a/TypeScript/24WebSocket/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 3cb8533..3ce8733 100644 --- a/TypeScript/24WebSocket/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; Id: string; diff --git a/TypeScript/24WebSocket/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/24WebSocket/types/models/eft/profile/IAkiProfile.d.ts similarity index 91% rename from TypeScript/24WebSocket/types/models/eft/profile/ISptProfile.d.ts rename to TypeScript/24WebSocket/types/models/eft/profile/IAkiProfile.d.ts index f6e6379..a6d06bb 100644 --- a/TypeScript/24WebSocket/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/profile/IAkiProfile.d.ts @@ -1,17 +1,17 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { EquipmentBuildType } from "@spt/models/enums/EquipmentBuildType"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; -export interface ISptProfile { +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { IProfileChangeEvent } from "@spt-aki/models/spt/dialog/ISendMessageDetails"; +export interface IAkiProfile { info: Info; characters: Characters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; dialogues: Record; - spt: Spt; + aki: Aki; vitality: Vitality; inraid: Inraid; insurance: Insurance[]; @@ -159,7 +159,7 @@ export interface DateTime { date: string; time: string; } -export interface Spt { +export interface Aki { version: string; mods?: ModDetails[]; receivedGifts: ReceivedGift[]; diff --git a/TypeScript/24WebSocket/types/models/eft/profile/IGetOtherProfileResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/profile/IGetOtherProfileResponse.d.ts index 7df4eba..26e43ac 100644 --- a/TypeScript/24WebSocket/types/models/eft/profile/IGetOtherProfileResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/profile/IGetOtherProfileResponse.d.ts @@ -1,5 +1,5 @@ -import { OverallCounters, Skills } from "@spt/models/eft/common/tables/IBotBase"; -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { OverallCounters, Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IGetOtherProfileResponse { id: string; aid: number; diff --git a/TypeScript/24WebSocket/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/24WebSocket/types/models/eft/ragfair/IGetItemPriceResult.d.ts index a81eee6..e692b1b 100644 --- a/TypeScript/24WebSocket/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,4 +1,4 @@ -import { MinMax } from "@spt/models/common/MinMax"; +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface IGetItemPriceResult extends MinMax { avg: number; } diff --git a/TypeScript/24WebSocket/types/models/eft/ragfair/IGetOffersResult.d.ts b/TypeScript/24WebSocket/types/models/eft/ragfair/IGetOffersResult.d.ts index f3420fa..8b753ae 100644 --- a/TypeScript/24WebSocket/types/models/eft/ragfair/IGetOffersResult.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ragfair/IGetOffersResult.d.ts @@ -1,4 +1,4 @@ -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; export interface IGetOffersResult { categories?: Record; offers: IRagfairOffer[]; diff --git a/TypeScript/24WebSocket/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/24WebSocket/types/models/eft/ragfair/IRagfairOffer.d.ts index 1741b47..043a986 100644 --- a/TypeScript/24WebSocket/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -1,5 +1,5 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; export interface IRagfairOffer { sellResult?: SellResult[]; _id: string; diff --git a/TypeScript/24WebSocket/types/models/eft/ragfair/ISearchRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/ragfair/ISearchRequestData.d.ts index 8261c5b..52cb2d4 100644 --- a/TypeScript/24WebSocket/types/models/eft/ragfair/ISearchRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ragfair/ISearchRequestData.d.ts @@ -1,4 +1,4 @@ -import { RagfairSort } from "@spt/models/enums/RagfairSort"; +import { RagfairSort } from "@spt-aki/models/enums/RagfairSort"; export interface ISearchRequestData { page: number; limit: number; diff --git a/TypeScript/24WebSocket/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..ceb3f7c 100644 --- a/TypeScript/24WebSocket/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,4 +1,4 @@ -import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; +import { IBaseRepairActionDataRequest } from "@spt-aki/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; repairKitsInfo: RepairKitsInfo[]; diff --git a/TypeScript/24WebSocket/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..82b83c6 100644 --- a/TypeScript/24WebSocket/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -1,4 +1,4 @@ -import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; +import { IBaseRepairActionDataRequest } from "@spt-aki/models/eft/repair/IBaseRepairActionDataRequest"; export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; diff --git a/TypeScript/24WebSocket/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index d64b2c9..15813c1 100644 --- a/TypeScript/24WebSocket/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,4 +1,4 @@ -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "SptInsure" | "SptRepair" | ""; type: string; diff --git a/TypeScript/24WebSocket/types/models/eft/trade/IProcessSellTradeRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/trade/IProcessSellTradeRequestData.d.ts index 459bd28..c0f91a0 100644 --- a/TypeScript/24WebSocket/types/models/eft/trade/IProcessSellTradeRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/trade/IProcessSellTradeRequestData.d.ts @@ -1,4 +1,4 @@ -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessSellTradeRequestData extends IProcessBaseTradeRequestData { Action: "sell_to_trader"; type: string; diff --git a/TypeScript/24WebSocket/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts index 3727ce4..0101dc1 100644 --- a/TypeScript/24WebSocket/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts @@ -1,4 +1,4 @@ -import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; +import { OwnerInfo } from "@spt-aki/models/eft/common/request/IBaseInteractionRequestData"; export interface ISellScavItemsToFenceRequestData { Action: "SellAllFromSavage"; totalValue: number; diff --git a/TypeScript/24WebSocket/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/24WebSocket/types/models/eft/weather/IWeatherData.d.ts index 81bc746..59a63fc 100644 --- a/TypeScript/24WebSocket/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/weather/IWeatherData.d.ts @@ -1,5 +1,5 @@ -import { Season } from "@spt/models/enums/Season"; -import { WindDirection } from "@spt/models/enums/WindDirection"; +import { Season } from "@spt-aki/models/enums/Season"; +import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsAid.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsAid.d.ts index 310d507..d053788 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsAid.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsAid.d.ts @@ -1,4 +1,4 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsAid extends IWsNotificationEvent { aid: number; } diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsAidNickname.d.ts index e623b19..82e91ac 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsAidNickname.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsAidNickname.d.ts @@ -1,4 +1,4 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsAidNickname extends IWsNotificationEvent { aid: number; Nickname: string; diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..74f9d0c 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,5 +1,5 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupId.d.ts index 62a8c6f..2bab478 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupId.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupId.d.ts @@ -1,4 +1,4 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsGroupId extends IWsNotificationEvent { groupId: string; } diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..db30348 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts index cf15409..368b945 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -1,4 +1,4 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { aid: number; Nickname: string; diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts index b52a49c..32174fd 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -1,5 +1,5 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { requestId: string; from: number; diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts index a374183..73e88cd 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -1,4 +1,4 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { owner: number; } diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts index ab76918..1d9f604 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -1,5 +1,5 @@ -import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { extendedProfile: IGroupCharacter; } diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts index 5fa52af..f323220 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -1,5 +1,5 @@ -import { IRaidSettings } from "@spt/models/eft/match/IRaidSettings"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { raidSettings: IRaidSettings; } diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsPing.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsPing.d.ts index d43aa03..a7bb0ea 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsPing.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsPing.d.ts @@ -1,3 +1,3 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsPing extends IWsNotificationEvent { } diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsRagfairOfferSold.d.ts index 1c4c88e..5f251e9 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsRagfairOfferSold.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -1,4 +1,4 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export interface IWsRagfairOfferSold extends IWsNotificationEvent { offerId: string; count: number; diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsUserConfirmed.d.ts index ac32e0d..dd6f5fd 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsUserConfirmed.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -1,6 +1,6 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { ProfileStatus } from "@spt/models/enums/ProfileStatus"; -import { RaidMode } from "@spt/models/enums/RaidMode"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; export interface IWsUserConfirmed extends IWsNotificationEvent { profileid: string; profileToken: string; diff --git a/TypeScript/24WebSocket/types/models/enums/ConfigTypes.d.ts b/TypeScript/24WebSocket/types/models/enums/ConfigTypes.d.ts index 646fd55..bf97c40 100644 --- a/TypeScript/24WebSocket/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/24WebSocket/types/models/enums/ConfigTypes.d.ts @@ -1,29 +1,29 @@ export declare enum ConfigTypes { - AIRDROP = "spt-airdrop", - BOT = "spt-bot", - PMC = "spt-pmc", - CORE = "spt-core", - HEALTH = "spt-health", - HIDEOUT = "spt-hideout", - HTTP = "spt-http", - IN_RAID = "spt-inraid", - INSURANCE = "spt-insurance", - INVENTORY = "spt-inventory", - ITEM = "spt-item", - LOCALE = "spt-locale", - LOCATION = "spt-location", - LOOT = "spt-loot", - MATCH = "spt-match", - PLAYERSCAV = "spt-playerscav", - PMC_CHAT_RESPONSE = "spt-pmcchatresponse", - QUEST = "spt-quest", - RAGFAIR = "spt-ragfair", - REPAIR = "spt-repair", - SCAVCASE = "spt-scavcase", - TRADER = "spt-trader", - WEATHER = "spt-weather", - SEASONAL_EVENT = "spt-seasonalevents", - LOST_ON_DEATH = "spt-lostondeath", - GIFTS = "spt-gifts", - BTR = "spt-btr" + AIRDROP = "aki-airdrop", + BOT = "aki-bot", + PMC = "aki-pmc", + CORE = "aki-core", + HEALTH = "aki-health", + HIDEOUT = "aki-hideout", + HTTP = "aki-http", + IN_RAID = "aki-inraid", + INSURANCE = "aki-insurance", + INVENTORY = "aki-inventory", + ITEM = "aki-item", + LOCALE = "aki-locale", + LOCATION = "aki-location", + LOOT = "aki-loot", + MATCH = "aki-match", + PLAYERSCAV = "aki-playerscav", + PMC_CHAT_RESPONSE = "aki-pmcchatresponse", + QUEST = "aki-quest", + RAGFAIR = "aki-ragfair", + REPAIR = "aki-repair", + SCAVCASE = "aki-scavcase", + TRADER = "aki-trader", + WEATHER = "aki-weather", + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts", + BTR = "aki-btr" } diff --git a/TypeScript/24WebSocket/types/models/external/IPostAkiLoadMod.d.ts b/TypeScript/24WebSocket/types/models/external/IPostAkiLoadMod.d.ts new file mode 100644 index 0000000..87a2ab0 --- /dev/null +++ b/TypeScript/24WebSocket/types/models/external/IPostAkiLoadMod.d.ts @@ -0,0 +1,4 @@ +import type { DependencyContainer } from "tsyringe"; +export interface IPostAkiLoadMod { + postAkiLoad(container: DependencyContainer): void; +} diff --git a/TypeScript/24WebSocket/types/models/external/IPostAkiLoadModAsync.d.ts b/TypeScript/24WebSocket/types/models/external/IPostAkiLoadModAsync.d.ts new file mode 100644 index 0000000..ea57e2b --- /dev/null +++ b/TypeScript/24WebSocket/types/models/external/IPostAkiLoadModAsync.d.ts @@ -0,0 +1,4 @@ +import type { DependencyContainer } from "tsyringe"; +export interface IPostAkiLoadModAsync { + postAkiLoadAsync(container: DependencyContainer): Promise; +} diff --git a/TypeScript/24WebSocket/types/models/external/IPostSptLoadMod.d.ts b/TypeScript/24WebSocket/types/models/external/IPostSptLoadMod.d.ts deleted file mode 100644 index 5ef9766..0000000 --- a/TypeScript/24WebSocket/types/models/external/IPostSptLoadMod.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPostSptLoadMod { - postSptLoad(container: DependencyContainer): void; -} diff --git a/TypeScript/24WebSocket/types/models/external/IPostSptLoadModAsync.d.ts b/TypeScript/24WebSocket/types/models/external/IPostSptLoadModAsync.d.ts deleted file mode 100644 index 7778d96..0000000 --- a/TypeScript/24WebSocket/types/models/external/IPostSptLoadModAsync.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPostSptLoadModAsync { - postSptLoadAsync(container: DependencyContainer): Promise; -} diff --git a/TypeScript/24WebSocket/types/models/external/IPreAkiLoadMod.d.ts b/TypeScript/24WebSocket/types/models/external/IPreAkiLoadMod.d.ts new file mode 100644 index 0000000..b3bb041 --- /dev/null +++ b/TypeScript/24WebSocket/types/models/external/IPreAkiLoadMod.d.ts @@ -0,0 +1,4 @@ +import type { DependencyContainer } from "tsyringe"; +export interface IPreAkiLoadMod { + preAkiLoad(container: DependencyContainer): void; +} diff --git a/TypeScript/24WebSocket/types/models/external/IPreAkiLoadModAsync.d.ts b/TypeScript/24WebSocket/types/models/external/IPreAkiLoadModAsync.d.ts new file mode 100644 index 0000000..4c0c984 --- /dev/null +++ b/TypeScript/24WebSocket/types/models/external/IPreAkiLoadModAsync.d.ts @@ -0,0 +1,4 @@ +import type { DependencyContainer } from "tsyringe"; +export interface IPreAkiLoadModAsync { + preAkiLoadAsync(container: DependencyContainer): Promise; +} diff --git a/TypeScript/24WebSocket/types/models/external/IPreSptLoadMod.d.ts b/TypeScript/24WebSocket/types/models/external/IPreSptLoadMod.d.ts deleted file mode 100644 index dc38515..0000000 --- a/TypeScript/24WebSocket/types/models/external/IPreSptLoadMod.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPreSptLoadMod { - preSptLoad(container: DependencyContainer): void; -} diff --git a/TypeScript/24WebSocket/types/models/external/IPreSptLoadModAsync.d.ts b/TypeScript/24WebSocket/types/models/external/IPreSptLoadModAsync.d.ts deleted file mode 100644 index 0322434..0000000 --- a/TypeScript/24WebSocket/types/models/external/IPreSptLoadModAsync.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { DependencyContainer } from "tsyringe"; -export interface IPreSptLoadModAsync { - preSptLoadAsync(container: DependencyContainer): Promise; -} diff --git a/TypeScript/24WebSocket/types/models/spt/bindings/Route.d.ts b/TypeScript/24WebSocket/types/models/spt/bindings/Route.d.ts index abe8d2c..1b29d7d 100644 --- a/TypeScript/24WebSocket/types/models/spt/bindings/Route.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/bindings/Route.d.ts @@ -1,3 +1,3 @@ export interface IRoute { - spt: any; + aki: any; } diff --git a/TypeScript/24WebSocket/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/24WebSocket/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..2a7a64e 100644 --- a/TypeScript/24WebSocket/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,4 +1,4 @@ -import { MinMax } from "@spt/models/common/MinMax"; +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; diff --git a/TypeScript/24WebSocket/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/24WebSocket/types/models/spt/bots/GenerateWeaponResult.d.ts index d4a2526..f28d052 100644 --- a/TypeScript/24WebSocket/types/models/spt/bots/GenerateWeaponResult.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/bots/GenerateWeaponResult.d.ts @@ -1,6 +1,6 @@ -import { Mods } 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"; +import { Mods } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; export declare class GenerateWeaponResult { weapon: Item[]; chosenAmmoTpl: string; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IBotCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IBotCallbacks.d.ts index e49406e..02f444e 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IBotCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IBotCallbacks.d.ts @@ -1,7 +1,7 @@ -import { IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; export interface IBotCallbacks { getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/ICustomizationCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/ICustomizationCallbacks.d.ts index 8dba3d7..f4f8877 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/ICustomizationCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/ICustomizationCallbacks.d.ts @@ -1,9 +1,9 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISuit } from "@spt/models/eft/common/tables/ITrader"; -import { IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData"; -import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ISuit } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IBuyClothingRequestData } from "@spt-aki/models/eft/customization/IBuyClothingRequestData"; +import { IWearClothingRequestData } from "@spt-aki/models/eft/customization/IWearClothingRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export interface ICustomizationCallbacks { getSuits(url: string, info: any, sessionID: string): IGetBodyResponseData; getTraderSuits(url: string, info: any, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IDataCallbacks.d.ts index cd0adab..0651dce 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -1,11 +1,11 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGlobals } from "@spt-aki/models/eft/common/IGlobals"; +import { IHideoutArea } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase"; +import { IHideoutSettingsBase } from "@spt-aki/models/eft/hideout/IHideoutSettingsBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { ISettingsBase } from "@spt-aki/models/spt/server/ISettingsBase"; export interface IDataCallbacks { getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..0cc835b 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -1,20 +1,20 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IFriendRequestData } from "@spt/models/eft/dialog/IFriendRequestData"; -import { IGetAllAttachmentsRequestData } from "@spt/models/eft/dialog/IGetAllAttachmentsRequestData"; -import { IGetAllAttachmentsResponse } from "@spt/models/eft/dialog/IGetAllAttachmentsResponse"; -import { IGetChatServerListRequestData } from "@spt/models/eft/dialog/IGetChatServerListRequestData"; -import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendListDataResponse"; -import { IGetMailDialogInfoRequestData } from "@spt/models/eft/dialog/IGetMailDialogInfoRequestData"; -import { IGetMailDialogListRequestData } from "@spt/models/eft/dialog/IGetMailDialogListRequestData"; -import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; -import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; -import { IPinDialogRequestData } from "@spt/models/eft/dialog/IPinDialogRequestData"; -import { IRemoveDialogRequestData } from "@spt/models/eft/dialog/IRemoveDialogRequestData"; -import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IGetAllAttachmentsRequestData } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsRequestData"; +import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; +import { IGetChatServerListRequestData } from "@spt-aki/models/eft/dialog/IGetChatServerListRequestData"; +import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; +import { IGetMailDialogInfoRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogInfoRequestData"; +import { IGetMailDialogListRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogListRequestData"; +import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; +import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewResponseData"; +import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; +import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; +import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; +import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { DialogueInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IGameCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IGameCallbacks.d.ts index 21554dd..324ec31 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IGameCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IGameCallbacks.d.ts @@ -1,9 +1,9 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse"; -import { IGameEmptyCrcRequestData } from "@spt/models/eft/game/IGameEmptyCrcRequestData"; -import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; +import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; +import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; export interface IGameCallbacks { versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IHealthCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IHealthCallbacks.d.ts index c0244a1..0ea81a2 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IHealthCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IHealthCallbacks.d.ts @@ -1,11 +1,11 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; -import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; -import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHealthTreatmentRequestData } from "@spt-aki/models/eft/health/IHealthTreatmentRequestData"; +import { IOffraidEatRequestData } from "@spt-aki/models/eft/health/IOffraidEatRequestData"; +import { IOffraidHealRequestData } from "@spt-aki/models/eft/health/IOffraidHealRequestData"; +import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IHealthCallbacks { - onLoad(sessionID: string): ISptProfile; + onLoad(sessionID: string): IAkiProfile; syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): any; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): any; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): any; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IHideoutCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IHideoutCallbacks.d.ts index 1349144..feda12e 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IHideoutCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IHideoutCallbacks.d.ts @@ -1,14 +1,14 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; -import { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData"; -import { IHideoutScavCaseStartRequestData } from "@spt/models/eft/hideout/IHideoutScavCaseStartRequestData"; -import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; -import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; -import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; -import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; -import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; -import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; +import { IHideoutPutItemInRequestData } from "@spt-aki/models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCaseStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutScavCaseStartRequestData"; +import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData"; +import { IHideoutTakeItemOutRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeItemOutRequestData"; +import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData"; +import { IHideoutToggleAreaRequestData } from "@spt-aki/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; +import { IHideoutUpgradeRequestData } from "@spt-aki/models/eft/hideout/IHideoutUpgradeRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export interface IHideoutCallbacks { upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IInraidCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IInraidCallbacks.d.ts index b267942..4754c0c 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IInraidCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IInraidCallbacks.d.ts @@ -1,10 +1,10 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IInraidCallbacks { - onLoad(sessionID: string): ISptProfile; + onLoad(sessionID: string): IAkiProfile; registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; getRaidEndState(): string; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IInsuranceCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IInsuranceCallbacks.d.ts index 2fae550..649039a 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IInsuranceCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IInsuranceCallbacks.d.ts @@ -1,9 +1,9 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsuranceCostRequestData"; -import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData"; +import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IInsuranceCallbacks { - onLoad(sessionID: string): ISptProfile; + onLoad(sessionID: string): IAkiProfile; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): any; insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): any; update(secondsSinceLastRun: number): boolean; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IInventoryCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IInventoryCallbacks.d.ts index 079d37b..7abe819 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IInventoryCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IInventoryCallbacks.d.ts @@ -1,21 +1,21 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; -import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; -import { IInventoryDeleteMarkerRequestData } from "@spt/models/eft/inventory/IInventoryDeleteMarkerRequestData"; -import { IInventoryEditMarkerRequestData } from "@spt/models/eft/inventory/IInventoryEditMarkerRequestData"; -import { IInventoryExamineRequestData } from "@spt/models/eft/inventory/IInventoryExamineRequestData"; -import { IInventoryFoldRequestData } from "@spt/models/eft/inventory/IInventoryFoldRequestData"; -import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; -import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; -import { IInventoryReadEncyclopediaRequestData } from "@spt/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; -import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; -import { IInventorySortRequestData } from "@spt/models/eft/inventory/IInventorySortRequestData"; -import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; -import { IInventorySwapRequestData } from "@spt/models/eft/inventory/IInventorySwapRequestData"; -import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTagRequestData"; -import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; -import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IInventoryBindRequestData } from "@spt-aki/models/eft/inventory/IInventoryBindRequestData"; +import { IInventoryCreateMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryCreateMarkerRequestData"; +import { IInventoryDeleteMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryDeleteMarkerRequestData"; +import { IInventoryEditMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryEditMarkerRequestData"; +import { IInventoryExamineRequestData } from "@spt-aki/models/eft/inventory/IInventoryExamineRequestData"; +import { IInventoryFoldRequestData } from "@spt-aki/models/eft/inventory/IInventoryFoldRequestData"; +import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData"; +import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData"; +import { IInventoryReadEncyclopediaRequestData } from "@spt-aki/models/eft/inventory/IInventoryReadEncyclopediaRequestData"; +import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData"; +import { IInventorySortRequestData } from "@spt-aki/models/eft/inventory/IInventorySortRequestData"; +import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData"; +import { IInventorySwapRequestData } from "@spt-aki/models/eft/inventory/IInventorySwapRequestData"; +import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInventoryTagRequestData"; +import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData"; +import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export interface IInventoryCallbacks { moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IItemEventCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IItemEventCallbacks.d.ts index 98fdb0b..6778e54 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IItemEventCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IItemEventCallbacks.d.ts @@ -1,6 +1,6 @@ -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterRequest } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterRequest } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export interface IItemEventCallbacks { handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/ILauncherCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/ILauncherCallbacks.d.ts index d01ae52..d37e58c 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/ILauncherCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/ILauncherCallbacks.d.ts @@ -1,8 +1,8 @@ -import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"; -import { IGetMiniProfileRequestData } from "@spt/models/eft/launcher/IGetMiniProfileRequestData"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; -import { IRemoveProfileData } from "@spt/models/eft/launcher/IRemoveProfileData"; +import { IChangeRequestData } from "@spt-aki/models/eft/launcher/IChangeRequestData"; +import { IGetMiniProfileRequestData } from "@spt-aki/models/eft/launcher/IGetMiniProfileRequestData"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; +import { IRegisterData } from "@spt-aki/models/eft/launcher/IRegisterData"; +import { IRemoveProfileData } from "@spt-aki/models/eft/launcher/IRemoveProfileData"; export interface ILauncherCallbacks { connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/ILocationCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/ILocationCallbacks.d.ts index e51c723..a031a29 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/ILocationCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/ILocationCallbacks.d.ts @@ -1,7 +1,7 @@ -import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILocationsGenerateAllResponse } from "@spt-aki/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetLocationRequestData } from "@spt-aki/models/eft/location/IGetLocationRequestData"; export interface ILocationCallbacks { getLocationData(url: string, info: any, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/INoteCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/INoteCallbacks.d.ts index 5ea2c96..aec8099 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/INoteCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/INoteCallbacks.d.ts @@ -1,6 +1,6 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { INoteActionData } from "@spt-aki/models/eft/notes/INoteActionData"; export interface INoteCallbacks { addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/INotifierCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/INotifierCallbacks.d.ts index 9f1fae1..7da556b 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/INotifierCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/INotifierCallbacks.d.ts @@ -1,7 +1,7 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IUIDRequestData } from "@spt/models/eft/common/request/IUIDRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INotifierChannel } from "@spt/models/eft/notifier/INotifier"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; export interface INotifierCallbacks { /** * If we don't have anything to send, it's ok to not send anything back diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts index b0d75bd..886cc9c 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IPresetBuildCallbacks.d.ts @@ -1,8 +1,8 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IPresetBuildActionRequestData } from "@spt/models/eft/presetBuild/IPresetBuildActionRequestData"; -import { IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData"; +import { IWeaponBuild } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IPresetBuildCallbacks { getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IProfileCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IProfileCallbacks.d.ts index f769cfd..f05532a 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IProfileCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IProfileCallbacks.d.ts @@ -1,12 +1,12 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData"; -import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData"; -import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData"; -import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData"; -import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse"; -import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData"; +import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData"; +import { IProfileCreateRequestData } from "@spt-aki/models/eft/profile/IProfileCreateRequestData"; +import { ISearchFriendRequestData } from "@spt-aki/models/eft/profile/ISearchFriendRequestData"; +import { ISearchFriendResponse } from "@spt-aki/models/eft/profile/ISearchFriendResponse"; +import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData"; export interface IProfileCallbacks { onLoad(sessionID: string): any; createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IQuestCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IQuestCallbacks.d.ts index 1a688a7..546191f 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IQuestCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IQuestCallbacks.d.ts @@ -1,14 +1,14 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuest } from "@spt/models/eft/common/tables/IQuest"; -import { IPmcDataRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; -import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; -import { IHandoverQuestRequestData } from "@spt/models/eft/quests/IHandoverQuestRequestData"; -import { IListQuestsRequestData } from "@spt/models/eft/quests/IListQuestsRequestData"; -import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt-aki/models/eft/quests/ICompleteQuestRequestData"; +import { IHandoverQuestRequestData } from "@spt-aki/models/eft/quests/IHandoverQuestRequestData"; +import { IListQuestsRequestData } from "@spt-aki/models/eft/quests/IListQuestsRequestData"; +import { IRepeatableQuestChangeRequest } from "@spt-aki/models/eft/quests/IRepeatableQuestChangeRequest"; export interface IQuestCallbacks { changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IRagfairCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IRagfairCallbacks.d.ts index dcad1ee..1157349 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IRagfairCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IRagfairCallbacks.d.ts @@ -1,13 +1,13 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IAddOfferRequestData } from "@spt/models/eft/ragfair/IAddOfferRequestData"; -import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; -import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; -import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; -import { IRemoveOfferRequestData } from "@spt/models/eft/ragfair/IRemoveOfferRequestData"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IAddOfferRequestData } from "@spt-aki/models/eft/ragfair/IAddOfferRequestData"; +import { IExtendOfferRequestData } from "@spt-aki/models/eft/ragfair/IExtendOfferRequestData"; +import { IGetItemPriceResult } from "@spt-aki/models/eft/ragfair/IGetItemPriceResult"; +import { IGetMarketPriceRequestData } from "@spt-aki/models/eft/ragfair/IGetMarketPriceRequestData"; +import { IRemoveOfferRequestData } from "@spt-aki/models/eft/ragfair/IRemoveOfferRequestData"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; export interface IRagfairCallbacks { load(): void; search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IRepairCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IRepairCallbacks.d.ts index e8d4fe1..b83fde8 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IRepairCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IRepairCallbacks.d.ts @@ -1,7 +1,7 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IRepairActionDataRequest } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IRepairActionDataRequest } from "@spt-aki/models/eft/repair/IRepairActionDataRequest"; +import { ITraderRepairActionDataRequest } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest"; export interface IRepairCallbacks { traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/ITradeCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/ITradeCallbacks.d.ts index 9b71d93..b6daa5d 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/ITradeCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/ITradeCallbacks.d.ts @@ -1,7 +1,7 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; -import { IProcessRagfairTradeRequestData } from "@spt/models/eft/trade/IProcessRagfairTradeRequestData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; +import { IProcessRagfairTradeRequestData } from "@spt-aki/models/eft/trade/IProcessRagfairTradeRequestData"; export interface ITradeCallbacks { processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/ITraderCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/ITraderCallbacks.d.ts index 963e523..23cd532 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/ITraderCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/ITraderCallbacks.d.ts @@ -1,6 +1,6 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { ITraderAssort, ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; export interface ITraderCallbacks { load(): void; getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IWeatherCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IWeatherCallbacks.d.ts index 5713469..1ba5b47 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IWeatherCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IWeatherCallbacks.d.ts @@ -1,5 +1,5 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; export interface IWeatherCallbacks { getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IWishlistCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IWishlistCallbacks.d.ts index 16f056d..3ab5c68 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IWishlistCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IWishlistCallbacks.d.ts @@ -1,6 +1,6 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IWishlistActionData } from "@spt/models/eft/wishlist/IWishlistActionData"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IWishlistActionData } from "@spt-aki/models/eft/wishlist/IWishlistActionData"; export interface IWishlistCallbacks { addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IAirdropConfig.d.ts index d438f00..8efb870 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IAirdropConfig.d.ts @@ -1,8 +1,8 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt-aki/models/enums/AirdropType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { - kind: "spt-airdrop"; + kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; /** Lowest point plane will fly at */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IBTRConfig.d.ts index 123c507..4c592f4 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IBTRConfig.d.ts @@ -1,7 +1,7 @@ -import { MinMax } from "@spt/models/common/MinMax"; +import { MinMax } from "@spt-aki/models/common/MinMax"; import { IBaseConfig } from "./IBaseConfig"; export interface IBTRConfig extends IBaseConfig { - kind: "spt-btr"; + kind: "aki-btr"; /** How fast the BTR moves */ moveSpeed: number; /** How long the cover fire service lasts for */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts index dd9c1cc..0148f2a 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts @@ -1,9 +1,9 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { GenerationData } from "@spt/models/eft/common/tables/IBotType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; +import { IBotDurability } from "@spt-aki/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { - kind: "spt-bot"; + kind: "aki-bot"; /** How many variants of each bot should be generated on raid start */ presetBatch: PresetBatch; /** Bot roles that should not have PMC types (sptBear/sptUsec) added as enemies to */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts index 755b308..3ecc337 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts @@ -1,7 +1,7 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { - kind: "spt-core"; - sptVersion: string; + kind: "aki-core"; + akiVersion: string; projectName: string; compatibleTarkovVersion: string; serverName: string; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IGiftsConfig.d.ts index c3c8799..b73761b 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IGiftsConfig.d.ts @@ -1,12 +1,12 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { Traders } from "@spt/models/enums/Traders"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "@spt-aki/models/enums/GiftSenderType"; +import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; +import { Traders } from "@spt-aki/models/enums/Traders"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { - kind: "spt-gifts"; + kind: "aki-gifts"; gifts: Record; } export interface Gift { diff --git a/TypeScript/24WebSocket/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IHealthConfig.d.ts index b86c208..49b405f 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IHealthConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { - kind: "spt-health"; + kind: "aki-health"; healthMultipliers: HealthMultipliers; save: Save; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IHideoutConfig.d.ts index c1967c0..6b07c34 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IHideoutConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig, IRunIntervalValues } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig, IRunIntervalValues } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IHideoutConfig extends IBaseConfig { - kind: "spt-hideout"; + kind: "aki-hideout"; /** How many seconds should pass before hideout crafts / fuel usage is checked and procesed */ runIntervalSeconds: number; /** Default values used to hydrate `runIntervalSeconds` with */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IHttpConfig.d.ts index 0f42e77..e7123fc 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IHttpConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IHttpConfig extends IBaseConfig { - kind: "spt-http"; + kind: "aki-http"; /** Address used by webserver */ ip: string; port: number; @@ -9,6 +9,6 @@ export interface IHttpConfig extends IBaseConfig { backendPort: string; webSocketPingDelayMs: number; logRequests: boolean; - /** e.g. "SPT_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "SPT_Data/Server/images/traders/NewTraderImage.png" */ + /** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */ serverImagePathOverride: Record; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IInRaidConfig.d.ts index 7d6befd..47023bf 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IInRaidConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { - kind: "spt-inraid"; + kind: "aki-inraid"; MIAOnRaidEnd: boolean; /** Overrides to apply to the pre-raid settings screen */ raidMenuSettings: RaidMenuSettings; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IInsuranceConfig.d.ts index a5056a5..86200f6 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { - kind: "spt-insurance"; + kind: "aki-insurance"; /** Insurance price multiplier */ insuranceMultiplier: Record; /** Chance item is returned as insurance, keyed by trader id */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts index b489393..bc64719 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts @@ -1,7 +1,7 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IInventoryConfig extends IBaseConfig { - kind: "spt-inventory"; + kind: "aki-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; randomLootContainers: Record; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IItemConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IItemConfig.d.ts index 0530278..40daa68 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IItemConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IItemConfig extends IBaseConfig { - kind: "spt-item"; + kind: "aki-item"; /** Items that should be globally blacklisted */ blacklist: string[]; /** items that should not be given as rewards */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/ILocaleConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ILocaleConfig.d.ts index c3de13e..bf57df6 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ILocaleConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ILocaleConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILocaleConfig extends IBaseConfig { - kind: "spt-locale"; + kind: "aki-locale"; /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ gameLocale: string; /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ILocationConfig.d.ts index 1e113b2..87ef6b5 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ILocationConfig.d.ts @@ -1,8 +1,8 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { BossLocationSpawn, Wave } from "@spt/models/eft/common/ILocationBase"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { BossLocationSpawn, Wave } from "@spt-aki/models/eft/common/ILocationBase"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { - kind: "spt-location"; + kind: "aki-location"; /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/ILootConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ILootConfig.d.ts index e22c3ea..003d6c6 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ILootConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ILootConfig.d.ts @@ -1,7 +1,7 @@ -import { Spawnpoint } from "@spt/models/eft/common/ILooseLoot"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { Spawnpoint } from "@spt-aki/models/eft/common/ILooseLoot"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILootConfig extends IBaseConfig { - kind: "spt-loot"; + kind: "aki-loot"; /** Spawn positions to add into a map, key=mapid */ looseLoot: Record; /** Loose loot probability adjustments to apply on game start */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ILostOnDeathConfig.d.ts index 8574646..d440e91 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILostOnDeathConfig extends IBaseConfig { - kind: "spt-lostondeath"; + kind: "aki-lostondeath"; /** What equipment in each slot should be lost on death */ equipment: Equipment; /** Should special slot items be removed from quest inventory on death e.g. wifi camera/markers */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IMatchConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IMatchConfig.d.ts index f6a9b4c..dc7a8cb 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IMatchConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IMatchConfig.d.ts @@ -1,5 +1,5 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IMatchConfig extends IBaseConfig { - kind: "spt-match"; + kind: "aki-match"; enabled: boolean; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IPlayerScavConfig.d.ts index 8834768..e5abca2 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IPlayerScavConfig.d.ts @@ -1,7 +1,7 @@ -import { GenerationData } from "@spt/models/eft/common/tables/IBotType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { - kind: "spt-playerscav"; + kind: "aki-playerscav"; karmaLevel: Record; } export interface KarmaLevel { diff --git a/TypeScript/24WebSocket/types/models/spt/config/IPmChatResponse.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IPmChatResponse.d.ts index 83fab34..50afdbc 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IPmChatResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IPmChatResponse.d.ts @@ -1,6 +1,6 @@ -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IPmcChatResponse extends IBaseConfig { - kind: "spt-pmcchatresponse"; + kind: "aki-pmcchatresponse"; victim: IResponseSettings; killer: IResponseSettings; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts index 00fabb3..89223b2 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts @@ -1,8 +1,8 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { MemberCategory } from "@spt/models/enums/MemberCategory"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IPmcConfig extends IBaseConfig { - kind: "spt-pmc"; + kind: "aki-pmc"; /** What game version should the PMC have */ gameVersionWeight: Record; /** What account type should the PMC have */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IQuestConfig.d.ts index 362602c..c190d01 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,10 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { ELocationName } from "@spt/models/enums/ELocationName"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { ELocationName } from "@spt-aki/models/enums/ELocationName"; +import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IQuestConfig extends IBaseConfig { - kind: "spt-quest"; - mailRedeemTimeHours: Record; + kind: "aki-quest"; + redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; /** Show non-seasonal quests be shown to player */ showNonSeasonalEventQuests: boolean; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts index bb318de..eac8a53 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts @@ -1,7 +1,7 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig, IRunIntervalValues } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig, IRunIntervalValues } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IRagfairConfig extends IBaseConfig { - kind: "spt-ragfair"; + kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; /** Default values used to hydrate `runIntervalSeconds` with */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..9e23cc4 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IRepairConfig.d.ts @@ -1,7 +1,7 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IRepairConfig extends IBaseConfig { - kind: "spt-repair"; + kind: "aki-repair"; priceMultiplier: number; applyRandomizeDurabilityLoss: boolean; weaponSkillRepairGain: number; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IScavCaseConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IScavCaseConfig.d.ts index c611948..92f2722 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IScavCaseConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IScavCaseConfig.d.ts @@ -1,7 +1,7 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IScavCaseConfig extends IBaseConfig { - kind: "spt-scavcase"; + kind: "aki-scavcase"; rewardItemValueRangeRub: Record; moneyRewards: MoneyRewards; ammoRewards: AmmoRewards; diff --git a/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts index da7070b..6334570 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,8 +1,8 @@ -import { BossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { BossLocationSpawn } from "@spt-aki/models/eft/common/ILocationBase"; +import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { - kind: "spt-seasonalevents"; + kind: "aki-seasonalevents"; enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; diff --git a/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts index a8c969c..8a906c7 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts @@ -1,8 +1,8 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; +import { LootRequest } from "@spt-aki/models/spt/services/LootRequest"; export interface ITraderConfig extends IBaseConfig { - kind: "spt-trader"; + kind: "aki-trader"; updateTime: UpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..845cb77 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IWeatherConfig.d.ts @@ -1,9 +1,9 @@ -import { MinMax } from "@spt/models/common/MinMax"; -import { Season } from "@spt/models/enums/Season"; -import { WindDirection } from "@spt/models/enums/WindDirection"; -import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; +import { WindDirection } from "@spt-aki/models/enums/WindDirection"; +import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { - kind: "spt-weather"; + kind: "aki-weather"; acceleration: number; weather: Weather; seasonDates: ISeasonDateTimes[]; diff --git a/TypeScript/24WebSocket/types/models/spt/controllers/IBotController.d.ts b/TypeScript/24WebSocket/types/models/spt/controllers/IBotController.d.ts index e577497..3e8e035 100644 --- a/TypeScript/24WebSocket/types/models/spt/controllers/IBotController.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/controllers/IBotController.d.ts @@ -1,7 +1,7 @@ -import { IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; -import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; +import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; +import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; export interface IBotController { getBotLimit(type: string): number; getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; diff --git a/TypeScript/24WebSocket/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/24WebSocket/types/models/spt/dialog/ISendMessageDetails.d.ts index 379b032..05b3bcd 100644 --- a/TypeScript/24WebSocket/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,7 +1,7 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { Traders } from "@spt/models/enums/Traders"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { Traders } from "@spt-aki/models/enums/Traders"; export interface ISendMessageDetails { /** Player id */ recipientId: string; diff --git a/TypeScript/24WebSocket/types/models/spt/fence/ICreateFenceAssortsResult.d.ts b/TypeScript/24WebSocket/types/models/spt/fence/ICreateFenceAssortsResult.d.ts index 553f4e2..8b90799 100644 --- a/TypeScript/24WebSocket/types/models/spt/fence/ICreateFenceAssortsResult.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/fence/ICreateFenceAssortsResult.d.ts @@ -1,5 +1,5 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader"; export interface ICreateFenceAssortsResult { sptItems: Item[][]; barter_scheme: Record; diff --git a/TypeScript/24WebSocket/types/models/spt/generators/IBotGenerator.d.ts b/TypeScript/24WebSocket/types/models/spt/generators/IBotGenerator.d.ts index e46ce24..2cb337d 100644 --- a/TypeScript/24WebSocket/types/models/spt/generators/IBotGenerator.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/generators/IBotGenerator.d.ts @@ -1,5 +1,5 @@ -import { Inventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; -import { Chances, Generation, Inventory } from "@spt/models/eft/common/tables/IBotType"; +import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Chances, Generation, Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; export interface IBotGenerator { generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; } diff --git a/TypeScript/24WebSocket/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/24WebSocket/types/models/spt/generators/ILocationGenerator.d.ts index 2df98e7..781e575 100644 --- a/TypeScript/24WebSocket/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; -import { ILooseLoot, SpawnpointTemplate } from "@spt/models/eft/common/ILooseLoot"; +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; +import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/24WebSocket/types/models/spt/generators/IRagfairAssortGenerator.d.ts b/TypeScript/24WebSocket/types/models/spt/generators/IRagfairAssortGenerator.d.ts index 193b685..bcd26c2 100644 --- a/TypeScript/24WebSocket/types/models/spt/generators/IRagfairAssortGenerator.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/generators/IRagfairAssortGenerator.d.ts @@ -1,4 +1,4 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IRagfairAssortGenerator { getAssortItems(): Item[]; } diff --git a/TypeScript/24WebSocket/types/models/spt/generators/IRagfairOfferGenerator.d.ts b/TypeScript/24WebSocket/types/models/spt/generators/IRagfairOfferGenerator.d.ts index 66d28e9..bb5fdf9 100644 --- a/TypeScript/24WebSocket/types/models/spt/generators/IRagfairOfferGenerator.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/generators/IRagfairOfferGenerator.d.ts @@ -1,6 +1,6 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; export interface IRagfairOfferGenerator { createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece: boolean): IRagfairOffer; } diff --git a/TypeScript/24WebSocket/types/models/spt/logging/IClientLogRequest.d.ts b/TypeScript/24WebSocket/types/models/spt/logging/IClientLogRequest.d.ts index 71f0b38..b7e1b36 100644 --- a/TypeScript/24WebSocket/types/models/spt/logging/IClientLogRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/logging/IClientLogRequest.d.ts @@ -1,4 +1,4 @@ -import { LogLevel } from "@spt/models/spt/logging/LogLevel"; +import { LogLevel } from "@spt-aki/models/spt/logging/LogLevel"; export interface IClientLogRequest { Source: string; Level: LogLevel | string; diff --git a/TypeScript/24WebSocket/types/models/spt/mod/IPackageJsonData.d.ts b/TypeScript/24WebSocket/types/models/spt/mod/IPackageJsonData.d.ts index d21e5f1..0f6f26c 100644 --- a/TypeScript/24WebSocket/types/models/spt/mod/IPackageJsonData.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/mod/IPackageJsonData.d.ts @@ -8,7 +8,7 @@ export interface IPackageJsonData { url: string; author: string; version: string; - sptVersion: string; + akiVersion: string; /** We deliberately purge this data */ scripts: Record; devDependencies: Record; diff --git a/TypeScript/24WebSocket/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/24WebSocket/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..304462d 100644 --- a/TypeScript/24WebSocket/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; diff --git a/TypeScript/24WebSocket/types/models/spt/repeatable/IQuestTypePool.d.ts b/TypeScript/24WebSocket/types/models/spt/repeatable/IQuestTypePool.d.ts index 200303b..bce68e8 100644 --- a/TypeScript/24WebSocket/types/models/spt/repeatable/IQuestTypePool.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/repeatable/IQuestTypePool.d.ts @@ -1,4 +1,4 @@ -import { ELocationName } from "@spt/models/enums/ELocationName"; +import { ELocationName } from "@spt-aki/models/enums/ELocationName"; export interface IQuestTypePool { types: string[]; pool: IQuestPool; diff --git a/TypeScript/24WebSocket/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/24WebSocket/types/models/spt/server/ExhaustableArray.d.ts index 2419acf..c7801eb 100644 --- a/TypeScript/24WebSocket/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/server/ExhaustableArray.d.ts @@ -1,5 +1,5 @@ -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; diff --git a/TypeScript/24WebSocket/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/24WebSocket/types/models/spt/server/IDatabaseTables.d.ts index 3a98412..1140374 100644 --- a/TypeScript/24WebSocket/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/server/IDatabaseTables.d.ts @@ -1,26 +1,26 @@ -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; -import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem"; -import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; -import { IMatch } from "@spt/models/eft/common/tables/IMatch"; -import { IProfileTemplates } from "@spt/models/eft/common/tables/IProfileTemplate"; -import { IQuest } from "@spt/models/eft/common/tables/IQuest"; -import { IRepeatableQuestDatabase } from "@spt/models/eft/common/tables/IRepeatableQuests"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ITrader } from "@spt/models/eft/common/tables/ITrader"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; -import { IDefaultEquipmentPreset } from "@spt/models/eft/profile/ISptProfile"; -import { ILocaleBase } from "@spt/models/spt/server/ILocaleBase"; -import { ILocations } from "@spt/models/spt/server/ILocations"; -import { IServerBase } from "@spt/models/spt/server/IServerBase"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; +import { IGlobals } from "@spt-aki/models/eft/common/IGlobals"; +import { IAchievement } from "@spt-aki/models/eft/common/tables/IAchievement"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; +import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; +import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; +import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; +import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; +import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; +import { IRepeatableQuestDatabase } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ITrader } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IHideoutArea } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction"; +import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase"; +import { IHideoutSettingsBase } from "@spt-aki/models/eft/hideout/IHideoutSettingsBase"; +import { IQteData } from "@spt-aki/models/eft/hideout/IQteData"; +import { IDefaultEquipmentPreset } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILocaleBase } from "@spt-aki/models/spt/server/ILocaleBase"; +import { ILocations } from "@spt-aki/models/spt/server/ILocations"; +import { IServerBase } from "@spt-aki/models/spt/server/IServerBase"; +import { ISettingsBase } from "@spt-aki/models/spt/server/ISettingsBase"; export interface IDatabaseTables { bots?: { types: Record; diff --git a/TypeScript/24WebSocket/types/models/spt/server/ILocations.d.ts b/TypeScript/24WebSocket/types/models/spt/server/ILocations.d.ts index 500efcc..0101dd7 100644 --- a/TypeScript/24WebSocket/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/server/ILocations.d.ts @@ -1,5 +1,5 @@ -import { ILocation } from "@spt/models/eft/common/ILocation"; -import { ILocationsBase } from "@spt/models/eft/common/tables/ILocationsBase"; +import { ILocation } from "@spt-aki/models/eft/common/ILocation"; +import { ILocationsBase } from "@spt-aki/models/eft/common/tables/ILocationsBase"; export interface ILocations { bigmap?: ILocation; develop?: ILocation; diff --git a/TypeScript/24WebSocket/types/models/spt/services/CustomPreset.d.ts b/TypeScript/24WebSocket/types/models/spt/services/CustomPreset.d.ts index 3301a55..989c58f 100644 --- a/TypeScript/24WebSocket/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/services/CustomPreset.d.ts @@ -1,4 +1,4 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; export interface CustomPreset { key: string; preset: IPreset; diff --git a/TypeScript/24WebSocket/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/24WebSocket/types/models/spt/services/CustomTraderAssortData.d.ts index 7ad6341..289d66a 100644 --- a/TypeScript/24WebSocket/types/models/spt/services/CustomTraderAssortData.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/services/CustomTraderAssortData.d.ts @@ -1,5 +1,5 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { Traders } from "@spt-aki/models/enums/Traders"; export interface CustomTraderAssortData { traderId: Traders; assorts: ITraderAssort; diff --git a/TypeScript/24WebSocket/types/models/spt/services/IInsuranceEquipmentPkg.d.ts b/TypeScript/24WebSocket/types/models/spt/services/IInsuranceEquipmentPkg.d.ts index 92d0565..379f3c9 100644 --- a/TypeScript/24WebSocket/types/models/spt/services/IInsuranceEquipmentPkg.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/services/IInsuranceEquipmentPkg.d.ts @@ -1,5 +1,5 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IInsuranceEquipmentPkg { sessionID: string; pmcData: IPmcData; diff --git a/TypeScript/24WebSocket/types/models/spt/services/ITraderServiceModel.d.ts b/TypeScript/24WebSocket/types/models/spt/services/ITraderServiceModel.d.ts index 165b65c..3fe43c4 100644 --- a/TypeScript/24WebSocket/types/models/spt/services/ITraderServiceModel.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/services/ITraderServiceModel.d.ts @@ -1,4 +1,4 @@ -import { TraderServiceType } from "@spt/models/enums/TraderServiceType"; +import { TraderServiceType } from "@spt-aki/models/enums/TraderServiceType"; export interface ITraderServiceModel { serviceType: TraderServiceType; itemsToPay?: { diff --git a/TypeScript/24WebSocket/types/models/spt/services/LootRequest.d.ts b/TypeScript/24WebSocket/types/models/spt/services/LootRequest.d.ts index 9f028a6..d4fa902 100644 --- a/TypeScript/24WebSocket/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/services/LootRequest.d.ts @@ -1,4 +1,4 @@ -import { MinMax } from "@spt/models/common/MinMax"; +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface LootRequest { weaponPresetCount: MinMax; armorPresetCount: MinMax; diff --git a/TypeScript/24WebSocket/types/models/spt/utils/IAsyncQueue.d.ts b/TypeScript/24WebSocket/types/models/spt/utils/IAsyncQueue.d.ts index 4bc9199..464139a 100644 --- a/TypeScript/24WebSocket/types/models/spt/utils/IAsyncQueue.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/utils/IAsyncQueue.d.ts @@ -1,4 +1,4 @@ -import { ICommand } from "@spt/models/spt/utils/ICommand"; +import { ICommand } from "@spt-aki/models/spt/utils/ICommand"; export interface IAsyncQueue { waitFor(command: ICommand): Promise; } diff --git a/TypeScript/24WebSocket/types/models/spt/utils/ILogger.d.ts b/TypeScript/24WebSocket/types/models/spt/utils/ILogger.d.ts index 1b9726d..340f26b 100644 --- a/TypeScript/24WebSocket/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/utils/ILogger.d.ts @@ -1,6 +1,6 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; -import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; +import { Daum } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor"; +import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; export interface ILogger { writeToLogFile(data: string | Daum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; diff --git a/TypeScript/24WebSocket/types/routers/EventOutputHolder.d.ts b/TypeScript/24WebSocket/types/routers/EventOutputHolder.d.ts index a943e2b..2a7cd70 100644 --- a/TypeScript/24WebSocket/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/24WebSocket/types/routers/EventOutputHolder.d.ts @@ -1,10 +1,10 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; diff --git a/TypeScript/24WebSocket/types/routers/HttpRouter.d.ts b/TypeScript/24WebSocket/types/routers/HttpRouter.d.ts index 3fdb53f..7de8b20 100644 --- a/TypeScript/24WebSocket/types/routers/HttpRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/HttpRouter.d.ts @@ -1,6 +1,6 @@ /// import { IncomingMessage } from "node:http"; -import { DynamicRouter, Router, StaticRouter } from "@spt/di/Router"; +import { DynamicRouter, Router, StaticRouter } from "@spt-aki/di/Router"; export declare class HttpRouter { protected staticRouters: StaticRouter[]; protected dynamicRoutes: DynamicRouter[]; diff --git a/TypeScript/24WebSocket/types/routers/ImageRouter.d.ts b/TypeScript/24WebSocket/types/routers/ImageRouter.d.ts index eb3697f..9d13b7a 100644 --- a/TypeScript/24WebSocket/types/routers/ImageRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/ImageRouter.d.ts @@ -1,8 +1,8 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { ImageRouteService } from "@spt/services/mod/image/ImageRouteService"; -import { HttpFileUtil } from "@spt/utils/HttpFileUtil"; -import { VFS } from "@spt/utils/VFS"; +import { ImageRouteService } from "@spt-aki/services/mod/image/ImageRouteService"; +import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class ImageRouter { protected vfs: VFS; protected imageRouteService: ImageRouteService; diff --git a/TypeScript/24WebSocket/types/routers/ItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/ItemEventRouter.d.ts index f8043c0..fa154ef 100644 --- a/TypeScript/24WebSocket/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/ItemEventRouter.d.ts @@ -1,11 +1,11 @@ -import { ItemEventRouterDefinition } from "@spt/di/Router"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IItemEventRouterRequest } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IItemEventRouterRequest } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/24WebSocket/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/24WebSocket/types/routers/dynamic/BotDynamicRouter.d.ts index 9b1131d..5c54065 100644 --- a/TypeScript/24WebSocket/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { BotCallbacks } from "@spt/callbacks/BotCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { BotCallbacks } from "@spt-aki/callbacks/BotCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class BotDynamicRouter extends DynamicRouter { protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/24WebSocket/types/routers/dynamic/BundleDynamicRouter.d.ts index c552c6d..c73860a 100644 --- a/TypeScript/24WebSocket/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { BundleCallbacks } from "@spt/callbacks/BundleCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { BundleCallbacks } from "@spt-aki/callbacks/BundleCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/24WebSocket/types/routers/dynamic/CustomizationDynamicRouter.d.ts index b7f4956..79e60e6 100644 --- a/TypeScript/24WebSocket/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { CustomizationCallbacks } from "@spt/callbacks/CustomizationCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/24WebSocket/types/routers/dynamic/DataDynamicRouter.d.ts index d71fde1..098748f 100644 --- a/TypeScript/24WebSocket/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { DataCallbacks } from "@spt/callbacks/DataCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { DataCallbacks } from "@spt-aki/callbacks/DataCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class DataDynamicRouter extends DynamicRouter { protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/24WebSocket/types/routers/dynamic/HttpDynamicRouter.d.ts index 01d1ffb..5fda392 100644 --- a/TypeScript/24WebSocket/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { DynamicRouter } from "@spt/di/Router"; -import { ImageRouter } from "@spt/routers/ImageRouter"; +import { DynamicRouter } from "@spt-aki/di/Router"; +import { ImageRouter } from "@spt-aki/routers/ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); diff --git a/TypeScript/24WebSocket/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/24WebSocket/types/routers/dynamic/InraidDynamicRouter.d.ts index e4cf1eb..b68282e 100644 --- a/TypeScript/24WebSocket/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { InraidCallbacks } from "@spt/callbacks/InraidCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { InraidCallbacks } from "@spt-aki/callbacks/InraidCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/24WebSocket/types/routers/dynamic/LocationDynamicRouter.d.ts index a52f8d6..aef354f 100644 --- a/TypeScript/24WebSocket/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { LocationCallbacks } from "@spt/callbacks/LocationCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { LocationCallbacks } from "@spt-aki/callbacks/LocationCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/24WebSocket/types/routers/dynamic/NotifierDynamicRouter.d.ts index c00c80e..f1c0ea7 100644 --- a/TypeScript/24WebSocket/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { NotifierCallbacks } from "@spt/callbacks/NotifierCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { NotifierCallbacks } from "@spt-aki/callbacks/NotifierCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/24WebSocket/types/routers/dynamic/TraderDynamicRouter.d.ts index cdd6b71..2cde752 100644 --- a/TypeScript/24WebSocket/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,5 +1,5 @@ -import { TraderCallbacks } from "@spt/callbacks/TraderCallbacks"; -import { DynamicRouter } from "@spt/di/Router"; +import { TraderCallbacks } from "@spt-aki/callbacks/TraderCallbacks"; +import { DynamicRouter } from "@spt-aki/di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/CustomizationItemEventRouter.d.ts index c9babf3..02f5ff9 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -1,7 +1,7 @@ -import { CustomizationCallbacks } from "@spt/callbacks/CustomizationCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/HealthItemEventRouter.d.ts index 490884f..d082053 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/HealthItemEventRouter.d.ts @@ -1,7 +1,7 @@ -import { HealthCallbacks } from "@spt/callbacks/HealthCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HealthCallbacks } from "@spt-aki/callbacks/HealthCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/HideoutItemEventRouter.d.ts index 6839fee..9d1a604 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -1,7 +1,7 @@ -import { HideoutCallbacks } from "@spt/callbacks/HideoutCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutCallbacks } from "@spt-aki/callbacks/HideoutCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/InsuranceItemEventRouter.d.ts index af2b3dc..7ff4d30 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -1,7 +1,7 @@ -import { InsuranceCallbacks } from "@spt/callbacks/InsuranceCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { InsuranceCallbacks } from "@spt-aki/callbacks/InsuranceCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/InventoryItemEventRouter.d.ts index 660de81..98c5376 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -1,8 +1,8 @@ -import { HideoutCallbacks } from "@spt/callbacks/HideoutCallbacks"; -import { InventoryCallbacks } from "@spt/callbacks/InventoryCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutCallbacks } from "@spt-aki/callbacks/HideoutCallbacks"; +import { InventoryCallbacks } from "@spt-aki/callbacks/InventoryCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { protected inventoryCallbacks: InventoryCallbacks; protected hideoutCallbacks: HideoutCallbacks; diff --git a/TypeScript/24WebSocket/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/NoteItemEventRouter.d.ts index b415c3a..88102be 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/NoteItemEventRouter.d.ts @@ -1,8 +1,8 @@ -import { NoteCallbacks } from "@spt/callbacks/NoteCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { INoteActionData } from "@spt/models/eft/notes/INoteActionData"; +import { NoteCallbacks } from "@spt-aki/callbacks/NoteCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { INoteActionData } from "@spt-aki/models/eft/notes/INoteActionData"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/QuestItemEventRouter.d.ts index 1ce94f9..8ef3360 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,8 +1,8 @@ -import { QuestCallbacks } from "@spt/callbacks/QuestCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { QuestCallbacks } from "@spt-aki/callbacks/QuestCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected logger: ILogger; protected questCallbacks: QuestCallbacks; diff --git a/TypeScript/24WebSocket/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/RagfairItemEventRouter.d.ts index 09cdbf6..f1cf326 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -1,7 +1,7 @@ -import { RagfairCallbacks } from "@spt/callbacks/RagfairCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { RagfairCallbacks } from "@spt-aki/callbacks/RagfairCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/RepairItemEventRouter.d.ts index d2f857d..e901dad 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/RepairItemEventRouter.d.ts @@ -1,7 +1,7 @@ -import { RepairCallbacks } from "@spt/callbacks/RepairCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { RepairCallbacks } from "@spt-aki/callbacks/RepairCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/TradeItemEventRouter.d.ts index 5617ab3..e998e48 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/TradeItemEventRouter.d.ts @@ -1,7 +1,7 @@ -import { TradeCallbacks } from "@spt/callbacks/TradeCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { TradeCallbacks } from "@spt-aki/callbacks/TradeCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/24WebSocket/types/routers/item_events/WishlistItemEventRouter.d.ts index bc6d257..de60c39 100644 --- a/TypeScript/24WebSocket/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -1,7 +1,7 @@ -import { WishlistCallbacks } from "@spt/callbacks/WishlistCallbacks"; -import { HandledRoute, ItemEventRouterDefinition } from "@spt/di/Router"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { WishlistCallbacks } from "@spt-aki/callbacks/WishlistCallbacks"; +import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/24WebSocket/types/routers/save_load/HealthSaveLoadRouter.d.ts index df04248..1ecfa44 100644 --- a/TypeScript/24WebSocket/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,6 +1,6 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/24WebSocket/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/24WebSocket/types/routers/save_load/InraidSaveLoadRouter.d.ts index 3ea61fa..7cc9a08 100644 --- a/TypeScript/24WebSocket/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,6 +1,6 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/24WebSocket/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/24WebSocket/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index ba8cb8a..af5222a 100644 --- a/TypeScript/24WebSocket/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,6 +1,6 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/24WebSocket/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/24WebSocket/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 77d50bd..8047834 100644 --- a/TypeScript/24WebSocket/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,6 +1,6 @@ -import { HandledRoute, SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { getHandledRoutes(): HandledRoute[]; - handleLoad(profile: ISptProfile): ISptProfile; + handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/24WebSocket/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/24WebSocket/types/routers/serializers/BundleSerializer.d.ts index dc71cd8..52db030 100644 --- a/TypeScript/24WebSocket/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/24WebSocket/types/routers/serializers/BundleSerializer.d.ts @@ -1,9 +1,9 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { Serializer } from "@spt/di/Serializer"; -import { BundleLoader } from "@spt/loaders/BundleLoader"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HttpFileUtil } from "@spt/utils/HttpFileUtil"; +import { Serializer } from "@spt-aki/di/Serializer"; +import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; export declare class BundleSerializer extends Serializer { protected logger: ILogger; protected bundleLoader: BundleLoader; diff --git a/TypeScript/24WebSocket/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/24WebSocket/types/routers/serializers/ImageSerializer.d.ts index 5c77243..3b1ff6d 100644 --- a/TypeScript/24WebSocket/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/24WebSocket/types/routers/serializers/ImageSerializer.d.ts @@ -1,7 +1,7 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { Serializer } from "@spt/di/Serializer"; -import { ImageRouter } from "@spt/routers/ImageRouter"; +import { Serializer } from "@spt-aki/di/Serializer"; +import { ImageRouter } from "@spt-aki/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); diff --git a/TypeScript/24WebSocket/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/24WebSocket/types/routers/serializers/NotifySerializer.d.ts index 8c07f81..f8730b6 100644 --- a/TypeScript/24WebSocket/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/24WebSocket/types/routers/serializers/NotifySerializer.d.ts @@ -1,9 +1,9 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { NotifierController } from "@spt/controllers/NotifierController"; -import { Serializer } from "@spt/di/Serializer"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { JsonUtil } from "@spt/utils/JsonUtil"; +import { NotifierController } from "@spt-aki/controllers/NotifierController"; +import { Serializer } from "@spt-aki/di/Serializer"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class NotifySerializer extends Serializer { protected notifierController: NotifierController; protected jsonUtil: JsonUtil; diff --git a/TypeScript/24WebSocket/types/routers/static/AchievementStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/AchievementStaticRouter.d.ts index 80e3ae6..80c5e71 100644 --- a/TypeScript/24WebSocket/types/routers/static/AchievementStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/AchievementStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { AchievementCallbacks } from "@spt/callbacks/AchievementCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { AchievementCallbacks } from "@spt-aki/callbacks/AchievementCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class AchievementStaticRouter extends StaticRouter { protected achievementCallbacks: AchievementCallbacks; constructor(achievementCallbacks: AchievementCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/BotStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/BotStaticRouter.d.ts index 2a164a5..e7e9ff5 100644 --- a/TypeScript/24WebSocket/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/BotStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { BotCallbacks } from "@spt/callbacks/BotCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { BotCallbacks } from "@spt-aki/callbacks/BotCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class BotStaticRouter extends StaticRouter { protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/BuildStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/BuildStaticRouter.d.ts index c5c3a5e..e351d19 100644 --- a/TypeScript/24WebSocket/types/routers/static/BuildStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/BuildStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { BuildsCallbacks } from "@spt/callbacks/BuildsCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { BuildsCallbacks } from "@spt-aki/callbacks/BuildsCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class BuildsStaticRouter extends StaticRouter { protected buildsCallbacks: BuildsCallbacks; constructor(buildsCallbacks: BuildsCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/BundleStaticRouter.d.ts index 070d981..62056ba 100644 --- a/TypeScript/24WebSocket/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/BundleStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { BundleCallbacks } from "@spt/callbacks/BundleCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { BundleCallbacks } from "@spt-aki/callbacks/BundleCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class BundleStaticRouter extends StaticRouter { protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/ClientLogStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/ClientLogStaticRouter.d.ts index 2df39ad..6ae3f50 100644 --- a/TypeScript/24WebSocket/types/routers/static/ClientLogStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/ClientLogStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { ClientLogCallbacks } from "@spt/callbacks/ClientLogCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { ClientLogCallbacks } from "@spt-aki/callbacks/ClientLogCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class ClientLogStaticRouter extends StaticRouter { protected clientLogCallbacks: ClientLogCallbacks; constructor(clientLogCallbacks: ClientLogCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/CustomizationStaticRouter.d.ts index 5d80536..cebf043 100644 --- a/TypeScript/24WebSocket/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { CustomizationCallbacks } from "@spt/callbacks/CustomizationCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/DataStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/DataStaticRouter.d.ts index f59a136..7e84ae1 100644 --- a/TypeScript/24WebSocket/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/DataStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { DataCallbacks } from "@spt/callbacks/DataCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { DataCallbacks } from "@spt-aki/callbacks/DataCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class DataStaticRouter extends StaticRouter { protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/DialogStaticRouter.d.ts index 5a17ba4..7f3ef7a 100644 --- a/TypeScript/24WebSocket/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/DialogStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { DialogueCallbacks } from "@spt/callbacks/DialogueCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { DialogueCallbacks } from "@spt-aki/callbacks/DialogueCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class DialogStaticRouter extends StaticRouter { protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/GameStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/GameStaticRouter.d.ts index bf045af..878f494 100644 --- a/TypeScript/24WebSocket/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/GameStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { GameCallbacks } from "@spt/callbacks/GameCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { GameCallbacks } from "@spt-aki/callbacks/GameCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class GameStaticRouter extends StaticRouter { protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/HealthStaticRouter.d.ts index d968017..79dedea 100644 --- a/TypeScript/24WebSocket/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/HealthStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { HealthCallbacks } from "@spt/callbacks/HealthCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { HealthCallbacks } from "@spt-aki/callbacks/HealthCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class HealthStaticRouter extends StaticRouter { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/InraidStaticRouter.d.ts index 2a0da3c..eb9c3b1 100644 --- a/TypeScript/24WebSocket/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/InraidStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { InraidCallbacks } from "@spt/callbacks/InraidCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { InraidCallbacks } from "@spt-aki/callbacks/InraidCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class InraidStaticRouter extends StaticRouter { protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/InsuranceStaticRouter.d.ts index 99e394f..58c1583 100644 --- a/TypeScript/24WebSocket/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { InsuranceCallbacks } from "@spt/callbacks/InsuranceCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { InsuranceCallbacks } from "@spt-aki/callbacks/InsuranceCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/ItemEventStaticRouter.d.ts index b23856d..772493a 100644 --- a/TypeScript/24WebSocket/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { ItemEventCallbacks } from "@spt/callbacks/ItemEventCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { ItemEventCallbacks } from "@spt-aki/callbacks/ItemEventCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/LauncherStaticRouter.d.ts index 08312d2..46a5bd6 100644 --- a/TypeScript/24WebSocket/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/LauncherStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { LauncherCallbacks } from "@spt/callbacks/LauncherCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { LauncherCallbacks } from "@spt-aki/callbacks/LauncherCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class LauncherStaticRouter extends StaticRouter { protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/LocationStaticRouter.d.ts index 9a2e16c..f577ba9 100644 --- a/TypeScript/24WebSocket/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/LocationStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { LocationCallbacks } from "@spt/callbacks/LocationCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { LocationCallbacks } from "@spt-aki/callbacks/LocationCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class LocationStaticRouter extends StaticRouter { protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/MatchStaticRouter.d.ts index 955ce34..e26c8bd 100644 --- a/TypeScript/24WebSocket/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/MatchStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { MatchCallbacks } from "@spt/callbacks/MatchCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { MatchCallbacks } from "@spt-aki/callbacks/MatchCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class MatchStaticRouter extends StaticRouter { protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/NotifierStaticRouter.d.ts index 7cb4756..9427d00 100644 --- a/TypeScript/24WebSocket/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/NotifierStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { NotifierCallbacks } from "@spt/callbacks/NotifierCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { NotifierCallbacks } from "@spt-aki/callbacks/NotifierCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class NotifierStaticRouter extends StaticRouter { protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/ProfileStaticRouter.d.ts index cb6aa84..31470f3 100644 --- a/TypeScript/24WebSocket/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/ProfileStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { ProfileCallbacks } from "@spt/callbacks/ProfileCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { ProfileCallbacks } from "@spt-aki/callbacks/ProfileCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class ProfileStaticRouter extends StaticRouter { protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/QuestStaticRouter.d.ts index 9c0e710..a505e5c 100644 --- a/TypeScript/24WebSocket/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/QuestStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { QuestCallbacks } from "@spt/callbacks/QuestCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { QuestCallbacks } from "@spt-aki/callbacks/QuestCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class QuestStaticRouter extends StaticRouter { protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/RagfairStaticRouter.d.ts index 475e1ee..e56a9c1 100644 --- a/TypeScript/24WebSocket/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/RagfairStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { RagfairCallbacks } from "@spt/callbacks/RagfairCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { RagfairCallbacks } from "@spt-aki/callbacks/RagfairCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class RagfairStaticRouter extends StaticRouter { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/TraderStaticRouter.d.ts index e7d5ee1..1b9cbd1 100644 --- a/TypeScript/24WebSocket/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/TraderStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { TraderCallbacks } from "@spt/callbacks/TraderCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { TraderCallbacks } from "@spt-aki/callbacks/TraderCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class TraderStaticRouter extends StaticRouter { protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); diff --git a/TypeScript/24WebSocket/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/24WebSocket/types/routers/static/WeatherStaticRouter.d.ts index d3055e6..499f911 100644 --- a/TypeScript/24WebSocket/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/static/WeatherStaticRouter.d.ts @@ -1,5 +1,5 @@ -import { WeatherCallbacks } from "@spt/callbacks/WeatherCallbacks"; -import { StaticRouter } from "@spt/di/Router"; +import { WeatherCallbacks } from "@spt-aki/callbacks/WeatherCallbacks"; +import { StaticRouter } from "@spt-aki/di/Router"; export declare class WeatherStaticRouter extends StaticRouter { protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); diff --git a/TypeScript/24WebSocket/types/servers/ConfigServer.d.ts b/TypeScript/24WebSocket/types/servers/ConfigServer.d.ts index 6f9bc83..c932dfe 100644 --- a/TypeScript/24WebSocket/types/servers/ConfigServer.d.ts +++ b/TypeScript/24WebSocket/types/servers/ConfigServer.d.ts @@ -1,7 +1,7 @@ -import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class ConfigServer { protected logger: ILogger; protected vfs: VFS; diff --git a/TypeScript/24WebSocket/types/servers/DatabaseServer.d.ts b/TypeScript/24WebSocket/types/servers/DatabaseServer.d.ts index c198a87..fc69a61 100644 --- a/TypeScript/24WebSocket/types/servers/DatabaseServer.d.ts +++ b/TypeScript/24WebSocket/types/servers/DatabaseServer.d.ts @@ -1,4 +1,4 @@ -import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables"; +import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; export declare class DatabaseServer { protected tableData: IDatabaseTables; getTables(): IDatabaseTables; diff --git a/TypeScript/24WebSocket/types/servers/HttpServer.d.ts b/TypeScript/24WebSocket/types/servers/HttpServer.d.ts index b00fe68..2ab3204 100644 --- a/TypeScript/24WebSocket/types/servers/HttpServer.d.ts +++ b/TypeScript/24WebSocket/types/servers/HttpServer.d.ts @@ -1,14 +1,14 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; -import { WebSocketServer } from "@spt/servers/WebSocketServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; +import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class HttpServer { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/servers/RagfairServer.d.ts b/TypeScript/24WebSocket/types/servers/RagfairServer.d.ts index af3acf3..f6f9730 100644 --- a/TypeScript/24WebSocket/types/servers/RagfairServer.d.ts +++ b/TypeScript/24WebSocket/types/servers/RagfairServer.d.ts @@ -1,15 +1,15 @@ -import { RagfairOfferGenerator } from "@spt/generators/RagfairOfferGenerator"; -import { TraderAssortHelper } from "@spt/helpers/TraderAssortHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairCategoriesService } from "@spt/services/RagfairCategoriesService"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; -import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; +import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; +import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RagfairCategoriesService } from "@spt-aki/services/RagfairCategoriesService"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { RagfairRequiredItemsService } from "@spt-aki/services/RagfairRequiredItemsService"; export declare class RagfairServer { protected logger: ILogger; protected ragfairOfferGenerator: RagfairOfferGenerator; diff --git a/TypeScript/24WebSocket/types/servers/SaveServer.d.ts b/TypeScript/24WebSocket/types/servers/SaveServer.d.ts index f71fbb2..d61259b 100644 --- a/TypeScript/24WebSocket/types/servers/SaveServer.d.ts +++ b/TypeScript/24WebSocket/types/servers/SaveServer.d.ts @@ -1,10 +1,10 @@ -import { SaveLoadRouter } from "@spt/di/Router"; -import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { SaveLoadRouter } from "@spt-aki/di/Router"; +import { IAkiProfile, Info } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; @@ -24,7 +24,7 @@ export declare class SaveServer { * @param id Id for save callback * @param callback Callback to execute prior to running SaveServer.saveProfile() */ - addBeforeSaveCallback(id: string, callback: (profile: Partial) => Partial): void; + addBeforeSaveCallback(id: string, callback: (profile: Partial) => Partial): void; /** * Remove a callback from being executed prior to saving profile in SaveServer.saveProfile() * @param id Id of callback to remove @@ -41,14 +41,14 @@ export declare class SaveServer { /** * Get a player profile from memory * @param sessionId Session id - * @returns ISptProfile + * @returns IAkiProfile */ - getProfile(sessionId: string): ISptProfile; + getProfile(sessionId: string): IAkiProfile; /** * Get all profiles from memory - * @returns Dictionary of ISptProfile + * @returns Dictionary of IAkiProfile */ - getProfiles(): Record; + getProfiles(): Record; /** * Delete a profile by id * @param sessionID Id of profile to remove @@ -64,7 +64,7 @@ export declare class SaveServer { * Add full profile in memory by key (info.id) * @param profileDetails Profile to save */ - addProfile(profileDetails: ISptProfile): void; + addProfile(profileDetails: IAkiProfile): void; /** * Look up profile json in user/profiles by id and store in memory * Execute saveLoadRouters callbacks after being loaded into memory diff --git a/TypeScript/24WebSocket/types/servers/WebSocketServer.d.ts b/TypeScript/24WebSocket/types/servers/WebSocketServer.d.ts index b9d66ee..4200b5a 100644 --- a/TypeScript/24WebSocket/types/servers/WebSocketServer.d.ts +++ b/TypeScript/24WebSocket/types/servers/WebSocketServer.d.ts @@ -1,11 +1,11 @@ /// import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; diff --git a/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts b/TypeScript/24WebSocket/types/servers/http/AkiHttpListener.d.ts similarity index 74% rename from TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts rename to TypeScript/24WebSocket/types/servers/http/AkiHttpListener.d.ts index ef68143..4ccdcf6 100644 --- a/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/24WebSocket/types/servers/http/AkiHttpListener.d.ts @@ -1,14 +1,14 @@ /// /// import { IncomingMessage, ServerResponse } from "node:http"; -import { Serializer } from "@spt/di/Serializer"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HttpRouter } from "@spt/routers/HttpRouter"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -export declare class SptHttpListener implements IHttpListener { +import { Serializer } from "@spt-aki/di/Serializer"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HttpRouter } from "@spt-aki/routers/HttpRouter"; +import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +export declare class AkiHttpListener implements IHttpListener { protected httpRouter: HttpRouter; protected serializers: Serializer[]; protected logger: ILogger; diff --git a/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts b/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts deleted file mode 100644 index ef68143..0000000 --- a/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/// -/// -import { IncomingMessage, ServerResponse } from "node:http"; -import { Serializer } from "@spt/di/Serializer"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HttpRouter } from "@spt/routers/HttpRouter"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -export declare class SptHttpListener implements IHttpListener { - protected httpRouter: HttpRouter; - protected serializers: Serializer[]; - protected logger: ILogger; - protected requestsLogger: ILogger; - protected jsonUtil: JsonUtil; - protected httpResponse: HttpResponseUtil; - protected localisationService: LocalisationService; - constructor(httpRouter: HttpRouter, // TODO: delay required - serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); - canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; - /** - * Send http response to the client - * @param sessionID Player id - * @param req Incoming request - * @param resp Outgoing response - * @param body Buffer - * @param output Server generated response data - */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; - protected getBodyInfo(body: Buffer, requestUrl?: any): any; - sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/24WebSocket/types/servers/ws/AkiWebSocketConnectionHandler.d.ts similarity index 55% rename from TypeScript/22CustomSptCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts rename to TypeScript/24WebSocket/types/servers/ws/AkiWebSocketConnectionHandler.d.ts index 10c8a74..b0b354a 100644 --- a/TypeScript/22CustomSptCommand/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/24WebSocket/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -1,27 +1,27 @@ /// import { IncomingMessage } from "http"; import { WebSocket } from "ws"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; -export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected jsonUtil: JsonUtil; - protected sptWebSocketMessageHandlers: ISptWebSocketMessageHandler[]; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; protected httpConfig: IHttpConfig; protected webSockets: Map; protected defaultNotification: IWsNotificationEvent; protected websocketPingHandler: any; - constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, sptWebSocketMessageHandlers: ISptWebSocketMessageHandler[]); + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); getSocketId(): string; getHookUrl(): string; onConnection(ws: WebSocket, req: IncomingMessage): void; diff --git a/TypeScript/24WebSocket/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/24WebSocket/types/servers/ws/SptWebSocketConnectionHandler.d.ts deleted file mode 100644 index 10c8a74..0000000 --- a/TypeScript/24WebSocket/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// -import { IncomingMessage } from "http"; -import { WebSocket } from "ws"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; -export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { - protected logger: ILogger; - protected profileHelper: ProfileHelper; - protected localisationService: LocalisationService; - protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; - protected sptWebSocketMessageHandlers: ISptWebSocketMessageHandler[]; - protected httpConfig: IHttpConfig; - protected webSockets: Map; - protected defaultNotification: IWsNotificationEvent; - protected websocketPingHandler: any; - constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, sptWebSocketMessageHandlers: ISptWebSocketMessageHandler[]); - getSocketId(): string; - getHookUrl(): string; - onConnection(ws: WebSocket, req: IncomingMessage): void; - sendMessage(sessionID: string, output: IWsNotificationEvent): void; - isConnectionWebSocket(sessionID: string): boolean; - getSessionWebSocket(sessionID: string): WebSocket; -} diff --git a/TypeScript/24WebSocket/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/24WebSocket/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/24WebSocket/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/24WebSocket/types/servers/ws/message/DefaultSptWebSocketMessageHandler.d.ts b/TypeScript/24WebSocket/types/servers/ws/message/DefaultSptWebSocketMessageHandler.d.ts deleted file mode 100644 index d5247ec..0000000 --- a/TypeScript/24WebSocket/types/servers/ws/message/DefaultSptWebSocketMessageHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { RawData, WebSocket } from "ws"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; -export declare class DefaultSptWebSocketMessageHandler implements ISptWebSocketMessageHandler { - protected logger: ILogger; - constructor(logger: ILogger); - onSptMessage(sessionId: string, client: WebSocket, message: RawData): void; -} diff --git a/TypeScript/24WebSocket/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/24WebSocket/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/24WebSocket/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/24WebSocket/types/servers/ws/message/ISptWebSocketMessageHandler.d.ts b/TypeScript/24WebSocket/types/servers/ws/message/ISptWebSocketMessageHandler.d.ts deleted file mode 100644 index 137bc87..0000000 --- a/TypeScript/24WebSocket/types/servers/ws/message/ISptWebSocketMessageHandler.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RawData, WebSocket } from "ws"; -export interface ISptWebSocketMessageHandler { - onSptMessage(sessionID: string, client: WebSocket, message: RawData): void; -} diff --git a/TypeScript/24WebSocket/types/services/BotEquipmentFilterService.d.ts b/TypeScript/24WebSocket/types/services/BotEquipmentFilterService.d.ts index 5ee2fb4..c66607f 100644 --- a/TypeScript/24WebSocket/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/24WebSocket/types/services/BotEquipmentFilterService.d.ts @@ -1,10 +1,10 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class BotEquipmentFilterService { protected logger: ILogger; protected botHelper: BotHelper; diff --git a/TypeScript/24WebSocket/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/24WebSocket/types/services/BotEquipmentModPoolService.d.ts index c53f31b..8cca127 100644 --- a/TypeScript/24WebSocket/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/24WebSocket/types/services/BotEquipmentModPoolService.d.ts @@ -1,12 +1,12 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Mods } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { VFS } from "@spt/utils/VFS"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { Mods } from "@spt-aki/models/eft/common/tables/IBotType"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { VFS } from "@spt-aki/utils/VFS"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; diff --git a/TypeScript/24WebSocket/types/services/BotGenerationCacheService.d.ts b/TypeScript/24WebSocket/types/services/BotGenerationCacheService.d.ts index ba27266..4c2ce9c 100644 --- a/TypeScript/24WebSocket/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/24WebSocket/types/services/BotGenerationCacheService.d.ts @@ -1,8 +1,8 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/services/BotLootCacheService.d.ts b/TypeScript/24WebSocket/types/services/BotLootCacheService.d.ts index 57d56af..7b56a12 100644 --- a/TypeScript/24WebSocket/types/services/BotLootCacheService.d.ts +++ b/TypeScript/24WebSocket/types/services/BotLootCacheService.d.ts @@ -1,13 +1,13 @@ -import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { PMCLootGenerator } from "@spt-aki/generators/PMCLootGenerator"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; +import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBotLootCache, LootCacheType } from "@spt-aki/models/spt/bots/IBotLootCache"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; protected itemHelper: ItemHelper; diff --git a/TypeScript/24WebSocket/types/services/BotWeaponModLimitService.d.ts b/TypeScript/24WebSocket/types/services/BotWeaponModLimitService.d.ts index 63c4967..cf530a9 100644 --- a/TypeScript/24WebSocket/types/services/BotWeaponModLimitService.d.ts +++ b/TypeScript/24WebSocket/types/services/BotWeaponModLimitService.d.ts @@ -1,9 +1,9 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; export declare class BotModLimits { scope: ItemCount; scopeMax: number; diff --git a/TypeScript/24WebSocket/types/services/CustomLocationWaveService.d.ts b/TypeScript/24WebSocket/types/services/CustomLocationWaveService.d.ts index 728a1e8..8232364 100644 --- a/TypeScript/24WebSocket/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/24WebSocket/types/services/CustomLocationWaveService.d.ts @@ -1,9 +1,9 @@ -import { BossLocationSpawn, Wave } from "@spt/models/eft/common/ILocationBase"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { BossLocationSpawn, Wave } from "@spt-aki/models/eft/common/ILocationBase"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/24WebSocket/types/services/FenceService.d.ts b/TypeScript/24WebSocket/types/services/FenceService.d.ts index 0e75ae6..b0fa697 100644 --- a/TypeScript/24WebSocket/types/services/FenceService.d.ts +++ b/TypeScript/24WebSocket/types/services/FenceService.d.ts @@ -1,21 +1,21 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PresetHelper } from "@spt/helpers/PresetHelper"; -import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; -import { IFenceAssortGenerationValues, IGenerationAssortValues } from "@spt/models/spt/fence/IFenceAssortGenerationValues"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { IFenceLevel } from "@spt-aki/models/eft/common/IGlobals"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item, Repairable } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IBarterScheme, ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ICreateFenceAssortsResult } from "@spt-aki/models/spt/fence/ICreateFenceAssortsResult"; +import { IFenceAssortGenerationValues, IGenerationAssortValues } from "@spt-aki/models/spt/fence/IFenceAssortGenerationValues"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Handle actions surrounding Fence * e.g. generating or refreshing assorts / get next refresh time diff --git a/TypeScript/24WebSocket/types/services/GiftService.d.ts b/TypeScript/24WebSocket/types/services/GiftService.d.ts index aca276c..2dbf09a 100644 --- a/TypeScript/24WebSocket/types/services/GiftService.d.ts +++ b/TypeScript/24WebSocket/types/services/GiftService.d.ts @@ -1,23 +1,21 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { GiftSentResult } from "@spt/models/enums/GiftSentResult"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { Gift, IGiftsConfig } from "@spt/models/spt/config/IGiftsConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { GiftSentResult } from "@spt-aki/models/enums/GiftSentResult"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { Gift, IGiftsConfig } from "@spt-aki/models/spt/config/IGiftsConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GiftService { protected logger: ILogger; protected mailSendService: MailSendService; - protected localisationService: LocalisationService; protected hashUtil: HashUtil; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, mailSendService: MailSendService, localisationService: LocalisationService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); /** * Does a gift with a specific ID exist in db * @param giftId Gift id to check for diff --git a/TypeScript/24WebSocket/types/services/InsuranceService.d.ts b/TypeScript/24WebSocket/types/services/InsuranceService.d.ts index 5492a56..b024e4d 100644 --- a/TypeScript/24WebSocket/types/services/InsuranceService.d.ts +++ b/TypeScript/24WebSocket/types/services/InsuranceService.d.ts @@ -1,27 +1,27 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { SecureContainerHelper } from "@spt/helpers/SecureContainerHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITraderBase } from "@spt/models/eft/common/tables/ITrader"; -import { IInsuredItemsData } from "@spt/models/eft/inRaid/IInsuredItemsData"; -import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData"; -import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; -import { ILostOnDeathConfig } from "@spt/models/spt/config/ILostOnDeathConfig"; -import { IInsuranceEquipmentPkg } from "@spt/models/spt/services/IInsuranceEquipmentPkg"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MailSendService } from "@spt/services/MailSendService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { SecureContainerHelper } from "@spt-aki/helpers/SecureContainerHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IInsuredItemsData } from "@spt-aki/models/eft/inRaid/IInsuredItemsData"; +import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig"; +import { ILostOnDeathConfig } from "@spt-aki/models/spt/config/ILostOnDeathConfig"; +import { IInsuranceEquipmentPkg } from "@spt-aki/models/spt/services/IInsuranceEquipmentPkg"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/services/ItemBaseClassService.d.ts b/TypeScript/24WebSocket/types/services/ItemBaseClassService.d.ts index 9c6e6c8..8a5b5c5 100644 --- a/TypeScript/24WebSocket/types/services/ItemBaseClassService.d.ts +++ b/TypeScript/24WebSocket/types/services/ItemBaseClassService.d.ts @@ -1,7 +1,7 @@ -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; /** * Cache the baseids for each item in the tiems db inside a dictionary */ diff --git a/TypeScript/24WebSocket/types/services/ItemFilterService.d.ts b/TypeScript/24WebSocket/types/services/ItemFilterService.d.ts index fde948b..dea17d7 100644 --- a/TypeScript/24WebSocket/types/services/ItemFilterService.d.ts +++ b/TypeScript/24WebSocket/types/services/ItemFilterService.d.ts @@ -1,7 +1,7 @@ -import { IItemConfig } from "@spt/models/spt/config/IItemConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; /** Centralise the handling of blacklisting items, uses blacklist found in config/item.json, stores items that should not be used by players / broken items */ export declare class ItemFilterService { protected logger: ILogger; diff --git a/TypeScript/24WebSocket/types/services/LocaleService.d.ts b/TypeScript/24WebSocket/types/services/LocaleService.d.ts index 2326dcc..d51859d 100644 --- a/TypeScript/24WebSocket/types/services/LocaleService.d.ts +++ b/TypeScript/24WebSocket/types/services/LocaleService.d.ts @@ -1,7 +1,7 @@ -import { ILocaleConfig } from "@spt/models/spt/config/ILocaleConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { ILocaleConfig } from "@spt-aki/models/spt/config/ILocaleConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; /** * Handles getting locales from config or users machine */ diff --git a/TypeScript/24WebSocket/types/services/LocalisationService.d.ts b/TypeScript/24WebSocket/types/services/LocalisationService.d.ts index 42dfa4e..c12e465 100644 --- a/TypeScript/24WebSocket/types/services/LocalisationService.d.ts +++ b/TypeScript/24WebSocket/types/services/LocalisationService.d.ts @@ -1,8 +1,8 @@ import { I18n } from "i18n"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocaleService } from "@spt/services/LocaleService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocaleService } from "@spt-aki/services/LocaleService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handles translating server text into different langauges */ diff --git a/TypeScript/24WebSocket/types/services/MailSendService.d.ts b/TypeScript/24WebSocket/types/services/MailSendService.d.ts index 176e5f8..e5643f9 100644 --- a/TypeScript/24WebSocket/types/services/MailSendService.d.ts +++ b/TypeScript/24WebSocket/types/services/MailSendService.d.ts @@ -1,19 +1,19 @@ -import { DialogueHelper } from "@spt/helpers/DialogueHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; -import { NotifierHelper } from "@spt/helpers/NotifierHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, IUserDialogInfo, Message, MessageItems } from "@spt/models/eft/profile/ISptProfile"; -import { MessageType } from "@spt/models/enums/MessageType"; -import { Traders } from "@spt/models/enums/Traders"; -import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; +import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { Traders } from "@spt-aki/models/enums/Traders"; +import { IProfileChangeEvent, ISendMessageDetails } from "@spt-aki/models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class MailSendService { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/24WebSocket/types/services/MatchBotDetailsCacheService.d.ts index e899577..6521719 100644 --- a/TypeScript/24WebSocket/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/24WebSocket/types/services/MatchBotDetailsCacheService.d.ts @@ -1,6 +1,6 @@ -import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt ideal as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; diff --git a/TypeScript/24WebSocket/types/services/MatchLocationService.d.ts b/TypeScript/24WebSocket/types/services/MatchLocationService.d.ts index dafa99a..43a66be 100644 --- a/TypeScript/24WebSocket/types/services/MatchLocationService.d.ts +++ b/TypeScript/24WebSocket/types/services/MatchLocationService.d.ts @@ -1,5 +1,5 @@ -import { SaveServer } from "@spt/servers/SaveServer"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class MatchLocationService { protected timeUtil: TimeUtil; protected saveServer: SaveServer; diff --git a/TypeScript/24WebSocket/types/services/ModCompilerService.d.ts b/TypeScript/24WebSocket/types/services/ModCompilerService.d.ts index eb4298c..51508ac 100644 --- a/TypeScript/24WebSocket/types/services/ModCompilerService.d.ts +++ b/TypeScript/24WebSocket/types/services/ModCompilerService.d.ts @@ -1,7 +1,7 @@ -import { CompilerOptions } from "typescript"; -import type { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ModHashCacheService } from "@spt/services/cache/ModHashCacheService"; -import { VFS } from "@spt/utils/VFS"; +import ts from "typescript"; +import type { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ModHashCacheService } from "@spt-aki/services/cache/ModHashCacheService"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class ModCompilerService { protected logger: ILogger; protected modHashCacheService: ModHashCacheService; @@ -21,7 +21,7 @@ export declare class ModCompilerService { * @param fileNames Paths to TS files * @param options Compiler options */ - protected compile(fileNames: string[], options: CompilerOptions): Promise; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; /** * Do the files at the provided paths exist * @param fileNames diff --git a/TypeScript/24WebSocket/types/services/NotificationService.d.ts b/TypeScript/24WebSocket/types/services/NotificationService.d.ts index 69d895a..81cc13d 100644 --- a/TypeScript/24WebSocket/types/services/NotificationService.d.ts +++ b/TypeScript/24WebSocket/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; diff --git a/TypeScript/24WebSocket/types/services/OpenZoneService.d.ts b/TypeScript/24WebSocket/types/services/OpenZoneService.d.ts index 1bc5f00..d423a14 100644 --- a/TypeScript/24WebSocket/types/services/OpenZoneService.d.ts +++ b/TypeScript/24WebSocket/types/services/OpenZoneService.d.ts @@ -1,9 +1,9 @@ -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; diff --git a/TypeScript/24WebSocket/types/services/PaymentService.d.ts b/TypeScript/24WebSocket/types/services/PaymentService.d.ts index 8d77ae2..0df23b4 100644 --- a/TypeScript/24WebSocket/types/services/PaymentService.d.ts +++ b/TypeScript/24WebSocket/types/services/PaymentService.d.ts @@ -1,18 +1,18 @@ -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; -import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData"; +import { IProcessSellTradeRequestData } from "@spt-aki/models/eft/trade/IProcessSellTradeRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; export declare class PaymentService { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/services/PlayerService.d.ts b/TypeScript/24WebSocket/types/services/PlayerService.d.ts index ae57410..f24e0dc 100644 --- a/TypeScript/24WebSocket/types/services/PlayerService.d.ts +++ b/TypeScript/24WebSocket/types/services/PlayerService.d.ts @@ -1,8 +1,8 @@ -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class PlayerService { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/24WebSocket/types/services/PmcChatResponseService.d.ts b/TypeScript/24WebSocket/types/services/PmcChatResponseService.d.ts index cc172c0..1d38e2c 100644 --- a/TypeScript/24WebSocket/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/24WebSocket/types/services/PmcChatResponseService.d.ts @@ -1,15 +1,15 @@ -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 { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; -import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Aggressor, Victim } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IPmcChatResponse } from "@spt-aki/models/spt/config/IPmChatResponse"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PmcChatResponseService { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts index 18da0c0..26425ae 100644 --- a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts +++ b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts @@ -1,26 +1,26 @@ -import { HideoutHelper } from "@spt/helpers/HideoutHelper"; -import { InventoryHelper } from "@spt/helpers/InventoryHelper"; -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 { 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"; -import { ISptProfile, IEquipmentBuild, IMagazineBuild, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; -import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; -import { Watermark } from "@spt/utils/Watermark"; +import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; +import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Bonus, HideoutSlot } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea"; +import { IAkiProfile, IEquipmentBuild, IMagazineBuild, IWeaponBuild } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; +import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; @@ -58,7 +58,7 @@ export declare class ProfileFixerService { * Add tag to profile to indicate when it was made * @param fullProfile */ - addMissingSptVersionTagToProfile(fullProfile: ISptProfile): void; + addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; /** * TODO - make this non-public - currently used by RepeatableQuestController * Remove unused condition counters @@ -121,7 +121,7 @@ export declare class ProfileFixerService { * @param sessionId Session id * @param pmcProfile Profile to check inventory of */ - checkForOrphanedModdedItems(sessionId: string, fullProfile: ISptProfile): void; + checkForOrphanedModdedItems(sessionId: string, fullProfile: IAkiProfile): void; /** * @param buildType The type of build, used for logging only * @param build The build to check for invalid items @@ -149,7 +149,7 @@ export declare class ProfileFixerService { * Iterate over associated profile template and check all hideout areas exist, add if not * @param fullProfile Profile to update */ - addMissingHideoutAreasToProfile(fullProfile: ISptProfile): void; + addMissingHideoutAreasToProfile(fullProfile: IAkiProfile): void; /** * These used to be used for storing scav case rewards, rewards are now generated on pickup * @param pmcProfile Profile to update @@ -160,12 +160,12 @@ export declare class ProfileFixerService { * We store the old AID value in new field `sessionId` * @param fullProfile Profile to update */ - fixIncorrectAidValue(fullProfile: ISptProfile): void; + fixIncorrectAidValue(fullProfile: IAkiProfile): void; /** * Bsg nested `stats` into a sub object called 'eft' * @param fullProfile Profile to check for and migrate stats data */ - migrateStatsToNewStructure(fullProfile: ISptProfile): void; + migrateStatsToNewStructure(fullProfile: IAkiProfile): void; /** * 26126 (7th August) requires bonuses to have an ID, these were not included in the default profile presets * @param pmcProfile Profile to add missing IDs to diff --git a/TypeScript/24WebSocket/types/services/ProfileSnapshotService.d.ts b/TypeScript/24WebSocket/types/services/ProfileSnapshotService.d.ts index 5bb718b..652bc92 100644 --- a/TypeScript/24WebSocket/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/24WebSocket/types/services/ProfileSnapshotService.d.ts @@ -1,21 +1,21 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { protected cloner: ICloner; - protected storedProfileSnapshots: Record; + protected storedProfileSnapshots: Record; constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key * @param profile - profile to save */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; + storeProfileSnapshot(sessionID: string, profile: IAkiProfile): void; /** * Retreve a stored profile * @param sessionID key * @returns A player profile object */ - getProfileSnapshot(sessionID: string): ISptProfile; + getProfileSnapshot(sessionID: string): IAkiProfile; /** * Does a profile exists against the provided key * @param sessionID key diff --git a/TypeScript/24WebSocket/types/services/RagfairCategoriesService.d.ts b/TypeScript/24WebSocket/types/services/RagfairCategoriesService.d.ts index c1ecb2d..ef40275 100644 --- a/TypeScript/24WebSocket/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/24WebSocket/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; export declare class RagfairCategoriesService { protected logger: ILogger; protected paymentHelper: PaymentHelper; diff --git a/TypeScript/24WebSocket/types/services/RagfairLinkedItemService.d.ts b/TypeScript/24WebSocket/types/services/RagfairLinkedItemService.d.ts index 6011c1a..3d607ac 100644 --- a/TypeScript/24WebSocket/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/24WebSocket/types/services/RagfairLinkedItemService.d.ts @@ -1,6 +1,6 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; export declare class RagfairLinkedItemService { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; diff --git a/TypeScript/24WebSocket/types/services/RagfairOfferService.d.ts b/TypeScript/24WebSocket/types/services/RagfairOfferService.d.ts index 04d5265..80bf353 100644 --- a/TypeScript/24WebSocket/types/services/RagfairOfferService.d.ts +++ b/TypeScript/24WebSocket/types/services/RagfairOfferService.d.ts @@ -1,17 +1,17 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; -import { RagfairOfferHolder } from "@spt/utils/RagfairOfferHolder"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; +import { RagfairOfferHolder } from "@spt-aki/utils/RagfairOfferHolder"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferService { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/24WebSocket/types/services/RagfairPriceService.d.ts b/TypeScript/24WebSocket/types/services/RagfairPriceService.d.ts index 5b8fa56..f89967c 100644 --- a/TypeScript/24WebSocket/types/services/RagfairPriceService.d.ts +++ b/TypeScript/24WebSocket/types/services/RagfairPriceService.d.ts @@ -1,20 +1,20 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { HandbookHelper } from "@spt/helpers/HandbookHelper"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -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 { Item } from "@spt/models/eft/common/tables/IItem"; -import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairConfig, IUnreasonableModPrices } from "@spt/models/spt/config/IRagfairConfig"; -import { IRagfairServerPrices } from "@spt/models/spt/ragfair/IRagfairServerPrices"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; +import { HandbookItem } from "@spt-aki/models/eft/common/tables/IHandbookBase"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader"; +import { IRagfairConfig, IUnreasonableModPrices } from "@spt-aki/models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "@spt-aki/models/spt/ragfair/IRagfairServerPrices"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -29,6 +29,8 @@ export declare class RagfairPriceService implements OnLoad { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected generatedDynamicPrices: boolean; + protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** @@ -39,11 +41,11 @@ export declare class RagfairPriceService implements OnLoad { /** * Iterate over all items of type "Item" in db and get template price, store in cache */ - refreshStaticPrices(): void; + generateStaticPrices(): void; /** - * Copy the prices.json data into our dynamic price dictionary + * Create a dictionary and store prices from prices.json in it */ - refreshDynamicPrices(): void; + generateDynamicPrices(): void; /** * Get the dynamic price for an item. If value doesn't exist, use static (handbook) value. * if no static value, return 1 @@ -59,6 +61,7 @@ export declare class RagfairPriceService implements OnLoad { getFleaPriceForOfferItems(offerItems: Item[]): number; /** * get the dynamic (flea) price for an item + * Grabs prices from prices.json and stores in class if none currently exist * @param itemTpl item template id to look up * @returns price in roubles */ @@ -71,7 +74,6 @@ export declare class RagfairPriceService implements OnLoad { getStaticPriceForItem(itemTpl: string): number; /** * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing - * This will refresh the caches prior to building the output * @returns Dictionary of item tpls and rouble cost */ getAllFleaPrices(): Record; diff --git a/TypeScript/24WebSocket/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/24WebSocket/types/services/RagfairRequiredItemsService.d.ts index cfc224d..6749c68 100644 --- a/TypeScript/24WebSocket/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/24WebSocket/types/services/RagfairRequiredItemsService.d.ts @@ -1,7 +1,7 @@ -import { PaymentHelper } from "@spt/helpers/PaymentHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { RagfairOfferService } from "@spt/services/RagfairOfferService"; +import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; export declare class RagfairRequiredItemsService { protected logger: ILogger; protected paymentHelper: PaymentHelper; diff --git a/TypeScript/24WebSocket/types/services/RagfairTaxService.d.ts b/TypeScript/24WebSocket/types/services/RagfairTaxService.d.ts index 4e4e648..dd9cc5f 100644 --- a/TypeScript/24WebSocket/types/services/RagfairTaxService.d.ts +++ b/TypeScript/24WebSocket/types/services/RagfairTaxService.d.ts @@ -1,11 +1,11 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IStorePlayerOfferTaxAmountRequestData } from "@spt/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RagfairPriceService } from "@spt/services/RagfairPriceService"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IStorePlayerOfferTaxAmountRequestData } from "@spt-aki/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; export declare class RagfairTaxService { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/services/RaidTimeAdjustmentService.d.ts b/TypeScript/24WebSocket/types/services/RaidTimeAdjustmentService.d.ts index e2a4237..a2a223a 100644 --- a/TypeScript/24WebSocket/types/services/RaidTimeAdjustmentService.d.ts +++ b/TypeScript/24WebSocket/types/services/RaidTimeAdjustmentService.d.ts @@ -1,14 +1,14 @@ -import { ApplicationContext } from "@spt/context/ApplicationContext"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -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 { ILocationConfig, IScavRaidTimeLocationSettings, LootMultiplier } 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"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; +import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; +import { ExtractChange, IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; +import { ILocationConfig, IScavRaidTimeLocationSettings, LootMultiplier } from "@spt-aki/models/spt/config/ILocationConfig"; +import { IRaidChanges } from "@spt-aki/models/spt/location/IRaidChanges"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RaidTimeAdjustmentService { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/services/RepairService.d.ts b/TypeScript/24WebSocket/types/services/RepairService.d.ts index 9203417..cc90eee 100644 --- a/TypeScript/24WebSocket/types/services/RepairService.d.ts +++ b/TypeScript/24WebSocket/types/services/RepairService.d.ts @@ -1,23 +1,23 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { RepairHelper } from "@spt/helpers/RepairHelper"; -import { TraderHelper } from "@spt/helpers/TraderHelper"; -import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; -import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Item } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; -import { BonusType } from "@spt/models/enums/BonusType"; -import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { PaymentService } from "@spt/services/PaymentService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { RepairHelper } from "@spt-aki/helpers/RepairHelper"; +import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; +import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; +import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest"; +import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest"; +import { BonusType } from "@spt-aki/models/enums/BonusType"; +import { SkillTypes } from "@spt-aki/models/enums/SkillTypes"; +import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { PaymentService } from "@spt-aki/services/PaymentService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairService { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts index 4162e14..ecb34fa 100644 --- a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts +++ b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts @@ -1,19 +1,19 @@ -import { BotHelper } from "@spt/helpers/BotHelper"; -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { IConfig } from "@spt/models/eft/common/IGlobals"; -import { Inventory } from "@spt/models/eft/common/tables/IBotType"; -import { Season } from "@spt/models/enums/Season"; -import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; -import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { GiftService } from "@spt/services/GiftService"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { DatabaseImporter } from "@spt/utils/DatabaseImporter"; +import { BotHelper } from "@spt-aki/helpers/BotHelper"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; +import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; +import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; +import { ISeasonalEvent, ISeasonalEventConfig } from "@spt-aki/models/spt/config/ISeasonalEventConfig"; +import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { GiftService } from "@spt-aki/services/GiftService"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { DatabaseImporter } from "@spt-aki/utils/DatabaseImporter"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/24WebSocket/types/services/TraderAssortService.d.ts b/TypeScript/24WebSocket/types/services/TraderAssortService.d.ts index 48af0b7..9130de6 100644 --- a/TypeScript/24WebSocket/types/services/TraderAssortService.d.ts +++ b/TypeScript/24WebSocket/types/services/TraderAssortService.d.ts @@ -1,4 +1,4 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; +import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader"; export declare class TraderAssortService { protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; diff --git a/TypeScript/24WebSocket/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/24WebSocket/types/services/TraderPurchasePersisterService.d.ts index 0ad76c9..92aaec3 100644 --- a/TypeScript/24WebSocket/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/24WebSocket/types/services/TraderPurchasePersisterService.d.ts @@ -1,11 +1,11 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; -import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { RandomUtil } from "@spt/utils/RandomUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { TraderPurchaseData } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ diff --git a/TypeScript/24WebSocket/types/services/TraderServicesService.d.ts b/TypeScript/24WebSocket/types/services/TraderServicesService.d.ts index 111c71a..cfad219 100644 --- a/TypeScript/24WebSocket/types/services/TraderServicesService.d.ts +++ b/TypeScript/24WebSocket/types/services/TraderServicesService.d.ts @@ -1,8 +1,8 @@ -import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ICloner } from "@spt/utils/cloners/ICloner"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; protected logger: ILogger; diff --git a/TypeScript/24WebSocket/types/services/cache/BundleHashCacheService.d.ts b/TypeScript/24WebSocket/types/services/cache/BundleHashCacheService.d.ts index f8289c2..00f5e4c 100644 --- a/TypeScript/24WebSocket/types/services/cache/BundleHashCacheService.d.ts +++ b/TypeScript/24WebSocket/types/services/cache/BundleHashCacheService.d.ts @@ -1,7 +1,7 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleHashCacheService { protected vfs: VFS; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/services/cache/ModHashCacheService.d.ts b/TypeScript/24WebSocket/types/services/cache/ModHashCacheService.d.ts index 3cb8ff8..dd33640 100644 --- a/TypeScript/24WebSocket/types/services/cache/ModHashCacheService.d.ts +++ b/TypeScript/24WebSocket/types/services/cache/ModHashCacheService.d.ts @@ -1,7 +1,7 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class ModHashCacheService { protected vfs: VFS; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/services/mod/CustomItemService.d.ts b/TypeScript/24WebSocket/types/services/mod/CustomItemService.d.ts index 0c82e8b..8af560d 100644 --- a/TypeScript/24WebSocket/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/24WebSocket/types/services/mod/CustomItemService.d.ts @@ -1,12 +1,12 @@ -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; -import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; -import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { HashUtil } from "@spt/utils/HashUtil"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; +import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt-aki/models/spt/mod/NewItemDetails"; +import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts b/TypeScript/24WebSocket/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts index bb969b3..5eed5b4 100644 --- a/TypeScript/24WebSocket/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts +++ b/TypeScript/24WebSocket/types/services/mod/dynamicRouter/DynamicRouterMod.d.ts @@ -1,4 +1,4 @@ -import { DynamicRouter, RouteAction } from "@spt/di/Router"; +import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; export declare class DynamicRouterMod extends DynamicRouter { private topLevelRoute; constructor(routes: RouteAction[], topLevelRoute: string); diff --git a/TypeScript/24WebSocket/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts b/TypeScript/24WebSocket/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts index 3c9d955..648d191 100644 --- a/TypeScript/24WebSocket/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts +++ b/TypeScript/24WebSocket/types/services/mod/dynamicRouter/DynamicRouterModService.d.ts @@ -1,5 +1,5 @@ import { DependencyContainer } from "tsyringe"; -import { RouteAction } from "@spt/di/Router"; +import { RouteAction } from "@spt-aki/di/Router"; export declare class DynamicRouterModService { private container; constructor(container: DependencyContainer); diff --git a/TypeScript/24WebSocket/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/24WebSocket/types/services/mod/httpListener/HttpListenerMod.d.ts index 75e42ee..723b78d 100644 --- a/TypeScript/24WebSocket/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/24WebSocket/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -1,6 +1,6 @@ /// import { IncomingMessage, ServerResponse } from "node:http"; -import { IHttpListener } from "@spt/servers/http/IHttpListener"; +import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; export declare class HttpListenerMod implements IHttpListener { private canHandleOverride; private handleOverride; diff --git a/TypeScript/24WebSocket/types/services/mod/onLoad/OnLoadMod.d.ts b/TypeScript/24WebSocket/types/services/mod/onLoad/OnLoadMod.d.ts index 6544704..2bd5a31 100644 --- a/TypeScript/24WebSocket/types/services/mod/onLoad/OnLoadMod.d.ts +++ b/TypeScript/24WebSocket/types/services/mod/onLoad/OnLoadMod.d.ts @@ -1,4 +1,4 @@ -import { OnLoad } from "@spt/di/OnLoad"; +import { OnLoad } from "@spt-aki/di/OnLoad"; export declare class OnLoadMod implements OnLoad { private onLoadOverride; private getRouteOverride; diff --git a/TypeScript/24WebSocket/types/services/mod/onUpdate/OnUpdateMod.d.ts b/TypeScript/24WebSocket/types/services/mod/onUpdate/OnUpdateMod.d.ts index 3a8a26f..bef1d1c 100644 --- a/TypeScript/24WebSocket/types/services/mod/onUpdate/OnUpdateMod.d.ts +++ b/TypeScript/24WebSocket/types/services/mod/onUpdate/OnUpdateMod.d.ts @@ -1,4 +1,4 @@ -import { OnUpdate } from "@spt/di/OnUpdate"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; export declare class OnUpdateMod implements OnUpdate { private onUpdateOverride; private getRouteOverride; diff --git a/TypeScript/24WebSocket/types/services/mod/staticRouter/StaticRouterMod.d.ts b/TypeScript/24WebSocket/types/services/mod/staticRouter/StaticRouterMod.d.ts index 48bf4a1..e01aaab 100644 --- a/TypeScript/24WebSocket/types/services/mod/staticRouter/StaticRouterMod.d.ts +++ b/TypeScript/24WebSocket/types/services/mod/staticRouter/StaticRouterMod.d.ts @@ -1,4 +1,4 @@ -import { RouteAction, StaticRouter } from "@spt/di/Router"; +import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; export declare class StaticRouterMod extends StaticRouter { private topLevelRoute; constructor(routes: RouteAction[], topLevelRoute: string); diff --git a/TypeScript/24WebSocket/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/24WebSocket/types/services/mod/staticRouter/StaticRouterModService.d.ts index f60432d..775caae 100644 --- a/TypeScript/24WebSocket/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/24WebSocket/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,5 +1,5 @@ import { DependencyContainer } from "tsyringe"; -import { RouteAction } from "@spt/di/Router"; +import { RouteAction } from "@spt-aki/di/Router"; export declare class StaticRouterModService { protected container: DependencyContainer; constructor(container: DependencyContainer); diff --git a/TypeScript/24WebSocket/types/utils/App.d.ts b/TypeScript/24WebSocket/types/utils/App.d.ts index 211044e..12a29bd 100644 --- a/TypeScript/24WebSocket/types/utils/App.d.ts +++ b/TypeScript/24WebSocket/types/utils/App.d.ts @@ -1,12 +1,12 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { OnUpdate } from "@spt/di/OnUpdate"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { HttpServer } from "@spt/servers/HttpServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { EncodingUtil } from "@spt/utils/EncodingUtil"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { OnUpdate } from "@spt-aki/di/OnUpdate"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { HttpServer } from "@spt-aki/servers/HttpServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { EncodingUtil } from "@spt-aki/utils/EncodingUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/24WebSocket/types/utils/AsyncQueue.d.ts b/TypeScript/24WebSocket/types/utils/AsyncQueue.d.ts index a14181d..2fab517 100644 --- a/TypeScript/24WebSocket/types/utils/AsyncQueue.d.ts +++ b/TypeScript/24WebSocket/types/utils/AsyncQueue.d.ts @@ -1,5 +1,5 @@ -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { ICommand } from "@spt/models/spt/utils/ICommand"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; +import { ICommand } from "@spt-aki/models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { protected commandsQueue: ICommand[]; constructor(); diff --git a/TypeScript/24WebSocket/types/utils/DatabaseImporter.d.ts b/TypeScript/24WebSocket/types/utils/DatabaseImporter.d.ts index 4005d46..f8218bf 100644 --- a/TypeScript/24WebSocket/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/24WebSocket/types/utils/DatabaseImporter.d.ts @@ -1,15 +1,15 @@ -import { OnLoad } from "@spt/di/OnLoad"; -import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ImageRouter } from "@spt/routers/ImageRouter"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { EncodingUtil } from "@spt/utils/EncodingUtil"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { ImporterUtil } from "@spt/utils/ImporterUtil"; -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { OnLoad } from "@spt-aki/di/OnLoad"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ImageRouter } from "@spt-aki/routers/ImageRouter"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { EncodingUtil } from "@spt-aki/utils/EncodingUtil"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { ImporterUtil } from "@spt-aki/utils/ImporterUtil"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class DatabaseImporter implements OnLoad { protected logger: ILogger; protected vfs: VFS; @@ -27,7 +27,7 @@ export declare class DatabaseImporter implements OnLoad { protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); /** - * Get path to spt data + * Get path to aki data * @returns path to data */ getSptDataPath(): string; diff --git a/TypeScript/24WebSocket/types/utils/HashUtil.d.ts b/TypeScript/24WebSocket/types/utils/HashUtil.d.ts index 427c186..d428072 100644 --- a/TypeScript/24WebSocket/types/utils/HashUtil.d.ts +++ b/TypeScript/24WebSocket/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ /// import crypto from "node:crypto"; import fs from "node:fs"; -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HashUtil { protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); diff --git a/TypeScript/24WebSocket/types/utils/HttpFileUtil.d.ts b/TypeScript/24WebSocket/types/utils/HttpFileUtil.d.ts index cc0d9ef..222d204 100644 --- a/TypeScript/24WebSocket/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/24WebSocket/types/utils/HttpFileUtil.d.ts @@ -1,6 +1,6 @@ /// import { ServerResponse } from "node:http"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; +import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); diff --git a/TypeScript/24WebSocket/types/utils/HttpResponseUtil.d.ts b/TypeScript/24WebSocket/types/utils/HttpResponseUtil.d.ts index 865c8e5..318e98b 100644 --- a/TypeScript/24WebSocket/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/24WebSocket/types/utils/HttpResponseUtil.d.ts @@ -1,9 +1,9 @@ -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { BackendErrorCodes } from "@spt/models/enums/BackendErrorCodes"; -import { LocalisationService } from "@spt/services/LocalisationService"; -import { JsonUtil } from "@spt/utils/JsonUtil"; +import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; +import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; +import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; +import { BackendErrorCodes } from "@spt-aki/models/enums/BackendErrorCodes"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HttpResponseUtil { protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; diff --git a/TypeScript/24WebSocket/types/utils/ImporterUtil.d.ts b/TypeScript/24WebSocket/types/utils/ImporterUtil.d.ts index c36bcb5..7ce1bdb 100644 --- a/TypeScript/24WebSocket/types/utils/ImporterUtil.d.ts +++ b/TypeScript/24WebSocket/types/utils/ImporterUtil.d.ts @@ -1,5 +1,5 @@ -import { JsonUtil } from "@spt/utils/JsonUtil"; -import { VFS } from "@spt/utils/VFS"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class ImporterUtil { protected vfs: VFS; protected jsonUtil: JsonUtil; diff --git a/TypeScript/24WebSocket/types/utils/JsonUtil.d.ts b/TypeScript/24WebSocket/types/utils/JsonUtil.d.ts index b59b0f9..091aba2 100644 --- a/TypeScript/24WebSocket/types/utils/JsonUtil.d.ts +++ b/TypeScript/24WebSocket/types/utils/JsonUtil.d.ts @@ -1,7 +1,7 @@ import { IParseOptions, IStringifyOptions, Reviver } from "jsonc/lib/interfaces"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { HashUtil } from "@spt/utils/HashUtil"; -import { VFS } from "@spt/utils/VFS"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; +import { VFS } from "@spt-aki/utils/VFS"; export declare class JsonUtil { protected vfs: VFS; protected hashUtil: HashUtil; diff --git a/TypeScript/24WebSocket/types/utils/ObjectId.d.ts b/TypeScript/24WebSocket/types/utils/ObjectId.d.ts index 91f64d3..309354f 100644 --- a/TypeScript/24WebSocket/types/utils/ObjectId.d.ts +++ b/TypeScript/24WebSocket/types/utils/ObjectId.d.ts @@ -1,5 +1,5 @@ /// -import { TimeUtil } from "@spt/utils/TimeUtil"; +import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class ObjectId { protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); diff --git a/TypeScript/24WebSocket/types/utils/RagfairOfferHolder.d.ts b/TypeScript/24WebSocket/types/utils/RagfairOfferHolder.d.ts index 20f54a9..b95e54a 100644 --- a/TypeScript/24WebSocket/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/24WebSocket/types/utils/RagfairOfferHolder.d.ts @@ -1,5 +1,5 @@ -import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; -import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; +import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { protected maxOffersPerTemplate: number; protected ragfairServerHelper: RagfairServerHelper; diff --git a/TypeScript/24WebSocket/types/utils/RandomUtil.d.ts b/TypeScript/24WebSocket/types/utils/RandomUtil.d.ts index 1cee659..39fe482 100644 --- a/TypeScript/24WebSocket/types/utils/RandomUtil.d.ts +++ b/TypeScript/24WebSocket/types/utils/RandomUtil.d.ts @@ -1,6 +1,6 @@ -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -import { MathUtil } from "@spt/utils/MathUtil"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; +import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects * based on the relative probability of each of its elements. diff --git a/TypeScript/24WebSocket/types/utils/VFS.d.ts b/TypeScript/24WebSocket/types/utils/VFS.d.ts index 20f428a..d880bf5 100644 --- a/TypeScript/24WebSocket/types/utils/VFS.d.ts +++ b/TypeScript/24WebSocket/types/utils/VFS.d.ts @@ -2,7 +2,7 @@ /// import "reflect-metadata"; import fs from "node:fs"; -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; export declare class VFS { protected asyncQueue: IAsyncQueue; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; diff --git a/TypeScript/24WebSocket/types/utils/Watermark.d.ts b/TypeScript/24WebSocket/types/utils/Watermark.d.ts index 27b5b03..eb24706 100644 --- a/TypeScript/24WebSocket/types/utils/Watermark.d.ts +++ b/TypeScript/24WebSocket/types/utils/Watermark.d.ts @@ -1,7 +1,7 @@ -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { LocalisationService } from "@spt/services/LocalisationService"; +import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; export declare class WatermarkLocale { protected localisationService: LocalisationService; protected description: string[]; @@ -17,7 +17,7 @@ export declare class Watermark { protected configServer: ConfigServer; protected localisationService: LocalisationService; protected watermarkLocale?: WatermarkLocale; - protected sptConfig: ICoreConfig; + protected akiConfig: ICoreConfig; protected text: string[]; protected versionLabel: string; constructor(logger: ILogger, configServer: ConfigServer, localisationService: LocalisationService, watermarkLocale?: WatermarkLocale); diff --git a/TypeScript/24WebSocket/types/utils/cloners/JsonCloner.d.ts b/TypeScript/24WebSocket/types/utils/cloners/JsonCloner.d.ts index 130dadb..2353d90 100644 --- a/TypeScript/24WebSocket/types/utils/cloners/JsonCloner.d.ts +++ b/TypeScript/24WebSocket/types/utils/cloners/JsonCloner.d.ts @@ -1,4 +1,4 @@ -import type { ICloner } from "@spt/utils/cloners/ICloner"; +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class JsonCloner implements ICloner { clone(obj: T): T; } diff --git a/TypeScript/24WebSocket/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/24WebSocket/types/utils/cloners/RecursiveCloner.d.ts index 9ea2882..e38fbe5 100644 --- a/TypeScript/24WebSocket/types/utils/cloners/RecursiveCloner.d.ts +++ b/TypeScript/24WebSocket/types/utils/cloners/RecursiveCloner.d.ts @@ -1,4 +1,4 @@ -import type { ICloner } from "@spt/utils/cloners/ICloner"; +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RecursiveCloner implements ICloner { private static primitives; clone(obj: T): T; diff --git a/TypeScript/24WebSocket/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/24WebSocket/types/utils/cloners/StructuredCloner.d.ts index 6401443..789cb6d 100644 --- a/TypeScript/24WebSocket/types/utils/cloners/StructuredCloner.d.ts +++ b/TypeScript/24WebSocket/types/utils/cloners/StructuredCloner.d.ts @@ -1,4 +1,4 @@ -import type { ICloner } from "@spt/utils/cloners/ICloner"; +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class StructuredCloner implements ICloner { clone(obj: T): T; } diff --git a/TypeScript/24WebSocket/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/24WebSocket/types/utils/logging/AbstractWinstonLogger.d.ts index 7098f85..05d5afe 100644 --- a/TypeScript/24WebSocket/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/24WebSocket/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,12 +1,12 @@ /// import fs from "node:fs"; import winston from "winston"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; -import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; -import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; -import { SptLogger } from "@spt/models/spt/logging/SptLogger"; -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { Daum } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; +import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor"; +import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; +import { SptLogger } from "@spt-aki/models/spt/logging/SptLogger"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; export declare abstract class AbstractWinstonLogger implements ILogger { protected asyncQueue: IAsyncQueue; protected showDebugInConsole: boolean; diff --git a/TypeScript/24WebSocket/types/utils/logging/WinstonMainLogger.d.ts b/TypeScript/24WebSocket/types/utils/logging/WinstonMainLogger.d.ts index 8a634b2..53cd9d3 100644 --- a/TypeScript/24WebSocket/types/utils/logging/WinstonMainLogger.d.ts +++ b/TypeScript/24WebSocket/types/utils/logging/WinstonMainLogger.d.ts @@ -1,5 +1,5 @@ -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { AbstractWinstonLogger } from "@spt/utils/logging/AbstractWinstonLogger"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; +import { AbstractWinstonLogger } from "@spt-aki/utils/logging/AbstractWinstonLogger"; export declare class WinstonMainLogger extends AbstractWinstonLogger { protected asyncQueue: IAsyncQueue; constructor(asyncQueue: IAsyncQueue); diff --git a/TypeScript/24WebSocket/types/utils/logging/WinstonRequestLogger.d.ts b/TypeScript/24WebSocket/types/utils/logging/WinstonRequestLogger.d.ts index 0988b6f..45bc436 100644 --- a/TypeScript/24WebSocket/types/utils/logging/WinstonRequestLogger.d.ts +++ b/TypeScript/24WebSocket/types/utils/logging/WinstonRequestLogger.d.ts @@ -1,5 +1,5 @@ -import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue"; -import { AbstractWinstonLogger } from "@spt/utils/logging/AbstractWinstonLogger"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; +import { AbstractWinstonLogger } from "@spt-aki/utils/logging/AbstractWinstonLogger"; export declare class WinstonRequestLogger extends AbstractWinstonLogger { protected asyncQueue: IAsyncQueue; constructor(asyncQueue: IAsyncQueue); diff --git a/TypeScript/2EditDatabase/README.md b/TypeScript/2EditDatabase/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/2EditDatabase/README.md +++ b/TypeScript/2EditDatabase/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/2EditDatabase/package.json b/TypeScript/2EditDatabase/package.json index e17f37d..c044a70 100644 --- a/TypeScript/2EditDatabase/package.json +++ b/TypeScript/2EditDatabase/package.json @@ -1,7 +1,7 @@ { "name": "EditDatabase", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/2EditDatabase/src/mod.ts b/TypeScript/2EditDatabase/src/mod.ts index 7d2bfb8..651c628 100644 --- a/TypeScript/2EditDatabase/src/mod.ts +++ b/TypeScript/2EditDatabase/src/mod.ts @@ -1,58 +1,54 @@ import { DependencyContainer } from "tsyringe"; -import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod"; -import { DatabaseService } from "@spt/services/DatabaseService"; -import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { BaseClasses } from "@spt/models/enums/BaseClasses"; +import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; +import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; +import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; -class Mod implements IPostDBLoadMod { +class Mod implements IPostDBLoadMod +{ public postDBLoad(container: DependencyContainer): void { - // Get database service from server - const databaseService = container.resolve("DatabaseService"); + // get database from server + const databaseServer = container.resolve("DatabaseServer"); - // Get all the in-memory item data found in /assets/database/templates/items.json - const itemsInDb = databaseService.getItems(); + // Get all the in-memory json found in /assets/database + const tables: IDatabaseTables = databaseServer.getTables(); - // ------------------------------------------------------------------ - // Example #1 - // Make the LedX item sellable on flea market + // --------------------------------------------------------- + // example #1 + // Make the LEDX item sellable on flea market - // Find the LedX item by its Id - const ledx = itemsInDb["5c0530ee86f774697952d952"]; // The long string of characters is the ledx Id, you can find these Ids via: https://db.sp-tarkov.com/search + // Find the ledx item by its Id + const ledx = tables.templates.items["5c0530ee86f774697952d952"]; - // Update the LedX `CanSellOnRagfair` property to be true - // This will alter ALL LedX items + // Update one of its properties to be true ledx._props.CanSellOnRagfair = true; - // ------------------------------------------------------------------ - // Example #2 - // Set flea market min level to be 1 for all players + // --------------------------------------------------------- + // example #2 + // Get globals settings and set flea market min level to be 1 + tables.globals.config.RagFair.minUserLevel = 1; - // Get globals data from database - const globals = databaseService.getGlobals(); - - // Set ragfair property `minUserLevel` to 1 - globals.config.RagFair.minUserLevel = 1; - - // ------------------------------------------------------------------ + // --------------------------------------------------------- // Example #3 - // Loop over all magazines in database and make them weigh nothing + // Loop over all magazines and make them weigh nothing - // Prepare the ItemHelper class so we can use it + // Get ItemHelper ready to use const itemHelper: ItemHelper = container.resolve("ItemHelper"); // Get all items in the database as an array so we can loop over them later - // `databaseService.getItems()` returns a dictionary, the key being the items template id, the value being the item itself, - // We want to convert it into an array so we can loop over all the items easily + // tables.templates.items is a dictionary, the key being the items template id, the value being the objects data, + // we want to convert it into an array so we can loop over all the items easily // Object.values lets us grab the 'value' part as an array and ignore the 'key' part - const items = Object.values(itemsInDb); + const items = Object.values(tables.templates.items); - // Use the `ItemHelper` class to assist us in getting only magazines + // Use the itemHelper class to assist us in getting only magazines // We are filtering all items to only those with a base class of MAGAZINE (5448bc234bdc2d3c308b4569) const magazines = items.filter(x => itemHelper.isOfBaseclass(x._id, BaseClasses.MAGAZINE)); - // Loop over all the magazines we found using above code + // Loop over all the magazines the above code found for (const magazine of magazines) { // Check the magazine has a weight property before we edit it @@ -62,17 +58,6 @@ class Mod implements IPostDBLoadMod { magazine._props.Weight = 0; } } - - // ------------------------------------------------------------------ - // Example #4 - // Adjust the red keycards flea price to be one million - - // Get all flea prices - // The prices are stored as a dictionary too, the key is the items ID, the value is the rouble price - const fleaPrices = databaseService.getPrices(); - - // Edit the red keycard price - fleaPrices["5c1d0efb86f7744baf2e7b7b"] = 1000000; // We can use this site to find item Ids: https://db.sp-tarkov.com/search } } diff --git a/TypeScript/2EditDatabase/tsconfig.json b/TypeScript/2EditDatabase/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/2EditDatabase/tsconfig.json +++ b/TypeScript/2EditDatabase/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts b/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/2EditDatabase/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/2EditDatabase/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/ILocation.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/2EditDatabase/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/2EditDatabase/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/2EditDatabase/types/models/enums/ModSpawn.d.ts b/TypeScript/2EditDatabase/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/2EditDatabase/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/2EditDatabase/types/models/enums/NotificationEventType.d.ts b/TypeScript/2EditDatabase/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/2EditDatabase/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/2EditDatabase/types/models/enums/SkillTypes.d.ts b/TypeScript/2EditDatabase/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/2EditDatabase/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/2EditDatabase/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/2EditDatabase/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/2EditDatabase/types/models/spt/services/LootRequest.d.ts b/TypeScript/2EditDatabase/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/2EditDatabase/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts b/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/2EditDatabase/types/servers/WebSocketServer.d.ts b/TypeScript/2EditDatabase/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/2EditDatabase/types/servers/WebSocketServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/2EditDatabase/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/2EditDatabase/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/2EditDatabase/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/2EditDatabase/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/2EditDatabase/types/services/DatabaseService.d.ts b/TypeScript/2EditDatabase/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/2EditDatabase/types/services/DatabaseService.d.ts +++ b/TypeScript/2EditDatabase/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/2EditDatabase/types/services/FenceService.d.ts b/TypeScript/2EditDatabase/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/2EditDatabase/types/services/FenceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/3GetSptConfigFile/README.md b/TypeScript/3GetSptConfigFile/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/3GetSptConfigFile/README.md +++ b/TypeScript/3GetSptConfigFile/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/3GetSptConfigFile/package.json b/TypeScript/3GetSptConfigFile/package.json index 25db4a1..fdc26ad 100644 --- a/TypeScript/3GetSptConfigFile/package.json +++ b/TypeScript/3GetSptConfigFile/package.json @@ -1,7 +1,7 @@ { "name": "GetSptConfigFile", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/3GetSptConfigFile/src/mod.ts b/TypeScript/3GetSptConfigFile/src/mod.ts index 05d1a16..a4b444b 100644 --- a/TypeScript/3GetSptConfigFile/src/mod.ts +++ b/TypeScript/3GetSptConfigFile/src/mod.ts @@ -1,29 +1,29 @@ import { DependencyContainer } from "tsyringe"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; +import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; -class Mod implements IPostSptLoadMod +class Mod implements IPostAkiLoadMod { - public postSptLoad(container: DependencyContainer): void + public postAkiLoad(container: DependencyContainer): void { // get logger - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); // get the config server so we can get a config with it const configServer = container.resolve("ConfigServer"); // Request the map location config - // Required - ConfigTypes.LOCATION is the enum of the config we want, others include ConfigTypes.AIRDROP/ConfigTypes.IN_RAID/ConfigTypes.BOT + // Required - ConfigTypes.LOCATION is the enum of the config we want, others include ConfigTypes.Airdrop const locationConfig: ILocationConfig = configServer.getConfig(ConfigTypes.LOCATION); // Log the original customs loose loot multipler logger.info(`Here is the original customs map loose loot multipler: ${locationConfig.looseLootMultiplier.bigmap}`); - // Adjust the multipler (BSGs internal name for `Customs` is `bigmap`) + // Adjust the multipler (customs is called bigmap in bsg land) locationConfig.looseLootMultiplier.bigmap = 10; // Log the new multipler diff --git a/TypeScript/3GetSptConfigFile/tsconfig.json b/TypeScript/3GetSptConfigFile/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/3GetSptConfigFile/tsconfig.json +++ b/TypeScript/3GetSptConfigFile/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/3GetSptConfigFile/types/helpers/PresetHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/PresetHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocation.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/ModSpawn.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/NotificationEventType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/SkillTypes.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/services/LootRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/servers/SaveServer.d.ts b/TypeScript/3GetSptConfigFile/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/SaveServer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/3GetSptConfigFile/types/servers/WebSocketServer.d.ts b/TypeScript/3GetSptConfigFile/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/WebSocketServer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/3GetSptConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/3GetSptConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/3GetSptConfigFile/types/services/DatabaseService.d.ts b/TypeScript/3GetSptConfigFile/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/3GetSptConfigFile/types/services/DatabaseService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/README.md b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/README.md +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/package.json b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/package.json index f64022f..b28fa8d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/package.json +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/package.json @@ -1,7 +1,7 @@ { "name": "UseACustomJson5OrJsonCConfigFile", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/src/mod.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/src/mod.ts index ea521fd..1439e17 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/src/mod.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/src/mod.ts @@ -1,18 +1,18 @@ import path from "node:path"; import { DependencyContainer } from "tsyringe"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { VFS } from "@spt/utils/VFS"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { VFS } from "@spt-aki/utils/VFS"; import JSON5 from "json5"; import { jsonc } from "jsonc"; -class Mod implements IPostSptLoadMod +class Mod implements IPostAkiLoadMod { - public postSptLoad(container: DependencyContainer): void { + public postAkiLoad(container: DependencyContainer): void { // get logger - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); // Get VFS to read in configs const vfs = container.resolve("VFS"); diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/tsconfig.json b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/tsconfig.json +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InraidCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotInventoryGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PresetHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PresetHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocation.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ModSpawn.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/NotificationEventType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SkillTypes.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/SaveServer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/SaveServer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/WebSocketServer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/WebSocketServer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/DatabaseService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/DatabaseService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/4UseACustomConfigFile/README.md b/TypeScript/4UseACustomConfigFile/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/4UseACustomConfigFile/README.md +++ b/TypeScript/4UseACustomConfigFile/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/4UseACustomConfigFile/package.json b/TypeScript/4UseACustomConfigFile/package.json index 974f6d6..f089d0f 100644 --- a/TypeScript/4UseACustomConfigFile/package.json +++ b/TypeScript/4UseACustomConfigFile/package.json @@ -1,7 +1,7 @@ { "name": "UseACustomConfigFile", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/4UseACustomConfigFile/src/mod.ts b/TypeScript/4UseACustomConfigFile/src/mod.ts index 3b555ed..c33274e 100644 --- a/TypeScript/4UseACustomConfigFile/src/mod.ts +++ b/TypeScript/4UseACustomConfigFile/src/mod.ts @@ -1,15 +1,15 @@ import { DependencyContainer } from "tsyringe"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -class Mod implements IPostSptLoadMod +class Mod implements IPostAkiLoadMod { private modConfig = require("../config/config.json"); - public postSptLoad(container: DependencyContainer): void { + public postAkiLoad(container: DependencyContainer): void { // get logger - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); // log the 'myProperty' value to the console logger.info(`here is the value from my config: ${this.modConfig.myProperty}`); diff --git a/TypeScript/4UseACustomConfigFile/tsconfig.json b/TypeScript/4UseACustomConfigFile/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/4UseACustomConfigFile/tsconfig.json +++ b/TypeScript/4UseACustomConfigFile/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocation.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/ModSpawn.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/NotificationEventType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/SkillTypes.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/4UseACustomConfigFile/types/servers/WebSocketServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/WebSocketServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/4UseACustomConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/4UseACustomConfigFile/types/services/DatabaseService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/DatabaseService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/5ReplaceMethod/README.md b/TypeScript/5ReplaceMethod/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/5ReplaceMethod/README.md +++ b/TypeScript/5ReplaceMethod/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/5ReplaceMethod/package.json b/TypeScript/5ReplaceMethod/package.json index 8ae3b2c..5876e57 100644 --- a/TypeScript/5ReplaceMethod/package.json +++ b/TypeScript/5ReplaceMethod/package.json @@ -1,7 +1,7 @@ { "name": "ReplaceMethod", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/5ReplaceMethod/src/mod.ts b/TypeScript/5ReplaceMethod/src/mod.ts index 08251de..e10244f 100644 --- a/TypeScript/5ReplaceMethod/src/mod.ts +++ b/TypeScript/5ReplaceMethod/src/mod.ts @@ -1,13 +1,13 @@ import { DependencyContainer } from "tsyringe"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { LauncherController } from "@spt/controllers/LauncherController"; -import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { SaveServer } from "@spt/servers/SaveServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { LauncherController } from "@spt-aki/controllers/LauncherController"; +import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestData"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { SaveServer } from "@spt-aki/servers/SaveServer"; -class Mod implements IPreSptLoadMod +class Mod implements IPreAkiLoadMod { // DO NOT leave static references to ANY resolved dependency. // ALWAYS use the container to resolve dependencies @@ -15,7 +15,7 @@ class Mod implements IPreSptLoadMod private static container: DependencyContainer; // Perform these actions before server fully loads - public preSptLoad(container: DependencyContainer): void + public preAkiLoad(container: DependencyContainer): void { // We will save a reference to the dependency container to resolve dependencies // that we may need down the line @@ -26,16 +26,16 @@ class Mod implements IPreSptLoadMod container.afterResolution("LauncherController", (_t, result: LauncherController) => { // We want to replace the original method logic with something different - result.login = (info: ILoginRequestData) => + result.login = (info: ILoginRequestData) => { return this.replacementFunction(info); } // The modifier Always makes sure this replacement method is ALWAYS replaced - }, { frequency: "Always" }); + }, {frequency: "Always"}); } // our new replacement function, ready to be used - public replacementFunction(info: ILoginRequestData): string + public replacementFunction(info: ILoginRequestData): string { // The original method requires the save server to be loaded const saveServer = Mod.container.resolve("SaveServer"); @@ -54,17 +54,16 @@ class Mod implements IPreSptLoadMod // This is now extra stuff we want to add // We resolve 2 more dependencies: The logger and the DatabaseServer - const logger = Mod.container.resolve("PrimaryLogger"); - const databaseService = Mod.container.resolve("DatabaseService"); - - // As an example lets count the number of items in the database - const loadedItems = Object.entries(databaseService.getItems()).length; + const logger = Mod.container.resolve("WinstonLogger"); + const dbServer = Mod.container.resolve("DatabaseServer"); + // As an example Im counting the amount of loaded items on the DB + const loadedItems = Object.entries(dbServer.getTables().templates.items).length; // Lets do a few informational messages logger.success(`User ${info.username} logged in to SPT, there are ${loadedItems} items loaded into the database`); logger.success(originalReturn.length > 0 ? `User session ID: ${originalReturn}` : "User not found"); - // And finally return whatever we were supposed to return originally through this function + // And finally return whatever we were supposed to return through this function return originalReturn; } } diff --git a/TypeScript/5ReplaceMethod/tsconfig.json b/TypeScript/5ReplaceMethod/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/5ReplaceMethod/tsconfig.json +++ b/TypeScript/5ReplaceMethod/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocation.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/ModSpawn.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/NotificationEventType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/SkillTypes.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/services/LootRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/5ReplaceMethod/types/servers/WebSocketServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/5ReplaceMethod/types/servers/WebSocketServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/5ReplaceMethod/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/5ReplaceMethod/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/5ReplaceMethod/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/5ReplaceMethod/types/services/DatabaseService.d.ts b/TypeScript/5ReplaceMethod/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/5ReplaceMethod/types/services/DatabaseService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/6ReferenceAnotherClass/README.md b/TypeScript/6ReferenceAnotherClass/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/6ReferenceAnotherClass/README.md +++ b/TypeScript/6ReferenceAnotherClass/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/6ReferenceAnotherClass/package.json b/TypeScript/6ReferenceAnotherClass/package.json index b8d3d13..a73456f 100644 --- a/TypeScript/6ReferenceAnotherClass/package.json +++ b/TypeScript/6ReferenceAnotherClass/package.json @@ -1,7 +1,7 @@ { "name": "ReferenceAnotherClass", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/6ReferenceAnotherClass/src/mod.ts b/TypeScript/6ReferenceAnotherClass/src/mod.ts index 0a6f127..035fcc8 100644 --- a/TypeScript/6ReferenceAnotherClass/src/mod.ts +++ b/TypeScript/6ReferenceAnotherClass/src/mod.ts @@ -1,15 +1,15 @@ import { DependencyContainer } from "tsyringe"; -import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { MoreCode } from "./MoreCode"; -class Mod implements IPostSptLoadMod +class Mod implements IPostAkiLoadMod { - public postSptLoad(container: DependencyContainer): void + public postAkiLoad(container: DependencyContainer): void { // get logger - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); // Make a new instance of the 'MoreCode' class const moreCode = new MoreCode(); diff --git a/TypeScript/6ReferenceAnotherClass/tsconfig.json b/TypeScript/6ReferenceAnotherClass/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/6ReferenceAnotherClass/tsconfig.json +++ b/TypeScript/6ReferenceAnotherClass/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocation.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/ModSpawn.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/NotificationEventType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/SkillTypes.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/WebSocketServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/WebSocketServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/DatabaseService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/DatabaseService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/7OnLoadHook/README.md b/TypeScript/7OnLoadHook/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/7OnLoadHook/README.md +++ b/TypeScript/7OnLoadHook/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/7OnLoadHook/package.json b/TypeScript/7OnLoadHook/package.json index 4a34e62..25ac3eb 100644 --- a/TypeScript/7OnLoadHook/package.json +++ b/TypeScript/7OnLoadHook/package.json @@ -1,7 +1,7 @@ { "name": "OnLoadHook", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/7OnLoadHook/src/mod.ts b/TypeScript/7OnLoadHook/src/mod.ts index 89bf6e5..e8fd335 100644 --- a/TypeScript/7OnLoadHook/src/mod.ts +++ b/TypeScript/7OnLoadHook/src/mod.ts @@ -1,14 +1,14 @@ import { DependencyContainer } from "tsyringe"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { OnLoadModService } from "@spt/services/mod/onLoad/OnLoadModService"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { OnLoadModService } from "@spt-aki/services/mod/onLoad/OnLoadModService"; -class Mod implements IPreSptLoadMod +class Mod implements IPreAkiLoadMod { - public preSptLoad(container: DependencyContainer): void + public preAkiLoad(container: DependencyContainer): void { - const logger = container.resolve("PrimaryLogger"); + const logger = container.resolve("WinstonLogger"); const onLoadModService = container.resolve("OnLoadModService"); onLoadModService.registerOnLoad( "MyCustomMod", // route key diff --git a/TypeScript/7OnLoadHook/tsconfig.json b/TypeScript/7OnLoadHook/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/7OnLoadHook/tsconfig.json +++ b/TypeScript/7OnLoadHook/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/7OnLoadHook/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/ILocation.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/7OnLoadHook/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/7OnLoadHook/types/models/enums/ModSpawn.d.ts b/TypeScript/7OnLoadHook/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/7OnLoadHook/types/models/enums/NotificationEventType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/7OnLoadHook/types/models/enums/SkillTypes.d.ts b/TypeScript/7OnLoadHook/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/7OnLoadHook/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/7OnLoadHook/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/services/LootRequest.d.ts b/TypeScript/7OnLoadHook/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts b/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/7OnLoadHook/types/servers/WebSocketServer.d.ts b/TypeScript/7OnLoadHook/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/7OnLoadHook/types/servers/WebSocketServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/7OnLoadHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/7OnLoadHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/7OnLoadHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/7OnLoadHook/types/services/DatabaseService.d.ts b/TypeScript/7OnLoadHook/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/7OnLoadHook/types/services/DatabaseService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/8OnUpdateHook/README.md b/TypeScript/8OnUpdateHook/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/8OnUpdateHook/README.md +++ b/TypeScript/8OnUpdateHook/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/8OnUpdateHook/package.json b/TypeScript/8OnUpdateHook/package.json index c6428c3..10957b7 100644 --- a/TypeScript/8OnUpdateHook/package.json +++ b/TypeScript/8OnUpdateHook/package.json @@ -1,7 +1,7 @@ { "name": "OnUpdateHook", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/8OnUpdateHook/src/mod.ts b/TypeScript/8OnUpdateHook/src/mod.ts index 09ea802..9f9f11b 100644 --- a/TypeScript/8OnUpdateHook/src/mod.ts +++ b/TypeScript/8OnUpdateHook/src/mod.ts @@ -1,13 +1,13 @@ import { DependencyContainer } from "tsyringe"; -import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import { ILogger } from "@spt/models/spt/utils/ILogger"; -import { OnUpdateModService } from "@spt/services/mod/onUpdate/OnUpdateModService"; +import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { OnUpdateModService } from "@spt-aki/services/mod/onUpdate/OnUpdateModService"; -class Mod implements IPreSptLoadMod +class Mod implements IPreAkiLoadMod { - public preSptLoad(container: DependencyContainer): void { - const logger = container.resolve("PrimaryLogger"); + public preAkiLoad(container: DependencyContainer): void { + const logger = container.resolve("WinstonLogger"); const onUpdateModService = container.resolve("OnUpdateModService"); onUpdateModService.registerOnUpdate( diff --git a/TypeScript/8OnUpdateHook/tsconfig.json b/TypeScript/8OnUpdateHook/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/8OnUpdateHook/tsconfig.json +++ b/TypeScript/8OnUpdateHook/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocation.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/ModSpawn.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/NotificationEventType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/SkillTypes.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/services/LootRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/8OnUpdateHook/types/servers/WebSocketServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/8OnUpdateHook/types/servers/WebSocketServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/8OnUpdateHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/8OnUpdateHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/8OnUpdateHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/8OnUpdateHook/types/services/DatabaseService.d.ts b/TypeScript/8OnUpdateHook/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/8OnUpdateHook/types/services/DatabaseService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence diff --git a/TypeScript/9RouterHooks/README.md b/TypeScript/9RouterHooks/README.md index a8981b6..3bd5a99 100644 --- a/TypeScript/9RouterHooks/README.md +++ b/TypeScript/9RouterHooks/README.md @@ -1,6 +1,6 @@ -# Welcome to the SPT Modding Project +# Welcome to the SPT-AKI Modding Project -This project is designed to streamline the initial setup process for building and creating mods in the SPT environment. Follow this guide to set up your environment efficiently. +This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently. ## **Table of Contents** - [NodeJS Setup](#nodejs-setup) @@ -39,7 +39,7 @@ Note: Preserve the `node_modules` folder as it contains necessary dependencies f ## **Essential Concepts** -Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT adopts. Comprehensive guidelines will be available on the hub upon release. +Prioritize understanding Dependency Injection and Inversion of Control, the architectural principles SPT-AKI adopts. Comprehensive guidelines will be available on the hub upon release. Some resources to get you started: - [A quick intro to Dependency Injection](https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/) @@ -47,13 +47,13 @@ Some resources to get you started: ## **Coding Guidelines** -Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. +Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`. New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/). ## **Distribution Guidelines** -Automated tasks are set up to bundle all necessary files for your mod to function in SPT: +Automated tasks are set up to bundle all necessary files for your mod to function in SPT-AKI: > Terminal -> Run Task... -> Show All Tasks... -> npm: build @@ -61,6 +61,6 @@ The ZIP output, located in the `dist` directory, contains all required files. En ## **Conclusion** -With this setup, you're ready to begin modding with SPT. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. +With this setup, you're ready to begin modding with SPT-AKI. If you run into any trouble be sure to check out the [modding documentation on the hub](https://hub.sp-tarkov.com/doc/lexicon/66-modding/). If you really get stuck feel free to join us in the [#mods-development](https://discord.com/channels/875684761291599922/875803116409323562) official Discord channel. Build something awesome! diff --git a/TypeScript/9RouterHooks/package.json b/TypeScript/9RouterHooks/package.json index b6db8f7..bf2f3c7 100644 --- a/TypeScript/9RouterHooks/package.json +++ b/TypeScript/9RouterHooks/package.json @@ -1,7 +1,7 @@ { "name": "RouterHooks", "version": "1.0.0", - "sptVersion": "~3.9", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/9RouterHooks/src/mod.ts b/TypeScript/9RouterHooks/src/mod.ts index 3f4431c..36ccde9 100644 --- a/TypeScript/9RouterHooks/src/mod.ts +++ b/TypeScript/9RouterHooks/src/mod.ts @@ -1,14 +1,14 @@ import { DependencyContainer } from "tsyringe"; -import type { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; -import type { ILogger } from "@spt/models/spt/utils/ILogger"; -import type {DynamicRouterModService} from "@spt/services/mod/dynamicRouter/DynamicRouterModService"; -import type {StaticRouterModService} from "@spt/services/mod/staticRouter/StaticRouterModService"; +import type { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"; +import type { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import type {DynamicRouterModService} from "@spt-aki/services/mod/dynamicRouter/DynamicRouterModService"; +import type {StaticRouterModService} from "@spt-aki/services/mod/staticRouter/StaticRouterModService"; -class Mod implements IPreSptLoadMod +class Mod implements IPreAkiLoadMod { - public preSptLoad(container: DependencyContainer): void { - const logger = container.resolve("PrimaryLogger"); + public preAkiLoad(container: DependencyContainer): void { + const logger = container.resolve("WinstonLogger"); const dynamicRouterModService = container.resolve("DynamicRouterModService"); const staticRouterModService = container.resolve("StaticRouterModService"); @@ -44,9 +44,9 @@ class Mod implements IPreSptLoadMod "custom-static-my-mod" ); - // Hook up to existing SPT dynamic route + // Hook up to existing AKI dynamic route dynamicRouterModService.registerDynamicRouter( - "DynamicRoutePeekingSpt", + "DynamicRoutePeekingAki", [ { url: "/client/menu/locale/", @@ -57,12 +57,12 @@ class Mod implements IPreSptLoadMod } } ], - "spt" + "aki" ); - // Hook up to existing SPT static route + // Hook up to existing AKI static route staticRouterModService.registerStaticRouter( - "StaticRoutePeekingSpt", + "StaticRoutePeekingAki", [ { url: "/launcher/ping", @@ -73,7 +73,7 @@ class Mod implements IPreSptLoadMod } } ], - "spt" + "aki" ); } } diff --git a/TypeScript/9RouterHooks/tsconfig.json b/TypeScript/9RouterHooks/tsconfig.json index 7d2e93d..c5ca53f 100644 --- a/TypeScript/9RouterHooks/tsconfig.json +++ b/TypeScript/9RouterHooks/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt/*": ["./types/*"], + "@spt-aki/*": ["./types/*"], }, }, "exclude": ["node_modules", "dist", "tmp"], diff --git a/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts index a058b99..dc6ede4 100644 --- a/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts @@ -59,4 +59,5 @@ export declare class InraidCallbacks { itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData; getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string; getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string; + getBossConvertSettings(url: string, info: IEmptyRequestData, sessionId: string): string; } diff --git a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts index 94f6ab8..e592cc2 100644 --- a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts @@ -3,6 +3,7 @@ import { BotGenerator } from "@spt/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; import { Condition, IGenerateBotsRequestData } from "@spt/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -27,6 +28,7 @@ export declare class BotController { protected botGenerator: BotGenerator; protected botHelper: BotHelper; protected botDifficultyHelper: BotDifficultyHelper; + protected weightedRandomHelper: WeightedRandomHelper; protected botGenerationCacheService: BotGenerationCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; @@ -38,7 +40,7 @@ export declare class BotController { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, weightedRandomHelper: WeightedRandomHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -116,6 +118,7 @@ export declare class BotController { * @returns Single IBotBase object */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts index 4aa6dad..87f419b 100644 --- a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts @@ -31,6 +31,7 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService"; import { TraderServicesService } from "@spt/services/TraderServicesService"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; /** * Logic for handling In Raid callbacks */ @@ -62,6 +63,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context @@ -189,4 +191,5 @@ export declare class InraidController { itemDelivery(sessionId: string, traderId: string, items: Item[]): void; getTraitorScavHostileChance(url: string, sessionID: string): number; getSandboxMaxPatrolValue(url: string, sessionID: string): number; + getBossConvertSettings(url: string, sessionId: string): string[]; } diff --git a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts index 4d46ab0..74f39eb 100644 --- a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts @@ -9,6 +9,7 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRepeatableQuestChangeRequest } from "@spt/models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "@spt/models/enums/ELocationName"; import { IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; +import { IGetRepeatableByIdResult } from "@spt/models/spt/quests/IGetRepeatableByIdResult"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -146,13 +147,21 @@ export declare class RepeatableQuestController { * @returns IItemEventRouterResponse */ changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; + /** + * Find a repeatable (daily/weekly/scav) from a players profile by its id + * @param questId Id of quest to find + * @param pmcData Profile that contains quests to look through + * @returns IGetRepeatableByIdResult + */ + protected getRepeatableById(questId: string, pmcData: IPmcData): IGetRepeatableByIdResult; protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; /** - * Some accounts have access to repeatable quest refreshes for free + * Some accounts have access to free repeatable quest refreshes * Track the usage of them inside players profile - * @param fullProfile Profile of player - * @param repeatableSubType Can be daily/weekly/scav repeatables - * @param repeatableTypeName Subtype of repeatables: daily / weekly / scav + * @param fullProfile Player profile + * @param repeatableSubType Can be daily / weekly / scav repeatable + * @param repeatableTypeName Subtype of repeatable quest: daily / weekly / scav + * @returns Is the repeatable being replaced for free */ - protected handleFreeRefreshUses(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): void; + protected useFreeRefreshIfAvailable(fullProfile: ISptProfile, repeatableSubType: IPmcDataRepeatableQuest, repeatableTypeName: string): boolean; } diff --git a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts index ad72f80..419120f 100644 --- a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts @@ -12,6 +12,8 @@ import { Item } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IChooseRandomCompatibleModResult } from "@spt/models/spt/bots/IChooseRandomCompatibleModResult"; +import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilterPlateModsForSlotByLevelResult"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -26,8 +28,6 @@ import { LocalisationService } from "@spt/services/LocalisationService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { HashUtil } from "@spt/utils/HashUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult"; -import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; export declare class BotEquipmentModGenerator { protected logger: ILogger; protected hashUtil: HashUtil; @@ -94,8 +94,19 @@ export declare class BotEquipmentModGenerator { * @param modSpawnChances Chance dictionary to update */ protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void; - protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean; - protected sortModKeys(unsortedKeys: string[]): string[]; + /** + * Does the provided modSlot allow muzzle-related items + * @param modSlot Slot id to check + * @param modsParentId OPTIONAL: parent id of modslot being checked + * @returns True if modSlot can have muzzle-related items + */ + protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId?: string): boolean; + /** + * Sort mod slots into an ordering that maximises chance of a successful weapon generation + * @param unsortedSlotKeys Array of mod slot strings to sort + * @returns Sorted array + */ + protected sortModKeys(unsortedSlotKeys: string[]): string[]; /** * Get a Slot property for an item (chamber/cartridge/slot) * @param modSlot e.g patron_in_weapon @@ -118,43 +129,53 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; - protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; + /** + * + * @param modPool Pool of mods that can be picked from + * @param parentSlot Slot the picked mod will have as a parent + * @param choiceTypeEnum How should chosen tpl be treated: DEFAULT_MOD/SPAWN/SKIP + * @param weapon Array of weapon items chosen item will be added to + * @param modSlotName Name of slot picked mod will be placed into + * @returns Chosen weapon details + */ + protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, choiceTypeEnum: ModSpawn, weapon: Item[], modSlotName: string): IChooseRandomCompatibleModResult; /** * Filter mod pool down based on various criteria: * Is slot flagged as randomisable * Is slot required * Is slot flagged as default mod only * @param itemModPool Existing pool of mods to choose - * @param modSpawnResult outcome of random roll to select if mod should be added + * @param itemSpawnCategory How should slot be handled * @param parentTemplate Mods parent * @param weaponTemplate Mods root parent (weapon/equipment) * @param modSlot name of mod slot to choose for - * @param botEquipBlacklist - * @param isRandomisableSlot is flagged as a randomisable slot - * @returns + * @param botEquipBlacklist A blacklist of items not allowed to be picked + * @param isRandomisableSlot Slot is flagged as a randomisable slot + * @returns Array of mod tpls */ - protected getModPoolForSlot(itemModPool: Record, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; + protected getModPoolForSlot(itemModPool: Record, itemSpawnCategory: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[]; /** - * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) - * @param weaponTemplate - * @param parentItemTpl + * Get default preset for weapon OR get specific weapon presets for edge cases (mp5/silenced dvl) + * @param weaponTemplate Weapons db template + * @param parentItemTpl Tpl of the parent item * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined; /** * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible - * @param weapon Weapon + * @param weapon Array of items that make up a weapon * @param modTpl Mod to check compatibility with weapon * @returns True if incompatible */ protected weaponModComboIsIncompatible(weapon: Item[], modTpl: string): boolean; /** - * Create a mod item with parameters as properties + * Create a mod item with provided parameters as properties + add upd property * @param modId _id * @param modTpl _tpl * @param parentId parentId * @param modSlot slotId * @param modTemplate Used to add additional properties in the upd object + * @param botRole The bots role mod is being created for * @returns Item object */ protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item; @@ -166,43 +187,44 @@ export declare class BotEquipmentModGenerator { protected getAmmoContainers(): string[]; /** * Get a random mod from an items compatible mods Filter array - * @param modTpl ???? default value to return if nothing found - * @param parentSlot item mod will go into, used to get compatible items + * @param fallbackModTpl Default value to return if parentSlot Filter is empty + * @param parentSlot Item mod will go into, used to get compatible items * @param modSlot Slot to get mod to fill - * @param items items to ensure picked mod is compatible with - * @returns item tpl + * @param items Items to ensure picked mod is compatible with + * @returns Item tpl */ - protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; + protected getRandomModTplFromItemDb(fallbackModTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined; /** * Check if mod exists in db + is for a required slot * @param modToAdd Db template of mod to check * @param slotAddedToTemplate Slot object the item will be placed as child into * @param modSlot Slot the mod will fill * @param parentTemplate Db template of the mods being added - * @param botRole Bots wildspawntype (assault/pmcBot etc) - * @returns true if valid + * @param botRole Bots wildspawntype (assault/pmcBot/exUsec etc) + * @returns True if valid for slot */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; /** * Find mod tpls of a provided type and add to modPool - * @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope) + * @param desiredSlotName Slot to look up and add we are adding tpls for (e.g mod_scope) * @param modTemplate db object for modItem we get compatible mods from * @param modPool Pool of mods we are adding to + * @param botEquipBlacklist A blacklist of items that cannot be picked */ protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for * @param modSlot Slot item should fit in - * @param botEquipBlacklist equipment that should not be picked - * @returns array of compatible items for that slot + * @param botEquipBlacklist Equipment that should not be picked + * @returns Array of compatible items for that slot */ protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist - * @param allowedMods base mods to filter - * @param botEquipBlacklist equipment blacklist - * @param modSlot slot mods belong to + * @param allowedMods Base mods to filter + * @param botEquipBlacklist Equipment blacklist + * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; @@ -212,17 +234,17 @@ export declare class BotEquipmentModGenerator { * Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. * This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine" * @param items The items where the CylinderMagazine's camora are appended to - * @param modPool modPool which should include available cartridges - * @param parentId The CylinderMagazine's UID - * @param parentTemplate The CylinderMagazine's template + * @param modPool ModPool which should include available cartridges + * @param cylinderMagParentId The CylinderMagazine's UID + * @param cylinderMagTemplate The CylinderMagazine's template */ - protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; + protected fillCamora(items: Item[], modPool: Mods, cylinderMagParentId: string, cylinderMagTemplate: ITemplateItem): void; /** * Take a record of camoras and merge the compatible shells into one array - * @param camorasWithShells camoras we want to merge into one array - * @returns string array of shells for multiple camora sources + * @param camorasWithShells Dictionary of camoras we want to merge into one array + * @returns String array of shells for multiple camora sources */ - protected mergeCamoraPoolsTogether(camorasWithShells: Record): string[]; + protected mergeCamoraPools(camorasWithShells: Record): string[]; /** * Filter out non-whitelisted weapon scopes * Controlled by bot.json weaponSightWhitelist diff --git a/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts index 0895e25..1ea549c 100644 --- a/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts @@ -6,9 +6,10 @@ 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 { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/common/tables/IBotType"; +import { Chances, Equipment, Generation, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; +import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; @@ -61,14 +62,14 @@ export declare class BotInventoryGenerator { protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; /** * Remove non-armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithProtection(templateEquipment: Equipment): void; /** * Remove armored rigs from parameter data - * @param templateInventory + * @param templateEquipment Equpiment to filter TacticalVest of */ - protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void; + protected filterRigsToThoseWithoutProtection(templateEquipment: Equipment): void; /** * Add a piece of equipment with mods to inventory from the provided pools * @param settings Values to adjust how item is chosen and added to bot @@ -90,8 +91,8 @@ export declare class BotInventoryGenerator { * @param botInventory Inventory to add weapons to * @param botRole assault/pmcBot/bossTagilla etc * @param isPmc Is the bot being generated as a pmc - * @param botLevel level of bot having weapon generated * @param itemGenerationLimitsMinMax Limits for items the bot can have + * @param botLevel level of bot having weapon generated */ protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void; /** @@ -119,22 +120,3 @@ export declare class BotInventoryGenerator { shouldSpawn: boolean; }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void; } -export interface IGenerateEquipmentProperties { - /** Root Slot being generated */ - rootEquipmentSlot: string; - /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; - /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; - /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; - /** OPTIONAL - Do not generate mods for tpls in this array */ - generateModsBlacklist?: string[]; -} diff --git a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts index 707ba95..2c7801b 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts @@ -170,7 +170,7 @@ export declare class RagfairOfferGenerator { * @param tpl Item to look for matching condition object * @returns condition id */ - protected getDynamicConditionIdForTpl(tpl: string): string; + protected getDynamicConditionIdForTpl(tpl: string): string | undefined; /** * Alter an items condition based on its item base type * @param conditionSettingsId also the parentId of item being altered diff --git a/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts index 436aad0..1e09994 100644 --- a/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -118,12 +118,22 @@ export declare class RepeatableQuestRewardGenerator { * Helper to create a reward item structured as required by the client * * @param {string} tpl ItemId of the rewarded item - * @param {integer} value Amount of items to give + * @param {integer} count Amount of items to give * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index * @param preset Optional array of preset items * @returns {object} Object of "Reward"-item-type */ - protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward; + protected generateItemReward(tpl: string, count: number, index: number): IQuestReward; + /** + * Helper to create a reward item structured as required by the client + * + * @param {string} tpl ItemId of the rewarded item + * @param {integer} count Amount of items to give + * @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index + * @param preset Optional array of preset items + * @returns {object} Object of "Reward"-item-type + */ + protected generatePresetReward(tpl: string, count: number, index: number, preset?: Item[]): IQuestReward; /** * Picks rewardable items from items.json * This means they must: diff --git a/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts index eea8ff8..c5871ae 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts @@ -47,6 +47,11 @@ export declare class BotHelper { */ shouldBotBePmc(botRole: string): boolean; rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean; + /** + * is the provided role a PMC, case-agnostic + * @param botRole Role to check + * @returns True if role is PMC + */ botRoleIsPmc(botRole: string): boolean; /** * Get randomization settings for bot from config/bot.json diff --git a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts index 7fb646c..650f633 100644 --- a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts @@ -22,12 +22,12 @@ export declare class HealthHelper { */ resetVitality(sessionID: string): ISptProfile; /** - * Update player profile with changes from request object + * Update player profile vitality values with changes from client request object * @param pmcData Player profile * @param request Heal request * @param sessionID Session id - * @param addEffects Should effects be added or removed (default - add) - * @param deleteExistingEffects Should all prior effects be removed before apply new ones + * @param addEffects Should effects be added to profile (default - true) + * @param deleteExistingEffects Should all prior effects be removed before apply new ones (default - true) */ saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** diff --git a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts index 2299ef9..449be9f 100644 --- a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts @@ -1,6 +1,7 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { IPmcData, IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IQuestStatus, TraderInfo } from "@spt/models/eft/common/tables/IBotBase"; @@ -17,7 +18,6 @@ import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ICloner } from "@spt/utils/cloners/ICloner"; import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { ProfileHelper } from "./ProfileHelper"; export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts index 5269646..f0ff69a 100644 --- a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts @@ -9,9 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Inventory } from "@spt/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectRequest"; -import { AddItem } from "@spt/models/eft/inventory/IAddItemRequestData"; import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; -import { IAddItemTempObject } from "@spt/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventoryRemoveRequestData"; @@ -106,19 +104,12 @@ export declare class InventoryHelper { * Find a location to place an item into inventory and place it * @param stashFS2D 2-dimensional representation of the container slots * @param sortingTableFS2D 2-dimensional representation of the sorting table slots - * @param itemWithChildren Item to place - * @param playerInventory + * @param itemWithChildren Item to place with children + * @param playerInventory Players inventory * @param useSortingTable Should sorting table to be used if main stash has no space * @param output output to send back to client */ protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void; - /** - * Split an items stack size based on its StackMaxSize value - * @param assortItems Items to add to inventory - * @param requestItem Details of purchased item to add to inventory - * @param result Array split stacks are appended to - */ - protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void; /** * Handle Remove event * Remove item from player inventory + insured items array @@ -154,6 +145,14 @@ export declare class InventoryHelper { * @returns [width, height] */ getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[]; + /** + * Calculates the size of an item including attachements + * takes into account if item is folded + * @param itemTpl Items template id + * @param itemID Items id + * @param inventoryItemHash Hashmap of inventory items + * @returns An array representing the [width, height] of the item + */ protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[]; /** * Get a blank two-dimentional representation of a container diff --git a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts index 9d5e832..da5dd11 100644 --- a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts @@ -182,15 +182,18 @@ export declare class ItemHelper { /** * Calcualte the average quality of an item and its children * @param items An offers item to process + * @param skipArmorItemsWithoutDurability Skip over armor items without durability * @returns % quality modifer between 0 and 1 */ - getItemQualityModifierForOfferItems(items: Item[]): number; + getItemQualityModifierForItems(items: Item[], skipArmorItemsWithoutDurability?: boolean): number; /** * get normalized value (0-1) based on item condition + * Will return -1 for base armor items with 0 durability * @param item - * @returns number between 0 and 1 + * @param skipArmorItemsWithoutDurability return -1 for armor items that have maxdurability of 0 + * @returns Number between 0 and 1 */ - getItemQualityModifier(item: Item): number; + getItemQualityModifier(item: Item, skipArmorItemsWithoutDurability?: boolean): number; /** * Get a quality value based on a repairable items (weapon/armor) current state between current and max durability * @param itemDetails Db details for item we want quality value for diff --git a/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts index e71e5b7..f16d6ce 100644 --- a/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ +import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ICloner } from "@spt/utils/cloners/ICloner"; -import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; diff --git a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts index 93368fa..80f75bb 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts @@ -144,11 +144,11 @@ export declare class QuestHelper { /** * Adjust quest money rewards by passed in multiplier * @param quest Quest to multiple money rewards - * @param multiplier Value to adjust money rewards by + * @param bonusPercent Value to adjust money rewards by * @param questStatus Status of quest to apply money boost to rewards of * @returns Updated quest */ - applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest; + applyMoneyBoost(quest: IQuest, bonusPercent: number, questStatus: QuestStatus): IQuest; /** * Sets the item stack to new value, or delete the item if value <= 0 * // TODO maybe merge this function and the one from customization diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts index 87d152e..f33c130 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PaymentHelper } from "@spt/helpers/PaymentHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { RagfairHelper } from "@spt/helpers/RagfairHelper"; import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt/helpers/RagfairSortHelper"; @@ -28,7 +29,6 @@ import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairRequiredItemsService } from "@spt/services/RagfairRequiredItemsService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import { QuestHelper } from "./QuestHelper"; export declare class RagfairOfferHelper { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/9RouterHooks/types/models/eft/builds/ISetMagazineRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/builds/ISetMagazineRequest.d.ts index 87dab41..d3d1479 100644 --- a/TypeScript/9RouterHooks/types/models/eft/builds/ISetMagazineRequest.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/builds/ISetMagazineRequest.d.ts @@ -1,4 +1,4 @@ -import { IMagazineTemplateAmmoItem } from "../profile/ISptProfile"; +import { IMagazineTemplateAmmoItem } from "@spt/models/eft/profile/ISptProfile"; export interface ISetMagazineRequest { Id: string; Name: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/ILocation.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/ILocation.d.ts index bf4c58a..b8589c9 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/ILocation.d.ts @@ -1,7 +1,7 @@ import { Exit, ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt/models/eft/common/ILooseLoot"; -import { Ixyz } from "./Ixyz"; -import { Item } from "./tables/IItem"; +import { Ixyz } from "@spt/models/eft/common/Ixyz"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface ILocation { /** Map meta-data */ base: ILocationBase; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IAchievement.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IAchievement.d.ts index 910b13d..7669e00 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IAchievement.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IAchievement.d.ts @@ -1,4 +1,4 @@ -import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IAchievement { id: string; imageUrl: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IRepeatableQuests.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IRepeatableQuests.d.ts index 27ff49d..0753cff 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IRepeatableQuests.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IRepeatableQuests.d.ts @@ -1,4 +1,4 @@ -import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; +import { IQuest, IQuestConditionTypes, IQuestRewards } from "@spt/models/eft/common/tables/IQuest"; export interface IRepeatableQuest extends IQuest { changeCost: IChangeCost[]; changeStandingCost: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts index 451a6f2..a27bfbb 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inRaid/IItemDeliveryRequestData.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IItemDeliveryRequestData { items: Item[]; traderId: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemDirectRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemDirectRequest.d.ts index 6459a79..1616901 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemDirectRequest.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ itemWithModsToAdd: Item[]; diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemsDirectRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemsDirectRequest.d.ts index 7091f44..386359e 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemsDirectRequest.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemsDirectRequest.d.ts @@ -1,4 +1,4 @@ -import { Item } from "../common/tables/IItem"; +import { Item } from "@spt/models/eft/common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ itemsWithModsToAdd: Item[][]; diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IRedeemProfileRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IRedeemProfileRequestData.d.ts index d351a8c..d39c9e6 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IRedeemProfileRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IRedeemProfileRequestData.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { Action: "RedeemProfileReward"; events: IRedeemProfileRequestEvent[]; diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/ISetFavoriteItems.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/ISetFavoriteItems.d.ts index aacbb39..24aac37 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/ISetFavoriteItems.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/ISetFavoriteItems.d.ts @@ -1,4 +1,4 @@ -import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { Action: "SetFavoriteItems"; items: any[]; diff --git a/TypeScript/9RouterHooks/types/models/eft/profile/IGetAchievementsResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/profile/IGetAchievementsResponse.d.ts index a5a43cb..6963fcf 100644 --- a/TypeScript/9RouterHooks/types/models/eft/profile/IGetAchievementsResponse.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/profile/IGetAchievementsResponse.d.ts @@ -1,4 +1,4 @@ -import { IAchievement } from "../common/tables/IAchievement"; +import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; export interface IGetAchievementsResponse { elements: IAchievement[]; } diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts index 217e8e5..302d8f1 100644 --- a/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,6 +1,6 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { Message } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; message: Message; diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts index ad176aa..8f100ac 100644 --- a/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -1,4 +1,4 @@ +import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; -import { IGroupCharacter } from "../match/IGroupCharacter"; export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { } diff --git a/TypeScript/9RouterHooks/types/models/enums/ModSpawn.d.ts b/TypeScript/9RouterHooks/types/models/enums/ModSpawn.d.ts index 445b5ab..93ecbb7 100644 --- a/TypeScript/9RouterHooks/types/models/enums/ModSpawn.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/ModSpawn.d.ts @@ -1,5 +1,8 @@ export declare enum ModSpawn { + /** Chosen mod should be the tpl from the default weapon template */ DEFAULT_MOD = 0, + /** Normal behaviour */ SPAWN = 1, + /** Item should not be chosen */ SKIP = 2 } diff --git a/TypeScript/9RouterHooks/types/models/enums/NotificationEventType.d.ts b/TypeScript/9RouterHooks/types/models/enums/NotificationEventType.d.ts index 51f0d4e..a16a221 100644 --- a/TypeScript/9RouterHooks/types/models/enums/NotificationEventType.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/NotificationEventType.d.ts @@ -1,9 +1,15 @@ export declare enum NotificationEventType { + ASSORTMENT_UNLOCK_RULE = "AssortmentUnlockRule", + EXAMINE_ITEMS = "ExamineItems", + EXAMINE_ALL_ITEMS = "ExamineAllItems", + FORCE_LOGOUT = "ForceLogout", RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_NEW_RATING = "RagfairNewRating", RAGFAIR_RATING_CHANGE = "RagfairRatingChange", CHAT_MESSAGE_RECEIVED = "new_message", PING = "ping", - TRADER_SUPPLY = "TraderSupply", + TRADER_SALES_SUM = "TraderSalesSum", + TRADER_SUPPLY = "trader_supply", TRADER_STANDING = "TraderStanding", UNLOCK_TRADER = "UnlockTrader", GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", @@ -18,11 +24,17 @@ export declare enum NotificationEventType { GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", USER_CONFIRMED = "userConfirmed", + USER_MATCHED = "UserMatched", + USER_MATCH_OVER = "userMatchOver", CHANNEL_DELETED = "channel_deleted", FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", + PROFILE_LOCK_TIMER = "ProfileLockTimer", + STASH_ROWS = "StashRows", + SKILL_POINTS = "SkillPoints", + TOURNAMENT_WARNING = "tournamentWarning" } diff --git a/TypeScript/9RouterHooks/types/models/enums/SkillTypes.d.ts b/TypeScript/9RouterHooks/types/models/enums/SkillTypes.d.ts index c41ce6f..4ff4799 100644 --- a/TypeScript/9RouterHooks/types/models/enums/SkillTypes.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/SkillTypes.d.ts @@ -52,5 +52,19 @@ export declare enum SkillTypes { USEC_DEEP_WEAPON_MOD = "UsecDeepweaponmodding_Settings", USEC_LONG_RANGE_OPTICS = "UsecLongrangeoptics_Settings", USEC_NEGOTIATIONS = "UsecNegotiations", - USEC_TACTICS = "UsecTactics" + USEC_TACTICS = "UsecTactics", + PISTOL = "Pistol", + REVOLVER = "Revolver", + SMG = "SMG", + ASSAULT = "Assault", + SHOTGUN = "Shotgun", + SNIPER = "Sniper", + LMG = "LMG", + HMG = "HMG", + LAUNCHER = "Launcher", + ATTACHED_LAUNCHER = "AttachedLauncher", + MISC = "Misc", + DMR = "DMR", + DRAW_MASTER = "DrawMaster", + AIM_MASTER = "AimMaster" } diff --git a/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateEquipmentProperties.d.ts new file mode 100644 index 0000000..9cf7685 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -0,0 +1,22 @@ +import { Inventory 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"; +export interface IGenerateEquipmentProperties { + /** Root Slot being generated */ + rootEquipmentSlot: string; + /** Equipment pool for root slot being generated */ + rootEquipmentPool: Record; + modPool: Mods; + /** Dictionary of mod items and their chance to spawn for this bot type */ + spawnChances: Chances; + /** Role being generated for */ + botRole: string; + /** Level of bot being generated */ + botLevel: number; + inventory: PmcInventory; + botEquipmentConfig: EquipmentFilters; + /** Settings from bot.json to adjust how item is generated */ + randomisationDetails: RandomisationDetails; + /** OPTIONAL - Do not generate mods for tpls in this array */ + generateModsBlacklist?: string[]; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IBTRConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IBTRConfig.d.ts index 123c507..2f56f73 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IBTRConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IBTRConfig.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { IBaseConfig } from "./IBaseConfig"; +import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IBTRConfig extends IBaseConfig { kind: "spt-btr"; /** How fast the BTR moves */ diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts index 6cf8943..b8c782a 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts @@ -43,6 +43,12 @@ export interface IBotConfig extends IBaseConfig { lowProfileGasBlockTpls: string[]; /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; + assaultToBossConversion: IAssaultToBossConversion; +} +export interface IAssaultToBossConversion { + bossConvertEnabled: boolean; + bossesToConvertToWeights: Record; + bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IGiftsConfig.d.ts index 5dd5540..736c4b7 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IGiftsConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IGiftsConfig.d.ts @@ -4,7 +4,7 @@ import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; +import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { kind: "spt-gifts"; gifts: Record; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts index a8c969c..d60b496 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts @@ -27,7 +27,8 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + /** Keyed to plate protection level */ + chancePlateExistsInArmorPercent: Record; /** Key: item tpl */ itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; diff --git a/TypeScript/9RouterHooks/types/models/spt/quests/IGetRepeatableByIdResult.d.ts b/TypeScript/9RouterHooks/types/models/spt/quests/IGetRepeatableByIdResult.d.ts new file mode 100644 index 0000000..cd57ec5 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/spt/quests/IGetRepeatableByIdResult.d.ts @@ -0,0 +1,5 @@ +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; +export interface IGetRepeatableByIdResult { + quest: IRepeatableQuest; + repeatableType: IPmcDataRepeatableQuest; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/services/LootRequest.d.ts b/TypeScript/9RouterHooks/types/models/spt/services/LootRequest.d.ts index 9f028a6..c52a876 100644 --- a/TypeScript/9RouterHooks/types/models/spt/services/LootRequest.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/services/LootRequest.d.ts @@ -11,4 +11,5 @@ export interface LootRequest { itemStackLimits: Record; armorLevelWhitelist: number[]; allowBossItems: boolean; + useRewarditemBlacklist?: boolean; } diff --git a/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts b/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts index 4e3df75..54c0f0a 100644 --- a/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts @@ -1,11 +1,11 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -import { ConfigServer } from "./ConfigServer"; export declare class SaveServer { protected vfs: VFS; protected saveLoadRouters: SaveLoadRouter[]; diff --git a/TypeScript/9RouterHooks/types/servers/WebSocketServer.d.ts b/TypeScript/9RouterHooks/types/servers/WebSocketServer.d.ts index b9d66ee..f4e07bb 100644 --- a/TypeScript/9RouterHooks/types/servers/WebSocketServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/WebSocketServer.d.ts @@ -3,10 +3,10 @@ import http, { IncomingMessage } from "node:http"; import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { RandomUtil } from "@spt/utils/RandomUtil"; -import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; diff --git a/TypeScript/9RouterHooks/types/servers/ws/SptWebSocketConnectionHandler.d.ts b/TypeScript/9RouterHooks/types/servers/ws/SptWebSocketConnectionHandler.d.ts index 9c41fab..98d0898 100644 --- a/TypeScript/9RouterHooks/types/servers/ws/SptWebSocketConnectionHandler.d.ts +++ b/TypeScript/9RouterHooks/types/servers/ws/SptWebSocketConnectionHandler.d.ts @@ -8,9 +8,9 @@ import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler"; +import { ISptWebSocketMessageHandler } from "@spt/servers/ws/message/ISptWebSocketMessageHandler"; import { LocalisationService } from "@spt/services/LocalisationService"; import { JsonUtil } from "@spt/utils/JsonUtil"; -import { ISptWebSocketMessageHandler } from "./message/ISptWebSocketMessageHandler"; export declare class SptWebSocketConnectionHandler implements IWebSocketConnectionHandler { protected logger: ILogger; protected profileHelper: ProfileHelper; diff --git a/TypeScript/9RouterHooks/types/services/DatabaseService.d.ts b/TypeScript/9RouterHooks/types/services/DatabaseService.d.ts index 4d42d2d..711a069 100644 --- a/TypeScript/9RouterHooks/types/services/DatabaseService.d.ts +++ b/TypeScript/9RouterHooks/types/services/DatabaseService.d.ts @@ -19,7 +19,7 @@ import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ITemplates } from "@spt/models/spt/templates/ITemplates"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; -import { LocalisationService } from "./LocalisationService"; +import { LocalisationService } from "@spt/services/LocalisationService"; export declare class DatabaseService { protected logger: ILogger; protected databaseServer: DatabaseServer; @@ -52,7 +52,7 @@ export declare class DatabaseService { getLocations(): ILocations; /** * Get specific location by its Id - * @param locationId Desired trader id + * @param locationId Desired location id * @returns assets/database/locations/ */ getLocation(locationId: string): ILocation; diff --git a/TypeScript/9RouterHooks/types/services/FenceService.d.ts b/TypeScript/9RouterHooks/types/services/FenceService.d.ts index 786573f..c156122 100644 --- a/TypeScript/9RouterHooks/types/services/FenceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/FenceService.d.ts @@ -4,7 +4,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IFenceLevel } from "@spt/models/eft/common/IGlobals"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Item, Repairable } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ITemplateItem, Slot } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAssortsResult"; @@ -254,6 +254,19 @@ export declare class FenceService { * @param itemDbDetails Armor items db template */ protected randomiseArmorModDurability(armor: Item[], itemDbDetails: ITemplateItem): void; + /** + * Randomise the durability values of items on armor with a passed in slot + * @param softInsertSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorSoftInsertDurabilities(softInsertSlots: Slot[], armorItemAndMods: Item[]): void; + /** + * Randomise the durability values of plate items in armor + * Has chance to remove plate + * @param plateSlots Slots of items to randomise + * @param armorItemAndMods Array of armor + inserts to get items from + */ + protected randomiseArmorInsertsDurabilities(plateSlots: Slot[], armorItemAndMods: Item[]): void; /** * Get stack size of a singular item (no mods) * @param itemDbDetails item being added to fence