diff --git a/README.md b/README.md index fd7c1f6..38601ba 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Mod examples for v3.7.2 +# Mod examples for v3.7.3 A collection of example mods that perform typical actions in SPT diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/10ScopesAndTypes/types/di/Router.d.ts b/TypeScript/10ScopesAndTypes/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/10ScopesAndTypes/types/di/Router.d.ts +++ b/TypeScript/10ScopesAndTypes/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/10ScopesAndTypes/types/helpers/PaymentHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts b/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/10ScopesAndTypes/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts b/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/10ScopesAndTypes/types/utils/MathUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/MathUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/10ScopesAndTypes/types/utils/RandomUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/11BundleLoadingSample/types/di/Router.d.ts b/TypeScript/11BundleLoadingSample/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/11BundleLoadingSample/types/di/Router.d.ts +++ b/TypeScript/11BundleLoadingSample/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/11BundleLoadingSample/types/helpers/PaymentHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts b/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/11BundleLoadingSample/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts b/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/11BundleLoadingSample/types/utils/MathUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/MathUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/11BundleLoadingSample/types/utils/RandomUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts b/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/PaymentHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/12ClassExtensionOverride/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/MathUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/MathUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/12ClassExtensionOverride/types/utils/RandomUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts b/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/13AddTrader/types/controllers/LauncherController.d.ts b/TypeScript/13AddTrader/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/13AddTrader/types/controllers/LauncherController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts b/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/13AddTrader/types/di/Router.d.ts b/TypeScript/13AddTrader/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/13AddTrader/types/di/Router.d.ts +++ b/TypeScript/13AddTrader/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/13AddTrader/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/13AddTrader/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/13AddTrader/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/13AddTrader/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/13AddTrader/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/13AddTrader/types/helpers/PaymentHelper.d.ts b/TypeScript/13AddTrader/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/13AddTrader/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/13AddTrader/types/helpers/RagfairHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/13AddTrader/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/13AddTrader/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/13AddTrader/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts b/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/13AddTrader/types/routers/ItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/13AddTrader/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/13AddTrader/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/13AddTrader/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/13AddTrader/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/13AddTrader/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/13AddTrader/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/13AddTrader/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/13AddTrader/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/13AddTrader/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/13AddTrader/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/13AddTrader/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/13AddTrader/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/13AddTrader/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/13AddTrader/types/services/PaymentService.d.ts b/TypeScript/13AddTrader/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/13AddTrader/types/services/PaymentService.d.ts +++ b/TypeScript/13AddTrader/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/13AddTrader/types/services/RepairService.d.ts b/TypeScript/13AddTrader/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/13AddTrader/types/services/RepairService.d.ts +++ b/TypeScript/13AddTrader/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts b/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts +++ b/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/13AddTrader/types/utils/MathUtil.d.ts b/TypeScript/13AddTrader/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/13AddTrader/types/utils/MathUtil.d.ts +++ b/TypeScript/13AddTrader/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/13AddTrader/types/utils/RandomUtil.d.ts b/TypeScript/13AddTrader/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/13AddTrader/types/utils/RandomUtil.d.ts +++ b/TypeScript/13AddTrader/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/LauncherController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/LauncherController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts b/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/PaymentHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/ItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/14AfterDBLoadHook/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/14AfterDBLoadHook/types/utils/MathUtil.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/MathUtil.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/14AfterDBLoadHook/types/utils/RandomUtil.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/RandomUtil.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/15HttpListenerExample/types/controllers/LauncherController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/LauncherController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/15HttpListenerExample/types/di/Router.d.ts b/TypeScript/15HttpListenerExample/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/15HttpListenerExample/types/di/Router.d.ts +++ b/TypeScript/15HttpListenerExample/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/15HttpListenerExample/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/15HttpListenerExample/types/helpers/PaymentHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts b/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/15HttpListenerExample/types/routers/ItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/15HttpListenerExample/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/15HttpListenerExample/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/15HttpListenerExample/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/15HttpListenerExample/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/15HttpListenerExample/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/15HttpListenerExample/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/15HttpListenerExample/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/15HttpListenerExample/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/15HttpListenerExample/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts b/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts b/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts b/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/15HttpListenerExample/types/utils/MathUtil.d.ts b/TypeScript/15HttpListenerExample/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/15HttpListenerExample/types/utils/MathUtil.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/15HttpListenerExample/types/utils/RandomUtil.d.ts b/TypeScript/15HttpListenerExample/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/15HttpListenerExample/types/utils/RandomUtil.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts b/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/16ImporterUtil/types/controllers/LauncherController.d.ts b/TypeScript/16ImporterUtil/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/16ImporterUtil/types/controllers/LauncherController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts b/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/16ImporterUtil/types/di/Router.d.ts b/TypeScript/16ImporterUtil/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/16ImporterUtil/types/di/Router.d.ts +++ b/TypeScript/16ImporterUtil/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/16ImporterUtil/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/16ImporterUtil/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/16ImporterUtil/types/helpers/PaymentHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/16ImporterUtil/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts b/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/16ImporterUtil/types/routers/ItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/16ImporterUtil/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/16ImporterUtil/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/16ImporterUtil/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/16ImporterUtil/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/16ImporterUtil/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/16ImporterUtil/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/16ImporterUtil/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/16ImporterUtil/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/16ImporterUtil/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts b/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/16ImporterUtil/types/services/RepairService.d.ts b/TypeScript/16ImporterUtil/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/16ImporterUtil/types/services/RepairService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts b/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/16ImporterUtil/types/utils/MathUtil.d.ts b/TypeScript/16ImporterUtil/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/16ImporterUtil/types/utils/MathUtil.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/16ImporterUtil/types/utils/RandomUtil.d.ts b/TypeScript/16ImporterUtil/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/16ImporterUtil/types/utils/RandomUtil.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LauncherController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LauncherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/PaymentHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/ItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/MathUtil.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/MathUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/17AsyncImporterWithDependency1/types/utils/RandomUtil.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/RandomUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LauncherController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LauncherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/PaymentHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/ItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/MathUtil.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/MathUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/17AsyncImporterWithDependency2/types/utils/RandomUtil.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/RandomUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts b/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/18CustomItemService/types/controllers/LauncherController.d.ts b/TypeScript/18CustomItemService/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/18CustomItemService/types/controllers/LauncherController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts b/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/18CustomItemService/types/di/Router.d.ts b/TypeScript/18CustomItemService/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/18CustomItemService/types/di/Router.d.ts +++ b/TypeScript/18CustomItemService/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/18CustomItemService/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/18CustomItemService/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/18CustomItemService/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/18CustomItemService/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/18CustomItemService/types/helpers/PaymentHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/18CustomItemService/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/18CustomItemService/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts b/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/18CustomItemService/types/routers/ItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/18CustomItemService/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/18CustomItemService/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/18CustomItemService/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/18CustomItemService/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/18CustomItemService/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/18CustomItemService/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/18CustomItemService/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/18CustomItemService/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/18CustomItemService/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/18CustomItemService/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/18CustomItemService/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/18CustomItemService/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/18CustomItemService/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/18CustomItemService/types/services/PaymentService.d.ts b/TypeScript/18CustomItemService/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/18CustomItemService/types/services/PaymentService.d.ts +++ b/TypeScript/18CustomItemService/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/18CustomItemService/types/services/RepairService.d.ts b/TypeScript/18CustomItemService/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/18CustomItemService/types/services/RepairService.d.ts +++ b/TypeScript/18CustomItemService/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts b/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts +++ b/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/18CustomItemService/types/utils/MathUtil.d.ts b/TypeScript/18CustomItemService/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/18CustomItemService/types/utils/MathUtil.d.ts +++ b/TypeScript/18CustomItemService/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/18CustomItemService/types/utils/RandomUtil.d.ts b/TypeScript/18CustomItemService/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/18CustomItemService/types/utils/RandomUtil.d.ts +++ b/TypeScript/18CustomItemService/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/19UseExternalLibraries/types/controllers/LauncherController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/LauncherController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/19UseExternalLibraries/types/di/Router.d.ts b/TypeScript/19UseExternalLibraries/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/19UseExternalLibraries/types/di/Router.d.ts +++ b/TypeScript/19UseExternalLibraries/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/19UseExternalLibraries/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/19UseExternalLibraries/types/helpers/PaymentHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/19UseExternalLibraries/types/helpers/RagfairHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts b/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/ItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/19UseExternalLibraries/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts b/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/19UseExternalLibraries/types/services/RepairService.d.ts b/TypeScript/19UseExternalLibraries/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/19UseExternalLibraries/types/services/RepairService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/19UseExternalLibraries/types/utils/JsonUtil.d.ts b/TypeScript/19UseExternalLibraries/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/19UseExternalLibraries/types/utils/JsonUtil.d.ts +++ b/TypeScript/19UseExternalLibraries/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/19UseExternalLibraries/types/utils/MathUtil.d.ts b/TypeScript/19UseExternalLibraries/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/19UseExternalLibraries/types/utils/MathUtil.d.ts +++ b/TypeScript/19UseExternalLibraries/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/19UseExternalLibraries/types/utils/RandomUtil.d.ts b/TypeScript/19UseExternalLibraries/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/19UseExternalLibraries/types/utils/RandomUtil.d.ts +++ b/TypeScript/19UseExternalLibraries/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts b/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/1LogToConsole/types/di/Router.d.ts b/TypeScript/1LogToConsole/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/1LogToConsole/types/di/Router.d.ts +++ b/TypeScript/1LogToConsole/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/1LogToConsole/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/1LogToConsole/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/1LogToConsole/types/helpers/PaymentHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/1LogToConsole/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/1LogToConsole/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts b/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/1LogToConsole/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/1LogToConsole/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/1LogToConsole/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/1LogToConsole/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/1LogToConsole/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/1LogToConsole/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/1LogToConsole/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/1LogToConsole/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/1LogToConsole/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/1LogToConsole/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/1LogToConsole/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/1LogToConsole/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/1LogToConsole/types/services/PaymentService.d.ts b/TypeScript/1LogToConsole/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/1LogToConsole/types/services/PaymentService.d.ts +++ b/TypeScript/1LogToConsole/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/1LogToConsole/types/services/RepairService.d.ts b/TypeScript/1LogToConsole/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/1LogToConsole/types/services/RepairService.d.ts +++ b/TypeScript/1LogToConsole/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts b/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/1LogToConsole/types/utils/MathUtil.d.ts b/TypeScript/1LogToConsole/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/1LogToConsole/types/utils/MathUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/1LogToConsole/types/utils/RandomUtil.d.ts b/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts b/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts b/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/2EditDatabase/types/di/Router.d.ts b/TypeScript/2EditDatabase/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/2EditDatabase/types/di/Router.d.ts +++ b/TypeScript/2EditDatabase/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/2EditDatabase/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/2EditDatabase/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/2EditDatabase/types/helpers/PaymentHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/2EditDatabase/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/2EditDatabase/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts b/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/2EditDatabase/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/2EditDatabase/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/2EditDatabase/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/2EditDatabase/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/2EditDatabase/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/2EditDatabase/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/2EditDatabase/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/2EditDatabase/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/2EditDatabase/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/2EditDatabase/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/2EditDatabase/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/2EditDatabase/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/2EditDatabase/types/services/PaymentService.d.ts b/TypeScript/2EditDatabase/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/2EditDatabase/types/services/PaymentService.d.ts +++ b/TypeScript/2EditDatabase/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/2EditDatabase/types/services/RepairService.d.ts b/TypeScript/2EditDatabase/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/2EditDatabase/types/services/RepairService.d.ts +++ b/TypeScript/2EditDatabase/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts b/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/2EditDatabase/types/utils/MathUtil.d.ts b/TypeScript/2EditDatabase/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/2EditDatabase/types/utils/MathUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/2EditDatabase/types/utils/RandomUtil.d.ts b/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/3GetSptConfigFile/types/controllers/LauncherController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/LauncherController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/3GetSptConfigFile/types/di/Router.d.ts b/TypeScript/3GetSptConfigFile/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/3GetSptConfigFile/types/di/Router.d.ts +++ b/TypeScript/3GetSptConfigFile/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/3GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/3GetSptConfigFile/types/helpers/PaymentHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RagfairHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/ItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/3GetSptConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts b/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/3GetSptConfigFile/types/services/RepairService.d.ts b/TypeScript/3GetSptConfigFile/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/3GetSptConfigFile/types/services/RepairService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/3GetSptConfigFile/types/utils/MathUtil.d.ts b/TypeScript/3GetSptConfigFile/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/MathUtil.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/3GetSptConfigFile/types/utils/RandomUtil.d.ts b/TypeScript/3GetSptConfigFile/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/RandomUtil.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LauncherController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LauncherController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Router.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Router.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PaymentHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RepairService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RepairService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/MathUtil.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/MathUtil.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/4.1UseACustomJson5OrJsonCConfigFile/types/utils/RandomUtil.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/RandomUtil.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts b/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/PaymentHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/4UseACustomConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/MathUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/MathUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/4UseACustomConfigFile/types/utils/RandomUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/5ReplaceMethod/types/di/Router.d.ts b/TypeScript/5ReplaceMethod/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/5ReplaceMethod/types/di/Router.d.ts +++ b/TypeScript/5ReplaceMethod/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/5ReplaceMethod/types/helpers/PaymentHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts b/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/5ReplaceMethod/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/5ReplaceMethod/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/5ReplaceMethod/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/5ReplaceMethod/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/5ReplaceMethod/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/5ReplaceMethod/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/5ReplaceMethod/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/5ReplaceMethod/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts b/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts b/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/5ReplaceMethod/types/utils/MathUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/5ReplaceMethod/types/utils/MathUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/5ReplaceMethod/types/utils/RandomUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts b/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/PaymentHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/MathUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/MathUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts b/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/7OnLoadHook/types/di/Router.d.ts b/TypeScript/7OnLoadHook/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/7OnLoadHook/types/di/Router.d.ts +++ b/TypeScript/7OnLoadHook/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/7OnLoadHook/types/helpers/PaymentHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/7OnLoadHook/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts b/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/7OnLoadHook/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/7OnLoadHook/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/7OnLoadHook/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/7OnLoadHook/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/7OnLoadHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/7OnLoadHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/7OnLoadHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/7OnLoadHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts b/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/7OnLoadHook/types/services/RepairService.d.ts b/TypeScript/7OnLoadHook/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/7OnLoadHook/types/services/RepairService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/7OnLoadHook/types/utils/MathUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/7OnLoadHook/types/utils/MathUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/7OnLoadHook/types/utils/RandomUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/8OnUpdateHook/types/di/Router.d.ts b/TypeScript/8OnUpdateHook/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/8OnUpdateHook/types/di/Router.d.ts +++ b/TypeScript/8OnUpdateHook/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/8OnUpdateHook/types/helpers/PaymentHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts b/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/8OnUpdateHook/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/8OnUpdateHook/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/8OnUpdateHook/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/8OnUpdateHook/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/8OnUpdateHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/8OnUpdateHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/8OnUpdateHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/8OnUpdateHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts b/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts b/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/8OnUpdateHook/types/utils/MathUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/8OnUpdateHook/types/utils/MathUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/8OnUpdateHook/types/utils/RandomUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 { diff --git a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts index ca9d5a8..bb940dd 100644 --- a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts @@ -85,7 +85,6 @@ export declare class HideoutController { */ protected checkAndUpgradeWall(pmcData: IPmcData): void; /** - * * @param pmcData Profile to edit * @param output Object to send back to client * @param sessionID Session/player id @@ -102,7 +101,6 @@ export declare class HideoutController { */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; /** - * * @param output Objet to send to client * @param sessionID Session/player id * @param areaType Hideout area that had stash added @@ -229,7 +227,7 @@ export declare class HideoutController { * // TODO - implement this * @param sessionId Session id * @returns IQteData array - */ + */ getQteList(sessionId: string): IQteData[]; /** * Handle HideoutQuickTimeEvent on client/game/profile/items/moving diff --git a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts index 0ee30ed..64c2ae8 100644 --- a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts @@ -36,18 +36,19 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected configServer: ConfigServer; protected insuranceConfig: IInsuranceConfig; + protected roubleTpl: string; 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. * * @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. diff --git a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts index 5612044..f696603 100644 --- a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts @@ -54,10 +54,10 @@ export declare class InventoryController { protected httpResponseUtil: HttpResponseUtil; 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, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** - * 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. + * 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 @@ -71,9 +71,9 @@ export declare class InventoryController { */ protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** - * Remove Item from Profile - * Deep tree item deletion, also removes items from insurance list - */ + * 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 @@ -111,10 +111,10 @@ export declare class InventoryController { */ 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 - * Also used to swap items using quick selection on character screen - */ + * 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 diff --git a/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts b/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts index cbc8118..5de2416 100644 --- a/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts @@ -8,12 +8,14 @@ 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 saveServer: SaveServer; protected httpServerHelper: HttpServerHelper; @@ -23,11 +25,11 @@ export declare class LauncherController { protected preAkiModLoader: PreAkiModLoader; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; - constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, 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 - * @returns + * 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; diff --git a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts index db2ff8a..b4ce0da 100644 --- a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts @@ -78,6 +78,12 @@ export declare class MatchController { */ protected extractWasViaCoop(extractName: string): boolean; protected sendCoopTakenFenceMessage(sessionId: string): void; + /** + * Handle when a player extracts using a coop extract - add rep to fence + * @param pmcData Profile + * @param extractName Name of extract taken + */ + protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract @@ -92,10 +98,11 @@ export declare class MatchController { */ protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; /** - * Update players fence trader standing value in profile - * @param pmcData Player profile - * @param fenceId Id of fence trader - * @param extractName Name of extract used + * 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 updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void; + protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number; } diff --git a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts index a3ebc1c..9743855 100644 --- a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts @@ -61,7 +61,6 @@ export declare class RepeatableQuestController { * (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} sessionId Player's session id * @returns {array} array of "repeatableQuestObjects" as descibed above */ diff --git a/TypeScript/9RouterHooks/types/di/Router.d.ts b/TypeScript/9RouterHooks/types/di/Router.d.ts index cc05f0a..b77dece 100644 --- a/TypeScript/9RouterHooks/types/di/Router.d.ts +++ b/TypeScript/9RouterHooks/types/di/Router.d.ts @@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router { getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - constructor(); handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } export declare class SaveLoadRouter extends Router { - constructor(); handleLoad(profile: IAkiProfile): IAkiProfile; } export declare class HandledRoute { diff --git a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts index 75530c7..2e73798 100644 --- a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts @@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator { */ 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 * @param modsParent Parent slot the item will be a part of @@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator { * @returns ITemplateItem */ 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 + * @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 diff --git a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts index 238ef72..8144f70 100644 --- a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts @@ -4,7 +4,7 @@ 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 { 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"; diff --git a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts index 7483930..d101107 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts @@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator { */ generateDynamicOffers(expiredOffers?: Item[]): Promise; /** - * * @param assortItemIndex Index of assort item * @param assortItemsToProcess Item array containing index * @param expiredOffers Currently expired offers on flea diff --git a/TypeScript/9RouterHooks/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RepeatableQuestGenerator.d.ts index 44c38be..35297fa 100644 --- a/TypeScript/9RouterHooks/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RepeatableQuestGenerator.d.ts @@ -6,6 +6,7 @@ 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"; @@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator { * 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} targetItemId id of the item to request + * @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(targetItemId: string, value: number): ICompletionAvailableFor; + protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor; /** * Generates a valid Exploration quest * @@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator { * @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): ITemplateItem[]; + protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[]; /** * Helper to create a reward item structured as required by the client * @@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator { * @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?: any): IReward; + 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) + * 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): [string, ITemplateItem][]; + 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): boolean; + 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/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts index c88442e..11e1bc3 100644 --- a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts @@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator { 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) * @returns filtered dbItems array diff --git a/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts index 407e34f..e7f32ed 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts @@ -30,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; }; /** diff --git a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts index 99fd5fe..f8df2ba 100644 --- a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts @@ -86,13 +86,6 @@ export declare class InRaidHelper { * @param tradersClientProfile Client */ protected applyTraderStandingAdjustments(tradersServerProfile: Record, tradersClientProfile: Record): void; - /** - * Some maps have one-time-use keys (e.g. Labs - * Remove the relevant key from an inventory based on the post-raid request data passed in - * @param offraidData post-raid data - * @param sessionID Session id - */ - protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; /** * Set the SPT inraid location Profile property to 'none' * @param sessionID Session id diff --git a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts index 466d84e..0bf2925 100644 --- a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts @@ -86,7 +86,6 @@ export declare class InventoryHelper { */ protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; /** - * * @param assortItems Items to add to inventory * @param requestItem Details of purchased item to add to inventory * @param result Array split stacks are added to @@ -163,8 +162,8 @@ export declare class InventoryHelper { */ protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** - * Internal helper function to handle cartridges in inventory if any of them exist. - */ + * 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 diff --git a/TypeScript/9RouterHooks/types/helpers/PaymentHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/PaymentHelper.d.ts index 6dca038..04d4163 100644 --- a/TypeScript/9RouterHooks/types/helpers/PaymentHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/PaymentHelper.d.ts @@ -11,9 +11,9 @@ export declare class PaymentHelper { */ isMoneyTpl(tpl: string): boolean; /** - * Gets currency TPL from TAG - * @param {string} currency - * @returns string - */ + * Gets currency TPL from TAG + * @param {string} currency + * @returns string + */ getCurrency(currency: string): string; } diff --git a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts index 0dda05b..5ea1a52 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts @@ -45,11 +45,11 @@ export declare class QuestHelper { protected questConfig: IQuestConfig; 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 - * @param questId Quest id to look up - * @returns QuestStatus enum - */ + * 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 diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts index 0222e24..9797257 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts @@ -25,10 +25,10 @@ export declare class RagfairHelper { protected ragfairConfig: IRagfairConfig; 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 - * @returns string - */ + * Gets currency TAG from TPL + * @param {string} currency + * @returns string + */ getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts index 070507d..380203e 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts @@ -28,7 +28,8 @@ export interface IBotBase { RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; - CarExtractCounts: CarExtractCounts; + CarExtractCounts: Record; + CoopExtractCounts: Record; SurvivorClass: SurvivorClass; WishList: string[]; /** SPT specific property used during bot generation in raid */ @@ -306,6 +307,8 @@ export interface Productive { /** 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; } export interface Production extends Productive { RecipeId: string; @@ -346,8 +349,6 @@ export interface LastCompleted { export interface Notes { Notes: Note[]; } -export interface CarExtractCounts { -} export declare enum SurvivorClass { UNKNOWN = 0, NEUTRALIZER = 1, diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IProfileTemplate.d.ts index 9d73857..35db121 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -5,8 +5,12 @@ export interface IProfileTemplates { "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: TemplateSide; bear: TemplateSide; } diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts deleted file mode 100644 index e303acf..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryUnbindRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData"; -export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts index 2e7ed6d..cc4336a 100644 --- a/TypeScript/9RouterHooks/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/trade/IProcessBuyTradeRequestData.d.ts @@ -1,6 +1,6 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair"; type: string; tid: string; item_id: string; @@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat 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/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts index 50e7e97..5b60526 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts @@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig { carExtracts: string[]; /** Names of coop extracts */ coopExtracts: string[]; - /** Fene rep gain from a single car extract */ + /** 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; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts index 8a71eb9..c190d01 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts @@ -61,6 +61,9 @@ export interface IRewardScaling { export interface ITraderWhitelist { traderId: string; questTypes: string[]; + rewardBaseWhitelist: string[]; + rewardCanBeWeapon: boolean; + weaponRewardChancePercent: number; } export interface IRepeatableQuestTypesConfig { Exploration: IExploration; @@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig { } export interface IExploration extends IBaseQuestConfig { maxExtracts: number; + maxExtractsWithSpecificExit: number; specificExits: ISpecificExits; } export interface ISpecificExits { @@ -79,6 +83,7 @@ export interface ISpecificExits { export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number; minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean; diff --git a/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts b/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts index 9b78c6a..d687a3a 100644 --- a/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts @@ -44,4 +44,9 @@ export declare class EventOutputHolder { * @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 resetSptIsCompleteFlaggedCrafts(productions: Record): void; } diff --git a/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts index 1d226e2..6c770ec 100644 --- a/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts @@ -13,7 +13,6 @@ export declare class ItemEventRouter { protected eventOutputHolder: EventOutputHolder; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); /** - * * @param info Event request * @param sessionID Session id * @returns Item response diff --git a/TypeScript/9RouterHooks/types/routers/save_load/HealthSaveLoadRouter.d.ts b/TypeScript/9RouterHooks/types/routers/save_load/HealthSaveLoadRouter.d.ts index aa4b1bc..1ecfa44 100644 --- a/TypeScript/9RouterHooks/types/routers/save_load/HealthSaveLoadRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/save_load/HealthSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class HealthSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/9RouterHooks/types/routers/save_load/InraidSaveLoadRouter.d.ts b/TypeScript/9RouterHooks/types/routers/save_load/InraidSaveLoadRouter.d.ts index 4631460..7cc9a08 100644 --- a/TypeScript/9RouterHooks/types/routers/save_load/InraidSaveLoadRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/save_load/InraidSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InraidSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/9RouterHooks/types/routers/save_load/InsuranceSaveLoadRouter.d.ts b/TypeScript/9RouterHooks/types/routers/save_load/InsuranceSaveLoadRouter.d.ts index 3f21aed..af5222a 100644 --- a/TypeScript/9RouterHooks/types/routers/save_load/InsuranceSaveLoadRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/save_load/InsuranceSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/9RouterHooks/types/routers/save_load/ProfileSaveLoadRouter.d.ts b/TypeScript/9RouterHooks/types/routers/save_load/ProfileSaveLoadRouter.d.ts index 03f7325..8047834 100644 --- a/TypeScript/9RouterHooks/types/routers/save_load/ProfileSaveLoadRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/save_load/ProfileSaveLoadRouter.d.ts @@ -1,7 +1,6 @@ import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export declare class ProfileSaveLoadRouter extends SaveLoadRouter { - constructor(); getHandledRoutes(): HandledRoute[]; handleLoad(profile: IAkiProfile): IAkiProfile; } diff --git a/TypeScript/9RouterHooks/types/services/PaymentService.d.ts b/TypeScript/9RouterHooks/types/services/PaymentService.d.ts index 9b8e0c9..d6b22ed 100644 --- a/TypeScript/9RouterHooks/types/services/PaymentService.d.ts +++ b/TypeScript/9RouterHooks/types/services/PaymentService.d.ts @@ -49,13 +49,13 @@ export declare class PaymentService { */ 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 - */ + * 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 + * 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 diff --git a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts index 7f16f53..b01f4a3 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts @@ -104,7 +104,6 @@ export declare class ProfileFixerService { */ addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; /** - * * @param profileBonuses bonuses from profile * @param bonus bonus to find * @returns matching bonus diff --git a/TypeScript/9RouterHooks/types/services/RepairService.d.ts b/TypeScript/9RouterHooks/types/services/RepairService.d.ts index 8f9e7e9..b9e6151 100644 --- a/TypeScript/9RouterHooks/types/services/RepairService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RepairService.d.ts @@ -41,7 +41,6 @@ export declare class RepairService { */ 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 @@ -64,7 +63,6 @@ export declare class RepairService { */ 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 diff --git a/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts b/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts index d6cbf8e..befc3cb 100644 --- a/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts @@ -28,9 +28,9 @@ export declare class JsonUtil { /** * 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 + * @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; diff --git a/TypeScript/9RouterHooks/types/utils/MathUtil.d.ts b/TypeScript/9RouterHooks/types/utils/MathUtil.d.ts index ea5fd69..4acfeaf 100644 --- a/TypeScript/9RouterHooks/types/utils/MathUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/MathUtil.d.ts @@ -1,9 +1,9 @@ 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) - */ + * @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 @@ -41,13 +41,13 @@ export declare class MathUtil { */ 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) - */ + * 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/9RouterHooks/types/utils/RandomUtil.d.ts b/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts index 1f79775..71435bd 100644 --- a/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts @@ -2,20 +2,20 @@ 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. - * 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) - */ + * 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 jsonUtil; @@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray extends 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. - */ + * 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 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 {