3.7.3 #19

Merged
chomp merged 2 commits from 3.7.3 into master 2023-11-19 15:48:57 -05:00
757 changed files with 2962 additions and 2563 deletions

View File

@ -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 A collection of example mods that perform typical actions in SPT

View File

@ -85,7 +85,6 @@ export declare class HideoutController {
*/ */
protected checkAndUpgradeWall(pmcData: IPmcData): void; protected checkAndUpgradeWall(pmcData: IPmcData): void;
/** /**
*
* @param pmcData Profile to edit * @param pmcData Profile to edit
* @param output Object to send back to client * @param output Object to send back to client
* @param sessionID Session/player id * @param sessionID Session/player id
@ -102,7 +101,6 @@ export declare class HideoutController {
*/ */
protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void;
/** /**
*
* @param output Objet to send to client * @param output Objet to send to client
* @param sessionID Session/player id * @param sessionID Session/player id
* @param areaType Hideout area that had stash added * @param areaType Hideout area that had stash added
@ -229,7 +227,7 @@ export declare class HideoutController {
* // TODO - implement this * // TODO - implement this
* @param sessionId Session id * @param sessionId Session id
* @returns IQteData array * @returns IQteData array
*/ */
getQteList(sessionId: string): IQteData[]; getQteList(sessionId: string): IQteData[];
/** /**
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving * Handle HideoutQuickTimeEvent on client/game/profile/items/moving

View File

@ -36,18 +36,19 @@ export declare class InsuranceController {
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig; 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); 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. * Process insurance items of all profiles prior to being given back to the player through the mail service.
* *
* @returns void * @returns void
*/ */
processReturn(): void; processReturn(): void;
/** /**
* Process insurance items of a single profile prior to being given back to the player through the mail service. * Process insurance items of a single profile prior to being given back to the player through the mail service.
* *
* @returns void * @returns void
*/ */
processReturnByProfile(sessionID: string): void; processReturnByProfile(sessionID: string): void;
/** /**
* Get all insured items that are ready to be processed in a specific profile. * Get all insured items that are ready to be processed in a specific profile.

View File

@ -54,10 +54,10 @@ export declare class InventoryController {
protected httpResponseUtil: HttpResponseUtil; 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); 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 * Move Item
* change location of item with parentId and slotId * change location of item with parentId and slotId
* transfers items from one profile to another if fromOwner/toOwner is set in the body. * transfers items from one profile to another if fromOwner/toOwner is set in the body.
* otherwise, move is contained within the same profile_f. * otherwise, move is contained within the same profile_f.
* @param pmcData Profile * @param pmcData Profile
* @param moveRequest Move request data * @param moveRequest Move request data
* @param sessionID Session id * @param sessionID Session id
@ -71,9 +71,9 @@ export declare class InventoryController {
*/ */
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Remove Item from Profile * Remove Item from Profile
* Deep tree item deletion, also removes items from insurance list * Deep tree item deletion, also removes items from insurance list
*/ */
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Handle Remove event * Handle Remove event
@ -111,10 +111,10 @@ export declare class InventoryController {
*/ */
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse; transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Swap Item * Swap Item
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment * 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 * Also used to swap items using quick selection on character screen
*/ */
swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handles folding of Weapons * Handles folding of Weapons

View File

@ -8,12 +8,14 @@ import { Info, ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile";
import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse"; import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse";
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; 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 { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { SaveServer } from "@spt-aki/servers/SaveServer"; import { SaveServer } from "@spt-aki/servers/SaveServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil";
export declare class LauncherController { export declare class LauncherController {
protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
@ -23,11 +25,11 @@ export declare class LauncherController {
protected preAkiModLoader: PreAkiModLoader; protected preAkiModLoader: PreAkiModLoader;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected coreConfig: ICoreConfig; 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; connect(): IConnectResponse;
/** /**
* Get descriptive text for each of the profile edtions a player can choose * 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 * @returns Dictionary of profile types with related descriptive text
*/ */
protected getProfileDescriptions(): Record<string, string>; protected getProfileDescriptions(): Record<string, string>;
find(sessionIdKey: string): Info; find(sessionIdKey: string): Info;

View File

@ -78,6 +78,12 @@ export declare class MatchController {
*/ */
protected extractWasViaCoop(extractName: string): boolean; protected extractWasViaCoop(extractName: string): boolean;
protected sendCoopTakenFenceMessage(sessionId: string): void; 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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract
@ -92,10 +98,11 @@ export declare class MatchController {
*/ */
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
/** /**
* Update players fence trader standing value in profile * Get the fence rep gain from using a car or coop extract
* @param pmcData Player profile * @param pmcData Profile
* @param fenceId Id of fence trader * @param baseGain amount gained for the first extract
* @param extractName Name of extract used * @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;
} }

View File

@ -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) * (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 * The new quests generated are again persisted in profile.RepeatableQuests
* *
*
* @param {string} sessionId Player's session id * @param {string} sessionId Player's session id
* @returns {array} array of "repeatableQuestObjects" as descibed above * @returns {array} array of "repeatableQuestObjects" as descibed above
*/ */

View File

@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router {
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
} }
export declare class ItemEventRouterDefinition extends Router { export declare class ItemEventRouterDefinition extends Router {
constructor();
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
} }
export declare class SaveLoadRouter extends Router { export declare class SaveLoadRouter extends Router {
constructor();
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }
export declare class HandledRoute { export declare class HandledRoute {

View File

@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator {
*/ */
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
/** /**
*
* @param modSlot Slot mod will fit into * @param modSlot Slot mod will fit into
* @param isRandomisableSlot Will generate a randomised mod pool if true * @param isRandomisableSlot Will generate a randomised mod pool if true
* @param modsParent Parent slot the item will be a part of * @param modsParent Parent slot the item will be a part of
@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator {
* @returns ITemplateItem * @returns ITemplateItem
*/ */
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem]; protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, 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 * Create a mod item with parameters as properties
* @param modId _id * @param modId _id

View File

@ -4,7 +4,7 @@ import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper";
import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper";
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; 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 { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails";
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";

View File

@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator {
*/ */
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>; generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
/** /**
*
* @param assortItemIndex Index of assort item * @param assortItemIndex Index of assort item
* @param assortItemsToProcess Item array containing index * @param assortItemsToProcess Item array containing index
* @param expiredOffers Currently expired offers on flea * @param expiredOffers Currently expired offers on flea

View File

@ -6,6 +6,7 @@ import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
import { Exit } from "@spt-aki/models/eft/common/ILocationBase"; import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; 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 { 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 { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; 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) * 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) * 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 * @param {integer} value amount of items of this specific type to request
* @returns {object} object of "Completion"-condition * @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 * 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 * @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; 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 * Select a number of items that have a colelctive value of the passed in parameter
* @param repeatableConfig Config * @param repeatableConfig Config
* @param roublesBudget Total value of items to return * @param roublesBudget Total value of items to return
* @returns Array of reward items that fit budget * @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 * 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 * @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 * @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 * @param repeatableQuestConfig Config file
* @returns List of rewardable items [[_tpl, itemTemplate],...] * @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 * 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. * 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 * @param {string} tpl template id of item to check
* @returns True if item is valid reward * @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 * 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 * The templates include Elimination, Completion and Extraction quest types

View File

@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator {
upd: Upd; upd: Upd;
}, rarity: string): void; }, rarity: string): void;
/** /**
*
* @param dbItems all items from the items.json * @param dbItems all items from the items.json
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
* @returns filtered dbItems array * @returns filtered dbItems array

View File

@ -30,7 +30,7 @@ export declare class BotGeneratorHelper {
* @param botRole Used by weapons to randomize the durability values. Null for non-equipped items * @param botRole Used by weapons to randomize the durability values. Null for non-equipped items
* @returns Item Upd object with extra properties * @returns Item Upd object with extra properties
*/ */
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
upd?: Upd; upd?: Upd;
}; };
/** /**

View File

@ -86,13 +86,6 @@ export declare class InRaidHelper {
* @param tradersClientProfile Client * @param tradersClientProfile Client
*/ */
protected applyTraderStandingAdjustments(tradersServerProfile: Record<string, TraderInfo>, tradersClientProfile: Record<string, TraderInfo>): void; protected applyTraderStandingAdjustments(tradersServerProfile: Record<string, TraderInfo>, tradersClientProfile: Record<string, TraderInfo>): 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' * Set the SPT inraid location Profile property to 'none'
* @param sessionID Session id * @param sessionID Session id

View File

@ -86,7 +86,6 @@ export declare class InventoryHelper {
*/ */
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void;
/** /**
*
* @param assortItems Items to add to inventory * @param assortItems Items to add to inventory
* @param requestItem Details of purchased item to add to inventory * @param requestItem Details of purchased item to add to inventory
* @param result Array split stacks are added to * @param result Array split stacks are added to
@ -163,8 +162,8 @@ export declare class InventoryHelper {
*/ */
protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; 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; protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void;
/** /**
* Get details for how a random loot container should be handled, max rewards, possible reward tpls * Get details for how a random loot container should be handled, max rewards, possible reward tpls

View File

@ -11,9 +11,9 @@ export declare class PaymentHelper {
*/ */
isMoneyTpl(tpl: string): boolean; isMoneyTpl(tpl: string): boolean;
/** /**
* Gets currency TPL from TAG * Gets currency TPL from TAG
* @param {string} currency * @param {string} currency
* @returns string * @returns string
*/ */
getCurrency(currency: string): string; getCurrency(currency: string): string;
} }

View File

@ -45,11 +45,11 @@ export declare class QuestHelper {
protected questConfig: IQuestConfig; 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); 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 * Get status of a quest in player profile by its id
* @param pmcData Profile to search * @param pmcData Profile to search
* @param questId Quest id to look up * @param questId Quest id to look up
* @returns QuestStatus enum * @returns QuestStatus enum
*/ */
getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus; getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus;
/** /**
* returns true is the level condition is satisfied * returns true is the level condition is satisfied

View File

@ -25,10 +25,10 @@ export declare class RagfairHelper {
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer);
/** /**
* Gets currency TAG from TPL * Gets currency TAG from TPL
* @param {string} currency * @param {string} currency
* @returns string * @returns string
*/ */
getCurrencyTag(currency: string): string; getCurrencyTag(currency: string): string;
filterCategories(sessionID: string, info: ISearchRequestData): string[]; filterCategories(sessionID: string, info: ISearchRequestData): string[];
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>; getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;

View File

@ -28,7 +28,8 @@ export interface IBotBase {
RepeatableQuests: IPmcDataRepeatableQuest[]; RepeatableQuests: IPmcDataRepeatableQuest[];
Bonuses: Bonus[]; Bonuses: Bonus[];
Notes: Notes; Notes: Notes;
CarExtractCounts: CarExtractCounts; CarExtractCounts: Record<string, number>;
CoopExtractCounts: Record<string, number>;
SurvivorClass: SurvivorClass; SurvivorClass: SurvivorClass;
WishList: string[]; WishList: string[];
/** SPT specific property used during bot generation in raid */ /** SPT specific property used during bot generation in raid */
@ -306,6 +307,8 @@ export interface Productive {
/** Used when sending data to client */ /** Used when sending data to client */
NeedFuelForAllProductionTime?: boolean; NeedFuelForAllProductionTime?: boolean;
sptIsScavCase?: boolean; sptIsScavCase?: boolean;
/** Some crafts are always inProgress, but need to be reset, e.g. water collector */
sptIsComplete?: boolean;
} }
export interface Production extends Productive { export interface Production extends Productive {
RecipeId: string; RecipeId: string;
@ -346,8 +349,6 @@ export interface LastCompleted {
export interface Notes { export interface Notes {
Notes: Note[]; Notes: Note[];
} }
export interface CarExtractCounts {
}
export declare enum SurvivorClass { export declare enum SurvivorClass {
UNKNOWN = 0, UNKNOWN = 0,
NEUTRALIZER = 1, NEUTRALIZER = 1,

View File

@ -5,8 +5,12 @@ export interface IProfileTemplates {
"Left Behind": IProfileSides; "Left Behind": IProfileSides;
"Prepare To Escape": IProfileSides; "Prepare To Escape": IProfileSides;
"Edge Of Darkness": IProfileSides; "Edge Of Darkness": IProfileSides;
"SPT Developer": IProfileSides;
"SPT Easy start": IProfileSides;
"SPT Zero to hero": IProfileSides;
} }
export interface IProfileSides { export interface IProfileSides {
descriptionLocaleKey: string;
usec: TemplateSide; usec: TemplateSide;
bear: TemplateSide; bear: TemplateSide;
} }

View File

@ -1,6 +0,0 @@
import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData";
export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData {
Action: "Unbind";
item: string;
index: number;
}

View File

@ -1,6 +1,6 @@
import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData";
export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData {
Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair";
type: string; type: string;
tid: string; tid: string;
item_id: string; item_id: string;
@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat
scheme_items: SchemeItem[]; scheme_items: SchemeItem[];
} }
export interface SchemeItem { export interface SchemeItem {
/** Id of stack to take money from, is money tpl when Action is `SptInsure` */
id: string; id: string;
count: number; count: number;
} }

View File

@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig {
carExtracts: string[]; carExtracts: string[];
/** Names of coop extracts */ /** Names of coop extracts */
coopExtracts: string[]; coopExtracts: string[];
/** Fene rep gain from a single car extract */ /** Fence rep gain from a single car extract */
carExtractBaseStandingGain: number; carExtractBaseStandingGain: number;
/** Fence rep gain from a single coop extract */
coopExtractBaseStandingGain: number;
/** Fence rep gain when successfully extracting as pscav */ /** Fence rep gain when successfully extracting as pscav */
scavExtractGain: number; scavExtractGain: number;
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */

View File

@ -61,6 +61,9 @@ export interface IRewardScaling {
export interface ITraderWhitelist { export interface ITraderWhitelist {
traderId: string; traderId: string;
questTypes: string[]; questTypes: string[];
rewardBaseWhitelist: string[];
rewardCanBeWeapon: boolean;
weaponRewardChancePercent: number;
} }
export interface IRepeatableQuestTypesConfig { export interface IRepeatableQuestTypesConfig {
Exploration: IExploration; Exploration: IExploration;
@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig {
} }
export interface IExploration extends IBaseQuestConfig { export interface IExploration extends IBaseQuestConfig {
maxExtracts: number; maxExtracts: number;
maxExtractsWithSpecificExit: number;
specificExits: ISpecificExits; specificExits: ISpecificExits;
} }
export interface ISpecificExits { export interface ISpecificExits {
@ -79,6 +83,7 @@ export interface ISpecificExits {
export interface ICompletion extends IBaseQuestConfig { export interface ICompletion extends IBaseQuestConfig {
minRequestedAmount: number; minRequestedAmount: number;
maxRequestedAmount: number; maxRequestedAmount: number;
uniqueItemCount: number;
minRequestedBulletAmount: number; minRequestedBulletAmount: number;
maxRequestedBulletAmount: number; maxRequestedBulletAmount: number;
useWhitelist: boolean; useWhitelist: boolean;

View File

@ -44,4 +44,9 @@ export declare class EventOutputHolder {
* @returns dictionary of hideout productions * @returns dictionary of hideout productions
*/ */
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive>; protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive>;
/**
* 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<string, Productive>): void;
} }

View File

@ -13,7 +13,6 @@ export declare class ItemEventRouter {
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
/** /**
*
* @param info Event request * @param info Event request
* @param sessionID Session id * @param sessionID Session id
* @returns Item response * @returns Item response

View File

@ -1,7 +1,6 @@
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
export declare class HealthSaveLoadRouter extends SaveLoadRouter { export declare class HealthSaveLoadRouter extends SaveLoadRouter {
constructor();
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }

View File

@ -1,7 +1,6 @@
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
export declare class InraidSaveLoadRouter extends SaveLoadRouter { export declare class InraidSaveLoadRouter extends SaveLoadRouter {
constructor();
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }

View File

@ -1,7 +1,6 @@
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { export declare class InsuranceSaveLoadRouter extends SaveLoadRouter {
constructor();
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }

View File

@ -1,7 +1,6 @@
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
export declare class ProfileSaveLoadRouter extends SaveLoadRouter { export declare class ProfileSaveLoadRouter extends SaveLoadRouter {
constructor();
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }

View File

@ -49,13 +49,13 @@ export declare class PaymentService {
*/ */
getMoney(pmcData: IPmcData, amount: number, body: IProcessSellTradeRequestData, output: IItemEventRouterResponse, sessionID: string): IItemEventRouterResponse; getMoney(pmcData: IPmcData, amount: number, body: IProcessSellTradeRequestData, output: IItemEventRouterResponse, sessionID: string): IItemEventRouterResponse;
/** /**
* Recursively checks if the given item is * Recursively checks if the given item is
* inside the stash, that is it has the stash as * inside the stash, that is it has the stash as
* ancestor with slotId=hideout * ancestor with slotId=hideout
*/ */
protected isItemInStash(pmcData: IPmcData, item: Item): boolean; 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 pmcData Player profile to find and remove currency from
* @param currencyTpl Type of currency to pay * @param currencyTpl Type of currency to pay
* @param amountToPay money value to pay * @param amountToPay money value to pay

View File

@ -104,7 +104,6 @@ export declare class ProfileFixerService {
*/ */
addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void;
/** /**
*
* @param profileBonuses bonuses from profile * @param profileBonuses bonuses from profile
* @param bonus bonus to find * @param bonus bonus to find
* @returns matching bonus * @returns matching bonus

View File

@ -41,7 +41,6 @@ export declare class RepairService {
*/ */
repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails;
/** /**
*
* @param sessionID Session id * @param sessionID Session id
* @param pmcData profile to take money from * @param pmcData profile to take money from
* @param repairedItemId Repaired item id * @param repairedItemId Repaired item id
@ -64,7 +63,6 @@ export declare class RepairService {
*/ */
protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number; protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number;
/** /**
*
* @param sessionId Session id * @param sessionId Session id
* @param pmcData Profile to update repaired item in * @param pmcData Profile to update repaired item in
* @param repairKits Array of Repair kits to use * @param repairKits Array of Repair kits to use

View File

@ -28,9 +28,9 @@ export declare class JsonUtil {
/** /**
* From object to string * From object to string
* @param data object to turn into JSON * @param data object to turn into JSON
* @param filename Name of file being serialized * @param filename Name of file being serialized
* @param options Stringify options or a replacer. * @param options Stringify options or a replacer.
* @returns The string converted from the JavaScript value * @returns The string converted from the JavaScript value
*/ */
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;

View File

@ -1,9 +1,9 @@
export declare class MathUtil { export declare class MathUtil {
/** /**
* Helper to create the sum of all array elements * Helper to create the sum of all array elements
* @param {array} values The array with numbers of which to calculate the sum * @param {array} values The array with numbers of which to calculate the sum
* @return {number} sum(values) * @return {number} sum(values)
*/ */
arraySum(values: number[]): number; arraySum(values: number[]): number;
/** /**
* Helper to create the cumulative sum of all array elements * 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; mapToRange(x: number, minIn: number, maxIn: number, minOut: number, maxOut: number): number;
/** /**
* Linear interpolation * Linear interpolation
* e.g. used to do a continuous integration for quest rewards which are defined for specific support centers of pmcLevel * 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 {string} xp the point of x at which to interpolate
* @param {array} x support points in x (of same length as y) * @param {array} x support points in x (of same length as y)
* @param {array} y support points in y (of same length as x) * @param {array} y support points in y (of same length as x)
* @return {number} y(xp) * @return {number} y(xp)
*/ */
interp1(xp: number, x: number[], y: number[]): number; interp1(xp: number, x: number[], y: number[]): number;
} }

View File

@ -2,20 +2,20 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil";
import { MathUtil } from "@spt-aki/utils/MathUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil";
/** /**
* Array of ProbabilityObjectArray which allow to randomly draw of the contained objects * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects
* based on the relative probability of each of its elements. * based on the relative probability of each of its elements.
* The probabilities of the contained element is not required to be normalized. * The probabilities of the contained element is not required to be normalized.
* *
* Example: * Example:
* po = new ProbabilityObjectArray( * po = new ProbabilityObjectArray(
* new ProbabilityObject("a", 5), * new ProbabilityObject("a", 5),
* new ProbabilityObject("b", 1), * new ProbabilityObject("b", 1),
* new ProbabilityObject("c", 1) * new ProbabilityObject("c", 1)
* ); * );
* res = po.draw(10000); * res = po.draw(10000);
* // count the elements which should be distributed according to the relative probabilities * // count the elements which should be distributed according to the relative probabilities
* res.filter(x => x==="b").reduce((sum, x) => sum + 1 , 0) * res.filter(x => x==="b").reduce((sum, x) => sum + 1 , 0)
*/ */
export declare class ProbabilityObjectArray<K, V = undefined> extends Array<ProbabilityObject<K, V>> { export declare class ProbabilityObjectArray<K, V = undefined> extends Array<ProbabilityObject<K, V>> {
private mathUtil; private mathUtil;
private jsonUtil; private jsonUtil;
@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray<K, V = undefined> extends Array<Prob
draw(count?: number, replacement?: boolean, locklist?: Array<K>): K[]; draw(count?: number, replacement?: boolean, locklist?: Array<K>): K[];
} }
/** /**
* A ProbabilityObject which is use as an element to the ProbabilityObjectArray array * A ProbabilityObject which is use as an element to the ProbabilityObjectArray array
* It contains a key, the relative probability as well as optional data. * It contains a key, the relative probability as well as optional data.
*/ */
export declare class ProbabilityObject<K, V = undefined> { export declare class ProbabilityObject<K, V = undefined> {
key: K; key: K;
relativeProbability: number; relativeProbability: number;
data: V; data: V;
/** /**
* Constructor for the ProbabilityObject * Constructor for the ProbabilityObject
* @param {string} key The key of the element * @param {string} key The key of the element
* @param {number} relativeProbability The relative probability of this element * @param {number} relativeProbability The relative probability of this element
* @param {any} data Optional data attached to the element * @param {any} data Optional data attached to the element
*/ */
constructor(key: K, relativeProbability: number, data?: V); constructor(key: K, relativeProbability: number, data?: V);
} }
export declare class RandomUtil { export declare class RandomUtil {

View File

@ -85,7 +85,6 @@ export declare class HideoutController {
*/ */
protected checkAndUpgradeWall(pmcData: IPmcData): void; protected checkAndUpgradeWall(pmcData: IPmcData): void;
/** /**
*
* @param pmcData Profile to edit * @param pmcData Profile to edit
* @param output Object to send back to client * @param output Object to send back to client
* @param sessionID Session/player id * @param sessionID Session/player id
@ -102,7 +101,6 @@ export declare class HideoutController {
*/ */
protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void;
/** /**
*
* @param output Objet to send to client * @param output Objet to send to client
* @param sessionID Session/player id * @param sessionID Session/player id
* @param areaType Hideout area that had stash added * @param areaType Hideout area that had stash added
@ -229,7 +227,7 @@ export declare class HideoutController {
* // TODO - implement this * // TODO - implement this
* @param sessionId Session id * @param sessionId Session id
* @returns IQteData array * @returns IQteData array
*/ */
getQteList(sessionId: string): IQteData[]; getQteList(sessionId: string): IQteData[];
/** /**
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving * Handle HideoutQuickTimeEvent on client/game/profile/items/moving

View File

@ -36,18 +36,19 @@ export declare class InsuranceController {
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig; 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); 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. * Process insurance items of all profiles prior to being given back to the player through the mail service.
* *
* @returns void * @returns void
*/ */
processReturn(): void; processReturn(): void;
/** /**
* Process insurance items of a single profile prior to being given back to the player through the mail service. * Process insurance items of a single profile prior to being given back to the player through the mail service.
* *
* @returns void * @returns void
*/ */
processReturnByProfile(sessionID: string): void; processReturnByProfile(sessionID: string): void;
/** /**
* Get all insured items that are ready to be processed in a specific profile. * Get all insured items that are ready to be processed in a specific profile.

View File

@ -54,10 +54,10 @@ export declare class InventoryController {
protected httpResponseUtil: HttpResponseUtil; 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); 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 * Move Item
* change location of item with parentId and slotId * change location of item with parentId and slotId
* transfers items from one profile to another if fromOwner/toOwner is set in the body. * transfers items from one profile to another if fromOwner/toOwner is set in the body.
* otherwise, move is contained within the same profile_f. * otherwise, move is contained within the same profile_f.
* @param pmcData Profile * @param pmcData Profile
* @param moveRequest Move request data * @param moveRequest Move request data
* @param sessionID Session id * @param sessionID Session id
@ -71,9 +71,9 @@ export declare class InventoryController {
*/ */
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Remove Item from Profile * Remove Item from Profile
* Deep tree item deletion, also removes items from insurance list * Deep tree item deletion, also removes items from insurance list
*/ */
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Handle Remove event * Handle Remove event
@ -111,10 +111,10 @@ export declare class InventoryController {
*/ */
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse; transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Swap Item * Swap Item
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment * 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 * Also used to swap items using quick selection on character screen
*/ */
swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handles folding of Weapons * Handles folding of Weapons

View File

@ -8,12 +8,14 @@ import { Info, ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile";
import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse"; import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse";
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; 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 { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { SaveServer } from "@spt-aki/servers/SaveServer"; import { SaveServer } from "@spt-aki/servers/SaveServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil";
export declare class LauncherController { export declare class LauncherController {
protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
@ -23,11 +25,11 @@ export declare class LauncherController {
protected preAkiModLoader: PreAkiModLoader; protected preAkiModLoader: PreAkiModLoader;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected coreConfig: ICoreConfig; 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; connect(): IConnectResponse;
/** /**
* Get descriptive text for each of the profile edtions a player can choose * 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 * @returns Dictionary of profile types with related descriptive text
*/ */
protected getProfileDescriptions(): Record<string, string>; protected getProfileDescriptions(): Record<string, string>;
find(sessionIdKey: string): Info; find(sessionIdKey: string): Info;

View File

@ -78,6 +78,12 @@ export declare class MatchController {
*/ */
protected extractWasViaCoop(extractName: string): boolean; protected extractWasViaCoop(extractName: string): boolean;
protected sendCoopTakenFenceMessage(sessionId: string): void; 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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract
@ -92,10 +98,11 @@ export declare class MatchController {
*/ */
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
/** /**
* Update players fence trader standing value in profile * Get the fence rep gain from using a car or coop extract
* @param pmcData Player profile * @param pmcData Profile
* @param fenceId Id of fence trader * @param baseGain amount gained for the first extract
* @param extractName Name of extract used * @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;
} }

View File

@ -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) * (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 * The new quests generated are again persisted in profile.RepeatableQuests
* *
*
* @param {string} sessionId Player's session id * @param {string} sessionId Player's session id
* @returns {array} array of "repeatableQuestObjects" as descibed above * @returns {array} array of "repeatableQuestObjects" as descibed above
*/ */

View File

@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router {
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
} }
export declare class ItemEventRouterDefinition extends Router { export declare class ItemEventRouterDefinition extends Router {
constructor();
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
} }
export declare class SaveLoadRouter extends Router { export declare class SaveLoadRouter extends Router {
constructor();
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }
export declare class HandledRoute { export declare class HandledRoute {

View File

@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator {
*/ */
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
/** /**
*
* @param modSlot Slot mod will fit into * @param modSlot Slot mod will fit into
* @param isRandomisableSlot Will generate a randomised mod pool if true * @param isRandomisableSlot Will generate a randomised mod pool if true
* @param modsParent Parent slot the item will be a part of * @param modsParent Parent slot the item will be a part of
@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator {
* @returns ITemplateItem * @returns ITemplateItem
*/ */
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem]; protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, 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 * Create a mod item with parameters as properties
* @param modId _id * @param modId _id

View File

@ -4,7 +4,7 @@ import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper";
import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper";
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; 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 { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails";
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";

View File

@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator {
*/ */
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>; generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
/** /**
*
* @param assortItemIndex Index of assort item * @param assortItemIndex Index of assort item
* @param assortItemsToProcess Item array containing index * @param assortItemsToProcess Item array containing index
* @param expiredOffers Currently expired offers on flea * @param expiredOffers Currently expired offers on flea

View File

@ -6,6 +6,7 @@ import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
import { Exit } from "@spt-aki/models/eft/common/ILocationBase"; import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; 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 { 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 { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; 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) * 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) * 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 * @param {integer} value amount of items of this specific type to request
* @returns {object} object of "Completion"-condition * @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 * 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 * @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; 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 * Select a number of items that have a colelctive value of the passed in parameter
* @param repeatableConfig Config * @param repeatableConfig Config
* @param roublesBudget Total value of items to return * @param roublesBudget Total value of items to return
* @returns Array of reward items that fit budget * @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 * 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 * @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 * @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 * @param repeatableQuestConfig Config file
* @returns List of rewardable items [[_tpl, itemTemplate],...] * @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 * 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. * 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 * @param {string} tpl template id of item to check
* @returns True if item is valid reward * @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 * 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 * The templates include Elimination, Completion and Extraction quest types

View File

@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator {
upd: Upd; upd: Upd;
}, rarity: string): void; }, rarity: string): void;
/** /**
*
* @param dbItems all items from the items.json * @param dbItems all items from the items.json
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
* @returns filtered dbItems array * @returns filtered dbItems array

View File

@ -30,7 +30,7 @@ export declare class BotGeneratorHelper {
* @param botRole Used by weapons to randomize the durability values. Null for non-equipped items * @param botRole Used by weapons to randomize the durability values. Null for non-equipped items
* @returns Item Upd object with extra properties * @returns Item Upd object with extra properties
*/ */
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
upd?: Upd; upd?: Upd;
}; };
/** /**

View File

@ -86,13 +86,6 @@ export declare class InRaidHelper {
* @param tradersClientProfile Client * @param tradersClientProfile Client
*/ */
protected applyTraderStandingAdjustments(tradersServerProfile: Record<string, TraderInfo>, tradersClientProfile: Record<string, TraderInfo>): void; protected applyTraderStandingAdjustments(tradersServerProfile: Record<string, TraderInfo>, tradersClientProfile: Record<string, TraderInfo>): 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' * Set the SPT inraid location Profile property to 'none'
* @param sessionID Session id * @param sessionID Session id

View File

@ -86,7 +86,6 @@ export declare class InventoryHelper {
*/ */
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void;
/** /**
*
* @param assortItems Items to add to inventory * @param assortItems Items to add to inventory
* @param requestItem Details of purchased item to add to inventory * @param requestItem Details of purchased item to add to inventory
* @param result Array split stacks are added to * @param result Array split stacks are added to
@ -163,8 +162,8 @@ export declare class InventoryHelper {
*/ */
protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; 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; protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void;
/** /**
* Get details for how a random loot container should be handled, max rewards, possible reward tpls * Get details for how a random loot container should be handled, max rewards, possible reward tpls

View File

@ -11,9 +11,9 @@ export declare class PaymentHelper {
*/ */
isMoneyTpl(tpl: string): boolean; isMoneyTpl(tpl: string): boolean;
/** /**
* Gets currency TPL from TAG * Gets currency TPL from TAG
* @param {string} currency * @param {string} currency
* @returns string * @returns string
*/ */
getCurrency(currency: string): string; getCurrency(currency: string): string;
} }

View File

@ -45,11 +45,11 @@ export declare class QuestHelper {
protected questConfig: IQuestConfig; 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); 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 * Get status of a quest in player profile by its id
* @param pmcData Profile to search * @param pmcData Profile to search
* @param questId Quest id to look up * @param questId Quest id to look up
* @returns QuestStatus enum * @returns QuestStatus enum
*/ */
getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus; getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus;
/** /**
* returns true is the level condition is satisfied * returns true is the level condition is satisfied

View File

@ -25,10 +25,10 @@ export declare class RagfairHelper {
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer);
/** /**
* Gets currency TAG from TPL * Gets currency TAG from TPL
* @param {string} currency * @param {string} currency
* @returns string * @returns string
*/ */
getCurrencyTag(currency: string): string; getCurrencyTag(currency: string): string;
filterCategories(sessionID: string, info: ISearchRequestData): string[]; filterCategories(sessionID: string, info: ISearchRequestData): string[];
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>; getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;

View File

@ -28,7 +28,8 @@ export interface IBotBase {
RepeatableQuests: IPmcDataRepeatableQuest[]; RepeatableQuests: IPmcDataRepeatableQuest[];
Bonuses: Bonus[]; Bonuses: Bonus[];
Notes: Notes; Notes: Notes;
CarExtractCounts: CarExtractCounts; CarExtractCounts: Record<string, number>;
CoopExtractCounts: Record<string, number>;
SurvivorClass: SurvivorClass; SurvivorClass: SurvivorClass;
WishList: string[]; WishList: string[];
/** SPT specific property used during bot generation in raid */ /** SPT specific property used during bot generation in raid */
@ -306,6 +307,8 @@ export interface Productive {
/** Used when sending data to client */ /** Used when sending data to client */
NeedFuelForAllProductionTime?: boolean; NeedFuelForAllProductionTime?: boolean;
sptIsScavCase?: boolean; sptIsScavCase?: boolean;
/** Some crafts are always inProgress, but need to be reset, e.g. water collector */
sptIsComplete?: boolean;
} }
export interface Production extends Productive { export interface Production extends Productive {
RecipeId: string; RecipeId: string;
@ -346,8 +349,6 @@ export interface LastCompleted {
export interface Notes { export interface Notes {
Notes: Note[]; Notes: Note[];
} }
export interface CarExtractCounts {
}
export declare enum SurvivorClass { export declare enum SurvivorClass {
UNKNOWN = 0, UNKNOWN = 0,
NEUTRALIZER = 1, NEUTRALIZER = 1,

View File

@ -5,8 +5,12 @@ export interface IProfileTemplates {
"Left Behind": IProfileSides; "Left Behind": IProfileSides;
"Prepare To Escape": IProfileSides; "Prepare To Escape": IProfileSides;
"Edge Of Darkness": IProfileSides; "Edge Of Darkness": IProfileSides;
"SPT Developer": IProfileSides;
"SPT Easy start": IProfileSides;
"SPT Zero to hero": IProfileSides;
} }
export interface IProfileSides { export interface IProfileSides {
descriptionLocaleKey: string;
usec: TemplateSide; usec: TemplateSide;
bear: TemplateSide; bear: TemplateSide;
} }

View File

@ -1,6 +0,0 @@
import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData";
export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData {
Action: "Unbind";
item: string;
index: number;
}

View File

@ -1,6 +1,6 @@
import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData";
export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData {
Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair";
type: string; type: string;
tid: string; tid: string;
item_id: string; item_id: string;
@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat
scheme_items: SchemeItem[]; scheme_items: SchemeItem[];
} }
export interface SchemeItem { export interface SchemeItem {
/** Id of stack to take money from, is money tpl when Action is `SptInsure` */
id: string; id: string;
count: number; count: number;
} }

View File

@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig {
carExtracts: string[]; carExtracts: string[];
/** Names of coop extracts */ /** Names of coop extracts */
coopExtracts: string[]; coopExtracts: string[];
/** Fene rep gain from a single car extract */ /** Fence rep gain from a single car extract */
carExtractBaseStandingGain: number; carExtractBaseStandingGain: number;
/** Fence rep gain from a single coop extract */
coopExtractBaseStandingGain: number;
/** Fence rep gain when successfully extracting as pscav */ /** Fence rep gain when successfully extracting as pscav */
scavExtractGain: number; scavExtractGain: number;
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */

View File

@ -61,6 +61,9 @@ export interface IRewardScaling {
export interface ITraderWhitelist { export interface ITraderWhitelist {
traderId: string; traderId: string;
questTypes: string[]; questTypes: string[];
rewardBaseWhitelist: string[];
rewardCanBeWeapon: boolean;
weaponRewardChancePercent: number;
} }
export interface IRepeatableQuestTypesConfig { export interface IRepeatableQuestTypesConfig {
Exploration: IExploration; Exploration: IExploration;
@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig {
} }
export interface IExploration extends IBaseQuestConfig { export interface IExploration extends IBaseQuestConfig {
maxExtracts: number; maxExtracts: number;
maxExtractsWithSpecificExit: number;
specificExits: ISpecificExits; specificExits: ISpecificExits;
} }
export interface ISpecificExits { export interface ISpecificExits {
@ -79,6 +83,7 @@ export interface ISpecificExits {
export interface ICompletion extends IBaseQuestConfig { export interface ICompletion extends IBaseQuestConfig {
minRequestedAmount: number; minRequestedAmount: number;
maxRequestedAmount: number; maxRequestedAmount: number;
uniqueItemCount: number;
minRequestedBulletAmount: number; minRequestedBulletAmount: number;
maxRequestedBulletAmount: number; maxRequestedBulletAmount: number;
useWhitelist: boolean; useWhitelist: boolean;

View File

@ -44,4 +44,9 @@ export declare class EventOutputHolder {
* @returns dictionary of hideout productions * @returns dictionary of hideout productions
*/ */
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive>; protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive>;
/**
* 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<string, Productive>): void;
} }

View File

@ -13,7 +13,6 @@ export declare class ItemEventRouter {
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
/** /**
*
* @param info Event request * @param info Event request
* @param sessionID Session id * @param sessionID Session id
* @returns Item response * @returns Item response

View File

@ -1,7 +1,6 @@
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
export declare class HealthSaveLoadRouter extends SaveLoadRouter { export declare class HealthSaveLoadRouter extends SaveLoadRouter {
constructor();
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }

View File

@ -1,7 +1,6 @@
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
export declare class InraidSaveLoadRouter extends SaveLoadRouter { export declare class InraidSaveLoadRouter extends SaveLoadRouter {
constructor();
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }

View File

@ -1,7 +1,6 @@
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
export declare class InsuranceSaveLoadRouter extends SaveLoadRouter { export declare class InsuranceSaveLoadRouter extends SaveLoadRouter {
constructor();
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }

View File

@ -1,7 +1,6 @@
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
export declare class ProfileSaveLoadRouter extends SaveLoadRouter { export declare class ProfileSaveLoadRouter extends SaveLoadRouter {
constructor();
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }

View File

@ -49,13 +49,13 @@ export declare class PaymentService {
*/ */
getMoney(pmcData: IPmcData, amount: number, body: IProcessSellTradeRequestData, output: IItemEventRouterResponse, sessionID: string): IItemEventRouterResponse; getMoney(pmcData: IPmcData, amount: number, body: IProcessSellTradeRequestData, output: IItemEventRouterResponse, sessionID: string): IItemEventRouterResponse;
/** /**
* Recursively checks if the given item is * Recursively checks if the given item is
* inside the stash, that is it has the stash as * inside the stash, that is it has the stash as
* ancestor with slotId=hideout * ancestor with slotId=hideout
*/ */
protected isItemInStash(pmcData: IPmcData, item: Item): boolean; 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 pmcData Player profile to find and remove currency from
* @param currencyTpl Type of currency to pay * @param currencyTpl Type of currency to pay
* @param amountToPay money value to pay * @param amountToPay money value to pay

View File

@ -104,7 +104,6 @@ export declare class ProfileFixerService {
*/ */
addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void; addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void;
/** /**
*
* @param profileBonuses bonuses from profile * @param profileBonuses bonuses from profile
* @param bonus bonus to find * @param bonus bonus to find
* @returns matching bonus * @returns matching bonus

View File

@ -41,7 +41,6 @@ export declare class RepairService {
*/ */
repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails;
/** /**
*
* @param sessionID Session id * @param sessionID Session id
* @param pmcData profile to take money from * @param pmcData profile to take money from
* @param repairedItemId Repaired item id * @param repairedItemId Repaired item id
@ -64,7 +63,6 @@ export declare class RepairService {
*/ */
protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number; protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number;
/** /**
*
* @param sessionId Session id * @param sessionId Session id
* @param pmcData Profile to update repaired item in * @param pmcData Profile to update repaired item in
* @param repairKits Array of Repair kits to use * @param repairKits Array of Repair kits to use

View File

@ -28,9 +28,9 @@ export declare class JsonUtil {
/** /**
* From object to string * From object to string
* @param data object to turn into JSON * @param data object to turn into JSON
* @param filename Name of file being serialized * @param filename Name of file being serialized
* @param options Stringify options or a replacer. * @param options Stringify options or a replacer.
* @returns The string converted from the JavaScript value * @returns The string converted from the JavaScript value
*/ */
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;

View File

@ -1,9 +1,9 @@
export declare class MathUtil { export declare class MathUtil {
/** /**
* Helper to create the sum of all array elements * Helper to create the sum of all array elements
* @param {array} values The array with numbers of which to calculate the sum * @param {array} values The array with numbers of which to calculate the sum
* @return {number} sum(values) * @return {number} sum(values)
*/ */
arraySum(values: number[]): number; arraySum(values: number[]): number;
/** /**
* Helper to create the cumulative sum of all array elements * 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; mapToRange(x: number, minIn: number, maxIn: number, minOut: number, maxOut: number): number;
/** /**
* Linear interpolation * Linear interpolation
* e.g. used to do a continuous integration for quest rewards which are defined for specific support centers of pmcLevel * 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 {string} xp the point of x at which to interpolate
* @param {array} x support points in x (of same length as y) * @param {array} x support points in x (of same length as y)
* @param {array} y support points in y (of same length as x) * @param {array} y support points in y (of same length as x)
* @return {number} y(xp) * @return {number} y(xp)
*/ */
interp1(xp: number, x: number[], y: number[]): number; interp1(xp: number, x: number[], y: number[]): number;
} }

View File

@ -2,20 +2,20 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil";
import { MathUtil } from "@spt-aki/utils/MathUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil";
/** /**
* Array of ProbabilityObjectArray which allow to randomly draw of the contained objects * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects
* based on the relative probability of each of its elements. * based on the relative probability of each of its elements.
* The probabilities of the contained element is not required to be normalized. * The probabilities of the contained element is not required to be normalized.
* *
* Example: * Example:
* po = new ProbabilityObjectArray( * po = new ProbabilityObjectArray(
* new ProbabilityObject("a", 5), * new ProbabilityObject("a", 5),
* new ProbabilityObject("b", 1), * new ProbabilityObject("b", 1),
* new ProbabilityObject("c", 1) * new ProbabilityObject("c", 1)
* ); * );
* res = po.draw(10000); * res = po.draw(10000);
* // count the elements which should be distributed according to the relative probabilities * // count the elements which should be distributed according to the relative probabilities
* res.filter(x => x==="b").reduce((sum, x) => sum + 1 , 0) * res.filter(x => x==="b").reduce((sum, x) => sum + 1 , 0)
*/ */
export declare class ProbabilityObjectArray<K, V = undefined> extends Array<ProbabilityObject<K, V>> { export declare class ProbabilityObjectArray<K, V = undefined> extends Array<ProbabilityObject<K, V>> {
private mathUtil; private mathUtil;
private jsonUtil; private jsonUtil;
@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray<K, V = undefined> extends Array<Prob
draw(count?: number, replacement?: boolean, locklist?: Array<K>): K[]; draw(count?: number, replacement?: boolean, locklist?: Array<K>): K[];
} }
/** /**
* A ProbabilityObject which is use as an element to the ProbabilityObjectArray array * A ProbabilityObject which is use as an element to the ProbabilityObjectArray array
* It contains a key, the relative probability as well as optional data. * It contains a key, the relative probability as well as optional data.
*/ */
export declare class ProbabilityObject<K, V = undefined> { export declare class ProbabilityObject<K, V = undefined> {
key: K; key: K;
relativeProbability: number; relativeProbability: number;
data: V; data: V;
/** /**
* Constructor for the ProbabilityObject * Constructor for the ProbabilityObject
* @param {string} key The key of the element * @param {string} key The key of the element
* @param {number} relativeProbability The relative probability of this element * @param {number} relativeProbability The relative probability of this element
* @param {any} data Optional data attached to the element * @param {any} data Optional data attached to the element
*/ */
constructor(key: K, relativeProbability: number, data?: V); constructor(key: K, relativeProbability: number, data?: V);
} }
export declare class RandomUtil { export declare class RandomUtil {

View File

@ -85,7 +85,6 @@ export declare class HideoutController {
*/ */
protected checkAndUpgradeWall(pmcData: IPmcData): void; protected checkAndUpgradeWall(pmcData: IPmcData): void;
/** /**
*
* @param pmcData Profile to edit * @param pmcData Profile to edit
* @param output Object to send back to client * @param output Object to send back to client
* @param sessionID Session/player id * @param sessionID Session/player id
@ -102,7 +101,6 @@ export declare class HideoutController {
*/ */
protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void; protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void;
/** /**
*
* @param output Objet to send to client * @param output Objet to send to client
* @param sessionID Session/player id * @param sessionID Session/player id
* @param areaType Hideout area that had stash added * @param areaType Hideout area that had stash added
@ -229,7 +227,7 @@ export declare class HideoutController {
* // TODO - implement this * // TODO - implement this
* @param sessionId Session id * @param sessionId Session id
* @returns IQteData array * @returns IQteData array
*/ */
getQteList(sessionId: string): IQteData[]; getQteList(sessionId: string): IQteData[];
/** /**
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving * Handle HideoutQuickTimeEvent on client/game/profile/items/moving

View File

@ -36,18 +36,19 @@ export declare class InsuranceController {
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig; 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); 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. * Process insurance items of all profiles prior to being given back to the player through the mail service.
* *
* @returns void * @returns void
*/ */
processReturn(): void; processReturn(): void;
/** /**
* Process insurance items of a single profile prior to being given back to the player through the mail service. * Process insurance items of a single profile prior to being given back to the player through the mail service.
* *
* @returns void * @returns void
*/ */
processReturnByProfile(sessionID: string): void; processReturnByProfile(sessionID: string): void;
/** /**
* Get all insured items that are ready to be processed in a specific profile. * Get all insured items that are ready to be processed in a specific profile.

View File

@ -54,10 +54,10 @@ export declare class InventoryController {
protected httpResponseUtil: HttpResponseUtil; 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); 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 * Move Item
* change location of item with parentId and slotId * change location of item with parentId and slotId
* transfers items from one profile to another if fromOwner/toOwner is set in the body. * transfers items from one profile to another if fromOwner/toOwner is set in the body.
* otherwise, move is contained within the same profile_f. * otherwise, move is contained within the same profile_f.
* @param pmcData Profile * @param pmcData Profile
* @param moveRequest Move request data * @param moveRequest Move request data
* @param sessionID Session id * @param sessionID Session id
@ -71,9 +71,9 @@ export declare class InventoryController {
*/ */
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Remove Item from Profile * Remove Item from Profile
* Deep tree item deletion, also removes items from insurance list * Deep tree item deletion, also removes items from insurance list
*/ */
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Handle Remove event * Handle Remove event
@ -111,10 +111,10 @@ export declare class InventoryController {
*/ */
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse; transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Swap Item * Swap Item
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment * 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 * Also used to swap items using quick selection on character screen
*/ */
swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handles folding of Weapons * Handles folding of Weapons

View File

@ -8,12 +8,14 @@ import { Info, ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile";
import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse"; import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse";
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; 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 { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { SaveServer } from "@spt-aki/servers/SaveServer"; import { SaveServer } from "@spt-aki/servers/SaveServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil";
export declare class LauncherController { export declare class LauncherController {
protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
@ -23,11 +25,11 @@ export declare class LauncherController {
protected preAkiModLoader: PreAkiModLoader; protected preAkiModLoader: PreAkiModLoader;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected coreConfig: ICoreConfig; 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; connect(): IConnectResponse;
/** /**
* Get descriptive text for each of the profile edtions a player can choose * 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 * @returns Dictionary of profile types with related descriptive text
*/ */
protected getProfileDescriptions(): Record<string, string>; protected getProfileDescriptions(): Record<string, string>;
find(sessionIdKey: string): Info; find(sessionIdKey: string): Info;

View File

@ -78,6 +78,12 @@ export declare class MatchController {
*/ */
protected extractWasViaCoop(extractName: string): boolean; protected extractWasViaCoop(extractName: string): boolean;
protected sendCoopTakenFenceMessage(sessionId: string): void; 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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract
@ -92,10 +98,11 @@ export declare class MatchController {
*/ */
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void; protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
/** /**
* Update players fence trader standing value in profile * Get the fence rep gain from using a car or coop extract
* @param pmcData Player profile * @param pmcData Profile
* @param fenceId Id of fence trader * @param baseGain amount gained for the first extract
* @param extractName Name of extract used * @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;
} }

View File

@ -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) * (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 * The new quests generated are again persisted in profile.RepeatableQuests
* *
*
* @param {string} sessionId Player's session id * @param {string} sessionId Player's session id
* @returns {array} array of "repeatableQuestObjects" as descibed above * @returns {array} array of "repeatableQuestObjects" as descibed above
*/ */

View File

@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router {
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
} }
export declare class ItemEventRouterDefinition extends Router { export declare class ItemEventRouterDefinition extends Router {
constructor();
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
} }
export declare class SaveLoadRouter extends Router { export declare class SaveLoadRouter extends Router {
constructor();
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }
export declare class HandledRoute { export declare class HandledRoute {

View File

@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator {
*/ */
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
/** /**
*
* @param modSlot Slot mod will fit into * @param modSlot Slot mod will fit into
* @param isRandomisableSlot Will generate a randomised mod pool if true * @param isRandomisableSlot Will generate a randomised mod pool if true
* @param modsParent Parent slot the item will be a part of * @param modsParent Parent slot the item will be a part of
@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator {
* @returns ITemplateItem * @returns ITemplateItem
*/ */
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem]; protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, 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 * Create a mod item with parameters as properties
* @param modId _id * @param modId _id

View File

@ -4,7 +4,7 @@ import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper";
import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper";
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; 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 { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails";
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";

View File

@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator {
*/ */
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>; generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
/** /**
*
* @param assortItemIndex Index of assort item * @param assortItemIndex Index of assort item
* @param assortItemsToProcess Item array containing index * @param assortItemsToProcess Item array containing index
* @param expiredOffers Currently expired offers on flea * @param expiredOffers Currently expired offers on flea

View File

@ -6,6 +6,7 @@ import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
import { Exit } from "@spt-aki/models/eft/common/ILocationBase"; import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; 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 { 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 { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; 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) * 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) * 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 * @param {integer} value amount of items of this specific type to request
* @returns {object} object of "Completion"-condition * @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 * 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 * @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; 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 * Select a number of items that have a colelctive value of the passed in parameter
* @param repeatableConfig Config * @param repeatableConfig Config
* @param roublesBudget Total value of items to return * @param roublesBudget Total value of items to return
* @returns Array of reward items that fit budget * @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 * 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 * @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 * @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 * @param repeatableQuestConfig Config file
* @returns List of rewardable items [[_tpl, itemTemplate],...] * @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 * 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. * 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 * @param {string} tpl template id of item to check
* @returns True if item is valid reward * @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 * 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 * The templates include Elimination, Completion and Extraction quest types

View File

@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator {
upd: Upd; upd: Upd;
}, rarity: string): void; }, rarity: string): void;
/** /**
*
* @param dbItems all items from the items.json * @param dbItems all items from the items.json
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
* @returns filtered dbItems array * @returns filtered dbItems array

View File

@ -30,7 +30,7 @@ export declare class BotGeneratorHelper {
* @param botRole Used by weapons to randomize the durability values. Null for non-equipped items * @param botRole Used by weapons to randomize the durability values. Null for non-equipped items
* @returns Item Upd object with extra properties * @returns Item Upd object with extra properties
*/ */
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
upd?: Upd; upd?: Upd;
}; };
/** /**

View File

@ -86,13 +86,6 @@ export declare class InRaidHelper {
* @param tradersClientProfile Client * @param tradersClientProfile Client
*/ */
protected applyTraderStandingAdjustments(tradersServerProfile: Record<string, TraderInfo>, tradersClientProfile: Record<string, TraderInfo>): void; protected applyTraderStandingAdjustments(tradersServerProfile: Record<string, TraderInfo>, tradersClientProfile: Record<string, TraderInfo>): 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' * Set the SPT inraid location Profile property to 'none'
* @param sessionID Session id * @param sessionID Session id

View File

@ -86,7 +86,6 @@ export declare class InventoryHelper {
*/ */
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void; protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void;
/** /**
*
* @param assortItems Items to add to inventory * @param assortItems Items to add to inventory
* @param requestItem Details of purchased item to add to inventory * @param requestItem Details of purchased item to add to inventory
* @param result Array split stacks are added to * @param result Array split stacks are added to
@ -163,8 +162,8 @@ export declare class InventoryHelper {
*/ */
protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; 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; protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void;
/** /**
* Get details for how a random loot container should be handled, max rewards, possible reward tpls * Get details for how a random loot container should be handled, max rewards, possible reward tpls

View File

@ -11,9 +11,9 @@ export declare class PaymentHelper {
*/ */
isMoneyTpl(tpl: string): boolean; isMoneyTpl(tpl: string): boolean;
/** /**
* Gets currency TPL from TAG * Gets currency TPL from TAG
* @param {string} currency * @param {string} currency
* @returns string * @returns string
*/ */
getCurrency(currency: string): string; getCurrency(currency: string): string;
} }

View File

@ -45,11 +45,11 @@ export declare class QuestHelper {
protected questConfig: IQuestConfig; 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); 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 * Get status of a quest in player profile by its id
* @param pmcData Profile to search * @param pmcData Profile to search
* @param questId Quest id to look up * @param questId Quest id to look up
* @returns QuestStatus enum * @returns QuestStatus enum
*/ */
getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus; getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus;
/** /**
* returns true is the level condition is satisfied * returns true is the level condition is satisfied

View File

@ -25,10 +25,10 @@ export declare class RagfairHelper {
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer);
/** /**
* Gets currency TAG from TPL * Gets currency TAG from TPL
* @param {string} currency * @param {string} currency
* @returns string * @returns string
*/ */
getCurrencyTag(currency: string): string; getCurrencyTag(currency: string): string;
filterCategories(sessionID: string, info: ISearchRequestData): string[]; filterCategories(sessionID: string, info: ISearchRequestData): string[];
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>; getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;

View File

@ -28,7 +28,8 @@ export interface IBotBase {
RepeatableQuests: IPmcDataRepeatableQuest[]; RepeatableQuests: IPmcDataRepeatableQuest[];
Bonuses: Bonus[]; Bonuses: Bonus[];
Notes: Notes; Notes: Notes;
CarExtractCounts: CarExtractCounts; CarExtractCounts: Record<string, number>;
CoopExtractCounts: Record<string, number>;
SurvivorClass: SurvivorClass; SurvivorClass: SurvivorClass;
WishList: string[]; WishList: string[];
/** SPT specific property used during bot generation in raid */ /** SPT specific property used during bot generation in raid */
@ -306,6 +307,8 @@ export interface Productive {
/** Used when sending data to client */ /** Used when sending data to client */
NeedFuelForAllProductionTime?: boolean; NeedFuelForAllProductionTime?: boolean;
sptIsScavCase?: boolean; sptIsScavCase?: boolean;
/** Some crafts are always inProgress, but need to be reset, e.g. water collector */
sptIsComplete?: boolean;
} }
export interface Production extends Productive { export interface Production extends Productive {
RecipeId: string; RecipeId: string;
@ -346,8 +349,6 @@ export interface LastCompleted {
export interface Notes { export interface Notes {
Notes: Note[]; Notes: Note[];
} }
export interface CarExtractCounts {
}
export declare enum SurvivorClass { export declare enum SurvivorClass {
UNKNOWN = 0, UNKNOWN = 0,
NEUTRALIZER = 1, NEUTRALIZER = 1,

View File

@ -5,8 +5,12 @@ export interface IProfileTemplates {
"Left Behind": IProfileSides; "Left Behind": IProfileSides;
"Prepare To Escape": IProfileSides; "Prepare To Escape": IProfileSides;
"Edge Of Darkness": IProfileSides; "Edge Of Darkness": IProfileSides;
"SPT Developer": IProfileSides;
"SPT Easy start": IProfileSides;
"SPT Zero to hero": IProfileSides;
} }
export interface IProfileSides { export interface IProfileSides {
descriptionLocaleKey: string;
usec: TemplateSide; usec: TemplateSide;
bear: TemplateSide; bear: TemplateSide;
} }

View File

@ -1,6 +0,0 @@
import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData";
export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData {
Action: "Unbind";
item: string;
index: number;
}

View File

@ -1,6 +1,6 @@
import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData";
export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData {
Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | ""; Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair";
type: string; type: string;
tid: string; tid: string;
item_id: string; item_id: string;
@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat
scheme_items: SchemeItem[]; scheme_items: SchemeItem[];
} }
export interface SchemeItem { export interface SchemeItem {
/** Id of stack to take money from, is money tpl when Action is `SptInsure` */
id: string; id: string;
count: number; count: number;
} }

View File

@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig {
carExtracts: string[]; carExtracts: string[];
/** Names of coop extracts */ /** Names of coop extracts */
coopExtracts: string[]; coopExtracts: string[];
/** Fene rep gain from a single car extract */ /** Fence rep gain from a single car extract */
carExtractBaseStandingGain: number; carExtractBaseStandingGain: number;
/** Fence rep gain from a single coop extract */
coopExtractBaseStandingGain: number;
/** Fence rep gain when successfully extracting as pscav */ /** Fence rep gain when successfully extracting as pscav */
scavExtractGain: number; scavExtractGain: number;
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */

View File

@ -61,6 +61,9 @@ export interface IRewardScaling {
export interface ITraderWhitelist { export interface ITraderWhitelist {
traderId: string; traderId: string;
questTypes: string[]; questTypes: string[];
rewardBaseWhitelist: string[];
rewardCanBeWeapon: boolean;
weaponRewardChancePercent: number;
} }
export interface IRepeatableQuestTypesConfig { export interface IRepeatableQuestTypesConfig {
Exploration: IExploration; Exploration: IExploration;
@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig {
} }
export interface IExploration extends IBaseQuestConfig { export interface IExploration extends IBaseQuestConfig {
maxExtracts: number; maxExtracts: number;
maxExtractsWithSpecificExit: number;
specificExits: ISpecificExits; specificExits: ISpecificExits;
} }
export interface ISpecificExits { export interface ISpecificExits {
@ -79,6 +83,7 @@ export interface ISpecificExits {
export interface ICompletion extends IBaseQuestConfig { export interface ICompletion extends IBaseQuestConfig {
minRequestedAmount: number; minRequestedAmount: number;
maxRequestedAmount: number; maxRequestedAmount: number;
uniqueItemCount: number;
minRequestedBulletAmount: number; minRequestedBulletAmount: number;
maxRequestedBulletAmount: number; maxRequestedBulletAmount: number;
useWhitelist: boolean; useWhitelist: boolean;

View File

@ -44,4 +44,9 @@ export declare class EventOutputHolder {
* @returns dictionary of hideout productions * @returns dictionary of hideout productions
*/ */
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive>; protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive>;
/**
* 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<string, Productive>): void;
} }

View File

@ -13,7 +13,6 @@ export declare class ItemEventRouter {
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
/** /**
*
* @param info Event request * @param info Event request
* @param sessionID Session id * @param sessionID Session id
* @returns Item response * @returns Item response

View File

@ -1,7 +1,6 @@
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
export declare class HealthSaveLoadRouter extends SaveLoadRouter { export declare class HealthSaveLoadRouter extends SaveLoadRouter {
constructor();
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleLoad(profile: IAkiProfile): IAkiProfile; handleLoad(profile: IAkiProfile): IAkiProfile;
} }

Some files were not shown because too many files have changed in this diff Show More