Updated types
This commit is contained in:
parent
b82b84a5eb
commit
780be737ab
@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
@ -47,9 +48,10 @@ export declare class BotGenerator {
|
|||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
* @param difficulty easy/normal/hard/impossible
|
* @param difficulty easy/normal/hard/impossible
|
||||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||||
* @returns
|
* profile PMC profile of player generating pscav
|
||||||
|
* @returns IBotBase
|
||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -79,6 +81,12 @@ export declare class BotGenerator {
|
|||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player
|
||||||
|
* @param botRole Role bot has
|
||||||
|
* @returns True if name should be simulated pscav
|
||||||
|
*/
|
||||||
|
protected shouldSimulatePlayerScav(botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get exp for kill by bot difficulty
|
* Get exp for kill by bot difficulty
|
||||||
* @param experience Dict of difficulties and experience
|
* @param experience Dict of difficulties and experience
|
||||||
|
@ -91,6 +91,12 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
*/
|
*/
|
||||||
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Get offers that have not exceeded buy limits
|
||||||
|
* @param possibleOffers offers to process
|
||||||
|
* @returns Offers
|
||||||
|
*/
|
||||||
|
protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Check if offer is from trader standing the player does not have
|
* Check if offer is from trader standing the player does not have
|
||||||
* @param offer Offer to check
|
* @param offer Offer to check
|
||||||
@ -209,4 +215,10 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns True if in range
|
* @returns True if in range
|
||||||
*/
|
*/
|
||||||
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
||||||
|
/**
|
||||||
|
* Does this offer come from a trader
|
||||||
|
* @param offer Offer to check
|
||||||
|
* @returns True = from trader
|
||||||
|
*/
|
||||||
|
offerIsFromTrader(offer: IRagfairOffer): boolean;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ export interface IUnlockedInfo {
|
|||||||
export interface IInfo {
|
export interface IInfo {
|
||||||
EntryPoint: string;
|
EntryPoint: string;
|
||||||
Nickname: string;
|
Nickname: string;
|
||||||
|
MainProfileNickname?: string;
|
||||||
LowerNickname: string;
|
LowerNickname: string;
|
||||||
Side: string;
|
Side: string;
|
||||||
SquadInviteRestriction: boolean;
|
SquadInviteRestriction: boolean;
|
||||||
|
@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
/** Multipliers for skill gain when inside menus, NOT in-game */
|
/** Multipliers for skill gain when inside menus, NOT in-game */
|
||||||
skillGainMultiplers: Record<string, number>;
|
skillGainMultiplers: Record<string, number>;
|
||||||
|
/** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */
|
||||||
|
deprioritisedMoneyContainers: string[];
|
||||||
}
|
}
|
||||||
export interface IRewardDetails {
|
export interface IRewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -66,7 +66,9 @@ export interface IPmcTypes {
|
|||||||
bear: string;
|
bear: string;
|
||||||
}
|
}
|
||||||
export interface ISlotLootSettings {
|
export interface ISlotLootSettings {
|
||||||
|
/** Item Type whitelist */
|
||||||
whitelist: string[];
|
whitelist: string[];
|
||||||
|
/** item tpl blacklist */
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
}
|
}
|
||||||
export interface IMinMaxLootValue extends MinMax {
|
export interface IMinMaxLootValue extends MinMax {
|
||||||
|
@ -75,6 +75,8 @@ export interface IDynamic {
|
|||||||
blacklist: IRagfairBlacklist;
|
blacklist: IRagfairBlacklist;
|
||||||
/** Dict of price limits keyed by item type */
|
/** Dict of price limits keyed by item type */
|
||||||
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
||||||
|
/** Custom rouble prices for items to override values from prices.json */
|
||||||
|
itemPriceOverrideRouble: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface IPriceRanges {
|
export interface IPriceRanges {
|
||||||
default: MinMax;
|
default: MinMax;
|
||||||
|
@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig {
|
|||||||
enableSeasonalEventDetection: boolean;
|
enableSeasonalEventDetection: boolean;
|
||||||
/** event / botType / equipSlot / itemid */
|
/** event / botType / equipSlot / itemid */
|
||||||
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
|
/** event / bot type / equipSlot / itemid */
|
||||||
|
eventLoot: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
events: ISeasonalEvent[];
|
events: ISeasonalEvent[];
|
||||||
eventBotMapping: Record<string, string>;
|
eventBotMapping: Record<string, string>;
|
||||||
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { BotHelper } from "@spt/helpers/BotHelper";
|
import { BotHelper } from "@spt/helpers/BotHelper";
|
||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
|
import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
@ -38,10 +39,13 @@ export declare class BotNameService {
|
|||||||
*/
|
*/
|
||||||
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
||||||
/**
|
/**
|
||||||
* Should this bot have a name like "name (Pmc Name)"
|
* Add random PMC name to bots MainProfileNickname property
|
||||||
* @param botRole Role bot has
|
* @param bot Bot to update
|
||||||
* @returns True if name should be simulated pscav
|
|
||||||
*/
|
*/
|
||||||
protected shouldSimulatePlayerScavName(botRole: string): boolean;
|
addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void;
|
||||||
protected addPlayerScavNameSimulationSuffix(nickname: string): string;
|
/**
|
||||||
|
* Choose a random PMC name from bear or usec bot jsons
|
||||||
|
* @returns PMC name as string
|
||||||
|
*/
|
||||||
|
protected getRandomPMCName(): string;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getCustomization(): Record<string, ICustomizationItem>;
|
getCustomization(): Record<string, ICustomizationItem>;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/handbook.json
|
||||||
*/
|
*/
|
||||||
getHandbook(): IHandbookBase;
|
getHandbook(): IHandbookBase;
|
||||||
/**
|
/**
|
||||||
@ -101,7 +101,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getProfiles(): IProfileTemplates;
|
getProfiles(): IProfileTemplates;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/quests.json
|
||||||
*/
|
*/
|
||||||
getQuests(): Record<string, IQuest>;
|
getQuests(): Record<string, IQuest>;
|
||||||
/**
|
/**
|
||||||
|
@ -62,14 +62,6 @@ export declare class InsuranceService {
|
|||||||
* @returns Timestamp to return items to player in seconds
|
* @returns Timestamp to return items to player in seconds
|
||||||
*/
|
*/
|
||||||
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
||||||
/**
|
|
||||||
* Take the insurance item packages within a profile session and ensure that each of the items in that package are
|
|
||||||
* not orphaned from their parent ID.
|
|
||||||
*
|
|
||||||
* @param sessionID The session ID to update insurance equipment packages in.
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
protected adoptOrphanedInsEquipment(sessionID: string): void;
|
|
||||||
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
||||||
/**
|
/**
|
||||||
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
||||||
@ -127,10 +119,4 @@ export declare class InsuranceService {
|
|||||||
* @returns price in roubles
|
* @returns price in roubles
|
||||||
*/
|
*/
|
||||||
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
||||||
/**
|
|
||||||
* Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance.
|
|
||||||
* @param sessionID Players id
|
|
||||||
* @returns The root item Id.
|
|
||||||
*/
|
|
||||||
getRootItemParentID(sessionID: string): string;
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
||||||
|
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
@ -24,7 +26,9 @@ export declare class PaymentService {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper);
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Take money and insert items into return to server request
|
* Take money and insert items into return to server request
|
||||||
* @param pmcData Pmc profile
|
* @param pmcData Pmc profile
|
||||||
|
@ -74,4 +74,6 @@ export declare class PostDbLoadService {
|
|||||||
*/
|
*/
|
||||||
protected validateQuestAssortUnlocksExist(): void;
|
protected validateQuestAssortUnlocksExist(): void;
|
||||||
protected setAllDbItemsAsSellableOnFlea(): void;
|
protected setAllDbItemsAsSellableOnFlea(): void;
|
||||||
|
protected addMissingTraderBuyRestrictionMaxValue(): void;
|
||||||
|
protected applyFleaPriceOverrides(): void;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,12 @@ export declare class ProfileFixerService {
|
|||||||
* @param pmcProfile profile to check and fix
|
* @param pmcProfile profile to check and fix
|
||||||
*/
|
*/
|
||||||
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Resolve any dialogue attachments that were accidentally created using the player's equipment ID as
|
||||||
|
* the stash root object ID
|
||||||
|
* @param fullProfile
|
||||||
|
*/
|
||||||
|
checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void;
|
||||||
/**
|
/**
|
||||||
* Find issues in the scav profile data that may cause issues
|
* Find issues in the scav profile data that may cause issues
|
||||||
* @param scavProfile profile to check and fix
|
* @param scavProfile profile to check and fix
|
||||||
|
@ -88,6 +88,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns bots with equipment changes
|
* @returns bots with equipment changes
|
||||||
*/
|
*/
|
||||||
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
|
/**
|
||||||
|
* Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween
|
||||||
|
* @param eventName Name of event to get gear changes for
|
||||||
|
* @returns bots with loot changes
|
||||||
|
*/
|
||||||
|
protected getEventBotLoot(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
/**
|
/**
|
||||||
* Get the dates each seasonal event starts and ends at
|
* Get the dates each seasonal event starts and ends at
|
||||||
* @returns Record with event name + start/end date
|
* @returns Record with event name + start/end date
|
||||||
@ -108,7 +114,7 @@ export declare class SeasonalEventService {
|
|||||||
/**
|
/**
|
||||||
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
||||||
*/
|
*/
|
||||||
protected cacheActiveEvents(): void;
|
cacheActiveEvents(): void;
|
||||||
/**
|
/**
|
||||||
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
||||||
* @returns Season enum value
|
* @returns Season enum value
|
||||||
@ -171,6 +177,11 @@ export declare class SeasonalEventService {
|
|||||||
* @param eventName Name of the event to read equipment in from config
|
* @param eventName Name of the event to read equipment in from config
|
||||||
*/
|
*/
|
||||||
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
||||||
|
/**
|
||||||
|
* Read in data from seasonalEvents.json and add found loot items to bots
|
||||||
|
* @param eventName Name of the event to read loot in from config
|
||||||
|
*/
|
||||||
|
protected addEventLootToBots(eventType: SeasonalEventType): void;
|
||||||
/**
|
/**
|
||||||
* Add pumpkin loot boxes to scavs
|
* Add pumpkin loot boxes to scavs
|
||||||
*/
|
*/
|
||||||
|
@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { HttpServer } from "@spt/servers/HttpServer";
|
import { HttpServer } from "@spt/servers/HttpServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
export declare class App {
|
export declare class App {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
13
TypeScript/10ScopesAndTypes/types/utils/ProgressWriter.d.ts
vendored
Normal file
13
TypeScript/10ScopesAndTypes/types/utils/ProgressWriter.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
export declare class ProgressWriter {
|
||||||
|
private count;
|
||||||
|
private total?;
|
||||||
|
private done;
|
||||||
|
private barFillChar;
|
||||||
|
private barEmptyChar;
|
||||||
|
private maxBarLength;
|
||||||
|
constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string);
|
||||||
|
/**
|
||||||
|
* Increment the progress counter and update the progress bar display.
|
||||||
|
*/
|
||||||
|
increment(): void;
|
||||||
|
}
|
@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
@ -47,9 +48,10 @@ export declare class BotGenerator {
|
|||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
* @param difficulty easy/normal/hard/impossible
|
* @param difficulty easy/normal/hard/impossible
|
||||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||||
* @returns
|
* profile PMC profile of player generating pscav
|
||||||
|
* @returns IBotBase
|
||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -79,6 +81,12 @@ export declare class BotGenerator {
|
|||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player
|
||||||
|
* @param botRole Role bot has
|
||||||
|
* @returns True if name should be simulated pscav
|
||||||
|
*/
|
||||||
|
protected shouldSimulatePlayerScav(botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get exp for kill by bot difficulty
|
* Get exp for kill by bot difficulty
|
||||||
* @param experience Dict of difficulties and experience
|
* @param experience Dict of difficulties and experience
|
||||||
|
@ -91,6 +91,12 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
*/
|
*/
|
||||||
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Get offers that have not exceeded buy limits
|
||||||
|
* @param possibleOffers offers to process
|
||||||
|
* @returns Offers
|
||||||
|
*/
|
||||||
|
protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Check if offer is from trader standing the player does not have
|
* Check if offer is from trader standing the player does not have
|
||||||
* @param offer Offer to check
|
* @param offer Offer to check
|
||||||
@ -209,4 +215,10 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns True if in range
|
* @returns True if in range
|
||||||
*/
|
*/
|
||||||
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
||||||
|
/**
|
||||||
|
* Does this offer come from a trader
|
||||||
|
* @param offer Offer to check
|
||||||
|
* @returns True = from trader
|
||||||
|
*/
|
||||||
|
offerIsFromTrader(offer: IRagfairOffer): boolean;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ export interface IUnlockedInfo {
|
|||||||
export interface IInfo {
|
export interface IInfo {
|
||||||
EntryPoint: string;
|
EntryPoint: string;
|
||||||
Nickname: string;
|
Nickname: string;
|
||||||
|
MainProfileNickname?: string;
|
||||||
LowerNickname: string;
|
LowerNickname: string;
|
||||||
Side: string;
|
Side: string;
|
||||||
SquadInviteRestriction: boolean;
|
SquadInviteRestriction: boolean;
|
||||||
|
@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
/** Multipliers for skill gain when inside menus, NOT in-game */
|
/** Multipliers for skill gain when inside menus, NOT in-game */
|
||||||
skillGainMultiplers: Record<string, number>;
|
skillGainMultiplers: Record<string, number>;
|
||||||
|
/** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */
|
||||||
|
deprioritisedMoneyContainers: string[];
|
||||||
}
|
}
|
||||||
export interface IRewardDetails {
|
export interface IRewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -66,7 +66,9 @@ export interface IPmcTypes {
|
|||||||
bear: string;
|
bear: string;
|
||||||
}
|
}
|
||||||
export interface ISlotLootSettings {
|
export interface ISlotLootSettings {
|
||||||
|
/** Item Type whitelist */
|
||||||
whitelist: string[];
|
whitelist: string[];
|
||||||
|
/** item tpl blacklist */
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
}
|
}
|
||||||
export interface IMinMaxLootValue extends MinMax {
|
export interface IMinMaxLootValue extends MinMax {
|
||||||
|
@ -75,6 +75,8 @@ export interface IDynamic {
|
|||||||
blacklist: IRagfairBlacklist;
|
blacklist: IRagfairBlacklist;
|
||||||
/** Dict of price limits keyed by item type */
|
/** Dict of price limits keyed by item type */
|
||||||
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
||||||
|
/** Custom rouble prices for items to override values from prices.json */
|
||||||
|
itemPriceOverrideRouble: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface IPriceRanges {
|
export interface IPriceRanges {
|
||||||
default: MinMax;
|
default: MinMax;
|
||||||
|
@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig {
|
|||||||
enableSeasonalEventDetection: boolean;
|
enableSeasonalEventDetection: boolean;
|
||||||
/** event / botType / equipSlot / itemid */
|
/** event / botType / equipSlot / itemid */
|
||||||
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
|
/** event / bot type / equipSlot / itemid */
|
||||||
|
eventLoot: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
events: ISeasonalEvent[];
|
events: ISeasonalEvent[];
|
||||||
eventBotMapping: Record<string, string>;
|
eventBotMapping: Record<string, string>;
|
||||||
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { BotHelper } from "@spt/helpers/BotHelper";
|
import { BotHelper } from "@spt/helpers/BotHelper";
|
||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
|
import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
@ -38,10 +39,13 @@ export declare class BotNameService {
|
|||||||
*/
|
*/
|
||||||
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
||||||
/**
|
/**
|
||||||
* Should this bot have a name like "name (Pmc Name)"
|
* Add random PMC name to bots MainProfileNickname property
|
||||||
* @param botRole Role bot has
|
* @param bot Bot to update
|
||||||
* @returns True if name should be simulated pscav
|
|
||||||
*/
|
*/
|
||||||
protected shouldSimulatePlayerScavName(botRole: string): boolean;
|
addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void;
|
||||||
protected addPlayerScavNameSimulationSuffix(nickname: string): string;
|
/**
|
||||||
|
* Choose a random PMC name from bear or usec bot jsons
|
||||||
|
* @returns PMC name as string
|
||||||
|
*/
|
||||||
|
protected getRandomPMCName(): string;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getCustomization(): Record<string, ICustomizationItem>;
|
getCustomization(): Record<string, ICustomizationItem>;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/handbook.json
|
||||||
*/
|
*/
|
||||||
getHandbook(): IHandbookBase;
|
getHandbook(): IHandbookBase;
|
||||||
/**
|
/**
|
||||||
@ -101,7 +101,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getProfiles(): IProfileTemplates;
|
getProfiles(): IProfileTemplates;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/quests.json
|
||||||
*/
|
*/
|
||||||
getQuests(): Record<string, IQuest>;
|
getQuests(): Record<string, IQuest>;
|
||||||
/**
|
/**
|
||||||
|
@ -62,14 +62,6 @@ export declare class InsuranceService {
|
|||||||
* @returns Timestamp to return items to player in seconds
|
* @returns Timestamp to return items to player in seconds
|
||||||
*/
|
*/
|
||||||
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
||||||
/**
|
|
||||||
* Take the insurance item packages within a profile session and ensure that each of the items in that package are
|
|
||||||
* not orphaned from their parent ID.
|
|
||||||
*
|
|
||||||
* @param sessionID The session ID to update insurance equipment packages in.
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
protected adoptOrphanedInsEquipment(sessionID: string): void;
|
|
||||||
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
||||||
/**
|
/**
|
||||||
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
||||||
@ -127,10 +119,4 @@ export declare class InsuranceService {
|
|||||||
* @returns price in roubles
|
* @returns price in roubles
|
||||||
*/
|
*/
|
||||||
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
||||||
/**
|
|
||||||
* Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance.
|
|
||||||
* @param sessionID Players id
|
|
||||||
* @returns The root item Id.
|
|
||||||
*/
|
|
||||||
getRootItemParentID(sessionID: string): string;
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
||||||
|
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
@ -24,7 +26,9 @@ export declare class PaymentService {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper);
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Take money and insert items into return to server request
|
* Take money and insert items into return to server request
|
||||||
* @param pmcData Pmc profile
|
* @param pmcData Pmc profile
|
||||||
|
@ -74,4 +74,6 @@ export declare class PostDbLoadService {
|
|||||||
*/
|
*/
|
||||||
protected validateQuestAssortUnlocksExist(): void;
|
protected validateQuestAssortUnlocksExist(): void;
|
||||||
protected setAllDbItemsAsSellableOnFlea(): void;
|
protected setAllDbItemsAsSellableOnFlea(): void;
|
||||||
|
protected addMissingTraderBuyRestrictionMaxValue(): void;
|
||||||
|
protected applyFleaPriceOverrides(): void;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,12 @@ export declare class ProfileFixerService {
|
|||||||
* @param pmcProfile profile to check and fix
|
* @param pmcProfile profile to check and fix
|
||||||
*/
|
*/
|
||||||
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Resolve any dialogue attachments that were accidentally created using the player's equipment ID as
|
||||||
|
* the stash root object ID
|
||||||
|
* @param fullProfile
|
||||||
|
*/
|
||||||
|
checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void;
|
||||||
/**
|
/**
|
||||||
* Find issues in the scav profile data that may cause issues
|
* Find issues in the scav profile data that may cause issues
|
||||||
* @param scavProfile profile to check and fix
|
* @param scavProfile profile to check and fix
|
||||||
|
@ -88,6 +88,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns bots with equipment changes
|
* @returns bots with equipment changes
|
||||||
*/
|
*/
|
||||||
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
|
/**
|
||||||
|
* Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween
|
||||||
|
* @param eventName Name of event to get gear changes for
|
||||||
|
* @returns bots with loot changes
|
||||||
|
*/
|
||||||
|
protected getEventBotLoot(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
/**
|
/**
|
||||||
* Get the dates each seasonal event starts and ends at
|
* Get the dates each seasonal event starts and ends at
|
||||||
* @returns Record with event name + start/end date
|
* @returns Record with event name + start/end date
|
||||||
@ -108,7 +114,7 @@ export declare class SeasonalEventService {
|
|||||||
/**
|
/**
|
||||||
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
||||||
*/
|
*/
|
||||||
protected cacheActiveEvents(): void;
|
cacheActiveEvents(): void;
|
||||||
/**
|
/**
|
||||||
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
||||||
* @returns Season enum value
|
* @returns Season enum value
|
||||||
@ -171,6 +177,11 @@ export declare class SeasonalEventService {
|
|||||||
* @param eventName Name of the event to read equipment in from config
|
* @param eventName Name of the event to read equipment in from config
|
||||||
*/
|
*/
|
||||||
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
||||||
|
/**
|
||||||
|
* Read in data from seasonalEvents.json and add found loot items to bots
|
||||||
|
* @param eventName Name of the event to read loot in from config
|
||||||
|
*/
|
||||||
|
protected addEventLootToBots(eventType: SeasonalEventType): void;
|
||||||
/**
|
/**
|
||||||
* Add pumpkin loot boxes to scavs
|
* Add pumpkin loot boxes to scavs
|
||||||
*/
|
*/
|
||||||
|
@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { HttpServer } from "@spt/servers/HttpServer";
|
import { HttpServer } from "@spt/servers/HttpServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
export declare class App {
|
export declare class App {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
13
TypeScript/11BundleLoadingSample/types/utils/ProgressWriter.d.ts
vendored
Normal file
13
TypeScript/11BundleLoadingSample/types/utils/ProgressWriter.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
export declare class ProgressWriter {
|
||||||
|
private count;
|
||||||
|
private total?;
|
||||||
|
private done;
|
||||||
|
private barFillChar;
|
||||||
|
private barEmptyChar;
|
||||||
|
private maxBarLength;
|
||||||
|
constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string);
|
||||||
|
/**
|
||||||
|
* Increment the progress counter and update the progress bar display.
|
||||||
|
*/
|
||||||
|
increment(): void;
|
||||||
|
}
|
@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
@ -47,9 +48,10 @@ export declare class BotGenerator {
|
|||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
* @param difficulty easy/normal/hard/impossible
|
* @param difficulty easy/normal/hard/impossible
|
||||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||||
* @returns
|
* profile PMC profile of player generating pscav
|
||||||
|
* @returns IBotBase
|
||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -79,6 +81,12 @@ export declare class BotGenerator {
|
|||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player
|
||||||
|
* @param botRole Role bot has
|
||||||
|
* @returns True if name should be simulated pscav
|
||||||
|
*/
|
||||||
|
protected shouldSimulatePlayerScav(botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get exp for kill by bot difficulty
|
* Get exp for kill by bot difficulty
|
||||||
* @param experience Dict of difficulties and experience
|
* @param experience Dict of difficulties and experience
|
||||||
|
@ -91,6 +91,12 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
*/
|
*/
|
||||||
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Get offers that have not exceeded buy limits
|
||||||
|
* @param possibleOffers offers to process
|
||||||
|
* @returns Offers
|
||||||
|
*/
|
||||||
|
protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Check if offer is from trader standing the player does not have
|
* Check if offer is from trader standing the player does not have
|
||||||
* @param offer Offer to check
|
* @param offer Offer to check
|
||||||
@ -209,4 +215,10 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns True if in range
|
* @returns True if in range
|
||||||
*/
|
*/
|
||||||
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
||||||
|
/**
|
||||||
|
* Does this offer come from a trader
|
||||||
|
* @param offer Offer to check
|
||||||
|
* @returns True = from trader
|
||||||
|
*/
|
||||||
|
offerIsFromTrader(offer: IRagfairOffer): boolean;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ export interface IUnlockedInfo {
|
|||||||
export interface IInfo {
|
export interface IInfo {
|
||||||
EntryPoint: string;
|
EntryPoint: string;
|
||||||
Nickname: string;
|
Nickname: string;
|
||||||
|
MainProfileNickname?: string;
|
||||||
LowerNickname: string;
|
LowerNickname: string;
|
||||||
Side: string;
|
Side: string;
|
||||||
SquadInviteRestriction: boolean;
|
SquadInviteRestriction: boolean;
|
||||||
|
@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
/** Multipliers for skill gain when inside menus, NOT in-game */
|
/** Multipliers for skill gain when inside menus, NOT in-game */
|
||||||
skillGainMultiplers: Record<string, number>;
|
skillGainMultiplers: Record<string, number>;
|
||||||
|
/** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */
|
||||||
|
deprioritisedMoneyContainers: string[];
|
||||||
}
|
}
|
||||||
export interface IRewardDetails {
|
export interface IRewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -66,7 +66,9 @@ export interface IPmcTypes {
|
|||||||
bear: string;
|
bear: string;
|
||||||
}
|
}
|
||||||
export interface ISlotLootSettings {
|
export interface ISlotLootSettings {
|
||||||
|
/** Item Type whitelist */
|
||||||
whitelist: string[];
|
whitelist: string[];
|
||||||
|
/** item tpl blacklist */
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
}
|
}
|
||||||
export interface IMinMaxLootValue extends MinMax {
|
export interface IMinMaxLootValue extends MinMax {
|
||||||
|
@ -75,6 +75,8 @@ export interface IDynamic {
|
|||||||
blacklist: IRagfairBlacklist;
|
blacklist: IRagfairBlacklist;
|
||||||
/** Dict of price limits keyed by item type */
|
/** Dict of price limits keyed by item type */
|
||||||
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
||||||
|
/** Custom rouble prices for items to override values from prices.json */
|
||||||
|
itemPriceOverrideRouble: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface IPriceRanges {
|
export interface IPriceRanges {
|
||||||
default: MinMax;
|
default: MinMax;
|
||||||
|
@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig {
|
|||||||
enableSeasonalEventDetection: boolean;
|
enableSeasonalEventDetection: boolean;
|
||||||
/** event / botType / equipSlot / itemid */
|
/** event / botType / equipSlot / itemid */
|
||||||
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
|
/** event / bot type / equipSlot / itemid */
|
||||||
|
eventLoot: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
events: ISeasonalEvent[];
|
events: ISeasonalEvent[];
|
||||||
eventBotMapping: Record<string, string>;
|
eventBotMapping: Record<string, string>;
|
||||||
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { BotHelper } from "@spt/helpers/BotHelper";
|
import { BotHelper } from "@spt/helpers/BotHelper";
|
||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
|
import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
@ -38,10 +39,13 @@ export declare class BotNameService {
|
|||||||
*/
|
*/
|
||||||
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
||||||
/**
|
/**
|
||||||
* Should this bot have a name like "name (Pmc Name)"
|
* Add random PMC name to bots MainProfileNickname property
|
||||||
* @param botRole Role bot has
|
* @param bot Bot to update
|
||||||
* @returns True if name should be simulated pscav
|
|
||||||
*/
|
*/
|
||||||
protected shouldSimulatePlayerScavName(botRole: string): boolean;
|
addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void;
|
||||||
protected addPlayerScavNameSimulationSuffix(nickname: string): string;
|
/**
|
||||||
|
* Choose a random PMC name from bear or usec bot jsons
|
||||||
|
* @returns PMC name as string
|
||||||
|
*/
|
||||||
|
protected getRandomPMCName(): string;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getCustomization(): Record<string, ICustomizationItem>;
|
getCustomization(): Record<string, ICustomizationItem>;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/handbook.json
|
||||||
*/
|
*/
|
||||||
getHandbook(): IHandbookBase;
|
getHandbook(): IHandbookBase;
|
||||||
/**
|
/**
|
||||||
@ -101,7 +101,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getProfiles(): IProfileTemplates;
|
getProfiles(): IProfileTemplates;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/quests.json
|
||||||
*/
|
*/
|
||||||
getQuests(): Record<string, IQuest>;
|
getQuests(): Record<string, IQuest>;
|
||||||
/**
|
/**
|
||||||
|
@ -62,14 +62,6 @@ export declare class InsuranceService {
|
|||||||
* @returns Timestamp to return items to player in seconds
|
* @returns Timestamp to return items to player in seconds
|
||||||
*/
|
*/
|
||||||
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
||||||
/**
|
|
||||||
* Take the insurance item packages within a profile session and ensure that each of the items in that package are
|
|
||||||
* not orphaned from their parent ID.
|
|
||||||
*
|
|
||||||
* @param sessionID The session ID to update insurance equipment packages in.
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
protected adoptOrphanedInsEquipment(sessionID: string): void;
|
|
||||||
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
||||||
/**
|
/**
|
||||||
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
||||||
@ -127,10 +119,4 @@ export declare class InsuranceService {
|
|||||||
* @returns price in roubles
|
* @returns price in roubles
|
||||||
*/
|
*/
|
||||||
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
||||||
/**
|
|
||||||
* Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance.
|
|
||||||
* @param sessionID Players id
|
|
||||||
* @returns The root item Id.
|
|
||||||
*/
|
|
||||||
getRootItemParentID(sessionID: string): string;
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
||||||
|
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
@ -24,7 +26,9 @@ export declare class PaymentService {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper);
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Take money and insert items into return to server request
|
* Take money and insert items into return to server request
|
||||||
* @param pmcData Pmc profile
|
* @param pmcData Pmc profile
|
||||||
|
@ -74,4 +74,6 @@ export declare class PostDbLoadService {
|
|||||||
*/
|
*/
|
||||||
protected validateQuestAssortUnlocksExist(): void;
|
protected validateQuestAssortUnlocksExist(): void;
|
||||||
protected setAllDbItemsAsSellableOnFlea(): void;
|
protected setAllDbItemsAsSellableOnFlea(): void;
|
||||||
|
protected addMissingTraderBuyRestrictionMaxValue(): void;
|
||||||
|
protected applyFleaPriceOverrides(): void;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,12 @@ export declare class ProfileFixerService {
|
|||||||
* @param pmcProfile profile to check and fix
|
* @param pmcProfile profile to check and fix
|
||||||
*/
|
*/
|
||||||
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Resolve any dialogue attachments that were accidentally created using the player's equipment ID as
|
||||||
|
* the stash root object ID
|
||||||
|
* @param fullProfile
|
||||||
|
*/
|
||||||
|
checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void;
|
||||||
/**
|
/**
|
||||||
* Find issues in the scav profile data that may cause issues
|
* Find issues in the scav profile data that may cause issues
|
||||||
* @param scavProfile profile to check and fix
|
* @param scavProfile profile to check and fix
|
||||||
|
@ -88,6 +88,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns bots with equipment changes
|
* @returns bots with equipment changes
|
||||||
*/
|
*/
|
||||||
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
|
/**
|
||||||
|
* Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween
|
||||||
|
* @param eventName Name of event to get gear changes for
|
||||||
|
* @returns bots with loot changes
|
||||||
|
*/
|
||||||
|
protected getEventBotLoot(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
/**
|
/**
|
||||||
* Get the dates each seasonal event starts and ends at
|
* Get the dates each seasonal event starts and ends at
|
||||||
* @returns Record with event name + start/end date
|
* @returns Record with event name + start/end date
|
||||||
@ -108,7 +114,7 @@ export declare class SeasonalEventService {
|
|||||||
/**
|
/**
|
||||||
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
||||||
*/
|
*/
|
||||||
protected cacheActiveEvents(): void;
|
cacheActiveEvents(): void;
|
||||||
/**
|
/**
|
||||||
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
||||||
* @returns Season enum value
|
* @returns Season enum value
|
||||||
@ -171,6 +177,11 @@ export declare class SeasonalEventService {
|
|||||||
* @param eventName Name of the event to read equipment in from config
|
* @param eventName Name of the event to read equipment in from config
|
||||||
*/
|
*/
|
||||||
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
||||||
|
/**
|
||||||
|
* Read in data from seasonalEvents.json and add found loot items to bots
|
||||||
|
* @param eventName Name of the event to read loot in from config
|
||||||
|
*/
|
||||||
|
protected addEventLootToBots(eventType: SeasonalEventType): void;
|
||||||
/**
|
/**
|
||||||
* Add pumpkin loot boxes to scavs
|
* Add pumpkin loot boxes to scavs
|
||||||
*/
|
*/
|
||||||
|
@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { HttpServer } from "@spt/servers/HttpServer";
|
import { HttpServer } from "@spt/servers/HttpServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
export declare class App {
|
export declare class App {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
13
TypeScript/12ClassExtensionOverride/types/utils/ProgressWriter.d.ts
vendored
Normal file
13
TypeScript/12ClassExtensionOverride/types/utils/ProgressWriter.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
export declare class ProgressWriter {
|
||||||
|
private count;
|
||||||
|
private total?;
|
||||||
|
private done;
|
||||||
|
private barFillChar;
|
||||||
|
private barEmptyChar;
|
||||||
|
private maxBarLength;
|
||||||
|
constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string);
|
||||||
|
/**
|
||||||
|
* Increment the progress counter and update the progress bar display.
|
||||||
|
*/
|
||||||
|
increment(): void;
|
||||||
|
}
|
@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
@ -47,9 +48,10 @@ export declare class BotGenerator {
|
|||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
* @param difficulty easy/normal/hard/impossible
|
* @param difficulty easy/normal/hard/impossible
|
||||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||||
* @returns
|
* profile PMC profile of player generating pscav
|
||||||
|
* @returns IBotBase
|
||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -79,6 +81,12 @@ export declare class BotGenerator {
|
|||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player
|
||||||
|
* @param botRole Role bot has
|
||||||
|
* @returns True if name should be simulated pscav
|
||||||
|
*/
|
||||||
|
protected shouldSimulatePlayerScav(botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get exp for kill by bot difficulty
|
* Get exp for kill by bot difficulty
|
||||||
* @param experience Dict of difficulties and experience
|
* @param experience Dict of difficulties and experience
|
||||||
|
@ -91,6 +91,12 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
*/
|
*/
|
||||||
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Get offers that have not exceeded buy limits
|
||||||
|
* @param possibleOffers offers to process
|
||||||
|
* @returns Offers
|
||||||
|
*/
|
||||||
|
protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Check if offer is from trader standing the player does not have
|
* Check if offer is from trader standing the player does not have
|
||||||
* @param offer Offer to check
|
* @param offer Offer to check
|
||||||
@ -209,4 +215,10 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns True if in range
|
* @returns True if in range
|
||||||
*/
|
*/
|
||||||
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
||||||
|
/**
|
||||||
|
* Does this offer come from a trader
|
||||||
|
* @param offer Offer to check
|
||||||
|
* @returns True = from trader
|
||||||
|
*/
|
||||||
|
offerIsFromTrader(offer: IRagfairOffer): boolean;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ export interface IUnlockedInfo {
|
|||||||
export interface IInfo {
|
export interface IInfo {
|
||||||
EntryPoint: string;
|
EntryPoint: string;
|
||||||
Nickname: string;
|
Nickname: string;
|
||||||
|
MainProfileNickname?: string;
|
||||||
LowerNickname: string;
|
LowerNickname: string;
|
||||||
Side: string;
|
Side: string;
|
||||||
SquadInviteRestriction: boolean;
|
SquadInviteRestriction: boolean;
|
||||||
|
@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
/** Multipliers for skill gain when inside menus, NOT in-game */
|
/** Multipliers for skill gain when inside menus, NOT in-game */
|
||||||
skillGainMultiplers: Record<string, number>;
|
skillGainMultiplers: Record<string, number>;
|
||||||
|
/** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */
|
||||||
|
deprioritisedMoneyContainers: string[];
|
||||||
}
|
}
|
||||||
export interface IRewardDetails {
|
export interface IRewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -66,7 +66,9 @@ export interface IPmcTypes {
|
|||||||
bear: string;
|
bear: string;
|
||||||
}
|
}
|
||||||
export interface ISlotLootSettings {
|
export interface ISlotLootSettings {
|
||||||
|
/** Item Type whitelist */
|
||||||
whitelist: string[];
|
whitelist: string[];
|
||||||
|
/** item tpl blacklist */
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
}
|
}
|
||||||
export interface IMinMaxLootValue extends MinMax {
|
export interface IMinMaxLootValue extends MinMax {
|
||||||
|
@ -75,6 +75,8 @@ export interface IDynamic {
|
|||||||
blacklist: IRagfairBlacklist;
|
blacklist: IRagfairBlacklist;
|
||||||
/** Dict of price limits keyed by item type */
|
/** Dict of price limits keyed by item type */
|
||||||
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
||||||
|
/** Custom rouble prices for items to override values from prices.json */
|
||||||
|
itemPriceOverrideRouble: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface IPriceRanges {
|
export interface IPriceRanges {
|
||||||
default: MinMax;
|
default: MinMax;
|
||||||
|
@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig {
|
|||||||
enableSeasonalEventDetection: boolean;
|
enableSeasonalEventDetection: boolean;
|
||||||
/** event / botType / equipSlot / itemid */
|
/** event / botType / equipSlot / itemid */
|
||||||
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
|
/** event / bot type / equipSlot / itemid */
|
||||||
|
eventLoot: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
events: ISeasonalEvent[];
|
events: ISeasonalEvent[];
|
||||||
eventBotMapping: Record<string, string>;
|
eventBotMapping: Record<string, string>;
|
||||||
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { BotHelper } from "@spt/helpers/BotHelper";
|
import { BotHelper } from "@spt/helpers/BotHelper";
|
||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
|
import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
@ -38,10 +39,13 @@ export declare class BotNameService {
|
|||||||
*/
|
*/
|
||||||
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
||||||
/**
|
/**
|
||||||
* Should this bot have a name like "name (Pmc Name)"
|
* Add random PMC name to bots MainProfileNickname property
|
||||||
* @param botRole Role bot has
|
* @param bot Bot to update
|
||||||
* @returns True if name should be simulated pscav
|
|
||||||
*/
|
*/
|
||||||
protected shouldSimulatePlayerScavName(botRole: string): boolean;
|
addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void;
|
||||||
protected addPlayerScavNameSimulationSuffix(nickname: string): string;
|
/**
|
||||||
|
* Choose a random PMC name from bear or usec bot jsons
|
||||||
|
* @returns PMC name as string
|
||||||
|
*/
|
||||||
|
protected getRandomPMCName(): string;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getCustomization(): Record<string, ICustomizationItem>;
|
getCustomization(): Record<string, ICustomizationItem>;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/handbook.json
|
||||||
*/
|
*/
|
||||||
getHandbook(): IHandbookBase;
|
getHandbook(): IHandbookBase;
|
||||||
/**
|
/**
|
||||||
@ -101,7 +101,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getProfiles(): IProfileTemplates;
|
getProfiles(): IProfileTemplates;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/quests.json
|
||||||
*/
|
*/
|
||||||
getQuests(): Record<string, IQuest>;
|
getQuests(): Record<string, IQuest>;
|
||||||
/**
|
/**
|
||||||
|
@ -62,14 +62,6 @@ export declare class InsuranceService {
|
|||||||
* @returns Timestamp to return items to player in seconds
|
* @returns Timestamp to return items to player in seconds
|
||||||
*/
|
*/
|
||||||
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
||||||
/**
|
|
||||||
* Take the insurance item packages within a profile session and ensure that each of the items in that package are
|
|
||||||
* not orphaned from their parent ID.
|
|
||||||
*
|
|
||||||
* @param sessionID The session ID to update insurance equipment packages in.
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
protected adoptOrphanedInsEquipment(sessionID: string): void;
|
|
||||||
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
||||||
/**
|
/**
|
||||||
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
||||||
@ -127,10 +119,4 @@ export declare class InsuranceService {
|
|||||||
* @returns price in roubles
|
* @returns price in roubles
|
||||||
*/
|
*/
|
||||||
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
||||||
/**
|
|
||||||
* Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance.
|
|
||||||
* @param sessionID Players id
|
|
||||||
* @returns The root item Id.
|
|
||||||
*/
|
|
||||||
getRootItemParentID(sessionID: string): string;
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
||||||
|
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
@ -24,7 +26,9 @@ export declare class PaymentService {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper);
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Take money and insert items into return to server request
|
* Take money and insert items into return to server request
|
||||||
* @param pmcData Pmc profile
|
* @param pmcData Pmc profile
|
||||||
|
@ -74,4 +74,6 @@ export declare class PostDbLoadService {
|
|||||||
*/
|
*/
|
||||||
protected validateQuestAssortUnlocksExist(): void;
|
protected validateQuestAssortUnlocksExist(): void;
|
||||||
protected setAllDbItemsAsSellableOnFlea(): void;
|
protected setAllDbItemsAsSellableOnFlea(): void;
|
||||||
|
protected addMissingTraderBuyRestrictionMaxValue(): void;
|
||||||
|
protected applyFleaPriceOverrides(): void;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,12 @@ export declare class ProfileFixerService {
|
|||||||
* @param pmcProfile profile to check and fix
|
* @param pmcProfile profile to check and fix
|
||||||
*/
|
*/
|
||||||
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Resolve any dialogue attachments that were accidentally created using the player's equipment ID as
|
||||||
|
* the stash root object ID
|
||||||
|
* @param fullProfile
|
||||||
|
*/
|
||||||
|
checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void;
|
||||||
/**
|
/**
|
||||||
* Find issues in the scav profile data that may cause issues
|
* Find issues in the scav profile data that may cause issues
|
||||||
* @param scavProfile profile to check and fix
|
* @param scavProfile profile to check and fix
|
||||||
|
@ -88,6 +88,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns bots with equipment changes
|
* @returns bots with equipment changes
|
||||||
*/
|
*/
|
||||||
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
|
/**
|
||||||
|
* Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween
|
||||||
|
* @param eventName Name of event to get gear changes for
|
||||||
|
* @returns bots with loot changes
|
||||||
|
*/
|
||||||
|
protected getEventBotLoot(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
/**
|
/**
|
||||||
* Get the dates each seasonal event starts and ends at
|
* Get the dates each seasonal event starts and ends at
|
||||||
* @returns Record with event name + start/end date
|
* @returns Record with event name + start/end date
|
||||||
@ -108,7 +114,7 @@ export declare class SeasonalEventService {
|
|||||||
/**
|
/**
|
||||||
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
||||||
*/
|
*/
|
||||||
protected cacheActiveEvents(): void;
|
cacheActiveEvents(): void;
|
||||||
/**
|
/**
|
||||||
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
||||||
* @returns Season enum value
|
* @returns Season enum value
|
||||||
@ -171,6 +177,11 @@ export declare class SeasonalEventService {
|
|||||||
* @param eventName Name of the event to read equipment in from config
|
* @param eventName Name of the event to read equipment in from config
|
||||||
*/
|
*/
|
||||||
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
||||||
|
/**
|
||||||
|
* Read in data from seasonalEvents.json and add found loot items to bots
|
||||||
|
* @param eventName Name of the event to read loot in from config
|
||||||
|
*/
|
||||||
|
protected addEventLootToBots(eventType: SeasonalEventType): void;
|
||||||
/**
|
/**
|
||||||
* Add pumpkin loot boxes to scavs
|
* Add pumpkin loot boxes to scavs
|
||||||
*/
|
*/
|
||||||
|
@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { HttpServer } from "@spt/servers/HttpServer";
|
import { HttpServer } from "@spt/servers/HttpServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
export declare class App {
|
export declare class App {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
13
TypeScript/13.1AddTraderWithAssortJSON/types/utils/ProgressWriter.d.ts
vendored
Normal file
13
TypeScript/13.1AddTraderWithAssortJSON/types/utils/ProgressWriter.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
export declare class ProgressWriter {
|
||||||
|
private count;
|
||||||
|
private total?;
|
||||||
|
private done;
|
||||||
|
private barFillChar;
|
||||||
|
private barEmptyChar;
|
||||||
|
private maxBarLength;
|
||||||
|
constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string);
|
||||||
|
/**
|
||||||
|
* Increment the progress counter and update the progress bar display.
|
||||||
|
*/
|
||||||
|
increment(): void;
|
||||||
|
}
|
@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
@ -47,9 +48,10 @@ export declare class BotGenerator {
|
|||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
* @param difficulty easy/normal/hard/impossible
|
* @param difficulty easy/normal/hard/impossible
|
||||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||||
* @returns
|
* profile PMC profile of player generating pscav
|
||||||
|
* @returns IBotBase
|
||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -79,6 +81,12 @@ export declare class BotGenerator {
|
|||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player
|
||||||
|
* @param botRole Role bot has
|
||||||
|
* @returns True if name should be simulated pscav
|
||||||
|
*/
|
||||||
|
protected shouldSimulatePlayerScav(botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get exp for kill by bot difficulty
|
* Get exp for kill by bot difficulty
|
||||||
* @param experience Dict of difficulties and experience
|
* @param experience Dict of difficulties and experience
|
||||||
|
@ -91,6 +91,12 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
*/
|
*/
|
||||||
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Get offers that have not exceeded buy limits
|
||||||
|
* @param possibleOffers offers to process
|
||||||
|
* @returns Offers
|
||||||
|
*/
|
||||||
|
protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Check if offer is from trader standing the player does not have
|
* Check if offer is from trader standing the player does not have
|
||||||
* @param offer Offer to check
|
* @param offer Offer to check
|
||||||
@ -209,4 +215,10 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns True if in range
|
* @returns True if in range
|
||||||
*/
|
*/
|
||||||
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
||||||
|
/**
|
||||||
|
* Does this offer come from a trader
|
||||||
|
* @param offer Offer to check
|
||||||
|
* @returns True = from trader
|
||||||
|
*/
|
||||||
|
offerIsFromTrader(offer: IRagfairOffer): boolean;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ export interface IUnlockedInfo {
|
|||||||
export interface IInfo {
|
export interface IInfo {
|
||||||
EntryPoint: string;
|
EntryPoint: string;
|
||||||
Nickname: string;
|
Nickname: string;
|
||||||
|
MainProfileNickname?: string;
|
||||||
LowerNickname: string;
|
LowerNickname: string;
|
||||||
Side: string;
|
Side: string;
|
||||||
SquadInviteRestriction: boolean;
|
SquadInviteRestriction: boolean;
|
||||||
|
@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
/** Multipliers for skill gain when inside menus, NOT in-game */
|
/** Multipliers for skill gain when inside menus, NOT in-game */
|
||||||
skillGainMultiplers: Record<string, number>;
|
skillGainMultiplers: Record<string, number>;
|
||||||
|
/** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */
|
||||||
|
deprioritisedMoneyContainers: string[];
|
||||||
}
|
}
|
||||||
export interface IRewardDetails {
|
export interface IRewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -66,7 +66,9 @@ export interface IPmcTypes {
|
|||||||
bear: string;
|
bear: string;
|
||||||
}
|
}
|
||||||
export interface ISlotLootSettings {
|
export interface ISlotLootSettings {
|
||||||
|
/** Item Type whitelist */
|
||||||
whitelist: string[];
|
whitelist: string[];
|
||||||
|
/** item tpl blacklist */
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
}
|
}
|
||||||
export interface IMinMaxLootValue extends MinMax {
|
export interface IMinMaxLootValue extends MinMax {
|
||||||
|
@ -75,6 +75,8 @@ export interface IDynamic {
|
|||||||
blacklist: IRagfairBlacklist;
|
blacklist: IRagfairBlacklist;
|
||||||
/** Dict of price limits keyed by item type */
|
/** Dict of price limits keyed by item type */
|
||||||
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
||||||
|
/** Custom rouble prices for items to override values from prices.json */
|
||||||
|
itemPriceOverrideRouble: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface IPriceRanges {
|
export interface IPriceRanges {
|
||||||
default: MinMax;
|
default: MinMax;
|
||||||
|
@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig {
|
|||||||
enableSeasonalEventDetection: boolean;
|
enableSeasonalEventDetection: boolean;
|
||||||
/** event / botType / equipSlot / itemid */
|
/** event / botType / equipSlot / itemid */
|
||||||
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
|
/** event / bot type / equipSlot / itemid */
|
||||||
|
eventLoot: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
events: ISeasonalEvent[];
|
events: ISeasonalEvent[];
|
||||||
eventBotMapping: Record<string, string>;
|
eventBotMapping: Record<string, string>;
|
||||||
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { BotHelper } from "@spt/helpers/BotHelper";
|
import { BotHelper } from "@spt/helpers/BotHelper";
|
||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
|
import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
@ -38,10 +39,13 @@ export declare class BotNameService {
|
|||||||
*/
|
*/
|
||||||
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
||||||
/**
|
/**
|
||||||
* Should this bot have a name like "name (Pmc Name)"
|
* Add random PMC name to bots MainProfileNickname property
|
||||||
* @param botRole Role bot has
|
* @param bot Bot to update
|
||||||
* @returns True if name should be simulated pscav
|
|
||||||
*/
|
*/
|
||||||
protected shouldSimulatePlayerScavName(botRole: string): boolean;
|
addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void;
|
||||||
protected addPlayerScavNameSimulationSuffix(nickname: string): string;
|
/**
|
||||||
|
* Choose a random PMC name from bear or usec bot jsons
|
||||||
|
* @returns PMC name as string
|
||||||
|
*/
|
||||||
|
protected getRandomPMCName(): string;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getCustomization(): Record<string, ICustomizationItem>;
|
getCustomization(): Record<string, ICustomizationItem>;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/handbook.json
|
||||||
*/
|
*/
|
||||||
getHandbook(): IHandbookBase;
|
getHandbook(): IHandbookBase;
|
||||||
/**
|
/**
|
||||||
@ -101,7 +101,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getProfiles(): IProfileTemplates;
|
getProfiles(): IProfileTemplates;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/quests.json
|
||||||
*/
|
*/
|
||||||
getQuests(): Record<string, IQuest>;
|
getQuests(): Record<string, IQuest>;
|
||||||
/**
|
/**
|
||||||
|
@ -62,14 +62,6 @@ export declare class InsuranceService {
|
|||||||
* @returns Timestamp to return items to player in seconds
|
* @returns Timestamp to return items to player in seconds
|
||||||
*/
|
*/
|
||||||
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
||||||
/**
|
|
||||||
* Take the insurance item packages within a profile session and ensure that each of the items in that package are
|
|
||||||
* not orphaned from their parent ID.
|
|
||||||
*
|
|
||||||
* @param sessionID The session ID to update insurance equipment packages in.
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
protected adoptOrphanedInsEquipment(sessionID: string): void;
|
|
||||||
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
||||||
/**
|
/**
|
||||||
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
||||||
@ -127,10 +119,4 @@ export declare class InsuranceService {
|
|||||||
* @returns price in roubles
|
* @returns price in roubles
|
||||||
*/
|
*/
|
||||||
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
||||||
/**
|
|
||||||
* Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance.
|
|
||||||
* @param sessionID Players id
|
|
||||||
* @returns The root item Id.
|
|
||||||
*/
|
|
||||||
getRootItemParentID(sessionID: string): string;
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
||||||
|
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
@ -24,7 +26,9 @@ export declare class PaymentService {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper);
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Take money and insert items into return to server request
|
* Take money and insert items into return to server request
|
||||||
* @param pmcData Pmc profile
|
* @param pmcData Pmc profile
|
||||||
|
@ -74,4 +74,6 @@ export declare class PostDbLoadService {
|
|||||||
*/
|
*/
|
||||||
protected validateQuestAssortUnlocksExist(): void;
|
protected validateQuestAssortUnlocksExist(): void;
|
||||||
protected setAllDbItemsAsSellableOnFlea(): void;
|
protected setAllDbItemsAsSellableOnFlea(): void;
|
||||||
|
protected addMissingTraderBuyRestrictionMaxValue(): void;
|
||||||
|
protected applyFleaPriceOverrides(): void;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,12 @@ export declare class ProfileFixerService {
|
|||||||
* @param pmcProfile profile to check and fix
|
* @param pmcProfile profile to check and fix
|
||||||
*/
|
*/
|
||||||
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Resolve any dialogue attachments that were accidentally created using the player's equipment ID as
|
||||||
|
* the stash root object ID
|
||||||
|
* @param fullProfile
|
||||||
|
*/
|
||||||
|
checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void;
|
||||||
/**
|
/**
|
||||||
* Find issues in the scav profile data that may cause issues
|
* Find issues in the scav profile data that may cause issues
|
||||||
* @param scavProfile profile to check and fix
|
* @param scavProfile profile to check and fix
|
||||||
|
@ -88,6 +88,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns bots with equipment changes
|
* @returns bots with equipment changes
|
||||||
*/
|
*/
|
||||||
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
|
/**
|
||||||
|
* Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween
|
||||||
|
* @param eventName Name of event to get gear changes for
|
||||||
|
* @returns bots with loot changes
|
||||||
|
*/
|
||||||
|
protected getEventBotLoot(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
/**
|
/**
|
||||||
* Get the dates each seasonal event starts and ends at
|
* Get the dates each seasonal event starts and ends at
|
||||||
* @returns Record with event name + start/end date
|
* @returns Record with event name + start/end date
|
||||||
@ -108,7 +114,7 @@ export declare class SeasonalEventService {
|
|||||||
/**
|
/**
|
||||||
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
||||||
*/
|
*/
|
||||||
protected cacheActiveEvents(): void;
|
cacheActiveEvents(): void;
|
||||||
/**
|
/**
|
||||||
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
||||||
* @returns Season enum value
|
* @returns Season enum value
|
||||||
@ -171,6 +177,11 @@ export declare class SeasonalEventService {
|
|||||||
* @param eventName Name of the event to read equipment in from config
|
* @param eventName Name of the event to read equipment in from config
|
||||||
*/
|
*/
|
||||||
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
||||||
|
/**
|
||||||
|
* Read in data from seasonalEvents.json and add found loot items to bots
|
||||||
|
* @param eventName Name of the event to read loot in from config
|
||||||
|
*/
|
||||||
|
protected addEventLootToBots(eventType: SeasonalEventType): void;
|
||||||
/**
|
/**
|
||||||
* Add pumpkin loot boxes to scavs
|
* Add pumpkin loot boxes to scavs
|
||||||
*/
|
*/
|
||||||
|
2
TypeScript/13AddTrader/types/utils/App.d.ts
vendored
2
TypeScript/13AddTrader/types/utils/App.d.ts
vendored
@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { HttpServer } from "@spt/servers/HttpServer";
|
import { HttpServer } from "@spt/servers/HttpServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
export declare class App {
|
export declare class App {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
13
TypeScript/13AddTrader/types/utils/ProgressWriter.d.ts
vendored
Normal file
13
TypeScript/13AddTrader/types/utils/ProgressWriter.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
export declare class ProgressWriter {
|
||||||
|
private count;
|
||||||
|
private total?;
|
||||||
|
private done;
|
||||||
|
private barFillChar;
|
||||||
|
private barEmptyChar;
|
||||||
|
private maxBarLength;
|
||||||
|
constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string);
|
||||||
|
/**
|
||||||
|
* Increment the progress counter and update the progress bar display.
|
||||||
|
*/
|
||||||
|
increment(): void;
|
||||||
|
}
|
@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
@ -47,9 +48,10 @@ export declare class BotGenerator {
|
|||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
* @param difficulty easy/normal/hard/impossible
|
* @param difficulty easy/normal/hard/impossible
|
||||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||||
* @returns
|
* profile PMC profile of player generating pscav
|
||||||
|
* @returns IBotBase
|
||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -79,6 +81,12 @@ export declare class BotGenerator {
|
|||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player
|
||||||
|
* @param botRole Role bot has
|
||||||
|
* @returns True if name should be simulated pscav
|
||||||
|
*/
|
||||||
|
protected shouldSimulatePlayerScav(botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get exp for kill by bot difficulty
|
* Get exp for kill by bot difficulty
|
||||||
* @param experience Dict of difficulties and experience
|
* @param experience Dict of difficulties and experience
|
||||||
|
@ -91,6 +91,12 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
*/
|
*/
|
||||||
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Get offers that have not exceeded buy limits
|
||||||
|
* @param possibleOffers offers to process
|
||||||
|
* @returns Offers
|
||||||
|
*/
|
||||||
|
protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Check if offer is from trader standing the player does not have
|
* Check if offer is from trader standing the player does not have
|
||||||
* @param offer Offer to check
|
* @param offer Offer to check
|
||||||
@ -209,4 +215,10 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns True if in range
|
* @returns True if in range
|
||||||
*/
|
*/
|
||||||
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
||||||
|
/**
|
||||||
|
* Does this offer come from a trader
|
||||||
|
* @param offer Offer to check
|
||||||
|
* @returns True = from trader
|
||||||
|
*/
|
||||||
|
offerIsFromTrader(offer: IRagfairOffer): boolean;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ export interface IUnlockedInfo {
|
|||||||
export interface IInfo {
|
export interface IInfo {
|
||||||
EntryPoint: string;
|
EntryPoint: string;
|
||||||
Nickname: string;
|
Nickname: string;
|
||||||
|
MainProfileNickname?: string;
|
||||||
LowerNickname: string;
|
LowerNickname: string;
|
||||||
Side: string;
|
Side: string;
|
||||||
SquadInviteRestriction: boolean;
|
SquadInviteRestriction: boolean;
|
||||||
|
@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
/** Multipliers for skill gain when inside menus, NOT in-game */
|
/** Multipliers for skill gain when inside menus, NOT in-game */
|
||||||
skillGainMultiplers: Record<string, number>;
|
skillGainMultiplers: Record<string, number>;
|
||||||
|
/** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */
|
||||||
|
deprioritisedMoneyContainers: string[];
|
||||||
}
|
}
|
||||||
export interface IRewardDetails {
|
export interface IRewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -66,7 +66,9 @@ export interface IPmcTypes {
|
|||||||
bear: string;
|
bear: string;
|
||||||
}
|
}
|
||||||
export interface ISlotLootSettings {
|
export interface ISlotLootSettings {
|
||||||
|
/** Item Type whitelist */
|
||||||
whitelist: string[];
|
whitelist: string[];
|
||||||
|
/** item tpl blacklist */
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
}
|
}
|
||||||
export interface IMinMaxLootValue extends MinMax {
|
export interface IMinMaxLootValue extends MinMax {
|
||||||
|
@ -75,6 +75,8 @@ export interface IDynamic {
|
|||||||
blacklist: IRagfairBlacklist;
|
blacklist: IRagfairBlacklist;
|
||||||
/** Dict of price limits keyed by item type */
|
/** Dict of price limits keyed by item type */
|
||||||
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
||||||
|
/** Custom rouble prices for items to override values from prices.json */
|
||||||
|
itemPriceOverrideRouble: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface IPriceRanges {
|
export interface IPriceRanges {
|
||||||
default: MinMax;
|
default: MinMax;
|
||||||
|
@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig {
|
|||||||
enableSeasonalEventDetection: boolean;
|
enableSeasonalEventDetection: boolean;
|
||||||
/** event / botType / equipSlot / itemid */
|
/** event / botType / equipSlot / itemid */
|
||||||
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
|
/** event / bot type / equipSlot / itemid */
|
||||||
|
eventLoot: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||||
events: ISeasonalEvent[];
|
events: ISeasonalEvent[];
|
||||||
eventBotMapping: Record<string, string>;
|
eventBotMapping: Record<string, string>;
|
||||||
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { BotHelper } from "@spt/helpers/BotHelper";
|
import { BotHelper } from "@spt/helpers/BotHelper";
|
||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
|
import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
@ -38,10 +39,13 @@ export declare class BotNameService {
|
|||||||
*/
|
*/
|
||||||
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string;
|
||||||
/**
|
/**
|
||||||
* Should this bot have a name like "name (Pmc Name)"
|
* Add random PMC name to bots MainProfileNickname property
|
||||||
* @param botRole Role bot has
|
* @param bot Bot to update
|
||||||
* @returns True if name should be simulated pscav
|
|
||||||
*/
|
*/
|
||||||
protected shouldSimulatePlayerScavName(botRole: string): boolean;
|
addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void;
|
||||||
protected addPlayerScavNameSimulationSuffix(nickname: string): string;
|
/**
|
||||||
|
* Choose a random PMC name from bear or usec bot jsons
|
||||||
|
* @returns PMC name as string
|
||||||
|
*/
|
||||||
|
protected getRandomPMCName(): string;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getCustomization(): Record<string, ICustomizationItem>;
|
getCustomization(): Record<string, ICustomizationItem>;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/handbook.json
|
||||||
*/
|
*/
|
||||||
getHandbook(): IHandbookBase;
|
getHandbook(): IHandbookBase;
|
||||||
/**
|
/**
|
||||||
@ -101,7 +101,7 @@ export declare class DatabaseService {
|
|||||||
*/
|
*/
|
||||||
getProfiles(): IProfileTemplates;
|
getProfiles(): IProfileTemplates;
|
||||||
/**
|
/**
|
||||||
* @returns assets/database/templates/items.json
|
* @returns assets/database/templates/quests.json
|
||||||
*/
|
*/
|
||||||
getQuests(): Record<string, IQuest>;
|
getQuests(): Record<string, IQuest>;
|
||||||
/**
|
/**
|
||||||
|
@ -62,14 +62,6 @@ export declare class InsuranceService {
|
|||||||
* @returns Timestamp to return items to player in seconds
|
* @returns Timestamp to return items to player in seconds
|
||||||
*/
|
*/
|
||||||
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
||||||
/**
|
|
||||||
* Take the insurance item packages within a profile session and ensure that each of the items in that package are
|
|
||||||
* not orphaned from their parent ID.
|
|
||||||
*
|
|
||||||
* @param sessionID The session ID to update insurance equipment packages in.
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
protected adoptOrphanedInsEquipment(sessionID: string): void;
|
|
||||||
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number;
|
||||||
/**
|
/**
|
||||||
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
* Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
|
||||||
@ -127,10 +119,4 @@ export declare class InsuranceService {
|
|||||||
* @returns price in roubles
|
* @returns price in roubles
|
||||||
*/
|
*/
|
||||||
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number;
|
||||||
/**
|
|
||||||
* Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance.
|
|
||||||
* @param sessionID Players id
|
|
||||||
* @returns The root item Id.
|
|
||||||
*/
|
|
||||||
getRootItemParentID(sessionID: string): string;
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData";
|
||||||
|
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
@ -24,7 +26,9 @@ export declare class PaymentService {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper);
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Take money and insert items into return to server request
|
* Take money and insert items into return to server request
|
||||||
* @param pmcData Pmc profile
|
* @param pmcData Pmc profile
|
||||||
|
@ -74,4 +74,6 @@ export declare class PostDbLoadService {
|
|||||||
*/
|
*/
|
||||||
protected validateQuestAssortUnlocksExist(): void;
|
protected validateQuestAssortUnlocksExist(): void;
|
||||||
protected setAllDbItemsAsSellableOnFlea(): void;
|
protected setAllDbItemsAsSellableOnFlea(): void;
|
||||||
|
protected addMissingTraderBuyRestrictionMaxValue(): void;
|
||||||
|
protected applyFleaPriceOverrides(): void;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,12 @@ export declare class ProfileFixerService {
|
|||||||
* @param pmcProfile profile to check and fix
|
* @param pmcProfile profile to check and fix
|
||||||
*/
|
*/
|
||||||
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Resolve any dialogue attachments that were accidentally created using the player's equipment ID as
|
||||||
|
* the stash root object ID
|
||||||
|
* @param fullProfile
|
||||||
|
*/
|
||||||
|
checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void;
|
||||||
/**
|
/**
|
||||||
* Find issues in the scav profile data that may cause issues
|
* Find issues in the scav profile data that may cause issues
|
||||||
* @param scavProfile profile to check and fix
|
* @param scavProfile profile to check and fix
|
||||||
|
@ -88,6 +88,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns bots with equipment changes
|
* @returns bots with equipment changes
|
||||||
*/
|
*/
|
||||||
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
|
/**
|
||||||
|
* Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween
|
||||||
|
* @param eventName Name of event to get gear changes for
|
||||||
|
* @returns bots with loot changes
|
||||||
|
*/
|
||||||
|
protected getEventBotLoot(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
|
||||||
/**
|
/**
|
||||||
* Get the dates each seasonal event starts and ends at
|
* Get the dates each seasonal event starts and ends at
|
||||||
* @returns Record with event name + start/end date
|
* @returns Record with event name + start/end date
|
||||||
@ -108,7 +114,7 @@ export declare class SeasonalEventService {
|
|||||||
/**
|
/**
|
||||||
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
* Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive
|
||||||
*/
|
*/
|
||||||
protected cacheActiveEvents(): void;
|
cacheActiveEvents(): void;
|
||||||
/**
|
/**
|
||||||
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
|
||||||
* @returns Season enum value
|
* @returns Season enum value
|
||||||
@ -171,6 +177,11 @@ export declare class SeasonalEventService {
|
|||||||
* @param eventName Name of the event to read equipment in from config
|
* @param eventName Name of the event to read equipment in from config
|
||||||
*/
|
*/
|
||||||
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
protected addEventGearToBots(eventType: SeasonalEventType): void;
|
||||||
|
/**
|
||||||
|
* Read in data from seasonalEvents.json and add found loot items to bots
|
||||||
|
* @param eventName Name of the event to read loot in from config
|
||||||
|
*/
|
||||||
|
protected addEventLootToBots(eventType: SeasonalEventType): void;
|
||||||
/**
|
/**
|
||||||
* Add pumpkin loot boxes to scavs
|
* Add pumpkin loot boxes to scavs
|
||||||
*/
|
*/
|
||||||
|
@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { HttpServer } from "@spt/servers/HttpServer";
|
import { HttpServer } from "@spt/servers/HttpServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
export declare class App {
|
export declare class App {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
13
TypeScript/14AfterDBLoadHook/types/utils/ProgressWriter.d.ts
vendored
Normal file
13
TypeScript/14AfterDBLoadHook/types/utils/ProgressWriter.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
export declare class ProgressWriter {
|
||||||
|
private count;
|
||||||
|
private total?;
|
||||||
|
private done;
|
||||||
|
private barFillChar;
|
||||||
|
private barEmptyChar;
|
||||||
|
private maxBarLength;
|
||||||
|
constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string);
|
||||||
|
/**
|
||||||
|
* Increment the progress counter and update the progress bar display.
|
||||||
|
*/
|
||||||
|
increment(): void;
|
||||||
|
}
|
@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
@ -47,9 +48,10 @@ export declare class BotGenerator {
|
|||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
* @param difficulty easy/normal/hard/impossible
|
* @param difficulty easy/normal/hard/impossible
|
||||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||||
* @returns
|
* profile PMC profile of player generating pscav
|
||||||
|
* @returns IBotBase
|
||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
* Create 1 bot of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -79,6 +81,12 @@ export declare class BotGenerator {
|
|||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player
|
||||||
|
* @param botRole Role bot has
|
||||||
|
* @returns True if name should be simulated pscav
|
||||||
|
*/
|
||||||
|
protected shouldSimulatePlayerScav(botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get exp for kill by bot difficulty
|
* Get exp for kill by bot difficulty
|
||||||
* @param experience Dict of difficulties and experience
|
* @param experience Dict of difficulties and experience
|
||||||
|
@ -91,6 +91,12 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
*/
|
*/
|
||||||
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Get offers that have not exceeded buy limits
|
||||||
|
* @param possibleOffers offers to process
|
||||||
|
* @returns Offers
|
||||||
|
*/
|
||||||
|
protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Check if offer is from trader standing the player does not have
|
* Check if offer is from trader standing the player does not have
|
||||||
* @param offer Offer to check
|
* @param offer Offer to check
|
||||||
@ -209,4 +215,10 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns True if in range
|
* @returns True if in range
|
||||||
*/
|
*/
|
||||||
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
protected itemQualityInRange(item: IItem, min: number, max: number): boolean;
|
||||||
|
/**
|
||||||
|
* Does this offer come from a trader
|
||||||
|
* @param offer Offer to check
|
||||||
|
* @returns True = from trader
|
||||||
|
*/
|
||||||
|
offerIsFromTrader(offer: IRagfairOffer): boolean;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ export interface IUnlockedInfo {
|
|||||||
export interface IInfo {
|
export interface IInfo {
|
||||||
EntryPoint: string;
|
EntryPoint: string;
|
||||||
Nickname: string;
|
Nickname: string;
|
||||||
|
MainProfileNickname?: string;
|
||||||
LowerNickname: string;
|
LowerNickname: string;
|
||||||
Side: string;
|
Side: string;
|
||||||
SquadInviteRestriction: boolean;
|
SquadInviteRestriction: boolean;
|
||||||
|
@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
/** Multipliers for skill gain when inside menus, NOT in-game */
|
/** Multipliers for skill gain when inside menus, NOT in-game */
|
||||||
skillGainMultiplers: Record<string, number>;
|
skillGainMultiplers: Record<string, number>;
|
||||||
|
/** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */
|
||||||
|
deprioritisedMoneyContainers: string[];
|
||||||
}
|
}
|
||||||
export interface IRewardDetails {
|
export interface IRewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
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