3.7.3 #19

Merged
chomp merged 2 commits from 3.7.3 into master 2023-11-19 15:48:57 -05:00
756 changed files with 2961 additions and 2562 deletions
Showing only changes of commit ce0ec1c64b - Show all commits

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

View File

@ -36,6 +36,7 @@ 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.

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

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

@ -55,7 +55,7 @@ export declare class PaymentService {
*/ */
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

@ -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

View File

@ -36,6 +36,7 @@ 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.

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

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

@ -55,7 +55,7 @@ export declare class PaymentService {
*/ */
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

@ -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

View File

@ -36,6 +36,7 @@ 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.

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

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

@ -55,7 +55,7 @@ export declare class PaymentService {
*/ */
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

@ -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

View File

@ -36,6 +36,7 @@ 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.

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

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