3.7.3 (#19)
Co-authored-by: Dev <dev@dev.sp-tarkov.com> Reviewed-on: #19
This commit is contained in:
parent
1485ce9452
commit
ca3201b576
@ -1,4 +1,4 @@
|
||||
# Mod examples for v3.7.2
|
||||
# Mod examples for v3.7.3
|
||||
|
||||
A collection of example mods that perform typical actions in SPT
|
||||
|
||||
|
@ -85,7 +85,6 @@ export declare class HideoutController {
|
||||
*/
|
||||
protected checkAndUpgradeWall(pmcData: IPmcData): void;
|
||||
/**
|
||||
*
|
||||
* @param pmcData Profile to edit
|
||||
* @param output Object to send back to client
|
||||
* @param sessionID Session/player id
|
||||
@ -102,7 +101,6 @@ export declare class HideoutController {
|
||||
*/
|
||||
protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void;
|
||||
/**
|
||||
*
|
||||
* @param output Objet to send to client
|
||||
* @param sessionID Session/player id
|
||||
* @param areaType Hideout area that had stash added
|
||||
@ -229,7 +227,7 @@ export declare class HideoutController {
|
||||
* // TODO - implement this
|
||||
* @param sessionId Session id
|
||||
* @returns IQteData array
|
||||
*/
|
||||
*/
|
||||
getQteList(sessionId: string): IQteData[];
|
||||
/**
|
||||
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving
|
||||
|
@ -36,18 +36,19 @@ export declare class InsuranceController {
|
||||
protected mailSendService: MailSendService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
*/
|
||||
processReturn(): void;
|
||||
/**
|
||||
* Process insurance items of a single profile prior to being given back to the player through the mail service.
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
*/
|
||||
processReturnByProfile(sessionID: string): void;
|
||||
/**
|
||||
* Get all insured items that are ready to be processed in a specific profile.
|
||||
|
@ -54,10 +54,10 @@ export declare class InventoryController {
|
||||
protected httpResponseUtil: HttpResponseUtil;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||
/**
|
||||
* Move Item
|
||||
* change location of item with parentId and slotId
|
||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||
* otherwise, move is contained within the same profile_f.
|
||||
* Move Item
|
||||
* change location of item with parentId and slotId
|
||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||
* otherwise, move is contained within the same profile_f.
|
||||
* @param pmcData Profile
|
||||
* @param moveRequest Move request data
|
||||
* @param sessionID Session id
|
||||
@ -71,9 +71,9 @@ export declare class InventoryController {
|
||||
*/
|
||||
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Remove Item from Profile
|
||||
* Deep tree item deletion, also removes items from insurance list
|
||||
*/
|
||||
* Remove Item from Profile
|
||||
* Deep tree item deletion, also removes items from insurance list
|
||||
*/
|
||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle Remove event
|
||||
@ -111,10 +111,10 @@ export declare class InventoryController {
|
||||
*/
|
||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Swap Item
|
||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||
* Also used to swap items using quick selection on character screen
|
||||
*/
|
||||
* Swap Item
|
||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||
* Also used to swap items using quick selection on character screen
|
||||
*/
|
||||
swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles folding of Weapons
|
||||
|
@ -8,12 +8,14 @@ import { Info, ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse";
|
||||
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||
import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
export declare class LauncherController {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected saveServer: SaveServer;
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
@ -23,11 +25,11 @@ export declare class LauncherController {
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
protected configServer: ConfigServer;
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer);
|
||||
connect(): IConnectResponse;
|
||||
/**
|
||||
* Get descriptive text for each of the profile edtions a player can choose
|
||||
* @returns
|
||||
* Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness"
|
||||
* @returns Dictionary of profile types with related descriptive text
|
||||
*/
|
||||
protected getProfileDescriptions(): Record<string, string>;
|
||||
find(sessionIdKey: string): Info;
|
||||
|
@ -78,6 +78,12 @@ export declare class MatchController {
|
||||
*/
|
||||
protected extractWasViaCoop(extractName: string): boolean;
|
||||
protected sendCoopTakenFenceMessage(sessionId: string): void;
|
||||
/**
|
||||
* Handle when a player extracts using a coop extract - add rep to fence
|
||||
* @param pmcData Profile
|
||||
* @param extractName Name of extract taken
|
||||
*/
|
||||
protected handleCoopExtract(pmcData: IPmcData, extractName: string): void;
|
||||
/**
|
||||
* Was extract by car
|
||||
* @param extractName name of extract
|
||||
@ -92,10 +98,11 @@ export declare class MatchController {
|
||||
*/
|
||||
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
|
||||
/**
|
||||
* Update players fence trader standing value in profile
|
||||
* @param pmcData Player profile
|
||||
* @param fenceId Id of fence trader
|
||||
* @param extractName Name of extract used
|
||||
* Get the fence rep gain from using a car or coop extract
|
||||
* @param pmcData Profile
|
||||
* @param baseGain amount gained for the first extract
|
||||
* @param extractCount Number of times extract was taken
|
||||
* @returns Fence standing after taking extract
|
||||
*/
|
||||
protected updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void;
|
||||
protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number;
|
||||
}
|
||||
|
@ -61,7 +61,6 @@ export declare class RepeatableQuestController {
|
||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||
*
|
||||
*
|
||||
* @param {string} sessionId Player's session id
|
||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||
*/
|
||||
|
@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router {
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
}
|
||||
export declare class ItemEventRouterDefinition extends Router {
|
||||
constructor();
|
||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
export declare class SaveLoadRouter extends Router {
|
||||
constructor();
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
export declare class HandledRoute {
|
||||
|
@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator {
|
||||
*/
|
||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||
/**
|
||||
*
|
||||
* @param modSlot Slot mod will fit into
|
||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
||||
* @param modsParent Parent slot the item will be a part of
|
||||
@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator {
|
||||
* @returns ITemplateItem
|
||||
*/
|
||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<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
|
||||
* @param modId _id
|
||||
|
@ -4,7 +4,7 @@ import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
|
@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator {
|
||||
*/
|
||||
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
||||
/**
|
||||
*
|
||||
* @param assortItemIndex Index of assort item
|
||||
* @param assortItemsToProcess Item array containing index
|
||||
* @param expiredOffers Currently expired offers on flea
|
||||
|
@ -6,6 +6,7 @@ import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
|
||||
import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||
@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator {
|
||||
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||
* This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many)
|
||||
*
|
||||
* @param {string} targetItemId id of the item to request
|
||||
* @param {string} itemTpl id of the item to request
|
||||
* @param {integer} value amount of items of this specific type to request
|
||||
* @returns {object} object of "Completion"-condition
|
||||
*/
|
||||
protected generateCompletionAvailableForFinish(targetItemId: string, value: number): ICompletionAvailableFor;
|
||||
protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor;
|
||||
/**
|
||||
* Generates a valid Exploration quest
|
||||
*
|
||||
@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator {
|
||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||
*/
|
||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
||||
/**
|
||||
* Should reward item have stack size increased (25% chance)
|
||||
* @param item Item to possibly increase stack size of
|
||||
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
||||
* @returns True if it should
|
||||
*/
|
||||
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean;
|
||||
/**
|
||||
* Get a randomised number a reward items stack size should be based on its handbook price
|
||||
* @param item Reward item to get stack size for
|
||||
* @returns Stack size value
|
||||
*/
|
||||
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
||||
/**
|
||||
* Select a number of items that have a colelctive value of the passed in parameter
|
||||
* @param repeatableConfig Config
|
||||
* @param roublesBudget Total value of items to return
|
||||
* @returns Array of reward items that fit budget
|
||||
*/
|
||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number): ITemplateItem[];
|
||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
||||
/**
|
||||
* Helper to create a reward item structured as required by the client
|
||||
*
|
||||
@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator {
|
||||
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
||||
* @returns {object} Object of "Reward"-item-type
|
||||
*/
|
||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IReward;
|
||||
/**
|
||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||
* @param repeatableQuestConfig Config file
|
||||
* @returns List of rewardable items [[_tpl, itemTemplate],...]
|
||||
*/
|
||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
|
||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][];
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
||||
* @param {string} tpl template id of item to check
|
||||
* @returns True if item is valid reward
|
||||
*/
|
||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
||||
/**
|
||||
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
||||
* The templates include Elimination, Completion and Extraction quest types
|
||||
|
@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator {
|
||||
upd: Upd;
|
||||
}, rarity: string): void;
|
||||
/**
|
||||
*
|
||||
* @param dbItems all items from the items.json
|
||||
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
|
||||
* @returns filtered dbItems array
|
||||
|
@ -30,7 +30,7 @@ export declare class BotGeneratorHelper {
|
||||
* @param botRole Used by weapons to randomize the durability values. Null for non-equipped items
|
||||
* @returns Item Upd object with extra properties
|
||||
*/
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
|
||||
upd?: Upd;
|
||||
};
|
||||
/**
|
||||
|
@ -86,13 +86,6 @@ export declare class InRaidHelper {
|
||||
* @param tradersClientProfile Client
|
||||
*/
|
||||
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'
|
||||
* @param sessionID Session id
|
||||
|
@ -86,7 +86,6 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void;
|
||||
/**
|
||||
*
|
||||
* @param assortItems Items to add to inventory
|
||||
* @param requestItem Details of purchased item to add to inventory
|
||||
* @param result Array split stacks are added to
|
||||
@ -163,8 +162,8 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void;
|
||||
/**
|
||||
* Internal helper function to handle cartridges in inventory if any of them exist.
|
||||
*/
|
||||
* Internal helper function to handle cartridges in inventory if any of them exist.
|
||||
*/
|
||||
protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void;
|
||||
/**
|
||||
* Get details for how a random loot container should be handled, max rewards, possible reward tpls
|
||||
|
@ -11,9 +11,9 @@ export declare class PaymentHelper {
|
||||
*/
|
||||
isMoneyTpl(tpl: string): boolean;
|
||||
/**
|
||||
* Gets currency TPL from TAG
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
* Gets currency TPL from TAG
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
getCurrency(currency: string): string;
|
||||
}
|
||||
|
@ -45,11 +45,11 @@ export declare class QuestHelper {
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
/**
|
||||
* Get status of a quest in player profile by its id
|
||||
* @param pmcData Profile to search
|
||||
* @param questId Quest id to look up
|
||||
* @returns QuestStatus enum
|
||||
*/
|
||||
* Get status of a quest in player profile by its id
|
||||
* @param pmcData Profile to search
|
||||
* @param questId Quest id to look up
|
||||
* @returns QuestStatus enum
|
||||
*/
|
||||
getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus;
|
||||
/**
|
||||
* returns true is the level condition is satisfied
|
||||
|
@ -25,10 +25,10 @@ export declare class RagfairHelper {
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer);
|
||||
/**
|
||||
* Gets currency TAG from TPL
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
* Gets currency TAG from TPL
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
getCurrencyTag(currency: string): string;
|
||||
filterCategories(sessionID: string, info: ISearchRequestData): string[];
|
||||
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
||||
|
@ -28,7 +28,8 @@ export interface IBotBase {
|
||||
RepeatableQuests: IPmcDataRepeatableQuest[];
|
||||
Bonuses: Bonus[];
|
||||
Notes: Notes;
|
||||
CarExtractCounts: CarExtractCounts;
|
||||
CarExtractCounts: Record<string, number>;
|
||||
CoopExtractCounts: Record<string, number>;
|
||||
SurvivorClass: SurvivorClass;
|
||||
WishList: string[];
|
||||
/** SPT specific property used during bot generation in raid */
|
||||
@ -306,6 +307,8 @@ export interface Productive {
|
||||
/** Used when sending data to client */
|
||||
NeedFuelForAllProductionTime?: boolean;
|
||||
sptIsScavCase?: boolean;
|
||||
/** Some crafts are always inProgress, but need to be reset, e.g. water collector */
|
||||
sptIsComplete?: boolean;
|
||||
}
|
||||
export interface Production extends Productive {
|
||||
RecipeId: string;
|
||||
@ -346,8 +349,6 @@ export interface LastCompleted {
|
||||
export interface Notes {
|
||||
Notes: Note[];
|
||||
}
|
||||
export interface CarExtractCounts {
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
UNKNOWN = 0,
|
||||
NEUTRALIZER = 1,
|
||||
|
@ -5,8 +5,12 @@ export interface IProfileTemplates {
|
||||
"Left Behind": IProfileSides;
|
||||
"Prepare To Escape": IProfileSides;
|
||||
"Edge Of Darkness": IProfileSides;
|
||||
"SPT Developer": IProfileSides;
|
||||
"SPT Easy start": IProfileSides;
|
||||
"SPT Zero to hero": IProfileSides;
|
||||
}
|
||||
export interface IProfileSides {
|
||||
descriptionLocaleKey: string;
|
||||
usec: TemplateSide;
|
||||
bear: TemplateSide;
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData";
|
||||
export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData {
|
||||
Action: "Unbind";
|
||||
item: string;
|
||||
index: number;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData";
|
||||
export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData {
|
||||
Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "";
|
||||
Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair";
|
||||
type: string;
|
||||
tid: string;
|
||||
item_id: string;
|
||||
@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat
|
||||
scheme_items: SchemeItem[];
|
||||
}
|
||||
export interface SchemeItem {
|
||||
/** Id of stack to take money from, is money tpl when Action is `SptInsure` */
|
||||
id: string;
|
||||
count: number;
|
||||
}
|
||||
|
@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig {
|
||||
carExtracts: string[];
|
||||
/** Names of coop extracts */
|
||||
coopExtracts: string[];
|
||||
/** Fene rep gain from a single car extract */
|
||||
/** Fence rep gain from a single car extract */
|
||||
carExtractBaseStandingGain: number;
|
||||
/** Fence rep gain from a single coop extract */
|
||||
coopExtractBaseStandingGain: number;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
|
@ -61,6 +61,9 @@ export interface IRewardScaling {
|
||||
export interface ITraderWhitelist {
|
||||
traderId: string;
|
||||
questTypes: string[];
|
||||
rewardBaseWhitelist: string[];
|
||||
rewardCanBeWeapon: boolean;
|
||||
weaponRewardChancePercent: number;
|
||||
}
|
||||
export interface IRepeatableQuestTypesConfig {
|
||||
Exploration: IExploration;
|
||||
@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig {
|
||||
}
|
||||
export interface IExploration extends IBaseQuestConfig {
|
||||
maxExtracts: number;
|
||||
maxExtractsWithSpecificExit: number;
|
||||
specificExits: ISpecificExits;
|
||||
}
|
||||
export interface ISpecificExits {
|
||||
@ -79,6 +83,7 @@ export interface ISpecificExits {
|
||||
export interface ICompletion extends IBaseQuestConfig {
|
||||
minRequestedAmount: number;
|
||||
maxRequestedAmount: number;
|
||||
uniqueItemCount: number;
|
||||
minRequestedBulletAmount: number;
|
||||
maxRequestedBulletAmount: number;
|
||||
useWhitelist: boolean;
|
||||
|
@ -44,4 +44,9 @@ export declare class EventOutputHolder {
|
||||
* @returns dictionary of hideout productions
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ export declare class ItemEventRouter {
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
|
||||
/**
|
||||
*
|
||||
* @param info Event request
|
||||
* @param sessionID Session id
|
||||
* @returns Item response
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
export declare class HealthSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
export declare class InraidSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
export declare class InsuranceSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
export declare class ProfileSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
|
@ -49,13 +49,13 @@ export declare class PaymentService {
|
||||
*/
|
||||
getMoney(pmcData: IPmcData, amount: number, body: IProcessSellTradeRequestData, output: IItemEventRouterResponse, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Recursively checks if the given item is
|
||||
* inside the stash, that is it has the stash as
|
||||
* ancestor with slotId=hideout
|
||||
*/
|
||||
* Recursively checks if the given item is
|
||||
* inside the stash, that is it has the stash as
|
||||
* ancestor with slotId=hideout
|
||||
*/
|
||||
protected isItemInStash(pmcData: IPmcData, item: Item): boolean;
|
||||
/**
|
||||
* Remove currency from player stash/inventory
|
||||
* Remove currency from player stash/inventory and update client object with changes
|
||||
* @param pmcData Player profile to find and remove currency from
|
||||
* @param currencyTpl Type of currency to pay
|
||||
* @param amountToPay money value to pay
|
||||
|
@ -104,7 +104,6 @@ export declare class ProfileFixerService {
|
||||
*/
|
||||
addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
*
|
||||
* @param profileBonuses bonuses from profile
|
||||
* @param bonus bonus to find
|
||||
* @returns matching bonus
|
||||
|
@ -41,7 +41,6 @@ export declare class RepairService {
|
||||
*/
|
||||
repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails;
|
||||
/**
|
||||
*
|
||||
* @param sessionID Session id
|
||||
* @param pmcData profile to take money from
|
||||
* @param repairedItemId Repaired item id
|
||||
@ -64,7 +63,6 @@ export declare class RepairService {
|
||||
*/
|
||||
protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number;
|
||||
/**
|
||||
*
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Profile to update repaired item in
|
||||
* @param repairKits Array of Repair kits to use
|
||||
|
@ -28,9 +28,9 @@ export declare class JsonUtil {
|
||||
/**
|
||||
* From object to string
|
||||
* @param data object to turn into JSON
|
||||
* @param filename Name of file being serialized
|
||||
* @param options Stringify options or a replacer.
|
||||
* @returns The string converted from the JavaScript value
|
||||
* @param filename Name of file being serialized
|
||||
* @param options Stringify options or a replacer.
|
||||
* @returns The string converted from the JavaScript value
|
||||
*/
|
||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||
|
@ -1,9 +1,9 @@
|
||||
export declare class MathUtil {
|
||||
/**
|
||||
* Helper to create the sum of all array elements
|
||||
* @param {array} values The array with numbers of which to calculate the sum
|
||||
* @return {number} sum(values)
|
||||
*/
|
||||
* @param {array} values The array with numbers of which to calculate the sum
|
||||
* @return {number} sum(values)
|
||||
*/
|
||||
arraySum(values: number[]): number;
|
||||
/**
|
||||
* Helper to create the cumulative sum of all array elements
|
||||
@ -41,13 +41,13 @@ export declare class MathUtil {
|
||||
*/
|
||||
mapToRange(x: number, minIn: number, maxIn: number, minOut: number, maxOut: number): number;
|
||||
/**
|
||||
* Linear interpolation
|
||||
* e.g. used to do a continuous integration for quest rewards which are defined for specific support centers of pmcLevel
|
||||
*
|
||||
* @param {string} xp the point of x at which to interpolate
|
||||
* @param {array} x support points in x (of same length as y)
|
||||
* @param {array} y support points in y (of same length as x)
|
||||
* @return {number} y(xp)
|
||||
*/
|
||||
* Linear interpolation
|
||||
* e.g. used to do a continuous integration for quest rewards which are defined for specific support centers of pmcLevel
|
||||
*
|
||||
* @param {string} xp the point of x at which to interpolate
|
||||
* @param {array} x support points in x (of same length as y)
|
||||
* @param {array} y support points in y (of same length as x)
|
||||
* @return {number} y(xp)
|
||||
*/
|
||||
interp1(xp: number, x: number[], y: number[]): number;
|
||||
}
|
||||
|
@ -2,20 +2,20 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
/**
|
||||
* Array of ProbabilityObjectArray which allow to randomly draw of the contained objects
|
||||
* based on the relative probability of each of its elements.
|
||||
* The probabilities of the contained element is not required to be normalized.
|
||||
*
|
||||
* Example:
|
||||
* po = new ProbabilityObjectArray(
|
||||
* new ProbabilityObject("a", 5),
|
||||
* new ProbabilityObject("b", 1),
|
||||
* new ProbabilityObject("c", 1)
|
||||
* );
|
||||
* res = po.draw(10000);
|
||||
* // count the elements which should be distributed according to the relative probabilities
|
||||
* res.filter(x => x==="b").reduce((sum, x) => sum + 1 , 0)
|
||||
*/
|
||||
* Array of ProbabilityObjectArray which allow to randomly draw of the contained objects
|
||||
* based on the relative probability of each of its elements.
|
||||
* The probabilities of the contained element is not required to be normalized.
|
||||
*
|
||||
* Example:
|
||||
* po = new ProbabilityObjectArray(
|
||||
* new ProbabilityObject("a", 5),
|
||||
* new ProbabilityObject("b", 1),
|
||||
* new ProbabilityObject("c", 1)
|
||||
* );
|
||||
* res = po.draw(10000);
|
||||
* // count the elements which should be distributed according to the relative probabilities
|
||||
* res.filter(x => x==="b").reduce((sum, x) => sum + 1 , 0)
|
||||
*/
|
||||
export declare class ProbabilityObjectArray<K, V = undefined> extends Array<ProbabilityObject<K, V>> {
|
||||
private mathUtil;
|
||||
private jsonUtil;
|
||||
@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray<K, V = undefined> extends Array<Prob
|
||||
draw(count?: number, replacement?: boolean, locklist?: Array<K>): K[];
|
||||
}
|
||||
/**
|
||||
* A ProbabilityObject which is use as an element to the ProbabilityObjectArray array
|
||||
* It contains a key, the relative probability as well as optional data.
|
||||
*/
|
||||
* A ProbabilityObject which is use as an element to the ProbabilityObjectArray array
|
||||
* It contains a key, the relative probability as well as optional data.
|
||||
*/
|
||||
export declare class ProbabilityObject<K, V = undefined> {
|
||||
key: K;
|
||||
relativeProbability: number;
|
||||
data: V;
|
||||
/**
|
||||
* Constructor for the ProbabilityObject
|
||||
* @param {string} key The key of the element
|
||||
* @param {number} relativeProbability The relative probability of this element
|
||||
* @param {any} data Optional data attached to the element
|
||||
*/
|
||||
* Constructor for the ProbabilityObject
|
||||
* @param {string} key The key of the element
|
||||
* @param {number} relativeProbability The relative probability of this element
|
||||
* @param {any} data Optional data attached to the element
|
||||
*/
|
||||
constructor(key: K, relativeProbability: number, data?: V);
|
||||
}
|
||||
export declare class RandomUtil {
|
||||
|
@ -85,7 +85,6 @@ export declare class HideoutController {
|
||||
*/
|
||||
protected checkAndUpgradeWall(pmcData: IPmcData): void;
|
||||
/**
|
||||
*
|
||||
* @param pmcData Profile to edit
|
||||
* @param output Object to send back to client
|
||||
* @param sessionID Session/player id
|
||||
@ -102,7 +101,6 @@ export declare class HideoutController {
|
||||
*/
|
||||
protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void;
|
||||
/**
|
||||
*
|
||||
* @param output Objet to send to client
|
||||
* @param sessionID Session/player id
|
||||
* @param areaType Hideout area that had stash added
|
||||
@ -229,7 +227,7 @@ export declare class HideoutController {
|
||||
* // TODO - implement this
|
||||
* @param sessionId Session id
|
||||
* @returns IQteData array
|
||||
*/
|
||||
*/
|
||||
getQteList(sessionId: string): IQteData[];
|
||||
/**
|
||||
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving
|
||||
|
@ -36,18 +36,19 @@ export declare class InsuranceController {
|
||||
protected mailSendService: MailSendService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
*/
|
||||
processReturn(): void;
|
||||
/**
|
||||
* Process insurance items of a single profile prior to being given back to the player through the mail service.
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
*/
|
||||
processReturnByProfile(sessionID: string): void;
|
||||
/**
|
||||
* Get all insured items that are ready to be processed in a specific profile.
|
||||
|
@ -54,10 +54,10 @@ export declare class InventoryController {
|
||||
protected httpResponseUtil: HttpResponseUtil;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||
/**
|
||||
* Move Item
|
||||
* change location of item with parentId and slotId
|
||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||
* otherwise, move is contained within the same profile_f.
|
||||
* Move Item
|
||||
* change location of item with parentId and slotId
|
||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||
* otherwise, move is contained within the same profile_f.
|
||||
* @param pmcData Profile
|
||||
* @param moveRequest Move request data
|
||||
* @param sessionID Session id
|
||||
@ -71,9 +71,9 @@ export declare class InventoryController {
|
||||
*/
|
||||
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Remove Item from Profile
|
||||
* Deep tree item deletion, also removes items from insurance list
|
||||
*/
|
||||
* Remove Item from Profile
|
||||
* Deep tree item deletion, also removes items from insurance list
|
||||
*/
|
||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle Remove event
|
||||
@ -111,10 +111,10 @@ export declare class InventoryController {
|
||||
*/
|
||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Swap Item
|
||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||
* Also used to swap items using quick selection on character screen
|
||||
*/
|
||||
* Swap Item
|
||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||
* Also used to swap items using quick selection on character screen
|
||||
*/
|
||||
swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles folding of Weapons
|
||||
|
@ -8,12 +8,14 @@ import { Info, ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse";
|
||||
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||
import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
export declare class LauncherController {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected saveServer: SaveServer;
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
@ -23,11 +25,11 @@ export declare class LauncherController {
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
protected configServer: ConfigServer;
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer);
|
||||
connect(): IConnectResponse;
|
||||
/**
|
||||
* Get descriptive text for each of the profile edtions a player can choose
|
||||
* @returns
|
||||
* Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness"
|
||||
* @returns Dictionary of profile types with related descriptive text
|
||||
*/
|
||||
protected getProfileDescriptions(): Record<string, string>;
|
||||
find(sessionIdKey: string): Info;
|
||||
|
@ -78,6 +78,12 @@ export declare class MatchController {
|
||||
*/
|
||||
protected extractWasViaCoop(extractName: string): boolean;
|
||||
protected sendCoopTakenFenceMessage(sessionId: string): void;
|
||||
/**
|
||||
* Handle when a player extracts using a coop extract - add rep to fence
|
||||
* @param pmcData Profile
|
||||
* @param extractName Name of extract taken
|
||||
*/
|
||||
protected handleCoopExtract(pmcData: IPmcData, extractName: string): void;
|
||||
/**
|
||||
* Was extract by car
|
||||
* @param extractName name of extract
|
||||
@ -92,10 +98,11 @@ export declare class MatchController {
|
||||
*/
|
||||
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
|
||||
/**
|
||||
* Update players fence trader standing value in profile
|
||||
* @param pmcData Player profile
|
||||
* @param fenceId Id of fence trader
|
||||
* @param extractName Name of extract used
|
||||
* Get the fence rep gain from using a car or coop extract
|
||||
* @param pmcData Profile
|
||||
* @param baseGain amount gained for the first extract
|
||||
* @param extractCount Number of times extract was taken
|
||||
* @returns Fence standing after taking extract
|
||||
*/
|
||||
protected updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void;
|
||||
protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number;
|
||||
}
|
||||
|
@ -61,7 +61,6 @@ export declare class RepeatableQuestController {
|
||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||
*
|
||||
*
|
||||
* @param {string} sessionId Player's session id
|
||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||
*/
|
||||
|
@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router {
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
}
|
||||
export declare class ItemEventRouterDefinition extends Router {
|
||||
constructor();
|
||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
export declare class SaveLoadRouter extends Router {
|
||||
constructor();
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
export declare class HandledRoute {
|
||||
|
@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator {
|
||||
*/
|
||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||
/**
|
||||
*
|
||||
* @param modSlot Slot mod will fit into
|
||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
||||
* @param modsParent Parent slot the item will be a part of
|
||||
@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator {
|
||||
* @returns ITemplateItem
|
||||
*/
|
||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<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
|
||||
* @param modId _id
|
||||
|
@ -4,7 +4,7 @@ import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
|
@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator {
|
||||
*/
|
||||
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
||||
/**
|
||||
*
|
||||
* @param assortItemIndex Index of assort item
|
||||
* @param assortItemsToProcess Item array containing index
|
||||
* @param expiredOffers Currently expired offers on flea
|
||||
|
@ -6,6 +6,7 @@ import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
|
||||
import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||
@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator {
|
||||
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||
* This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many)
|
||||
*
|
||||
* @param {string} targetItemId id of the item to request
|
||||
* @param {string} itemTpl id of the item to request
|
||||
* @param {integer} value amount of items of this specific type to request
|
||||
* @returns {object} object of "Completion"-condition
|
||||
*/
|
||||
protected generateCompletionAvailableForFinish(targetItemId: string, value: number): ICompletionAvailableFor;
|
||||
protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor;
|
||||
/**
|
||||
* Generates a valid Exploration quest
|
||||
*
|
||||
@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator {
|
||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||
*/
|
||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
||||
/**
|
||||
* Should reward item have stack size increased (25% chance)
|
||||
* @param item Item to possibly increase stack size of
|
||||
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
||||
* @returns True if it should
|
||||
*/
|
||||
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean;
|
||||
/**
|
||||
* Get a randomised number a reward items stack size should be based on its handbook price
|
||||
* @param item Reward item to get stack size for
|
||||
* @returns Stack size value
|
||||
*/
|
||||
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
||||
/**
|
||||
* Select a number of items that have a colelctive value of the passed in parameter
|
||||
* @param repeatableConfig Config
|
||||
* @param roublesBudget Total value of items to return
|
||||
* @returns Array of reward items that fit budget
|
||||
*/
|
||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number): ITemplateItem[];
|
||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
||||
/**
|
||||
* Helper to create a reward item structured as required by the client
|
||||
*
|
||||
@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator {
|
||||
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
||||
* @returns {object} Object of "Reward"-item-type
|
||||
*/
|
||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IReward;
|
||||
/**
|
||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||
* @param repeatableQuestConfig Config file
|
||||
* @returns List of rewardable items [[_tpl, itemTemplate],...]
|
||||
*/
|
||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
|
||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][];
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
||||
* @param {string} tpl template id of item to check
|
||||
* @returns True if item is valid reward
|
||||
*/
|
||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
||||
/**
|
||||
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
||||
* The templates include Elimination, Completion and Extraction quest types
|
||||
|
@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator {
|
||||
upd: Upd;
|
||||
}, rarity: string): void;
|
||||
/**
|
||||
*
|
||||
* @param dbItems all items from the items.json
|
||||
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
|
||||
* @returns filtered dbItems array
|
||||
|
@ -30,7 +30,7 @@ export declare class BotGeneratorHelper {
|
||||
* @param botRole Used by weapons to randomize the durability values. Null for non-equipped items
|
||||
* @returns Item Upd object with extra properties
|
||||
*/
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
|
||||
upd?: Upd;
|
||||
};
|
||||
/**
|
||||
|
@ -86,13 +86,6 @@ export declare class InRaidHelper {
|
||||
* @param tradersClientProfile Client
|
||||
*/
|
||||
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'
|
||||
* @param sessionID Session id
|
||||
|
@ -86,7 +86,6 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void;
|
||||
/**
|
||||
*
|
||||
* @param assortItems Items to add to inventory
|
||||
* @param requestItem Details of purchased item to add to inventory
|
||||
* @param result Array split stacks are added to
|
||||
@ -163,8 +162,8 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void;
|
||||
/**
|
||||
* Internal helper function to handle cartridges in inventory if any of them exist.
|
||||
*/
|
||||
* Internal helper function to handle cartridges in inventory if any of them exist.
|
||||
*/
|
||||
protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void;
|
||||
/**
|
||||
* Get details for how a random loot container should be handled, max rewards, possible reward tpls
|
||||
|
@ -11,9 +11,9 @@ export declare class PaymentHelper {
|
||||
*/
|
||||
isMoneyTpl(tpl: string): boolean;
|
||||
/**
|
||||
* Gets currency TPL from TAG
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
* Gets currency TPL from TAG
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
getCurrency(currency: string): string;
|
||||
}
|
||||
|
@ -45,11 +45,11 @@ export declare class QuestHelper {
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
/**
|
||||
* Get status of a quest in player profile by its id
|
||||
* @param pmcData Profile to search
|
||||
* @param questId Quest id to look up
|
||||
* @returns QuestStatus enum
|
||||
*/
|
||||
* Get status of a quest in player profile by its id
|
||||
* @param pmcData Profile to search
|
||||
* @param questId Quest id to look up
|
||||
* @returns QuestStatus enum
|
||||
*/
|
||||
getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus;
|
||||
/**
|
||||
* returns true is the level condition is satisfied
|
||||
|
@ -25,10 +25,10 @@ export declare class RagfairHelper {
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer);
|
||||
/**
|
||||
* Gets currency TAG from TPL
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
* Gets currency TAG from TPL
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
getCurrencyTag(currency: string): string;
|
||||
filterCategories(sessionID: string, info: ISearchRequestData): string[];
|
||||
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
||||
|
@ -28,7 +28,8 @@ export interface IBotBase {
|
||||
RepeatableQuests: IPmcDataRepeatableQuest[];
|
||||
Bonuses: Bonus[];
|
||||
Notes: Notes;
|
||||
CarExtractCounts: CarExtractCounts;
|
||||
CarExtractCounts: Record<string, number>;
|
||||
CoopExtractCounts: Record<string, number>;
|
||||
SurvivorClass: SurvivorClass;
|
||||
WishList: string[];
|
||||
/** SPT specific property used during bot generation in raid */
|
||||
@ -306,6 +307,8 @@ export interface Productive {
|
||||
/** Used when sending data to client */
|
||||
NeedFuelForAllProductionTime?: boolean;
|
||||
sptIsScavCase?: boolean;
|
||||
/** Some crafts are always inProgress, but need to be reset, e.g. water collector */
|
||||
sptIsComplete?: boolean;
|
||||
}
|
||||
export interface Production extends Productive {
|
||||
RecipeId: string;
|
||||
@ -346,8 +349,6 @@ export interface LastCompleted {
|
||||
export interface Notes {
|
||||
Notes: Note[];
|
||||
}
|
||||
export interface CarExtractCounts {
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
UNKNOWN = 0,
|
||||
NEUTRALIZER = 1,
|
||||
|
@ -5,8 +5,12 @@ export interface IProfileTemplates {
|
||||
"Left Behind": IProfileSides;
|
||||
"Prepare To Escape": IProfileSides;
|
||||
"Edge Of Darkness": IProfileSides;
|
||||
"SPT Developer": IProfileSides;
|
||||
"SPT Easy start": IProfileSides;
|
||||
"SPT Zero to hero": IProfileSides;
|
||||
}
|
||||
export interface IProfileSides {
|
||||
descriptionLocaleKey: string;
|
||||
usec: TemplateSide;
|
||||
bear: TemplateSide;
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData";
|
||||
export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData {
|
||||
Action: "Unbind";
|
||||
item: string;
|
||||
index: number;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData";
|
||||
export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData {
|
||||
Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "";
|
||||
Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair";
|
||||
type: string;
|
||||
tid: string;
|
||||
item_id: string;
|
||||
@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat
|
||||
scheme_items: SchemeItem[];
|
||||
}
|
||||
export interface SchemeItem {
|
||||
/** Id of stack to take money from, is money tpl when Action is `SptInsure` */
|
||||
id: string;
|
||||
count: number;
|
||||
}
|
||||
|
@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig {
|
||||
carExtracts: string[];
|
||||
/** Names of coop extracts */
|
||||
coopExtracts: string[];
|
||||
/** Fene rep gain from a single car extract */
|
||||
/** Fence rep gain from a single car extract */
|
||||
carExtractBaseStandingGain: number;
|
||||
/** Fence rep gain from a single coop extract */
|
||||
coopExtractBaseStandingGain: number;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
|
@ -61,6 +61,9 @@ export interface IRewardScaling {
|
||||
export interface ITraderWhitelist {
|
||||
traderId: string;
|
||||
questTypes: string[];
|
||||
rewardBaseWhitelist: string[];
|
||||
rewardCanBeWeapon: boolean;
|
||||
weaponRewardChancePercent: number;
|
||||
}
|
||||
export interface IRepeatableQuestTypesConfig {
|
||||
Exploration: IExploration;
|
||||
@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig {
|
||||
}
|
||||
export interface IExploration extends IBaseQuestConfig {
|
||||
maxExtracts: number;
|
||||
maxExtractsWithSpecificExit: number;
|
||||
specificExits: ISpecificExits;
|
||||
}
|
||||
export interface ISpecificExits {
|
||||
@ -79,6 +83,7 @@ export interface ISpecificExits {
|
||||
export interface ICompletion extends IBaseQuestConfig {
|
||||
minRequestedAmount: number;
|
||||
maxRequestedAmount: number;
|
||||
uniqueItemCount: number;
|
||||
minRequestedBulletAmount: number;
|
||||
maxRequestedBulletAmount: number;
|
||||
useWhitelist: boolean;
|
||||
|
@ -44,4 +44,9 @@ export declare class EventOutputHolder {
|
||||
* @returns dictionary of hideout productions
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ export declare class ItemEventRouter {
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
|
||||
/**
|
||||
*
|
||||
* @param info Event request
|
||||
* @param sessionID Session id
|
||||
* @returns Item response
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
export declare class HealthSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
export declare class InraidSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
export declare class InsuranceSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
export declare class ProfileSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
|
@ -49,13 +49,13 @@ export declare class PaymentService {
|
||||
*/
|
||||
getMoney(pmcData: IPmcData, amount: number, body: IProcessSellTradeRequestData, output: IItemEventRouterResponse, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Recursively checks if the given item is
|
||||
* inside the stash, that is it has the stash as
|
||||
* ancestor with slotId=hideout
|
||||
*/
|
||||
* Recursively checks if the given item is
|
||||
* inside the stash, that is it has the stash as
|
||||
* ancestor with slotId=hideout
|
||||
*/
|
||||
protected isItemInStash(pmcData: IPmcData, item: Item): boolean;
|
||||
/**
|
||||
* Remove currency from player stash/inventory
|
||||
* Remove currency from player stash/inventory and update client object with changes
|
||||
* @param pmcData Player profile to find and remove currency from
|
||||
* @param currencyTpl Type of currency to pay
|
||||
* @param amountToPay money value to pay
|
||||
|
@ -104,7 +104,6 @@ export declare class ProfileFixerService {
|
||||
*/
|
||||
addMissingHideoutBonusesToProfile(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
*
|
||||
* @param profileBonuses bonuses from profile
|
||||
* @param bonus bonus to find
|
||||
* @returns matching bonus
|
||||
|
@ -41,7 +41,6 @@ export declare class RepairService {
|
||||
*/
|
||||
repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails;
|
||||
/**
|
||||
*
|
||||
* @param sessionID Session id
|
||||
* @param pmcData profile to take money from
|
||||
* @param repairedItemId Repaired item id
|
||||
@ -64,7 +63,6 @@ export declare class RepairService {
|
||||
*/
|
||||
protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number;
|
||||
/**
|
||||
*
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Profile to update repaired item in
|
||||
* @param repairKits Array of Repair kits to use
|
||||
|
@ -28,9 +28,9 @@ export declare class JsonUtil {
|
||||
/**
|
||||
* From object to string
|
||||
* @param data object to turn into JSON
|
||||
* @param filename Name of file being serialized
|
||||
* @param options Stringify options or a replacer.
|
||||
* @returns The string converted from the JavaScript value
|
||||
* @param filename Name of file being serialized
|
||||
* @param options Stringify options or a replacer.
|
||||
* @returns The string converted from the JavaScript value
|
||||
*/
|
||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||
|
@ -1,9 +1,9 @@
|
||||
export declare class MathUtil {
|
||||
/**
|
||||
* Helper to create the sum of all array elements
|
||||
* @param {array} values The array with numbers of which to calculate the sum
|
||||
* @return {number} sum(values)
|
||||
*/
|
||||
* @param {array} values The array with numbers of which to calculate the sum
|
||||
* @return {number} sum(values)
|
||||
*/
|
||||
arraySum(values: number[]): number;
|
||||
/**
|
||||
* Helper to create the cumulative sum of all array elements
|
||||
@ -41,13 +41,13 @@ export declare class MathUtil {
|
||||
*/
|
||||
mapToRange(x: number, minIn: number, maxIn: number, minOut: number, maxOut: number): number;
|
||||
/**
|
||||
* Linear interpolation
|
||||
* e.g. used to do a continuous integration for quest rewards which are defined for specific support centers of pmcLevel
|
||||
*
|
||||
* @param {string} xp the point of x at which to interpolate
|
||||
* @param {array} x support points in x (of same length as y)
|
||||
* @param {array} y support points in y (of same length as x)
|
||||
* @return {number} y(xp)
|
||||
*/
|
||||
* Linear interpolation
|
||||
* e.g. used to do a continuous integration for quest rewards which are defined for specific support centers of pmcLevel
|
||||
*
|
||||
* @param {string} xp the point of x at which to interpolate
|
||||
* @param {array} x support points in x (of same length as y)
|
||||
* @param {array} y support points in y (of same length as x)
|
||||
* @return {number} y(xp)
|
||||
*/
|
||||
interp1(xp: number, x: number[], y: number[]): number;
|
||||
}
|
||||
|
@ -2,20 +2,20 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
/**
|
||||
* Array of ProbabilityObjectArray which allow to randomly draw of the contained objects
|
||||
* based on the relative probability of each of its elements.
|
||||
* The probabilities of the contained element is not required to be normalized.
|
||||
*
|
||||
* Example:
|
||||
* po = new ProbabilityObjectArray(
|
||||
* new ProbabilityObject("a", 5),
|
||||
* new ProbabilityObject("b", 1),
|
||||
* new ProbabilityObject("c", 1)
|
||||
* );
|
||||
* res = po.draw(10000);
|
||||
* // count the elements which should be distributed according to the relative probabilities
|
||||
* res.filter(x => x==="b").reduce((sum, x) => sum + 1 , 0)
|
||||
*/
|
||||
* Array of ProbabilityObjectArray which allow to randomly draw of the contained objects
|
||||
* based on the relative probability of each of its elements.
|
||||
* The probabilities of the contained element is not required to be normalized.
|
||||
*
|
||||
* Example:
|
||||
* po = new ProbabilityObjectArray(
|
||||
* new ProbabilityObject("a", 5),
|
||||
* new ProbabilityObject("b", 1),
|
||||
* new ProbabilityObject("c", 1)
|
||||
* );
|
||||
* res = po.draw(10000);
|
||||
* // count the elements which should be distributed according to the relative probabilities
|
||||
* res.filter(x => x==="b").reduce((sum, x) => sum + 1 , 0)
|
||||
*/
|
||||
export declare class ProbabilityObjectArray<K, V = undefined> extends Array<ProbabilityObject<K, V>> {
|
||||
private mathUtil;
|
||||
private jsonUtil;
|
||||
@ -87,19 +87,19 @@ export declare class ProbabilityObjectArray<K, V = undefined> extends Array<Prob
|
||||
draw(count?: number, replacement?: boolean, locklist?: Array<K>): K[];
|
||||
}
|
||||
/**
|
||||
* A ProbabilityObject which is use as an element to the ProbabilityObjectArray array
|
||||
* It contains a key, the relative probability as well as optional data.
|
||||
*/
|
||||
* A ProbabilityObject which is use as an element to the ProbabilityObjectArray array
|
||||
* It contains a key, the relative probability as well as optional data.
|
||||
*/
|
||||
export declare class ProbabilityObject<K, V = undefined> {
|
||||
key: K;
|
||||
relativeProbability: number;
|
||||
data: V;
|
||||
/**
|
||||
* Constructor for the ProbabilityObject
|
||||
* @param {string} key The key of the element
|
||||
* @param {number} relativeProbability The relative probability of this element
|
||||
* @param {any} data Optional data attached to the element
|
||||
*/
|
||||
* Constructor for the ProbabilityObject
|
||||
* @param {string} key The key of the element
|
||||
* @param {number} relativeProbability The relative probability of this element
|
||||
* @param {any} data Optional data attached to the element
|
||||
*/
|
||||
constructor(key: K, relativeProbability: number, data?: V);
|
||||
}
|
||||
export declare class RandomUtil {
|
||||
|
@ -85,7 +85,6 @@ export declare class HideoutController {
|
||||
*/
|
||||
protected checkAndUpgradeWall(pmcData: IPmcData): void;
|
||||
/**
|
||||
*
|
||||
* @param pmcData Profile to edit
|
||||
* @param output Object to send back to client
|
||||
* @param sessionID Session/player id
|
||||
@ -102,7 +101,6 @@ export declare class HideoutController {
|
||||
*/
|
||||
protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void;
|
||||
/**
|
||||
*
|
||||
* @param output Objet to send to client
|
||||
* @param sessionID Session/player id
|
||||
* @param areaType Hideout area that had stash added
|
||||
@ -229,7 +227,7 @@ export declare class HideoutController {
|
||||
* // TODO - implement this
|
||||
* @param sessionId Session id
|
||||
* @returns IQteData array
|
||||
*/
|
||||
*/
|
||||
getQteList(sessionId: string): IQteData[];
|
||||
/**
|
||||
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving
|
||||
|
@ -36,18 +36,19 @@ export declare class InsuranceController {
|
||||
protected mailSendService: MailSendService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
*/
|
||||
processReturn(): void;
|
||||
/**
|
||||
* Process insurance items of a single profile prior to being given back to the player through the mail service.
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
*/
|
||||
processReturnByProfile(sessionID: string): void;
|
||||
/**
|
||||
* Get all insured items that are ready to be processed in a specific profile.
|
||||
|
@ -54,10 +54,10 @@ export declare class InventoryController {
|
||||
protected httpResponseUtil: HttpResponseUtil;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||
/**
|
||||
* Move Item
|
||||
* change location of item with parentId and slotId
|
||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||
* otherwise, move is contained within the same profile_f.
|
||||
* Move Item
|
||||
* change location of item with parentId and slotId
|
||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||
* otherwise, move is contained within the same profile_f.
|
||||
* @param pmcData Profile
|
||||
* @param moveRequest Move request data
|
||||
* @param sessionID Session id
|
||||
@ -71,9 +71,9 @@ export declare class InventoryController {
|
||||
*/
|
||||
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Remove Item from Profile
|
||||
* Deep tree item deletion, also removes items from insurance list
|
||||
*/
|
||||
* Remove Item from Profile
|
||||
* Deep tree item deletion, also removes items from insurance list
|
||||
*/
|
||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle Remove event
|
||||
@ -111,10 +111,10 @@ export declare class InventoryController {
|
||||
*/
|
||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Swap Item
|
||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||
* Also used to swap items using quick selection on character screen
|
||||
*/
|
||||
* Swap Item
|
||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||
* Also used to swap items using quick selection on character screen
|
||||
*/
|
||||
swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles folding of Weapons
|
||||
|
@ -8,12 +8,14 @@ import { Info, ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse";
|
||||
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||
import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
export declare class LauncherController {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected saveServer: SaveServer;
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
@ -23,11 +25,11 @@ export declare class LauncherController {
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
protected configServer: ConfigServer;
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer);
|
||||
connect(): IConnectResponse;
|
||||
/**
|
||||
* Get descriptive text for each of the profile edtions a player can choose
|
||||
* @returns
|
||||
* Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness"
|
||||
* @returns Dictionary of profile types with related descriptive text
|
||||
*/
|
||||
protected getProfileDescriptions(): Record<string, string>;
|
||||
find(sessionIdKey: string): Info;
|
||||
|
@ -78,6 +78,12 @@ export declare class MatchController {
|
||||
*/
|
||||
protected extractWasViaCoop(extractName: string): boolean;
|
||||
protected sendCoopTakenFenceMessage(sessionId: string): void;
|
||||
/**
|
||||
* Handle when a player extracts using a coop extract - add rep to fence
|
||||
* @param pmcData Profile
|
||||
* @param extractName Name of extract taken
|
||||
*/
|
||||
protected handleCoopExtract(pmcData: IPmcData, extractName: string): void;
|
||||
/**
|
||||
* Was extract by car
|
||||
* @param extractName name of extract
|
||||
@ -92,10 +98,11 @@ export declare class MatchController {
|
||||
*/
|
||||
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
|
||||
/**
|
||||
* Update players fence trader standing value in profile
|
||||
* @param pmcData Player profile
|
||||
* @param fenceId Id of fence trader
|
||||
* @param extractName Name of extract used
|
||||
* Get the fence rep gain from using a car or coop extract
|
||||
* @param pmcData Profile
|
||||
* @param baseGain amount gained for the first extract
|
||||
* @param extractCount Number of times extract was taken
|
||||
* @returns Fence standing after taking extract
|
||||
*/
|
||||
protected updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void;
|
||||
protected getFenceStandingAfterExtract(pmcData: IPmcData, baseGain: number, extractCount: number): number;
|
||||
}
|
||||
|
@ -61,7 +61,6 @@ export declare class RepeatableQuestController {
|
||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||
*
|
||||
*
|
||||
* @param {string} sessionId Player's session id
|
||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||
*/
|
||||
|
@ -21,11 +21,9 @@ export declare class DynamicRouter extends Router {
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
}
|
||||
export declare class ItemEventRouterDefinition extends Router {
|
||||
constructor();
|
||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
export declare class SaveLoadRouter extends Router {
|
||||
constructor();
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
export declare class HandledRoute {
|
||||
|
@ -104,7 +104,6 @@ export declare class BotEquipmentModGenerator {
|
||||
*/
|
||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||
/**
|
||||
*
|
||||
* @param modSlot Slot mod will fit into
|
||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
||||
* @param modsParent Parent slot the item will be a part of
|
||||
@ -116,6 +115,13 @@ export declare class BotEquipmentModGenerator {
|
||||
* @returns ITemplateItem
|
||||
*/
|
||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<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
|
||||
* @param modId _id
|
||||
|
@ -4,7 +4,7 @@ import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
|
@ -121,7 +121,6 @@ export declare class RagfairOfferGenerator {
|
||||
*/
|
||||
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
||||
/**
|
||||
*
|
||||
* @param assortItemIndex Index of assort item
|
||||
* @param assortItemsToProcess Item array containing index
|
||||
* @param expiredOffers Currently expired offers on flea
|
||||
|
@ -6,6 +6,7 @@ import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
|
||||
import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||
@ -105,11 +106,11 @@ export declare class RepeatableQuestGenerator {
|
||||
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||
* This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many)
|
||||
*
|
||||
* @param {string} targetItemId id of the item to request
|
||||
* @param {string} itemTpl id of the item to request
|
||||
* @param {integer} value amount of items of this specific type to request
|
||||
* @returns {object} object of "Completion"-condition
|
||||
*/
|
||||
protected generateCompletionAvailableForFinish(targetItemId: string, value: number): ICompletionAvailableFor;
|
||||
protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor;
|
||||
/**
|
||||
* Generates a valid Exploration quest
|
||||
*
|
||||
@ -156,13 +157,26 @@ export declare class RepeatableQuestGenerator {
|
||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||
*/
|
||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
||||
/**
|
||||
* Should reward item have stack size increased (25% chance)
|
||||
* @param item Item to possibly increase stack size of
|
||||
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
||||
* @returns True if it should
|
||||
*/
|
||||
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean;
|
||||
/**
|
||||
* Get a randomised number a reward items stack size should be based on its handbook price
|
||||
* @param item Reward item to get stack size for
|
||||
* @returns Stack size value
|
||||
*/
|
||||
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
||||
/**
|
||||
* Select a number of items that have a colelctive value of the passed in parameter
|
||||
* @param repeatableConfig Config
|
||||
* @param roublesBudget Total value of items to return
|
||||
* @returns Array of reward items that fit budget
|
||||
*/
|
||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number): ITemplateItem[];
|
||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
||||
/**
|
||||
* Helper to create a reward item structured as required by the client
|
||||
*
|
||||
@ -171,20 +185,20 @@ export declare class RepeatableQuestGenerator {
|
||||
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
||||
* @returns {object} Object of "Reward"-item-type
|
||||
*/
|
||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IReward;
|
||||
/**
|
||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||
* @param repeatableQuestConfig Config file
|
||||
* @returns List of rewardable items [[_tpl, itemTemplate],...]
|
||||
*/
|
||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
|
||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][];
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
||||
* @param {string} tpl template id of item to check
|
||||
* @returns True if item is valid reward
|
||||
*/
|
||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
||||
/**
|
||||
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
||||
* The templates include Elimination, Completion and Extraction quest types
|
||||
|
@ -84,7 +84,6 @@ export declare class ScavCaseRewardGenerator {
|
||||
upd: Upd;
|
||||
}, rarity: string): void;
|
||||
/**
|
||||
*
|
||||
* @param dbItems all items from the items.json
|
||||
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
|
||||
* @returns filtered dbItems array
|
||||
|
@ -30,7 +30,7 @@ export declare class BotGeneratorHelper {
|
||||
* @param botRole Used by weapons to randomize the durability values. Null for non-equipped items
|
||||
* @returns Item Upd object with extra properties
|
||||
*/
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
|
||||
upd?: Upd;
|
||||
};
|
||||
/**
|
||||
|
@ -86,13 +86,6 @@ export declare class InRaidHelper {
|
||||
* @param tradersClientProfile Client
|
||||
*/
|
||||
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'
|
||||
* @param sessionID Session id
|
||||
|
@ -86,7 +86,6 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void;
|
||||
/**
|
||||
*
|
||||
* @param assortItems Items to add to inventory
|
||||
* @param requestItem Details of purchased item to add to inventory
|
||||
* @param result Array split stacks are added to
|
||||
@ -163,8 +162,8 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void;
|
||||
/**
|
||||
* Internal helper function to handle cartridges in inventory if any of them exist.
|
||||
*/
|
||||
* Internal helper function to handle cartridges in inventory if any of them exist.
|
||||
*/
|
||||
protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void;
|
||||
/**
|
||||
* Get details for how a random loot container should be handled, max rewards, possible reward tpls
|
||||
|
@ -11,9 +11,9 @@ export declare class PaymentHelper {
|
||||
*/
|
||||
isMoneyTpl(tpl: string): boolean;
|
||||
/**
|
||||
* Gets currency TPL from TAG
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
* Gets currency TPL from TAG
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
getCurrency(currency: string): string;
|
||||
}
|
||||
|
@ -45,11 +45,11 @@ export declare class QuestHelper {
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
/**
|
||||
* Get status of a quest in player profile by its id
|
||||
* @param pmcData Profile to search
|
||||
* @param questId Quest id to look up
|
||||
* @returns QuestStatus enum
|
||||
*/
|
||||
* Get status of a quest in player profile by its id
|
||||
* @param pmcData Profile to search
|
||||
* @param questId Quest id to look up
|
||||
* @returns QuestStatus enum
|
||||
*/
|
||||
getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus;
|
||||
/**
|
||||
* returns true is the level condition is satisfied
|
||||
|
@ -25,10 +25,10 @@ export declare class RagfairHelper {
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer);
|
||||
/**
|
||||
* Gets currency TAG from TPL
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
* Gets currency TAG from TPL
|
||||
* @param {string} currency
|
||||
* @returns string
|
||||
*/
|
||||
getCurrencyTag(currency: string): string;
|
||||
filterCategories(sessionID: string, info: ISearchRequestData): string[];
|
||||
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
||||
|
@ -28,7 +28,8 @@ export interface IBotBase {
|
||||
RepeatableQuests: IPmcDataRepeatableQuest[];
|
||||
Bonuses: Bonus[];
|
||||
Notes: Notes;
|
||||
CarExtractCounts: CarExtractCounts;
|
||||
CarExtractCounts: Record<string, number>;
|
||||
CoopExtractCounts: Record<string, number>;
|
||||
SurvivorClass: SurvivorClass;
|
||||
WishList: string[];
|
||||
/** SPT specific property used during bot generation in raid */
|
||||
@ -306,6 +307,8 @@ export interface Productive {
|
||||
/** Used when sending data to client */
|
||||
NeedFuelForAllProductionTime?: boolean;
|
||||
sptIsScavCase?: boolean;
|
||||
/** Some crafts are always inProgress, but need to be reset, e.g. water collector */
|
||||
sptIsComplete?: boolean;
|
||||
}
|
||||
export interface Production extends Productive {
|
||||
RecipeId: string;
|
||||
@ -346,8 +349,6 @@ export interface LastCompleted {
|
||||
export interface Notes {
|
||||
Notes: Note[];
|
||||
}
|
||||
export interface CarExtractCounts {
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
UNKNOWN = 0,
|
||||
NEUTRALIZER = 1,
|
||||
|
@ -5,8 +5,12 @@ export interface IProfileTemplates {
|
||||
"Left Behind": IProfileSides;
|
||||
"Prepare To Escape": IProfileSides;
|
||||
"Edge Of Darkness": IProfileSides;
|
||||
"SPT Developer": IProfileSides;
|
||||
"SPT Easy start": IProfileSides;
|
||||
"SPT Zero to hero": IProfileSides;
|
||||
}
|
||||
export interface IProfileSides {
|
||||
descriptionLocaleKey: string;
|
||||
usec: TemplateSide;
|
||||
bear: TemplateSide;
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/IInventoryBaseActionRequestData";
|
||||
export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData {
|
||||
Action: "Unbind";
|
||||
item: string;
|
||||
index: number;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData";
|
||||
export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData {
|
||||
Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "";
|
||||
Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "" | "SptInsure" | "SptRepair";
|
||||
type: string;
|
||||
tid: string;
|
||||
item_id: string;
|
||||
@ -9,6 +9,7 @@ export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestDat
|
||||
scheme_items: SchemeItem[];
|
||||
}
|
||||
export interface SchemeItem {
|
||||
/** Id of stack to take money from, is money tpl when Action is `SptInsure` */
|
||||
id: string;
|
||||
count: number;
|
||||
}
|
||||
|
@ -10,8 +10,10 @@ export interface IInRaidConfig extends IBaseConfig {
|
||||
carExtracts: string[];
|
||||
/** Names of coop extracts */
|
||||
coopExtracts: string[];
|
||||
/** Fene rep gain from a single car extract */
|
||||
/** Fence rep gain from a single car extract */
|
||||
carExtractBaseStandingGain: number;
|
||||
/** Fence rep gain from a single coop extract */
|
||||
coopExtractBaseStandingGain: number;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
|
@ -61,6 +61,9 @@ export interface IRewardScaling {
|
||||
export interface ITraderWhitelist {
|
||||
traderId: string;
|
||||
questTypes: string[];
|
||||
rewardBaseWhitelist: string[];
|
||||
rewardCanBeWeapon: boolean;
|
||||
weaponRewardChancePercent: number;
|
||||
}
|
||||
export interface IRepeatableQuestTypesConfig {
|
||||
Exploration: IExploration;
|
||||
@ -70,6 +73,7 @@ export interface IRepeatableQuestTypesConfig {
|
||||
}
|
||||
export interface IExploration extends IBaseQuestConfig {
|
||||
maxExtracts: number;
|
||||
maxExtractsWithSpecificExit: number;
|
||||
specificExits: ISpecificExits;
|
||||
}
|
||||
export interface ISpecificExits {
|
||||
@ -79,6 +83,7 @@ export interface ISpecificExits {
|
||||
export interface ICompletion extends IBaseQuestConfig {
|
||||
minRequestedAmount: number;
|
||||
maxRequestedAmount: number;
|
||||
uniqueItemCount: number;
|
||||
minRequestedBulletAmount: number;
|
||||
maxRequestedBulletAmount: number;
|
||||
useWhitelist: boolean;
|
||||
|
@ -44,4 +44,9 @@ export declare class EventOutputHolder {
|
||||
* @returns dictionary of hideout productions
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ export declare class ItemEventRouter {
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
|
||||
/**
|
||||
*
|
||||
* @param info Event request
|
||||
* @param sessionID Session id
|
||||
* @returns Item response
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router";
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
export declare class HealthSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user