Update examples for 3.2.0
This commit is contained in:
parent
54b3bc63e6
commit
c4ee2f5787
9
TypeScript/10ScopesAndTypes/types/context/ApplicationContext.d.ts
vendored
Normal file
9
TypeScript/10ScopesAndTypes/types/context/ApplicationContext.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { ContextVariable } from "./ContextVariable";
|
||||
import { ContextVariableType } from "./ContextVariableType";
|
||||
export declare class ApplicationContext {
|
||||
private variables;
|
||||
private static holderMaxSize;
|
||||
getLatestValue(type: ContextVariableType): ContextVariable;
|
||||
getValues(type: ContextVariableType): ContextVariable[];
|
||||
addValue(type: ContextVariableType, value: any): void;
|
||||
}
|
10
TypeScript/10ScopesAndTypes/types/context/ContextVariable.d.ts
vendored
Normal file
10
TypeScript/10ScopesAndTypes/types/context/ContextVariable.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { ContextVariableType } from "./ContextVariableType";
|
||||
export declare class ContextVariable {
|
||||
private value;
|
||||
private timestamp;
|
||||
private type;
|
||||
constructor(value: any, type: ContextVariableType);
|
||||
getValue(): any;
|
||||
getTimestamp(): Date;
|
||||
getType(): ContextVariableType;
|
||||
}
|
4
TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts
vendored
Normal file
4
TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export declare enum ContextVariableType {
|
||||
SESSION_ID = 0,
|
||||
MATCH_INFO = 1
|
||||
}
|
@ -30,6 +30,6 @@ export declare class BotController {
|
||||
*/
|
||||
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
||||
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty;
|
||||
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||
getBotCap(): number;
|
||||
}
|
||||
|
@ -1,14 +1,15 @@
|
||||
import { ScavCaseRewardGenerator } from "../generators/ScavCaseRewardGenerator";
|
||||
import { HideoutHelper } from "../helpers/HideoutHelper";
|
||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
||||
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
||||
@ -42,26 +43,58 @@ export declare class HideoutController {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected hideoutHelper: HideoutHelper;
|
||||
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
||||
protected configServer: ConfigServer;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer);
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Create item in hideout slot item array, remove item from player inventory
|
||||
* @param pmcData Profile data
|
||||
* @param addItemToHideoutRequest reqeust from client to place item in area slot
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse object
|
||||
*/
|
||||
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
||||
/**
|
||||
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
|
||||
* @param sessionID Session id
|
||||
* @param pmcData Profile to update
|
||||
* @param removeResourceRequest client request
|
||||
* @param output response to send to client
|
||||
* @param hideoutArea Area fuel is being removed from
|
||||
* @returns IItemEventRouterResponse response
|
||||
*/
|
||||
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles event after clicking 'start' on the scav case hideout page
|
||||
* @param pmcData player profile
|
||||
* @param body client request object
|
||||
* @param sessionID session id
|
||||
* @returns item event router response
|
||||
*/
|
||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): {
|
||||
[x: string]: number;
|
||||
};
|
||||
protected getRandomisedScavRewards(rarityItemCounter: {
|
||||
[x: string]: number;
|
||||
}): Product[];
|
||||
/**
|
||||
* Add generated scav case rewards to player profile
|
||||
* @param pmcData player profile to add rewards to
|
||||
* @param rewards reward items to add to profile
|
||||
*/
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[]): void;
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||
* @param sessionID
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param output
|
||||
* @returns
|
||||
*/
|
||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
update(): void;
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
|
||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||
import { HealthHelper } from "../helpers/HealthHelper";
|
||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { QuestHelper } from "../helpers/QuestHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||
@ -12,20 +13,32 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { InsuranceService } from "../services/InsuranceService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class InraidController {
|
||||
protected saveServer: SaveServer;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected questHelper: QuestHelper;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected extendedProfileHelper: ExtendedProfileHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected playerScavGenerator: PlayerScavGenerator;
|
||||
protected healthHelper: HealthHelper;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected inRaidHelper: InRaidHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
||||
constructor(saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
||||
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||
/**
|
||||
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
||||
* @param offraidData Save Progress Request
|
||||
* @param pmcData player profile
|
||||
* @param isPlayerScav Was the player a pScav
|
||||
*/
|
||||
private markOrRemoveFoundInRaidItems;
|
||||
private handlePostRaidPlayerScavProcess;
|
||||
private handlePostRaidPlayerScavKarmaChanges;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
@ -21,9 +22,10 @@ export declare class MatchController {
|
||||
protected traderHelper: TraderHelper;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected configServer: ConfigServer;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected matchConfig: IMatchConfig;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, applicationContext: ApplicationContext);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
|
||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
||||
@ -21,9 +22,10 @@ export declare class ProfileController {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected playerScavGenerator: PlayerScavGenerator;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected extendedProfileHelper: ExtendedProfileHelper;
|
||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper);
|
||||
protected profileHelper: ProfileHelper;
|
||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, profileHelper: ProfileHelper);
|
||||
getMiniProfiles(): IMiniProfile[];
|
||||
getMiniProfile(sessionID: string): any;
|
||||
getCompleteProfile(sessionID: string): IPmcData[];
|
||||
|
@ -4,7 +4,8 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { Exit } from "../models/eft/common/ILocationBase";
|
||||
import { IPmcData, TraderInfo } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { TraderInfo } from "../models/eft/common/tables/IBotBase";
|
||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPmcDataRepeatableQuest, IRepeatableQuest, IReward, IRewards } from "../models/eft/common/tables/IRepeatableQuests";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||
|
@ -1,13 +1,14 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||
import { Health as PmcHealth } from "../models/eft/common/IPmcData";
|
||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType";
|
||||
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, IBotType, Inventory } from "../models/eft/common/tables/IBotType";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
@ -23,19 +24,30 @@ export declare class BotGenerator {
|
||||
protected hashUtil: HashUtil;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected botInventoryGenerator: BotInventoryGenerator;
|
||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||
protected botHelper: BotHelper;
|
||||
protected gameEventHelper: GameEventHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botEquipmentFilterService: BotEquipmentFilterService, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||
/**
|
||||
* Choose if a bot should become a Pmc by checking if bot type is allowed to become a Pmc in bot config
|
||||
* @param isPlayerScav is a player scav being generated, forces choice returned to never be a pmc
|
||||
* Generate a player scav bot object
|
||||
* @param role e.g. assault / pmcbot
|
||||
* @param difficulty easy/normal/hard/impossible
|
||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||
* @returns
|
||||
*/
|
||||
protected shouldBotBePmc(isPlayerScav: boolean, role: string): boolean;
|
||||
generatePlayerScav(role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||
/**
|
||||
* Choose if a bot should become a PMC by checking if bot type is allowed to become a Pmc in botConfig.convertFromChances and doing a random int check
|
||||
* @param botRole the bot role to check if should be a pmc
|
||||
* @returns true if should be a pmc
|
||||
*/
|
||||
protected shouldBotBePmc(botRole: string): boolean;
|
||||
/**
|
||||
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||
* @returns pmc side as string
|
||||
@ -46,7 +58,7 @@ export declare class BotGenerator {
|
||||
* @returns IBotBase object
|
||||
*/
|
||||
protected getCloneOfBotBase(): IBotBase;
|
||||
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
|
||||
protected generateBot(bot: IBotBase, role: string, node: IBotType, isPmc: boolean, isPlayerScav?: boolean): IBotBase;
|
||||
/**
|
||||
* Log the number of PMCs generated to the debug console
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||
import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -10,6 +11,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||
export declare class BotLootGenerator {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
@ -17,11 +19,106 @@ export declare class BotLootGenerator {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected botWeaponGenerator: BotWeaponGenerator;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||
generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, inventory: PmcInventory): void;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||
generateLoot(templateInventory: Inventory, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, botInventory: PmcInventory, equipmentChances: Chances): void;
|
||||
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void;
|
||||
/**
|
||||
* Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached
|
||||
* @param pool pool of items to pick from
|
||||
* @param equipmentSlots What equality slot will the loot items be added to
|
||||
* @param totalItemCount Max count of items to add
|
||||
* @param inventoryToAddItemsTo bot inventory loot will be added to
|
||||
* @param botRole role of the bot loot is being generated for (assault/pmcbot)
|
||||
* @param useLimits should item limit counts be used as defined in config/bot.json
|
||||
* @param totalValueLimitRub total value of loot allowed in roubles
|
||||
* @param isPmc is the bot being generated for a pmc
|
||||
*/
|
||||
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, useLimits?: boolean, totalValueLimitRub?: number, isPmc?: boolean): void;
|
||||
/**
|
||||
* Add generated weapons to inventory as loot
|
||||
* @param botInventory inventory to add preset to
|
||||
* @param equipmentSlot slot to place the preset in (backpack)
|
||||
* @param templateInventory bots template, assault.json
|
||||
* @param modChances chances for mods to spawn on weapon
|
||||
* @param botRole bots role, .e.g. pmcBot
|
||||
* @param isPmc are we generating for a pmc
|
||||
*/
|
||||
protected addLooseWeaponsToInventorySlot(botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean): void;
|
||||
/**
|
||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||
* @param pool pool of items to pick an item from
|
||||
* @param isPmc is the bot being created a pmc
|
||||
* @returns ITemplateItem object
|
||||
*/
|
||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||
/**
|
||||
* Get the loot nvalue from botconfig
|
||||
* @param isPmc if true the pmc nvalue is returned
|
||||
* @returns nvalue as number
|
||||
*/
|
||||
protected getBotLootNValue(isPmc: boolean): number;
|
||||
/**
|
||||
* Update item limit array to contain items that have a limit
|
||||
* All values are set to 0
|
||||
* @param isPmc is the bot a pmc
|
||||
* @param botRole role the bot has
|
||||
* @param limitCount
|
||||
*/
|
||||
protected initItemLimitArray(isPmc: boolean, botRole: string, limitCount: Record<string, number>): void;
|
||||
/**
|
||||
* Check if an item has reached its bot-specific spawn limit
|
||||
* @param itemTemplate Item we check to see if its reached spawn limit
|
||||
* @param botRole Bot type
|
||||
* @param isPmc Is bot we're working with a pmc
|
||||
* @param limitCount spawn limits for items on bot
|
||||
* @param itemSpawnLimits the limits this bot is allowed to have
|
||||
* @returns true if item has reached spawn limit
|
||||
*/
|
||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||
/**
|
||||
* Is the item an ammo box
|
||||
* @param props props of the item to check
|
||||
* @returns true if item is an ammo box
|
||||
*/
|
||||
protected isAmmoBox(props: Props): boolean;
|
||||
/**
|
||||
* Create an object that contains the ammo stack for an ammo box
|
||||
* @param parentId ammo box id
|
||||
* @param props ammo box props
|
||||
* @returns Item object
|
||||
*/
|
||||
protected createAmmoForAmmoBox(parentId: string, props: Props): Item;
|
||||
/**
|
||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||
* @param isPmc is this a PMC
|
||||
* @param itemTemplate item details
|
||||
* @param moneyItem Money stack to randomise
|
||||
*/
|
||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||
/**
|
||||
* Randomise the size of an ammo stack
|
||||
* @param isPmc is this a PMC
|
||||
* @param itemTemplate item details
|
||||
* @param ammoItem Ammo stack to randomise
|
||||
*/
|
||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
||||
/**
|
||||
* Get spawn limits for a specific bot type from bot.json config
|
||||
* If no limit found for a non pmc bot, fall back to defaults
|
||||
* @param isPmc is the bot we want limits for a pmc
|
||||
* @param botRole what role does the bot have
|
||||
* @returns dictionary of tplIds and limit
|
||||
*/
|
||||
protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record<string, number>;
|
||||
/**
|
||||
* Get the parentId or tplId of item inside spawnLimits object if it exists
|
||||
* @param itemTemplate item we want to look for in spawn limits
|
||||
* @param spawnLimits Limits to check for item
|
||||
* @returns id as string, otherwise undefined
|
||||
*/
|
||||
protected getMatchingIdFromSpawnLimits(itemTemplate: ITemplateItem, spawnLimits: Record<string, number>): string;
|
||||
}
|
||||
|
@ -1,15 +1,19 @@
|
||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||
import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { MinMax } from "../models/common/MinMax";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Inventory, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { GenerateWeaponResult } from "../models/spt/bots/GenerateWeaponResult";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class BotWeaponGenerator {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
@ -19,19 +23,69 @@ export declare class BotWeaponGenerator {
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected randomUtil: RandomUtil;
|
||||
private readonly modMagazineSlotId;
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
||||
generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
||||
protected configServer: ConfigServer;
|
||||
protected readonly modMagazineSlotId = "mod_magazine";
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||
/**
|
||||
* Get a random weapon from a bots pool of weapons (weighted)
|
||||
* @param equipmentSlot Primary/secondary/holster
|
||||
* @param botTemplateInventory e.g. assault.json
|
||||
* @returns weapon tpl
|
||||
*/
|
||||
pickWeightedWeaponTplFromPool(equipmentSlot: string, botTemplateInventory: Inventory): string;
|
||||
/**
|
||||
* Generated a weapon based on the supplied weapon tpl
|
||||
* @param weaponTpl weapon tpl to generate (use pickWeightedWeaponTplFromPool())
|
||||
* @param equipmentSlot slot to fit into, primary/secondary/holster
|
||||
* @param botTemplateInventory e.g. assault.json
|
||||
* @param weaponParentId
|
||||
* @param modChances
|
||||
* @param botRole
|
||||
* @param isPmc
|
||||
* @returns GenerateWeaponResult object
|
||||
*/
|
||||
generateWeaponByTpl(weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean): GenerateWeaponResult;
|
||||
/**
|
||||
* Generate an entirely random weapon
|
||||
* @param equipmentSlot Primary/secondary/holster
|
||||
* @param botTemplateInventory e.g. assault.json
|
||||
* @param weaponParentId
|
||||
* @param modChances
|
||||
* @param botRole
|
||||
* @param isPmc
|
||||
* @returns GenerateWeaponResult object
|
||||
*/
|
||||
generateRandomWeapon(equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean): GenerateWeaponResult;
|
||||
/**
|
||||
* Create array with weapon base as only element
|
||||
* Add additional properties as required
|
||||
* @param weaponTpl
|
||||
* @param weaponParentId
|
||||
* @param equipmentSlot
|
||||
* @param weaponItemTemplate
|
||||
* @param botRole for durability values
|
||||
* @returns
|
||||
*/
|
||||
constructWeaponBaseArray(weaponTpl: string, weaponParentId: string, equipmentSlot: string, weaponItemTemplate: ITemplateItem, botRole: string): Item[];
|
||||
/**
|
||||
* Add compatible magazines to an inventory based on a generated weapon
|
||||
* @param weaponDetails
|
||||
* @param magCounts
|
||||
* @param inventory
|
||||
* @param botRole the bot type we're getting generating extra mags for
|
||||
*/
|
||||
addExtraMagazinesToInventory(weaponDetails: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
|
||||
/**
|
||||
* Get the mods necessary to kit out a weapon to its preset level
|
||||
* @param weaponTpl weapon to find preset for
|
||||
* @param equipmentSlot the slot the weapon will be placed in
|
||||
* @param weaponParentId
|
||||
* @param weaponParentId Value used for the parentid
|
||||
* @returns array of weapon mods
|
||||
*/
|
||||
protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[];
|
||||
/** Checks if all required slots are occupied on a weapon and all it's mods */
|
||||
protected isWeaponValid(itemList: Item[]): boolean;
|
||||
protected isWeaponValid(weaponItemArray: Item[]): boolean;
|
||||
/**
|
||||
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
||||
* Additionally, adds extra bullets to SecuredContainer
|
||||
@ -40,9 +94,10 @@ export declare class BotWeaponGenerator {
|
||||
* @param magCounts
|
||||
* @param ammoTpl
|
||||
* @param inventory
|
||||
* @param botRole the bot type we're getting generating extra mags for
|
||||
* @returns
|
||||
*/
|
||||
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void;
|
||||
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory, botRole: string): void;
|
||||
/**
|
||||
* Get a randomised number of bullets for a specific magazine
|
||||
* @param magCounts min and max count of magazines
|
||||
@ -68,18 +123,31 @@ export declare class BotWeaponGenerator {
|
||||
* Get a weapons magazine tpl from a weapon template
|
||||
* @param weaponMods mods from a weapon template
|
||||
* @param weaponTemplate Weapon to get magazine tpl for
|
||||
* @param botRole the bot type we are getting the magazine for
|
||||
* @returns magazine tpl string
|
||||
*/
|
||||
protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string;
|
||||
protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem, botRole: string): string;
|
||||
/**
|
||||
* Get a weapons default magazine template id
|
||||
* @param weaponTemplate weapon to get default magazine for
|
||||
* @returns tpl of magazine
|
||||
*/
|
||||
protected getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string;
|
||||
protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void;
|
||||
/**
|
||||
* Finds and returns compatible ammo tpl
|
||||
*
|
||||
* @param {*} weaponMods
|
||||
* @param {*} weaponTemplate
|
||||
* @returns compatible ammo tpl
|
||||
* Finds and return a compatible ammo tpl based on the bots ammo weightings (x.json/inventory/equipment/ammo)
|
||||
* @param ammo a list of ammo tpls the weapon can use
|
||||
* @param weaponTemplate the weapon we want to pick ammo for
|
||||
* @param isPmc is the ammo being gathered for a pmc (runs pmc ammo filtering)
|
||||
* @returns an ammo tpl that works with the desired gun
|
||||
*/
|
||||
protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string;
|
||||
protected getCompatibleAmmo(ammo: Record<string, Record<string, number>>, weaponTemplate: ITemplateItem, isPmc: boolean): string;
|
||||
/**
|
||||
* Get a weapons compatible cartridge caliber
|
||||
* @param weaponTemplate Weapon to look up caliber of
|
||||
* @returns caliber as string
|
||||
*/
|
||||
protected getWeaponCaliber(weaponTemplate: ITemplateItem): string;
|
||||
/**
|
||||
* Fill existing magazines to full, while replacing their contents with specified ammo
|
||||
* @param weaponMods
|
||||
@ -87,6 +155,14 @@ export declare class BotWeaponGenerator {
|
||||
* @param ammoTpl
|
||||
*/
|
||||
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
|
||||
/**
|
||||
* Add cartridge item to weapon Item array, if it already exists, update
|
||||
* @param weaponMods Weapon items array to amend
|
||||
* @param magazine magazine item details we're adding cartridges to
|
||||
* @param chosenAmmo cartridge to put into the magazine
|
||||
* @param newStackSize how many cartridges should go into the magazine
|
||||
*/
|
||||
protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void;
|
||||
/**
|
||||
* Fill each Camora with a bullet
|
||||
* @param weaponMods Weapon mods to find and update camora mod(s) from
|
||||
|
67
TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts
vendored
Normal file
67
TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Skills, Stats } from "../models/eft/common/tables/IBotBase";
|
||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { IPlayerScavConfig, KarmaLevel } from "../models/spt/config/IPlayerScavConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { BotGenerator } from "./BotGenerator";
|
||||
export declare class PlayerScavGenerator {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected saveServer: SaveServer;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected botHelper: BotHelper;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected fenceService: FenceService;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected botGenerator: BotGenerator;
|
||||
protected configServer: ConfigServer;
|
||||
protected playerScavConfig: IPlayerScavConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, botGenerator: BotGenerator, configServer: ConfigServer);
|
||||
/**
|
||||
* Update a player profile to include a new player scav profile
|
||||
* @param sessionID session id to specify what profile is updated
|
||||
* @returns profile object
|
||||
*/
|
||||
generate(sessionID: string): IPmcData;
|
||||
/**
|
||||
* Get the scav karama level for a profile
|
||||
* Is also the fence trader rep level
|
||||
* @param pmcData pmc profile
|
||||
* @returns karma level
|
||||
*/
|
||||
protected getScavKarmaLevel(pmcData: IPmcData): number;
|
||||
/**
|
||||
* Get a baseBot template
|
||||
* If the parameter doesnt match "assault", take parts from the loot type and apply to the return bot template
|
||||
* @param botTypeForLoot bot type to use for inventory/chances
|
||||
* @returns IBotType object
|
||||
*/
|
||||
protected constructBotBaseTemplate(botTypeForLoot: string): IBotType;
|
||||
/**
|
||||
* Adjust equipment/mod/item generation values based on scav karma levels
|
||||
* @param karmaSettings Values to modify the bot template with
|
||||
* @param baseBotNode bot template to modify according to karama level settings
|
||||
*/
|
||||
protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void;
|
||||
protected getScavSkills(scavProfile: IPmcData): Skills;
|
||||
protected getDefaultScavSkills(): Skills;
|
||||
protected getScavStats(scavProfile: IPmcData): Stats;
|
||||
protected getScavLevel(scavProfile: IPmcData): number;
|
||||
protected getScavExperience(scavProfile: IPmcData): number;
|
||||
/**
|
||||
* Set cooldown till pscav is playable
|
||||
* take into account scav cooldown bonus
|
||||
* @param scavData scav profile
|
||||
* @param pmcData pmc profile
|
||||
* @returns
|
||||
*/
|
||||
protected setScavCooldownTimer(scavData: IPmcData, pmcData: IPmcData): IPmcData;
|
||||
}
|
105
TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts
vendored
Normal file
105
TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { Product } from "../models/eft/common/tables/IBotBase";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
|
||||
import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "../models/spt/hideout/ScavCaseRewardCountsAndPrices";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class ScavCaseRewardGenerator {
|
||||
protected logger: ILogger;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected scavCaseConfig: IScavCaseConfig;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Create an array of rewards that will be given to the player upon completing their scav case build
|
||||
* @param body client request
|
||||
* @returns Product array
|
||||
*/
|
||||
generate(body: IHideoutScavCaseStartRequestData): Product[];
|
||||
/**
|
||||
* Get all db items that are not blacklisted in scavcase config
|
||||
* @returns filtered array of db items
|
||||
*/
|
||||
protected getDbItems(): ITemplateItem[];
|
||||
/**
|
||||
* Check if a template id has a blacklisted parent id
|
||||
* @param tplid template id to check
|
||||
* @returns true if item is blacklisted
|
||||
*/
|
||||
protected itemHasBlacklistedParent(tplid: string): boolean;
|
||||
/**
|
||||
* Pick a number of items to be rewards, the count is defined by the values in
|
||||
* @param items item pool to pick rewards from
|
||||
* @param itemFilters how the rewards should be filtered down (by item count)
|
||||
* @returns
|
||||
*/
|
||||
protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[];
|
||||
/**
|
||||
* Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig
|
||||
* @returns true if reward should be money
|
||||
*/
|
||||
protected rewardShouldBeMoney(): boolean;
|
||||
/**
|
||||
* Choose if ammo should be a reward based on the ammoRewardChancePercent config chance in scavCaseConfig
|
||||
* @returns true if reward should be ammo
|
||||
*/
|
||||
protected rewardShouldBeAmmo(): boolean;
|
||||
/**
|
||||
* Choose from rouble/dollar/euro at random
|
||||
*/
|
||||
protected getRandomMoney(): ITemplateItem;
|
||||
/**
|
||||
* Get a random ammo from items.json that is not in the ammo blacklist AND inside the price rage defined in scavcase.json config
|
||||
* @param rarity The rarity this ammo reward is for
|
||||
* @returns random ammo item from items.json
|
||||
*/
|
||||
protected getRandomAmmo(rarity: string): ITemplateItem;
|
||||
/**
|
||||
* Take all the rewards picked create the Product object array ready to return to calling code
|
||||
* Also add a stack count to ammo and money
|
||||
* @param rewardItems items to convert
|
||||
* @returns Product array
|
||||
*/
|
||||
protected randomiseContainerItemRewards(rewardItems: ITemplateItem[], rarity: string): Product[];
|
||||
/**
|
||||
* Add a randomised stack count to ammo or money items
|
||||
* @param item money or ammo item
|
||||
* @param resultItem money or ammo item with a randomise stack size
|
||||
*/
|
||||
protected addStackCountToAmmoAndMoney(item: ITemplateItem, resultItem: {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd: any;
|
||||
}, rarity: string): void;
|
||||
/**
|
||||
*
|
||||
* @param dbItems all items from the items.json
|
||||
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
|
||||
* @returns filtered dbItems array
|
||||
*/
|
||||
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[];
|
||||
/**
|
||||
* Gathers the reward options from config and scavcase.json into a single object
|
||||
* @param scavCaseDetails scavcase.json values
|
||||
* @returns ScavCaseRewardCountsAndPrices object
|
||||
*/
|
||||
protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices;
|
||||
/**
|
||||
* Randomises the size of ammo and money stacks
|
||||
* @param itemToCalculate ammo or money item
|
||||
* @param rarity rarity (common/rare/superrare)
|
||||
* @returns value to set stack count to
|
||||
*/
|
||||
protected getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem, rarity: string): number;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
||||
import { Grid, ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
||||
@ -35,13 +35,6 @@ export declare class BotGeneratorHelper {
|
||||
* @returns true if it is cylinder related
|
||||
*/
|
||||
magazineIsCylinderRelated(magazineParentName: string): boolean;
|
||||
/**
|
||||
* Get a list of non black-listed cartridges from the PMC bot config
|
||||
* @param modSlot mod item slot
|
||||
* @param itemModPool
|
||||
* @returns string array of cartridges PMCs can use
|
||||
*/
|
||||
protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record<string, string[]>): string[];
|
||||
/**
|
||||
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
||||
* never return true for an item that has 0% spawn chance
|
||||
@ -53,6 +46,7 @@ export declare class BotGeneratorHelper {
|
||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||
/**
|
||||
* Get a list of containers that hold ammo
|
||||
* e.g. mod_magazine
|
||||
* @returns string array
|
||||
*/
|
||||
protected getAmmoContainers(): string[];
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||
import { Difficulty, IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -14,6 +14,7 @@ export declare class BotHelper {
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||
getBotDifficultySettings(type: string, difficulty: string): Difficulty;
|
||||
getBotTemplate(role: string): IBotType;
|
||||
getPmcDifficultySettings(type: string, difficulty: string): Difficulty;
|
||||
/**
|
||||
* Randomise the chance the PMC will attack their own side
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { Dialogue, MessageContent, MessagePreview } from "../models/eft/profile/IAkiProfile";
|
||||
import { MessageType } from "../models/enums/MessageType";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
@ -15,7 +16,25 @@ export declare class DialogueHelper {
|
||||
protected itemHelper: ItemHelper;
|
||||
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
|
||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||
/**
|
||||
* Add a templated message to the dialogue.
|
||||
* @param dialogueID
|
||||
* @param messageContent
|
||||
* @param sessionID
|
||||
* @param rewards
|
||||
*/
|
||||
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void;
|
||||
/**
|
||||
* Get the preview contents of the last message in a dialogue.
|
||||
* @param dialogue
|
||||
* @returns
|
||||
*/
|
||||
getMessagePreview(dialogue: Dialogue): MessagePreview;
|
||||
getMessageItemContents(messageID: string, sessionID: string): any[];
|
||||
/**
|
||||
* Get the item contents for a particular message.
|
||||
* @param messageID
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
getMessageItemContents(messageID: string, sessionID: string): Item[];
|
||||
}
|
||||
|
@ -1,27 +0,0 @@
|
||||
import { BotGenerator } from "../generators/BotGenerator";
|
||||
import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { Watermark } from "../utils/Watermark";
|
||||
import { ItemHelper } from "./ItemHelper";
|
||||
import { ProfileHelper } from "./ProfileHelper";
|
||||
/**
|
||||
* This class needs to exist outside of ProfileHelper to ensure cyclic deps don't cause the server to fail on load
|
||||
*/
|
||||
export declare class ExtendedProfileHelper extends ProfileHelper {
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected botGenerator: BotGenerator;
|
||||
constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, botLootCacheService: BotLootCacheService, fenceService: FenceService, botGenerator: BotGenerator);
|
||||
generatePlayerScav(sessionID: string): IPmcData;
|
||||
protected getScavSkills(sessionID: string): Skills;
|
||||
protected removeSecureContainer(profile: IPmcData): IPmcData;
|
||||
protected getDefaultScavSkills(): Skills;
|
||||
protected getScavStats(sessionID: string): Stats;
|
||||
protected getScavLevel(sessionID: string): number;
|
||||
protected getScavExperience(sessionID: string): number;
|
||||
protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Common, HideoutArea, Production, Productive } from "../models/eft/common/tables/IBotBase";
|
||||
import { Upd } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { StageBonus } from "../models/eft/hideout/IHideoutArea";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
@ -64,5 +64,4 @@ export declare class HideoutHelper {
|
||||
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
||||
isProduction(productive: Productive): productive is Production;
|
||||
getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { IPmcData, Victim } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Victim } from "../models/eft/common/tables/IBotBase";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -15,21 +16,72 @@ export declare class InRaidHelper {
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper);
|
||||
/**
|
||||
* Reset the SPT inraid property stored in a profile to 'none'
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
protected removePlayer(sessionID: string): void;
|
||||
/**
|
||||
* Some maps have one-time-use keys (e.g. Labs
|
||||
* Remove the relevant key from an inventory based on the post-raid request data passed in
|
||||
* @param offraidData post-raid data
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||
/**
|
||||
* Check an array of items and add an upd object to money items with a stack count of 1
|
||||
* Single stack money items have no upd object and thus no StackObjectsCount, causing issues
|
||||
* @param items Items array to check
|
||||
*/
|
||||
addUpdToMoneyFromRaid(items: Item[]): void;
|
||||
/**
|
||||
* Add positive karma for PMC kills
|
||||
* @param {*} existingFenceStanding
|
||||
* @param {*} victims
|
||||
* Add karma changes up and return the new value
|
||||
* @param existingFenceStanding Current fence standing level
|
||||
* @param victims Array of kills player performed
|
||||
* @returns adjusted karma level after kills are taken into account
|
||||
*/
|
||||
calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): void;
|
||||
setBaseStats(profileData: IPmcData, offraidData: ISaveProgressRequestData, sessionID: string): IPmcData;
|
||||
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
removeFoundInRaidStatusFromItems(profile: IPmcData): IPmcData;
|
||||
setInventory(sessionID: string, pmcData: IPmcData, profile: IPmcData): IPmcData;
|
||||
calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): number;
|
||||
/**
|
||||
* Reset a profile to a baseline, used post-raid
|
||||
* Reset points earned during session property
|
||||
* Increment exp
|
||||
* Remove Labs keycard
|
||||
* @param profileData Profile to update
|
||||
* @param saveProgressRequest post raid save data request data
|
||||
* @param sessionID Sessino id
|
||||
* @returns Reset profile object
|
||||
*/
|
||||
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData;
|
||||
/**
|
||||
* Adds SpawnedInSession property to items found in a raid
|
||||
* Removes SpawnedInSession for non-scav players if item was taken into raid with SpawnedInSession = true
|
||||
* @param preRaidProfile profile to update
|
||||
* @param postRaidProfile profile to upate inventory contents of
|
||||
* @param isPlayerScav Was this a p scav raid
|
||||
* @returns
|
||||
*/
|
||||
addSpawnedInSessionPropertyToItems(preRaidProfile: IPmcData, postRaidProfile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
/**
|
||||
* Iterate over inventory items and remove the property that defines an item as Found in Raid
|
||||
* Only removes property if item had FiR when entering raid
|
||||
* @param postRaidProfile profile to update items for
|
||||
* @returns Updated profile with SpawnedInSession removed
|
||||
*/
|
||||
removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData;
|
||||
/**
|
||||
* Update a players inventory post-raid
|
||||
* Remove equipped items from pre-raid
|
||||
* Add new items found in raid to profile
|
||||
* Store insurance items in profile
|
||||
* @param sessionID
|
||||
* @param pmcData Profile to update
|
||||
* @param postRaidProfile Profile returned by client after a raid
|
||||
* @returns Updated profile
|
||||
*/
|
||||
setInventory(sessionID: string, pmcData: IPmcData, postRaidProfile: IPmcData): IPmcData;
|
||||
/**
|
||||
* Clear pmc inventory of all items except those that are exempt
|
||||
* Used post-raid to remove items after death
|
||||
* @param pmcData Player profile
|
||||
* @param sessionID Session id
|
||||
* @returns Player profile with pmc inventory cleared
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { InsuredItem } from "../models/eft/common/tables/IBotBase";
|
||||
import { Item, Repairable } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -36,7 +37,7 @@ declare class ItemHelper {
|
||||
* @param {string} baseclassTpl the baseclass to check for
|
||||
* @return {boolean} is the tpl a descendent?
|
||||
*/
|
||||
isOfBaseclass(tpl: string, baseclassTpl: string): any;
|
||||
isOfBaseclass(tpl: string, baseclassTpl: string): boolean;
|
||||
/**
|
||||
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
||||
* found in the handbook. If the price can't be found at all return 0
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { IPmcData, Stats } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Stats } from "../models/eft/common/tables/IBotBase";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
@ -36,4 +37,10 @@ export declare class ProfileHelper {
|
||||
getDefaultCounters(): Stats;
|
||||
protected isWiped(sessionID: string): boolean;
|
||||
protected getServerVersion(): string;
|
||||
/**
|
||||
* Iterate over player profile inventory items and find the secure container and remove it
|
||||
* @param profile Profile to remove secure container from
|
||||
* @returns profile without secure container
|
||||
*/
|
||||
removeSecureContainer(profile: IPmcData): IPmcData;
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { IPmcData, Quest } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||
import { QuestStatus } from "../models/enums/QuestStatus";
|
||||
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
@ -35,8 +36,7 @@ export declare class QuestHelper {
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||
static get STATUS(): Record<string, number>;
|
||||
questStatus(pmcData: IPmcData, questID: string): string;
|
||||
questStatus(pmcData: IPmcData, questID: string): QuestStatus;
|
||||
/**
|
||||
* returns true is the condition is satisfied
|
||||
*/
|
||||
@ -51,8 +51,14 @@ export declare class QuestHelper {
|
||||
dumpQuests(quests: any, label?: any): void;
|
||||
loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean;
|
||||
protected processReward(reward: Reward): any[];
|
||||
getQuestRewardItems(quest: IQuest, state: string): Reward[];
|
||||
addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void;
|
||||
getQuestRewardItems(quest: IQuest, state: QuestStatus): Reward[];
|
||||
/**
|
||||
* Add quest with new state value to pmc profile
|
||||
* @param pmcData profile to add quest to
|
||||
* @param newState state the new quest should be in when added
|
||||
* @param acceptedQuest Details of quest being added
|
||||
*/
|
||||
addQuestToPMCData(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): void;
|
||||
acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[];
|
||||
failedUnlocked(failedQuestId: string, sessionID: string): IQuest[];
|
||||
applyMoneyBoost(quest: IQuest, moneyBoost: number): IQuest;
|
||||
@ -83,6 +89,13 @@ export declare class QuestHelper {
|
||||
*/
|
||||
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
||||
getQuestLocaleIdFromDb(messageId: string): string;
|
||||
/**
|
||||
* Alter a quests state + Add a record to tis status timers object
|
||||
* @param pmcData Profile to update
|
||||
* @param newQuestState new state the qeust should be in
|
||||
* @param questId id of the quest to alter the status of
|
||||
*/
|
||||
updateQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void;
|
||||
/**
|
||||
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks
|
||||
* @param pmcData Player profile
|
||||
@ -91,7 +104,7 @@ export declare class QuestHelper {
|
||||
* @param sessionID Seession id
|
||||
* @returns array of reward objects
|
||||
*/
|
||||
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[];
|
||||
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: QuestStatus, sessionID: string): Reward[];
|
||||
/**
|
||||
* Get the intel center bonus a player has
|
||||
* @param pmcData player profile
|
||||
|
@ -14,7 +14,7 @@ export declare class RepairHelper {
|
||||
protected configServer: ConfigServer;
|
||||
protected repairConfig: IRepairConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item;
|
||||
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean, applyRandomDegradation?: boolean): Item;
|
||||
protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number;
|
||||
protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number;
|
||||
isWeaponTemplate(tpl: string): boolean;
|
||||
|
4
TypeScript/10ScopesAndTypes/types/models/common/MinMax.d.ts
vendored
Normal file
4
TypeScript/10ScopesAndTypes/types/models/common/MinMax.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export interface MinMax {
|
||||
max: number;
|
||||
min: number;
|
||||
}
|
@ -1,347 +1,3 @@
|
||||
import { IRagfairOffer } from "../ragfair/IRagfairOffer";
|
||||
import { IPmcDataRepeatableQuest } from "./tables/IRepeatableQuests";
|
||||
import { Item, Upd } from "./tables/IItem";
|
||||
import { HideoutAreas } from "../../enums/HideoutAreas";
|
||||
import { MemberCategory } from "../../enums/MemberCategory";
|
||||
export interface IPmcData {
|
||||
_id: string;
|
||||
aid: string;
|
||||
savage?: string;
|
||||
Info: Info;
|
||||
Customization: Customization;
|
||||
Health: Health;
|
||||
Inventory: Inventory;
|
||||
Skills: Skills;
|
||||
Stats: Stats;
|
||||
Encyclopedia: Record<string, boolean>;
|
||||
ConditionCounters: ConditionCounters;
|
||||
BackendCounters: Record<string, BackendCounter>;
|
||||
InsuredItems: InsuredItem[];
|
||||
Hideout: Hideout;
|
||||
Bonuses: Bonus[];
|
||||
Notes: Notes;
|
||||
Quests: Quest[];
|
||||
TradersInfo: Record<string, TraderInfo>;
|
||||
RagfairInfo: RagfairInfo;
|
||||
WishList: string[];
|
||||
RepeatableQuests: IPmcDataRepeatableQuest[];
|
||||
CarExtractCounts: CarExtractCounts;
|
||||
SurvivorClass: SurvivorClass;
|
||||
}
|
||||
export interface Info {
|
||||
EntryPoint: string;
|
||||
Nickname: string;
|
||||
LowerNickname: string;
|
||||
Side: string;
|
||||
Voice: string;
|
||||
Level: number;
|
||||
Experience: number;
|
||||
RegistrationDate: number;
|
||||
GameVersion: string;
|
||||
AccountType: number;
|
||||
MemberCategory: MemberCategory;
|
||||
lockedMoveCommands: boolean;
|
||||
SavageLockTime: number;
|
||||
LastTimePlayedAsSavage: number;
|
||||
Settings: Settings;
|
||||
NicknameChangeDate: number;
|
||||
IsStreamerModeAvailable: boolean;
|
||||
Bans: IBan[];
|
||||
BannedState: boolean;
|
||||
BannedUntil: number;
|
||||
NeedWipeOptions: any[];
|
||||
lastCompletedWipe: LastCompleted;
|
||||
lastCompletedEvent?: LastCompleted;
|
||||
}
|
||||
export interface Settings {
|
||||
Role: string;
|
||||
BotDifficulty: string;
|
||||
Experience: number;
|
||||
StandingForKill: number;
|
||||
AggressorBonus: number;
|
||||
}
|
||||
export interface IBan {
|
||||
type: BanType;
|
||||
dateTime: number;
|
||||
}
|
||||
export declare enum BanType {
|
||||
Chat = 0,
|
||||
RagFair = 1,
|
||||
Voip = 2,
|
||||
Trading = 3,
|
||||
Online = 4,
|
||||
Friends = 5,
|
||||
ChangeNickname = 6
|
||||
}
|
||||
export interface Notes {
|
||||
Notes: Note[];
|
||||
}
|
||||
export interface Note {
|
||||
Time: number;
|
||||
Text: string;
|
||||
}
|
||||
export interface Customization {
|
||||
Head: string;
|
||||
Body: string;
|
||||
Feet: string;
|
||||
Hands: string;
|
||||
}
|
||||
export interface Health {
|
||||
Hydration: CurrentMax;
|
||||
Energy: CurrentMax;
|
||||
Temperature: CurrentMax;
|
||||
BodyParts: BodyPartsHealth;
|
||||
UpdateTime: number;
|
||||
}
|
||||
export interface BodyPartsHealth {
|
||||
Head: BodyPartHealth;
|
||||
Chest: BodyPartHealth;
|
||||
Stomach: BodyPartHealth;
|
||||
LeftArm: BodyPartHealth;
|
||||
RightArm: BodyPartHealth;
|
||||
LeftLeg: BodyPartHealth;
|
||||
RightLeg: BodyPartHealth;
|
||||
}
|
||||
export interface BodyPartHealth {
|
||||
Health: CurrentMax;
|
||||
Effects?: Record<string, number>;
|
||||
}
|
||||
export interface CurrentMax {
|
||||
Current: number;
|
||||
Maximum: number;
|
||||
}
|
||||
export interface Inventory {
|
||||
items: Item[];
|
||||
equipment: string;
|
||||
stash: string;
|
||||
sortingTable: string;
|
||||
questRaidItems: string;
|
||||
questStashItems: string;
|
||||
fastPanel: FastPanel;
|
||||
}
|
||||
export interface FastPanel {
|
||||
}
|
||||
export interface Skills {
|
||||
Common: Common[];
|
||||
Mastering: Mastering[];
|
||||
Bonuses?: any[];
|
||||
Points: number;
|
||||
}
|
||||
export interface Common {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
PointsEarnedDuringSession: number;
|
||||
LastAccess: number;
|
||||
}
|
||||
export interface Mastering {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
}
|
||||
export interface Stats {
|
||||
CarriedQuestItems: string[];
|
||||
Victims: Victim[];
|
||||
TotalSessionExperience: number;
|
||||
LastSessionDate: number;
|
||||
SessionCounters: SessionCounters;
|
||||
OverallCounters: OverallCounters;
|
||||
SessionExperienceMult?: number;
|
||||
ExperienceBonusMult?: number;
|
||||
Aggressor?: Aggressor;
|
||||
DroppedItems?: IDroppedItem[];
|
||||
FoundInRaidItems?: FoundInRaidItem[];
|
||||
DamageHistory?: DamageHistory;
|
||||
DeathCause?: DeathCause;
|
||||
LastPlayerState?: LastPlayerState;
|
||||
TotalInGameTime: number;
|
||||
SurvivorClass?: string;
|
||||
}
|
||||
export interface IDroppedItem {
|
||||
QuestId: string;
|
||||
ItemId: string;
|
||||
ZoneId: string;
|
||||
}
|
||||
export interface FoundInRaidItem {
|
||||
QuestId: string;
|
||||
ItemId: string;
|
||||
}
|
||||
export interface Victim {
|
||||
AccountId: string;
|
||||
ProfileId: string;
|
||||
Name: string;
|
||||
Side: string;
|
||||
BodyPart: string;
|
||||
Time: string;
|
||||
Distance: number;
|
||||
Level: number;
|
||||
Weapon: string;
|
||||
Role: string;
|
||||
}
|
||||
export interface SessionCounters {
|
||||
Items: CounterKeyValue[];
|
||||
}
|
||||
export interface OverallCounters {
|
||||
Items: CounterKeyValue[];
|
||||
}
|
||||
export interface CounterKeyValue {
|
||||
Key: string[];
|
||||
Value: number;
|
||||
}
|
||||
export interface Aggressor {
|
||||
AccountId: string;
|
||||
ProfileId: string;
|
||||
MainProfileNickname: string;
|
||||
Name: string;
|
||||
Side: string;
|
||||
BodyPart: string;
|
||||
HeadSegment: string;
|
||||
WeaponName: string;
|
||||
Category: string;
|
||||
}
|
||||
export interface DamageHistory {
|
||||
LethalDamagePart: string;
|
||||
LethalDamage: LethalDamage;
|
||||
BodyParts: BodyPartsDamageHistory;
|
||||
}
|
||||
export interface LethalDamage {
|
||||
Amount: number;
|
||||
Type: string;
|
||||
SourceId: string;
|
||||
OverDamageFrom: string;
|
||||
Blunt: boolean;
|
||||
ImpactsCount: number;
|
||||
}
|
||||
export interface BodyPartsDamageHistory {
|
||||
Head: DamageStats[];
|
||||
Chest: DamageStats[];
|
||||
Stomach: DamageStats[];
|
||||
LeftArm: DamageStats[];
|
||||
RightArm: DamageStats[];
|
||||
LeftLeg: DamageStats[];
|
||||
RightLeg: DamageStats[];
|
||||
Common: DamageStats[];
|
||||
}
|
||||
export interface DamageStats {
|
||||
Amount: number;
|
||||
Type: string;
|
||||
SourceId: string;
|
||||
OverDamageFrom: string;
|
||||
Blunt: boolean;
|
||||
ImpactsCount: number;
|
||||
}
|
||||
export interface DeathCause {
|
||||
DamageType: string;
|
||||
Side: string;
|
||||
Role: string;
|
||||
WeaponId: string;
|
||||
}
|
||||
export interface LastPlayerState {
|
||||
Info: LastPlayerStateInfo;
|
||||
Customization: Record<string, string>;
|
||||
Equipment: any;
|
||||
}
|
||||
export interface LastPlayerStateInfo {
|
||||
Nickname: string;
|
||||
Side: string;
|
||||
Level: number;
|
||||
MemberCategory: string;
|
||||
}
|
||||
export interface ConditionCounters {
|
||||
Counters: Counter[];
|
||||
}
|
||||
export interface Counter {
|
||||
id: string;
|
||||
value: number;
|
||||
qid: string;
|
||||
}
|
||||
export interface BackendCounter {
|
||||
id: string;
|
||||
qid?: string;
|
||||
value: number;
|
||||
}
|
||||
export interface InsuredItem {
|
||||
tid: string;
|
||||
itemId: string;
|
||||
}
|
||||
export interface Hideout {
|
||||
Production: Record<string, Productive>;
|
||||
Areas: HideoutArea[];
|
||||
}
|
||||
export interface Productive {
|
||||
Products: Product[];
|
||||
Progress?: number;
|
||||
inProgress?: boolean;
|
||||
StartTimestamp?: number;
|
||||
}
|
||||
export interface Product {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd?: Upd;
|
||||
}
|
||||
export interface ScavCase extends Productive {
|
||||
}
|
||||
export interface Production extends Productive {
|
||||
RecipeId: string;
|
||||
SkipTime: number;
|
||||
ProductionTime: number;
|
||||
}
|
||||
export interface HideoutArea {
|
||||
type: HideoutAreas;
|
||||
level: number;
|
||||
active: boolean;
|
||||
passiveBonusesEnabled: boolean;
|
||||
completeTime: number;
|
||||
constructing: boolean;
|
||||
slots: HideoutSlot[];
|
||||
lastRecipe: string;
|
||||
}
|
||||
export interface HideoutSlot {
|
||||
item: HideoutItem[];
|
||||
}
|
||||
export interface HideoutItem {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd?: Upd;
|
||||
}
|
||||
export interface Bonus {
|
||||
type: string;
|
||||
templateId?: string;
|
||||
passive?: boolean;
|
||||
production?: boolean;
|
||||
visible?: boolean;
|
||||
value?: number;
|
||||
icon?: string;
|
||||
}
|
||||
export interface Quest {
|
||||
qid: string;
|
||||
startTime: number;
|
||||
status: string;
|
||||
statusTimers?: StatusTimer;
|
||||
completedConditions?: string[];
|
||||
}
|
||||
export interface StatusTimer {
|
||||
AvailableForStart?: number;
|
||||
}
|
||||
export interface TraderInfo {
|
||||
loyaltyLevel: number;
|
||||
salesSum: number;
|
||||
standing: number;
|
||||
nextResupply: number;
|
||||
unlocked: boolean;
|
||||
}
|
||||
export interface RagfairInfo {
|
||||
rating: number;
|
||||
isRatingGrowing: boolean;
|
||||
offers: IRagfairOffer[];
|
||||
}
|
||||
export interface CarExtractCounts {
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
Unknown = 0,
|
||||
Neutralizer = 1,
|
||||
Marauder = 2,
|
||||
Paramedic = 3,
|
||||
Survivor = 4
|
||||
}
|
||||
export interface LastCompleted {
|
||||
$oid: string;
|
||||
import { IBotBase } from "./tables/IBotBase";
|
||||
export interface IPmcData extends IBotBase {
|
||||
}
|
||||
|
@ -1,23 +1,36 @@
|
||||
import { BackendCounter, Bonus } from "../IPmcData";
|
||||
import { Item } from "./IItem";
|
||||
import { HideoutAreas } from "../../../enums/HideoutAreas";
|
||||
import { MemberCategory } from "../../../enums/MemberCategory";
|
||||
import { QuestStatus } from "../../../enums/QuestStatus";
|
||||
import { IRagfairOffer } from "../../ragfair/IRagfairOffer";
|
||||
import { Item, Upd } from "./IItem";
|
||||
import { IPmcDataRepeatableQuest } from "./IRepeatableQuests";
|
||||
export interface IBotBase {
|
||||
_id: string;
|
||||
aid: string;
|
||||
savage: any;
|
||||
savage?: string;
|
||||
Info: Info;
|
||||
Customization: Customization;
|
||||
Health: Health;
|
||||
Inventory: Inventory;
|
||||
Skills: Skills;
|
||||
Stats: Stats;
|
||||
Encyclopedia: any;
|
||||
Encyclopedia: Record<string, boolean>;
|
||||
ConditionCounters: ConditionCounters;
|
||||
BackendCounters: Record<string, BackendCounter>;
|
||||
InsuredItems: any[];
|
||||
InsuredItems: InsuredItem[];
|
||||
Hideout: Hideout;
|
||||
Quests: Quest[];
|
||||
TradersInfo: Record<string, TraderInfo>;
|
||||
RagfairInfo: RagfairInfo;
|
||||
RepeatableQuests: IPmcDataRepeatableQuest[];
|
||||
Bonuses: Bonus[];
|
||||
Notes: Notes;
|
||||
CarExtractCounts: CarExtractCounts;
|
||||
SurvivorClass: SurvivorClass;
|
||||
WishList: string[];
|
||||
}
|
||||
export interface Info {
|
||||
EntryPoint: string;
|
||||
Nickname: string;
|
||||
LowerNickname: string;
|
||||
Side: string;
|
||||
@ -27,17 +40,19 @@ export interface Info {
|
||||
RegistrationDate: number;
|
||||
GameVersion: string;
|
||||
AccountType: number;
|
||||
MemberCategory: number;
|
||||
MemberCategory: MemberCategory;
|
||||
lockedMoveCommands: boolean;
|
||||
SavageLockTime: number;
|
||||
LastTimePlayedAsSavage: number;
|
||||
Settings: Settings;
|
||||
NicknameChangeDate: number;
|
||||
NeedWipeOptions: any[];
|
||||
lastCompletedWipe: any;
|
||||
lastCompletedWipe: LastCompleted;
|
||||
Bans: IBan[];
|
||||
BannedState: boolean;
|
||||
BannedUntil: number;
|
||||
IsStreamerModeAvailable: boolean;
|
||||
lastCompletedEvent?: LastCompleted;
|
||||
}
|
||||
export interface Settings {
|
||||
Role: string;
|
||||
@ -46,6 +61,19 @@ export interface Settings {
|
||||
StandingForKill: number;
|
||||
AggressorBonus: number;
|
||||
}
|
||||
export interface IBan {
|
||||
type: BanType;
|
||||
dateTime: number;
|
||||
}
|
||||
export declare enum BanType {
|
||||
Chat = 0,
|
||||
RagFair = 1,
|
||||
Voip = 2,
|
||||
Trading = 3,
|
||||
Online = 4,
|
||||
Friends = 5,
|
||||
ChangeNickname = 6
|
||||
}
|
||||
export interface Customization {
|
||||
Head: string;
|
||||
Body: string;
|
||||
@ -53,6 +81,28 @@ export interface Customization {
|
||||
Hands: string;
|
||||
}
|
||||
export interface Health {
|
||||
Hydration: CurrentMax;
|
||||
Energy: CurrentMax;
|
||||
Temperature: CurrentMax;
|
||||
BodyParts: BodyPartsHealth;
|
||||
UpdateTime: number;
|
||||
}
|
||||
export interface BodyPartsHealth {
|
||||
Head: BodyPartHealth;
|
||||
Chest: BodyPartHealth;
|
||||
Stomach: BodyPartHealth;
|
||||
LeftArm: BodyPartHealth;
|
||||
RightArm: BodyPartHealth;
|
||||
LeftLeg: BodyPartHealth;
|
||||
RightLeg: BodyPartHealth;
|
||||
}
|
||||
export interface BodyPartHealth {
|
||||
Health: CurrentMax;
|
||||
Effects?: Record<string, number>;
|
||||
}
|
||||
export interface CurrentMax {
|
||||
Current: number;
|
||||
Maximum: number;
|
||||
}
|
||||
export interface Inventory {
|
||||
items: Item[];
|
||||
@ -66,36 +116,238 @@ export interface Inventory {
|
||||
export interface FastPanel {
|
||||
}
|
||||
export interface Skills {
|
||||
Common: any[];
|
||||
Mastering: any[];
|
||||
Common: Common[];
|
||||
Mastering: Mastering[];
|
||||
Bonuses?: any[];
|
||||
Points: number;
|
||||
}
|
||||
export interface Common {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
PointsEarnedDuringSession?: number;
|
||||
LastAccess?: number;
|
||||
max?: number;
|
||||
min?: number;
|
||||
}
|
||||
export interface Mastering {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
max?: number;
|
||||
min?: number;
|
||||
}
|
||||
export interface Stats {
|
||||
CarriedQuestItems: string[];
|
||||
Victims: Victim[];
|
||||
TotalSessionExperience: number;
|
||||
LastSessionDate: number;
|
||||
SessionCounters: SessionCounters;
|
||||
OverallCounters: OverallCounters;
|
||||
SessionExperienceMult?: number;
|
||||
ExperienceBonusMult?: number;
|
||||
Aggressor?: Aggressor;
|
||||
DroppedItems?: IDroppedItem[];
|
||||
FoundInRaidItems?: FoundInRaidItem[];
|
||||
DamageHistory?: DamageHistory;
|
||||
DeathCause?: DeathCause;
|
||||
LastPlayerState?: LastPlayerState;
|
||||
TotalInGameTime: number;
|
||||
SurvivorClass?: string;
|
||||
}
|
||||
export interface IDroppedItem {
|
||||
QuestId: string;
|
||||
ItemId: string;
|
||||
ZoneId: string;
|
||||
}
|
||||
export interface FoundInRaidItem {
|
||||
QuestId: string;
|
||||
ItemId: string;
|
||||
}
|
||||
export interface Victim {
|
||||
AccountId: string;
|
||||
ProfileId: string;
|
||||
Name: string;
|
||||
Side: string;
|
||||
BodyPart: string;
|
||||
Time: string;
|
||||
Distance: number;
|
||||
Level: number;
|
||||
Weapon: string;
|
||||
Role: string;
|
||||
}
|
||||
export interface SessionCounters {
|
||||
Items: any[];
|
||||
Items: CounterKeyValue[];
|
||||
}
|
||||
export interface OverallCounters {
|
||||
Items: any[];
|
||||
Items: CounterKeyValue[];
|
||||
}
|
||||
export interface CounterKeyValue {
|
||||
Key: string[];
|
||||
Value: number;
|
||||
}
|
||||
export interface ConditionCounters {
|
||||
Counters: any[];
|
||||
Counters: Counter[];
|
||||
}
|
||||
export interface Counter {
|
||||
id: string;
|
||||
value: number;
|
||||
qid: string;
|
||||
}
|
||||
export interface Aggressor {
|
||||
AccountId: string;
|
||||
ProfileId: string;
|
||||
MainProfileNickname: string;
|
||||
Name: string;
|
||||
Side: string;
|
||||
BodyPart: string;
|
||||
HeadSegment: string;
|
||||
WeaponName: string;
|
||||
Category: string;
|
||||
}
|
||||
export interface DamageHistory {
|
||||
LethalDamagePart: string;
|
||||
LethalDamage: LethalDamage;
|
||||
BodyParts: BodyPartsDamageHistory;
|
||||
}
|
||||
export interface LethalDamage {
|
||||
Amount: number;
|
||||
Type: string;
|
||||
SourceId: string;
|
||||
OverDamageFrom: string;
|
||||
Blunt: boolean;
|
||||
ImpactsCount: number;
|
||||
}
|
||||
export interface BodyPartsDamageHistory {
|
||||
Head: DamageStats[];
|
||||
Chest: DamageStats[];
|
||||
Stomach: DamageStats[];
|
||||
LeftArm: DamageStats[];
|
||||
RightArm: DamageStats[];
|
||||
LeftLeg: DamageStats[];
|
||||
RightLeg: DamageStats[];
|
||||
Common: DamageStats[];
|
||||
}
|
||||
export interface DamageStats {
|
||||
Amount: number;
|
||||
Type: string;
|
||||
SourceId: string;
|
||||
OverDamageFrom: string;
|
||||
Blunt: boolean;
|
||||
ImpactsCount: number;
|
||||
}
|
||||
export interface DeathCause {
|
||||
DamageType: string;
|
||||
Side: string;
|
||||
Role: string;
|
||||
WeaponId: string;
|
||||
}
|
||||
export interface LastPlayerState {
|
||||
Info: LastPlayerStateInfo;
|
||||
Customization: Record<string, string>;
|
||||
Equipment: any;
|
||||
}
|
||||
export interface LastPlayerStateInfo {
|
||||
Nickname: string;
|
||||
Side: string;
|
||||
Level: number;
|
||||
MemberCategory: string;
|
||||
}
|
||||
export interface BackendCounter {
|
||||
id: string;
|
||||
qid?: string;
|
||||
value: number;
|
||||
}
|
||||
export interface InsuredItem {
|
||||
tid: string;
|
||||
itemId: string;
|
||||
}
|
||||
export interface Hideout {
|
||||
Production: Production;
|
||||
Areas: Area[];
|
||||
Production: Record<string, Productive>;
|
||||
Areas: HideoutArea[];
|
||||
}
|
||||
export interface Production {
|
||||
export interface Productive {
|
||||
Products: Product[];
|
||||
Progress?: number;
|
||||
inProgress?: boolean;
|
||||
StartTimestamp?: number;
|
||||
}
|
||||
export interface Area {
|
||||
type: number;
|
||||
export interface Production extends Productive {
|
||||
RecipeId: string;
|
||||
SkipTime: number;
|
||||
ProductionTime: number;
|
||||
}
|
||||
export interface ScavCase extends Productive {
|
||||
RecipeId: string;
|
||||
}
|
||||
export interface Product {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd?: Upd;
|
||||
}
|
||||
export interface HideoutArea {
|
||||
type: HideoutAreas;
|
||||
level: number;
|
||||
active: boolean;
|
||||
passiveBonusesEnabled: boolean;
|
||||
completeTime: number;
|
||||
constructing: boolean;
|
||||
slots: any[];
|
||||
lastRecipe: any;
|
||||
slots: HideoutSlot[];
|
||||
lastRecipe: string;
|
||||
}
|
||||
export interface HideoutSlot {
|
||||
/** SPT specific value to keep track of what index this slot is (0,1,2,3 etc) */
|
||||
locationIndex: number;
|
||||
item?: HideoutItem[];
|
||||
}
|
||||
export interface HideoutItem {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd?: Upd;
|
||||
}
|
||||
export interface LastCompleted {
|
||||
$oid: string;
|
||||
}
|
||||
export interface Notes {
|
||||
Notes: Note[];
|
||||
}
|
||||
export interface CarExtractCounts {
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
Unknown = 0,
|
||||
Neutralizer = 1,
|
||||
Marauder = 2,
|
||||
Paramedic = 3,
|
||||
Survivor = 4
|
||||
}
|
||||
export interface Quest {
|
||||
qid: string;
|
||||
startTime: number;
|
||||
status: QuestStatus;
|
||||
statusTimers?: Record<string, number>;
|
||||
/** SPT specific property */
|
||||
completedConditions?: string[];
|
||||
}
|
||||
export interface TraderInfo {
|
||||
loyaltyLevel: number;
|
||||
salesSum: number;
|
||||
standing: number;
|
||||
nextResupply: number;
|
||||
unlocked: boolean;
|
||||
}
|
||||
export interface RagfairInfo {
|
||||
rating: number;
|
||||
isRatingGrowing: boolean;
|
||||
offers: IRagfairOffer[];
|
||||
}
|
||||
export interface Bonus {
|
||||
type: string;
|
||||
templateId?: string;
|
||||
passive?: boolean;
|
||||
production?: boolean;
|
||||
visible?: boolean;
|
||||
value?: number;
|
||||
icon?: string;
|
||||
}
|
||||
export interface Note {
|
||||
Time: number;
|
||||
Text: string;
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { MinMax } from "../../../common/MinMax";
|
||||
import { Skills } from "./IBotBase";
|
||||
export interface IBotType {
|
||||
appearance: Appearance;
|
||||
chances: Chances;
|
||||
@ -121,12 +123,9 @@ export interface BodyPart {
|
||||
RightLeg: MinMax;
|
||||
Stomach: MinMax;
|
||||
}
|
||||
export interface MinMax {
|
||||
max: number;
|
||||
min: number;
|
||||
}
|
||||
export interface Inventory {
|
||||
equipment: Equipment;
|
||||
Ammo: Record<string, Record<string, number>>;
|
||||
items: Items;
|
||||
mods: Mods;
|
||||
}
|
||||
@ -154,23 +153,3 @@ export interface Items {
|
||||
TacticalVest: string[];
|
||||
}
|
||||
export declare type Mods = Record<string, Record<string, string[]>>;
|
||||
export interface Skills {
|
||||
Common: Common[];
|
||||
Bonuses?: any;
|
||||
Mastering: Mastering[];
|
||||
Points: number;
|
||||
}
|
||||
export interface Mastering {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
max?: number;
|
||||
min?: number;
|
||||
}
|
||||
export interface Common {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
PointsEarnedDuringSession?: number;
|
||||
LastAccess?: number;
|
||||
max?: number;
|
||||
min?: number;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { MinMax } from "../../common/MinMax";
|
||||
export interface IHideoutScavCase {
|
||||
_id: string;
|
||||
ProductionTime: number;
|
||||
@ -15,7 +16,3 @@ export interface EndProducts {
|
||||
Rare: MinMax;
|
||||
Superrare: MinMax;
|
||||
}
|
||||
export interface MinMax {
|
||||
min: string;
|
||||
max: string;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Skills } from "../common/IPmcData";
|
||||
import { Skills } from "../common/tables/IBotBase";
|
||||
import { Item, Upd } from "../common/tables/IItem";
|
||||
import { IQuest } from "../common/tables/IQuest";
|
||||
import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Skills } from "../common/IPmcData";
|
||||
import { Skills } from "../common/tables/IBotBase";
|
||||
export interface IPlayerIncrementSkillLevelRequestData {
|
||||
_id: string;
|
||||
experience: number;
|
||||
|
@ -49,16 +49,16 @@ export interface Message {
|
||||
uid: string;
|
||||
type: MessageType;
|
||||
dt: number;
|
||||
localDateTime: number;
|
||||
UtcDateTime?: number;
|
||||
Member?: IUpdatableChatMember;
|
||||
templateId: string;
|
||||
text?: string;
|
||||
hasRewards: boolean;
|
||||
rewardCollected: boolean;
|
||||
items: Items;
|
||||
items: MessageItems;
|
||||
maxStorageTime?: number;
|
||||
systemData?: ISystemData;
|
||||
profileChangeEvents?: any[];
|
||||
}
|
||||
export interface MessagePreview {
|
||||
uid: string;
|
||||
@ -67,7 +67,7 @@ export interface MessagePreview {
|
||||
templateId: string;
|
||||
text?: string;
|
||||
}
|
||||
export interface Items {
|
||||
export interface MessageItems {
|
||||
stash?: string;
|
||||
data?: Item[];
|
||||
}
|
||||
@ -153,15 +153,11 @@ export interface MessageContent {
|
||||
templateId: string;
|
||||
type: MessageType;
|
||||
maxStorageTime?: number;
|
||||
systemData?: MessageContentData;
|
||||
profileChangeEvents?: any[];
|
||||
systemData?: ISystemData;
|
||||
}
|
||||
export interface MessageContentRagfair {
|
||||
offerId: string;
|
||||
count: number;
|
||||
handbookId: string;
|
||||
}
|
||||
export interface MessageContentData {
|
||||
date: string;
|
||||
time: string;
|
||||
location: string;
|
||||
}
|
||||
|
208
TypeScript/10ScopesAndTypes/types/models/enums/AmmoTypes.d.ts
vendored
Normal file
208
TypeScript/10ScopesAndTypes/types/models/enums/AmmoTypes.d.ts
vendored
Normal file
@ -0,0 +1,208 @@
|
||||
export declare enum Grenade {
|
||||
M386_HE_GRENADE = "5ede475b549eed7c6d5c18fb",
|
||||
M576_MP_APERS_GRENADE = "5ede475339ee016e8c534742",
|
||||
M433_HEDP_GRENADE = "5f0c892565703e5c461894e9",
|
||||
M406_HE_GRENADE = "5ede4739e0350d05467f73e8",
|
||||
M381_HE_GRENADE = "5ede474b0c226a66f5402622",
|
||||
M441_HE_GRENADE = "5ede47405b097655935d7d16"
|
||||
}
|
||||
export declare enum Ammo762x51 {
|
||||
M62_TRACER = "5a608bf24f39f98ffc77720e",
|
||||
M80 = "58dd3ad986f77403051cba8f",
|
||||
M61 = "5a6086ea4f39f99cd479502f",
|
||||
BCP_FMJ = "5e023e53d4353e3302577c4c",
|
||||
ULTRA_NOSLER = "5e023e88277cce2b522ff2b1",
|
||||
TCW_SP = "5e023e6e34d52a55c3304f71",
|
||||
M993 = "5efb0c1bd79ff02a1f5e68d9"
|
||||
}
|
||||
export declare enum Ammo762x54 {
|
||||
SNB_GZH = "560d61e84bdc2da74d8b4571",
|
||||
LPS_GZH = "5887431f2459777e1612938f",
|
||||
PS_GZH = "59e77a2386f7742ee578960a",
|
||||
T46M_GZH = "5e023cf8186a883be655e54f",
|
||||
BT_GZH = "5e023d34e8a400319a28ed44",
|
||||
BS_GZH = "5e023d48186a883be655e551"
|
||||
}
|
||||
export declare enum Ammo338Lapua {
|
||||
TAC_X = "5fc382b6d6fa9c00c571bbc3",
|
||||
UCW = "5fc382c1016cce60e8341b20",
|
||||
AP = "5fc382a9d724d907e2077dab",
|
||||
FMJ = "5fc275cf85fd526b824a571a"
|
||||
}
|
||||
export declare enum Ammo46x30 {
|
||||
AP_SX = "5ba26835d4351e0035628ff5",
|
||||
ACTION_SX = "5ba26812d4351e003201fef1",
|
||||
FMJ_SX = "5ba2678ad4351e44f824b344",
|
||||
SUBSONIC_SX = "5ba26844d4351e00334c9475"
|
||||
}
|
||||
export declare enum Ammo57x28 {
|
||||
SS198LF = "5cc80f79e4a949033c7343b2",
|
||||
R37_F = "5cc86832d7f00c000d3a6e6c",
|
||||
SS190 = "5cc80f38e4a949001152b560",
|
||||
R37_X = "5cc86840d7f00c002412c56c",
|
||||
L191 = "5cc80f53e4a949000e1ea4f8",
|
||||
SS197SR = "5cc80f8fe4a949033b0224a2",
|
||||
SB193 = "5cc80f67e4a949035e43bbba"
|
||||
}
|
||||
export declare enum Ammo762x25 {
|
||||
FMJ43 = "5735ff5c245977640e39ba7e",
|
||||
LRN = "573601b42459776410737435",
|
||||
P_GL = "5736026a245977644601dc61",
|
||||
PST_GZH = "573603562459776430731618",
|
||||
LRNPC = "573602322459776445391df1",
|
||||
AKBS = "5735fdcd2459776445391d61",
|
||||
PT_GZH = "573603c924597764442bd9cb"
|
||||
}
|
||||
export declare enum Ammo9x18 {
|
||||
PM_SP8_GZH = "5737218f245977612125ba51",
|
||||
P_GZH = "573719762459775a626ccbc1",
|
||||
PSTM_GZH = "57371aab2459775a77142f22",
|
||||
RG028_GZH = "573720e02459776143012541",
|
||||
BZHT_GZH = "573718ba2459775a75491131",
|
||||
PM_PSV = "5737207f24597760ff7b25f2",
|
||||
SP7_GZH = "57372140245977611f70ee91",
|
||||
PBM_GZH = "573719df2459775a626ccbc2",
|
||||
PSO_GZH = "57371f8d24597761006c6a81",
|
||||
PST_GZH = "5737201124597760fc4431f1",
|
||||
PS_GS_PPO = "57371f2b24597761224311f1",
|
||||
PRS_GS = "57371eb62459776125652ac1",
|
||||
PPT_GZH = "57371e4124597760ff7b25f1",
|
||||
PPE_GZH = "57371b192459775a9f58a5e0"
|
||||
}
|
||||
export declare enum Ammo9x19 {
|
||||
PSO_GZH = "58864a4f2459770fcc257101",
|
||||
PST_GZH = "56d59d3ad2720bdb418b4577",
|
||||
GREEN_TRACER = "5c3df7d588a4501f290594e5",
|
||||
RIP = "5c0d56a986f774449d5de529",
|
||||
AP_63 = "5c925fa22e221601da359b7b",
|
||||
LUGER_CCI = "5a3c16fe86f77452b62de32a",
|
||||
PBP_GZH = "5efb0da7a29a85116f6ea05f",
|
||||
QUAKEMAKER = "5efb0e16aeb21837e749c7ff"
|
||||
}
|
||||
export declare enum Ammo9x21 {
|
||||
P_GZH = "5a26abfac4a28232980eabff",
|
||||
PS_GZH = "5a269f97c4a282000b151807",
|
||||
PE_GZH = "5a26ac06c4a282000c5a90a8",
|
||||
BT_GZH = "5a26ac0ec4a28200741e1e18"
|
||||
}
|
||||
export declare enum Ammo357Mag {
|
||||
FMJ = "62330b3ed4dc74626d570b95",
|
||||
HOLLOW_POINT = "62330bfadc5883093563729b",
|
||||
SOFT_POINT = "62330c40bdd19b369e1e53d1",
|
||||
JACKET_HP = "62330c18744e5e31df12f516"
|
||||
}
|
||||
export declare enum Ammo45ACP {
|
||||
MATCH_FMJ = "5e81f423763d9f754677bf2e",
|
||||
HYDRA_SHOK = "5efb0fc6aeb21837e749c801",
|
||||
LASERMATCH_FMJ = "5efb0d4f4bc50b58e81710f3",
|
||||
AP = "5efb0cabfb3e451d70735af5",
|
||||
RIP = "5ea2a8e200685063ec28c05a"
|
||||
}
|
||||
export declare enum Ammo545x39 {
|
||||
PS_GS = "56dff3afd2720bba668b4567",
|
||||
SP = "56dff421d2720b5f5a8b4567",
|
||||
PPBS_GS_IGOLNIK = "5c0d5e4486f77478390952fe",
|
||||
BS_7N40 = "61962b617c6c7b169525f168",
|
||||
PRS_GS = "56dff338d2720bbd668b4569",
|
||||
BT_GS = "56dff061d2720bb5668b4567",
|
||||
US_GS = "56dff4ecd2720b5f5a8b4568",
|
||||
BP_GS = "56dfef82d2720bbd668b4567",
|
||||
HP = "56dff216d2720bbd668b4568",
|
||||
BS_GS = "56dff026d2720bb8668b4567",
|
||||
T_GS = "56dff4a2d2720bbd668b456a",
|
||||
PP_GS = "56dff2ced2720bb4668b4567",
|
||||
FMJ = "56dff0bed2720bb0668b4567"
|
||||
}
|
||||
export declare enum Ammo556x45 {
|
||||
M856 = "59e68f6f86f7746c9f75e846",
|
||||
MK255_MOD_0_RRLP = "59e6918f86f7746c9f75e849",
|
||||
M995 = "59e690b686f7746c9f75e848",
|
||||
M855A1 = "54527ac44bdc2d36668b4567",
|
||||
M856A1 = "59e6906286f7746c9f75e847",
|
||||
M855 = "54527a984bdc2d4e668b4567",
|
||||
HP = "59e6927d86f77411da468256",
|
||||
FMJ = "59e6920f86f77411d82aa167",
|
||||
WARMAGEDDON = "5c0d5ae286f7741e46554302",
|
||||
MK_318_MOD_0_SOST = "60194943740c5d77f6705eea",
|
||||
SSA_AP = "601949593ae8f707c4608daa"
|
||||
}
|
||||
export declare enum Ammo300Blackout {
|
||||
M62_TRACER = "619636be6db0f2477964e710",
|
||||
BCP_FMJ = "5fbe3ffdf8b6a877a729ea82",
|
||||
AP = "5fd20ff893a8961fc660a954",
|
||||
V_MAX = "6196364158ef8c428c287d9f",
|
||||
WHISPER = "6196365d58ef8c428c287da1"
|
||||
}
|
||||
export declare enum Ammo762x39 {
|
||||
PS_GZH = "5656d7c34bdc2d9d198b4587",
|
||||
HP = "59e4d3d286f774176a36250a",
|
||||
US_GZH = "59e4d24686f7741776641ac7",
|
||||
T45M1_GZH = "59e4cf5286f7741778269d8a",
|
||||
BP_GZH = "59e0d99486f7744a32234762",
|
||||
MAI_AP = "601aa3d2b2bcb34913271e6d"
|
||||
}
|
||||
export declare enum Ammo9x39 {
|
||||
SP5_GS = "57a0dfb82459774d3078b56c",
|
||||
BP_GS = "5c0d688c86f77413ae3407b2",
|
||||
SP6_GS = "57a0e5022459774d1673f889",
|
||||
SPP_GS = "5c0d668f86f7747ccb7f13b2",
|
||||
PAB9_GS = "61962d879bb3d20b0946d385"
|
||||
}
|
||||
export declare enum Ammo366TKM {
|
||||
FMJ = "59e6542b86f77411dc52a77a",
|
||||
GEKSA = "59e6658b86f77411d949b250",
|
||||
EKO = "59e655cb86f77411dc52a77b",
|
||||
APM = "5f0596629e22f464da6bbdd9"
|
||||
}
|
||||
export declare enum Ammo127x55 {
|
||||
PS12 = "5cadf6ddae9215051e1c23b2",
|
||||
PS12B = "5cadf6eeae921500134b2799",
|
||||
PS12A = "5cadf6e5ae921500113bb973"
|
||||
}
|
||||
export declare enum Ammo12Gauge {
|
||||
BUCKSHOT_7MM = "560d5e524bdc2d25448b4571",
|
||||
MAGNUM_85MM = "5d6e6806a4b936088465b17e",
|
||||
RIP = "5c0d591486f7744c505b416f",
|
||||
BMG_SLUG_50CAL = "5d6e68c4a4b9361b93413f79",
|
||||
BUCKSHOT_525MM = "5d6e6772a4b936088465b17c",
|
||||
EXPRESS_65MM = "5d6e67fba4b9361bc73bc779",
|
||||
FLECHETTE = "5d6e6911a4b9361bd5780d52",
|
||||
FTX_CUSTOM_LITE_SLUG = "5d6e68e6a4b9361c140bcfe0",
|
||||
AP20_ARMOR_PIERCING_SLUG = "5d6e68a8a4b9360b6c0d54e2",
|
||||
DUAL_SABOT_SLUG = "5d6e68dea4b9361bcc29e659",
|
||||
POLEVA_6U_SLUG = "5d6e689ca4b9361bc8618956",
|
||||
POLEVA_3_SLUG = "5d6e6891a4b9361bd473feea",
|
||||
GRIZZLY_40_SLUG = "5d6e6869a4b9361c140bcfde",
|
||||
SUPERFORMANCE_HP_SLUG = "5d6e68d1a4b93622fe60e845",
|
||||
COPPER_SABOT_PREMIER_HP_SLUG = "5d6e68b3a4b9361bca7e50b5",
|
||||
LEAD_SLUG = "58820d1224597753c90aeb13"
|
||||
}
|
||||
export declare enum Ammo20Gauge {
|
||||
BUCKSHOT_75MM = "5a38ebd9c4a282000d722a5b",
|
||||
STAR_SLUG = "5d6e6a05a4b93618084f58d0",
|
||||
BUCKSHOT_73MM = "5d6e69c7a4b9360b6c0d54e4",
|
||||
DEVASTATOR_SLUG = "5d6e6a5fa4b93614ec501745",
|
||||
BUCKSHOT_56MM = "5d6e695fa4b936359b35d852",
|
||||
POLEVA_6U_SLUG = "5d6e6a42a4b9364f07165f52",
|
||||
POLEVA_3_SLUG = "5d6e6a53a4b9361bd473feec",
|
||||
BUCKSHOT_62MM = "5d6e69b9a4b9361bc8618958"
|
||||
}
|
||||
export declare enum Ammo23x75 {
|
||||
SHRAPNEL10_BUCKSHOT = "5e85a9a6eacf8c039e4e2ac1",
|
||||
SHRAPNEL25_BUCKSHOT = "5f647f31b6238e5dd066e196",
|
||||
ZVEZDA_FLASHBANG = "5e85a9f4add9fe03027d9bf1",
|
||||
BARRIKADA_SLUG = "5e85aa1a988a8701445df1f5"
|
||||
}
|
||||
export declare enum Ammo30x29 {
|
||||
VOG_30 = "5d70e500a4b9364de70d38ce"
|
||||
}
|
||||
export declare enum Ammo127x108 {
|
||||
B32 = "5cde8864d7f00c0010373be1",
|
||||
BZT_44M = "5d2f2ab648f03550091993ca"
|
||||
}
|
||||
export declare enum Ammo26x75 {
|
||||
GREEN_FLARE = "62389aaba63f32501b1b444f",
|
||||
RED_FLARE = "62389ba9a63f32501b1b4451",
|
||||
WHITE_FLARE = "62389bc9423ed1685422dc57",
|
||||
YELLOW_FLARE = "62389be94d5d474bf712e709"
|
||||
}
|
@ -11,9 +11,11 @@ export declare enum ConfigTypes {
|
||||
LOCALE = "aki-locale",
|
||||
LOCATION = "aki-location",
|
||||
MATCH = "aki-match",
|
||||
PLAYERSCAV = "aki-playerscav",
|
||||
QUEST = "aki-quest",
|
||||
RAGFAIR = "aki-ragfair",
|
||||
REPAIR = "aki-repair",
|
||||
SCAVCASE = "aki-scavcase",
|
||||
TRADER = "aki-trader",
|
||||
WEATHER = "aki-weather"
|
||||
}
|
||||
|
29
TypeScript/10ScopesAndTypes/types/models/enums/ContainerTypes.d.ts
vendored
Normal file
29
TypeScript/10ScopesAndTypes/types/models/enums/ContainerTypes.d.ts
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
export declare enum CommonContainers {
|
||||
AMMO_CASE = "5aafbde786f774389d0cbc0f",
|
||||
DOCUMENTS_CASE = "590c60fc86f77412b13fddcf",
|
||||
DOGTAG_CASE = "5c093e3486f77430cb02e593",
|
||||
GRENADE_CASE = "5e2af55f86f7746d4159f07c",
|
||||
INJECTOR_CASE = "619cbf7d23893217ec30b689",
|
||||
ITEM_CASE = "59fb042886f7746c5005a7b2",
|
||||
KEY_TOOL = "59fafd4b86f7745ca07e1232",
|
||||
KEYCARD_HOLDER = "619cbf9e0a7c3a1a2731940a",
|
||||
SCAV_JUNKBOX = "5b7c710788a4506dec015957",
|
||||
MAGAZINE_CASE = "5c127c4486f7745625356c13",
|
||||
MEDICINE_CASE = "5aafbcd986f7745e590fff23",
|
||||
MONEY_CASE = "59fb016586f7746d0d4b423a",
|
||||
HOLODILNICK_THERMAL_BAG = "5c093db286f7740a1b2617e3",
|
||||
PISTOL_CASE = "567143bf4bdc2d1a0f8b4567",
|
||||
SICC_ORGANIZATIONAL_POUCH = "5d235bb686f77443f4331278",
|
||||
SIMPLE_WALLET = "5783c43d2459774bbe137486",
|
||||
THICC_ITEM_CASE = "5c0a840b86f7742ffa4f2482",
|
||||
THICC_WEAPON_CASE = "5b6d9ce188a4501afc1b2b25",
|
||||
WEAPON_CASE = "59fb023c86f7746d0d4b423c",
|
||||
WZ_WALLET = "60b0f6c058e0b0481a09ad11"
|
||||
}
|
||||
export declare enum SecuredContainers {
|
||||
ALPHA = "544a11ac4bdc2d470e8b456a",
|
||||
BETA = "5857a8b324597729ab0a0e7d",
|
||||
EPSILON = "59db794186f77448bc595262",
|
||||
GAMMA = "5857a8bc2459772bad15db29",
|
||||
KAPPA = "5c093ca986f7740a1867ab12"
|
||||
}
|
@ -6,5 +6,6 @@ export declare enum QuestStatus {
|
||||
Success = 4,
|
||||
Fail = 5,
|
||||
FailRestartable = 6,
|
||||
MarkedAsFailed = 7
|
||||
MarkedAsFailed = 7,
|
||||
Expired = 8
|
||||
}
|
||||
|
9
TypeScript/10ScopesAndTypes/types/models/spt/bots/GenerateWeaponResult.d.ts
vendored
Normal file
9
TypeScript/10ScopesAndTypes/types/models/spt/bots/GenerateWeaponResult.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { Mods } from "../../eft/common/tables/IBotType";
|
||||
import { Item } from "../../eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../../eft/common/tables/ITemplateItem";
|
||||
export declare class GenerateWeaponResult {
|
||||
weapon: Item[];
|
||||
chosenAmmo: string;
|
||||
weaponMods: Mods;
|
||||
weaponTemplate: ITemplateItem;
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
import { MinMax } from "../../common/MinMax";
|
||||
import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IBotConfig extends IBaseConfig {
|
||||
kind: "aki-bot";
|
||||
@ -7,8 +8,11 @@ export interface IBotConfig extends IBaseConfig {
|
||||
lootNValue: LootNvalue;
|
||||
revenge: Record<string, string[]>;
|
||||
pmc: PmcConfig;
|
||||
itemSpawnLimits: Record<string, Record<string, number>>;
|
||||
equipment: Record<string, Equipment>;
|
||||
showTypeInNickname: boolean;
|
||||
maxBotCap: number;
|
||||
secureContainerAmmoStackCount: number;
|
||||
}
|
||||
export interface PresetBatch {
|
||||
assault: number;
|
||||
@ -90,9 +94,10 @@ export interface LootNvalue {
|
||||
pmc: number;
|
||||
}
|
||||
export interface PmcConfig {
|
||||
dynamicLoot: DynamicLoot;
|
||||
cartridgeBlacklist: string[];
|
||||
dynamicLoot: PmcDynamicLoot;
|
||||
difficulty: string;
|
||||
looseWeaponInBackpackChancePercent: number;
|
||||
looseWeaponInBackpackLootMinMax: MinMax;
|
||||
isUsec: number;
|
||||
chanceSameSideIsHostilePercent: number;
|
||||
usecType: string;
|
||||
@ -100,18 +105,19 @@ export interface PmcConfig {
|
||||
maxBackpackLootTotalRub: number;
|
||||
maxPocketLootTotalRub: number;
|
||||
maxVestLootTotalRub: number;
|
||||
types: Types;
|
||||
convertIntoPmcChance: Record<string, MinMax>;
|
||||
enemyTypes: string[];
|
||||
}
|
||||
export interface DynamicLoot {
|
||||
export interface PmcDynamicLoot {
|
||||
whitelist: string[];
|
||||
blacklist: string[];
|
||||
spawnLimits: Record<string, number>;
|
||||
moneyStackLimits: Record<string, number>;
|
||||
}
|
||||
export interface Types {
|
||||
assault: number;
|
||||
cursedAssault: number;
|
||||
pmcBot: number;
|
||||
exUsec: number;
|
||||
export interface Equipment {
|
||||
blacklist: EquipmentBlacklistDetails[];
|
||||
}
|
||||
export interface EquipmentBlacklistDetails {
|
||||
levelRange: MinMax;
|
||||
equipment: string[];
|
||||
cartridge: string[];
|
||||
}
|
||||
|
@ -2,26 +2,5 @@ import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IHideoutConfig extends IBaseConfig {
|
||||
kind: "aki-hideout";
|
||||
runIntervalSeconds: number;
|
||||
scavCase: ScavCase;
|
||||
fuelDrainRateMultipler: number;
|
||||
}
|
||||
export interface ScavCase {
|
||||
rewardParentBlacklist: string[];
|
||||
rewardItemBlacklist: any[];
|
||||
ammoRewards: AmmoRewards;
|
||||
moneyRewards: MoneyRewards;
|
||||
}
|
||||
export interface AmmoRewards {
|
||||
giveMultipleOfTen: boolean;
|
||||
minAmount: number;
|
||||
}
|
||||
export interface MoneyRewards {
|
||||
enabled: boolean;
|
||||
rub: MinMax;
|
||||
usd: MinMax;
|
||||
eur: MinMax;
|
||||
}
|
||||
export interface MinMax {
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
@ -3,5 +3,7 @@ export interface IInsuranceConfig extends IBaseConfig {
|
||||
kind: "aki-insurance";
|
||||
insuranceMultiplier: Record<string, number>;
|
||||
returnChancePercent: Record<string, number>;
|
||||
blacklistedEquipment: string[];
|
||||
slotIdsWithChanceOfNotReturning: string[];
|
||||
runIntervalSeconds: number;
|
||||
}
|
||||
|
24
TypeScript/10ScopesAndTypes/types/models/spt/config/IPlayerScavConfig.d.ts
vendored
Normal file
24
TypeScript/10ScopesAndTypes/types/models/spt/config/IPlayerScavConfig.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import { MinMax } from "../../common/MinMax";
|
||||
import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IPlayerScavConfig extends IBaseConfig {
|
||||
kind: "aki-playerscav";
|
||||
karmaLevel: Record<string, KarmaLevel>;
|
||||
}
|
||||
export interface KarmaLevel {
|
||||
botTypeForLoot: string;
|
||||
modifiers: Modifiers;
|
||||
itemLimits: ItemLimits;
|
||||
equipmentBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface Modifiers {
|
||||
equipment: Record<string, number>;
|
||||
mod: Record<string, number>;
|
||||
}
|
||||
export interface ItemLimits {
|
||||
healing: MinMax;
|
||||
drugs: MinMax;
|
||||
stims: MinMax;
|
||||
looseLoot: MinMax;
|
||||
magazines: MinMax;
|
||||
grenades: MinMax;
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
import { MinMax } from "../../common/MinMax";
|
||||
import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IRagfairConfig extends IBaseConfig {
|
||||
kind: "aki-ragfair";
|
||||
@ -40,10 +41,6 @@ export interface Dynamic {
|
||||
showAsSingleStack: string[];
|
||||
blacklist: Blacklist;
|
||||
}
|
||||
export interface MinMax {
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
export interface Condition {
|
||||
conditionChance: number;
|
||||
min: number;
|
||||
|
@ -2,4 +2,5 @@ import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IRepairConfig extends IBaseConfig {
|
||||
kind: "aki-repair";
|
||||
priceMultiplier: number;
|
||||
applyRandomizeDurabilityLoss: boolean;
|
||||
}
|
||||
|
27
TypeScript/10ScopesAndTypes/types/models/spt/config/IScavCaseConfig.d.ts
vendored
Normal file
27
TypeScript/10ScopesAndTypes/types/models/spt/config/IScavCaseConfig.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
import { MinMax } from "../../common/MinMax";
|
||||
import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IScavCaseConfig extends IBaseConfig {
|
||||
kind: "aki-scavcase";
|
||||
rewardItemValueRangeRub: Record<string, MinMax>;
|
||||
moneyRewards: MoneyRewards;
|
||||
ammoRewards: AmmoRewards;
|
||||
rewardItemParentBlacklist: string[];
|
||||
rewardItemBlacklist: string[];
|
||||
}
|
||||
export interface MoneyRewards {
|
||||
moneyRewardChancePercent: number;
|
||||
rubCount: MoneyLevels;
|
||||
usdCount: MoneyLevels;
|
||||
eurCount: MoneyLevels;
|
||||
}
|
||||
export interface MoneyLevels {
|
||||
common: MinMax;
|
||||
rare: MinMax;
|
||||
superrare: MinMax;
|
||||
}
|
||||
export interface AmmoRewards {
|
||||
ammoRewardChancePercent: number;
|
||||
ammoRewardBlacklist: Record<string, string[]>;
|
||||
ammoRewardValueRangeRub: Record<string, MinMax>;
|
||||
minStackSize: number;
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
import { MinMax } from "../../common/MinMax";
|
||||
import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IWeatherConfig extends IBaseConfig {
|
||||
kind: "aki-weather";
|
||||
@ -15,7 +16,3 @@ export interface Weather {
|
||||
temp: MinMax;
|
||||
pressure: MinMax;
|
||||
}
|
||||
export interface MinMax {
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Inventory as PmcInventory } from "../../eft/common/IPmcData";
|
||||
import { Inventory as PmcInventory } from "../../eft/common/tables/IBotBase";
|
||||
import { Inventory, Chances, Generation } from "../../eft/common/tables/IBotType";
|
||||
export interface IBotGenerator {
|
||||
generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory;
|
||||
|
11
TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts
vendored
Normal file
11
TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
export interface ScavCaseRewardCountsAndPrices {
|
||||
common: RewardCountAndPriceDetails;
|
||||
rare: RewardCountAndPriceDetails;
|
||||
superrare: RewardCountAndPriceDetails;
|
||||
}
|
||||
export interface RewardCountAndPriceDetails {
|
||||
minCount: number;
|
||||
maxCount: number;
|
||||
minPriceRub: number;
|
||||
maxPriceRub: number;
|
||||
}
|
39
TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts
vendored
Normal file
39
TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
import { ITemplateItem, Props } from "../../eft/common/tables/ITemplateItem";
|
||||
export declare abstract class NewItemDetailsBase {
|
||||
/** Price of the item on flea market */
|
||||
fleaPriceRoubles: number;
|
||||
/** Price of the item in the handbook */
|
||||
handbookPriceRoubles: number;
|
||||
/**
|
||||
* A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr)
|
||||
* If a language is not included, the first item in the array will be used in its place
|
||||
*/
|
||||
locales: Record<string, LocaleDetails>;
|
||||
}
|
||||
export declare class NewItemFromCloneDetails extends NewItemDetailsBase {
|
||||
/** Id of the item to copy and use as a base */
|
||||
itemTplToClone: string;
|
||||
/** Item properties that should be applied over the top of the cloned base */
|
||||
overrideProperties: Props;
|
||||
/** ParentId for the new item (item type) */
|
||||
parentId: string;
|
||||
/**
|
||||
* the id the new item should have, leave blank to have one generated for you
|
||||
* This is often known as the TplId, or TemplateId
|
||||
*/
|
||||
newId: string;
|
||||
}
|
||||
export declare class NewItemDetails extends NewItemDetailsBase {
|
||||
newItem: ITemplateItem;
|
||||
}
|
||||
export declare class LocaleDetails {
|
||||
name: string;
|
||||
shortName: string;
|
||||
description: string;
|
||||
}
|
||||
export declare class CreateItemResult {
|
||||
constructor();
|
||||
success: boolean;
|
||||
itemId: string;
|
||||
errors: string[];
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import http, { ServerResponse } from "http";
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { Serializer } from "../di/Serializer";
|
||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||
import { NotifierHelper } from "../helpers/NotifierHelper";
|
||||
@ -25,8 +26,9 @@ export declare class HttpServer implements IHttpServer {
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
protected serializers: Serializer[];
|
||||
protected configServer: ConfigServer;
|
||||
protected applicationContext: ApplicationContext;
|
||||
constructor(httpRouter: HttpRouter, // TODO: delay required
|
||||
logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer);
|
||||
logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer, applicationContext: ApplicationContext);
|
||||
protected buffers: {};
|
||||
protected onReceive: {};
|
||||
protected onRespond: {};
|
||||
|
41
TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts
vendored
Normal file
41
TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
||||
constructor(logger: ILogger, configServer: ConfigServer);
|
||||
/**
|
||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param playerLevel Level of the currently playing player
|
||||
* @param isPmc Is the bot we're filtering a PMC
|
||||
* @param role Role of the bot we're filtering
|
||||
*/
|
||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||
/**
|
||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
||||
* @param role Role of the bot we want the blacklist for
|
||||
* @param playerLevel Level of the player
|
||||
* @returns EquipmentBlacklistDetails object
|
||||
*/
|
||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
||||
/**
|
||||
* Filter bot equipment based on blacklist from config/bot.json
|
||||
* @param baseBotNode bot .json file to update
|
||||
* @param equipmentBlacklist equipment blacklist
|
||||
* @returns Filtered bot file
|
||||
*/
|
||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
||||
/**
|
||||
* Filter bot cartridges based on blacklist from config/bot.json
|
||||
* @param baseBotNode bot .json file to update
|
||||
* @param equipmentBlacklist equipment blacklist
|
||||
* @returns Filtered bot file
|
||||
*/
|
||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { PMCLootGenerator } from "../generators/PMCLootGenerator";
|
||||
import { Items } from "../models/eft/common/tables/IBotType";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { BotLootCache, LootCacheType } from "../models/spt/bots/BotLootCache";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
@ -22,19 +22,42 @@ export declare class BotLootCacheService {
|
||||
* Get the fully created loot array, ordered by price low to high
|
||||
* @param botRole bot to get loot for
|
||||
* @param isPmc is the bot a pmc
|
||||
* @param lootType what type of loot is needed
|
||||
* @param lootType what type of loot is needed (backpack/pocket/stim/vest etc)
|
||||
* @param lootPool the full pool of loot (needed when cache is empty)
|
||||
* @returns ITemplateItem array
|
||||
*/
|
||||
getLootFromCache(botRole: string, isPmc: boolean, lootType: LootCacheType, lootPool: Items): ITemplateItem[];
|
||||
/**
|
||||
* Generate loot for a bot and store inside a private class property
|
||||
* @param botRole
|
||||
* @param lootType
|
||||
* @param botRole bots role (assault / pmcBot etc)
|
||||
* @param lootPool the full pool of loot we use to create the various sub-categories with
|
||||
* @param isPmc
|
||||
* @param isPmc Is the bot a PMC (alteres what loot is cached)
|
||||
*/
|
||||
protected addLootToCache(botRole: string, isPmc: boolean, lootType: LootCacheType, lootPool: Items): void;
|
||||
protected addLootToCache(botRole: string, isPmc: boolean, lootPool: Items): void;
|
||||
/**
|
||||
* Ammo/grenades have this property
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
protected isBulletOrGrenade(props: Props): boolean;
|
||||
/**
|
||||
* Internal and external magazine have this property
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
protected isMagazine(props: Props): boolean;
|
||||
/**
|
||||
* Medical use items (e.g. morphine/lip balm/grizzly)
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
protected isMedicalItem(props: Props): boolean;
|
||||
/**
|
||||
* Grenades have this property (e.g. smoke/frag/flash grenades)
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
protected isGrenade(props: Props): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -34,7 +34,13 @@ export declare class InsuranceService {
|
||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||
getItemPrice(_tpl: string): number;
|
||||
generateTemplatesById(): void;
|
||||
sendInsuredItems(pmcData: IPmcData, sessionID: string): void;
|
||||
/**
|
||||
* Sends stored insured items as message to player
|
||||
* @param pmcData profile to modify
|
||||
* @param sessionID SessionId of current player
|
||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||
*/
|
||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||
storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void;
|
||||
storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void;
|
||||
protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { INotification } from "../models/eft/notifier/INotifier";
|
||||
export declare class NotificationService {
|
||||
protected messageQueue: {};
|
||||
getMessageQueue(): {};
|
||||
getMessageFromQueue(sessionId: string): any;
|
||||
protected messageQueue: Record<string, any[]>;
|
||||
getMessageQueue(): Record<string, any[]>;
|
||||
getMessageFromQueue(sessionId: string): any[];
|
||||
updateMessageOnQueue(sessionId: string, value: any[]): void;
|
||||
has(sessionID: string): boolean;
|
||||
/**
|
||||
@ -17,5 +17,5 @@ export declare class NotificationService {
|
||||
* Get message queue for session
|
||||
* @param sessionID
|
||||
*/
|
||||
get(sessionID: string): any;
|
||||
get(sessionID: string): any[];
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { HideoutSlot } from "../models/eft/common/tables/IBotBase";
|
||||
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { HideoutAreas } from "../models/enums/HideoutAreas";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { Watermark } from "../utils/Watermark";
|
||||
@ -29,8 +31,27 @@ export declare class ProfileFixerService {
|
||||
protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[];
|
||||
protected fixNullTraderSalesSums(pmcProfile: IPmcData): void;
|
||||
protected addMissingBonusesProperty(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
* Adjust profile quest status and statusTimers object values
|
||||
* quest.status is numeric e.g. 2
|
||||
* quest.statusTimers keys are numeric as strings e.g. "2"
|
||||
* @param pmcProfile profile to update
|
||||
*/
|
||||
protected updateProfileQuestDataValues(pmcProfile: IPmcData): void;
|
||||
protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void;
|
||||
protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
* A new property was added to slot items "locationIndex", if this is missing, the hideout slot item must be removed
|
||||
* @param pmcProfile Profile to find and remove slots from
|
||||
*/
|
||||
protected removeResourcesFromSlotsInHideoutWithoutLocationIndexValue(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
* add in objects equal to the number of slots
|
||||
* @param areaType area to check
|
||||
* @param pmcProfile profile to update
|
||||
*/
|
||||
protected addEmptyObjectsToHideoutAreaSlots(areaType: HideoutAreas, emptyItemCount: number, pmcProfile: IPmcData): void;
|
||||
protected addObjectsToArray(count: number, slots: HideoutSlot[]): HideoutSlot[];
|
||||
/**
|
||||
* In 18876 bsg changed the pockets tplid to be one that has 3 additional special slots
|
||||
* @param pmcProfile
|
||||
|
@ -27,6 +27,7 @@ export declare class RagfairPriceService {
|
||||
getDynamicPrice(itemTpl: string): number;
|
||||
getAllFleaPrices(): Record<string, number>;
|
||||
getFleaPriceForItem(tplId: string): number;
|
||||
getStaticPriceForItem(tplId: string): number;
|
||||
getBarterPrice(barterScheme: IBarterScheme[]): number;
|
||||
getDynamicOfferPrice(items: Item[], desiredCurrency: string): number;
|
||||
/**
|
||||
|
80
TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts
vendored
Normal file
80
TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
import { ITemplateItem, Props } from "../../models/eft/common/tables/ITemplateItem";
|
||||
import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "../../models/spt/mod/NewItemDetails";
|
||||
import { IDatabaseTables } from "../../models/spt/server/IDatabaseTables";
|
||||
import { ILogger } from "../../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../../servers/DatabaseServer";
|
||||
import { HashUtil } from "../../utils/HashUtil";
|
||||
import { JsonUtil } from "../../utils/JsonUtil";
|
||||
export declare class CustomItemService {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected tables: IDatabaseTables;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
||||
/**
|
||||
* Create a new item from a cloned item base
|
||||
* WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start
|
||||
* Add to the items db
|
||||
* Add to the flea market
|
||||
* Add to the handbook
|
||||
* Add to the locales
|
||||
* @param newItemDetails Item details for the new item to be created
|
||||
* @returns tplId of the new item created
|
||||
*/
|
||||
createItemFromClone(newItemDetails: NewItemFromCloneDetails): CreateItemResult;
|
||||
/**
|
||||
* Create a new item without using an existing item as a template
|
||||
* Add to the items db
|
||||
* Add to the flea market
|
||||
* Add to the handbook
|
||||
* Add to the locales
|
||||
* @param newItemDetails Details on what the item to be created
|
||||
* @returns CreateItemResult containing the completed items Id
|
||||
*/
|
||||
createItem(newItemDetails: NewItemDetails): CreateItemResult;
|
||||
/**
|
||||
* If the id provided is an empty string, return a randomly generated guid, otherwise return the newId parameter
|
||||
* @param newId id supplied to code
|
||||
* @returns item id
|
||||
*/
|
||||
protected getOrGenerateIdForItem(newId: string): string;
|
||||
/**
|
||||
* Iterates through supplied properties and updates the cloned items properties with them
|
||||
* Complex objects cannot have overrides, they must be fully hydrated with values if they are to be used
|
||||
* @param overrideProperties new properties to apply
|
||||
* @param itemClone item to update
|
||||
*/
|
||||
protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void;
|
||||
/**
|
||||
* Addd a new item object to the in-memory representation of items.json
|
||||
* @param newItemId id of the item to add to items.json
|
||||
* @param itemToAdd Item to add against the new id
|
||||
*/
|
||||
protected addToItemsDb(newItemId: string, itemToAdd: ITemplateItem): void;
|
||||
/**
|
||||
* Add a handbook price for an item
|
||||
* @param newItemId id of the item being added
|
||||
* @param parentId parent id of the item being added
|
||||
* @param priceRoubles price of the item being added
|
||||
*/
|
||||
protected addToHandbookDb(newItemId: string, parentId: string, priceRoubles: number): void;
|
||||
/**
|
||||
* Iterate through the passed in locale data and add to each locale in turn
|
||||
* If data is not provided for each langauge eft uses, the first object will be used in its place
|
||||
* e.g.
|
||||
* en[0]
|
||||
* fr[1]
|
||||
*
|
||||
* No jp provided, so english will be used as a substitute
|
||||
* @param localeDetails key is language, value are the new locale details
|
||||
* @param newItemId id of the item being created
|
||||
*/
|
||||
protected addToLocaleDbs(localeDetails: Record<string, LocaleDetails>, newItemId: string): void;
|
||||
/**
|
||||
* Add a price to the in-memory representation of prices.json, used to inform the flea of an items price on the market
|
||||
* @param newItemId id of the new item
|
||||
* @param fleaPriceRoubles Price of the new item
|
||||
*/
|
||||
protected addToFleaPriceDb(newItemId: string, fleaPriceRoubles: number): void;
|
||||
}
|
@ -11,4 +11,5 @@ export declare class App {
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
||||
load(): void;
|
||||
protected update(onUpdateComponents: OnUpdate[]): void;
|
||||
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
||||
}
|
||||
|
@ -5,4 +5,14 @@ export declare class TimeUtil {
|
||||
getDate(): string;
|
||||
getTime(): string;
|
||||
getTimestamp(): number;
|
||||
/**
|
||||
* mail in eft requires time be in a specific format
|
||||
* @returns current time in format: 00:00 (hh:mm)
|
||||
*/
|
||||
getTimeMailFormat(): string;
|
||||
/**
|
||||
* Mail in eft requires date be in a specific format
|
||||
* @returns current date in format: 00.00.0000 (dd.mm.yyyy)
|
||||
*/
|
||||
getDateMailFormat(): string;
|
||||
}
|
||||
|
30
TypeScript/10ScopesAndTypes/types/utils/collections/lists/LinkedList.d.ts
vendored
Normal file
30
TypeScript/10ScopesAndTypes/types/utils/collections/lists/LinkedList.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
export declare class LinkedList<T> {
|
||||
private head;
|
||||
private tail;
|
||||
add(t: T): void;
|
||||
addRange(list: T[]): void;
|
||||
getHead(): LinkedListNode<T>;
|
||||
getTail(): LinkedListNode<T>;
|
||||
isEmpty(): boolean;
|
||||
getSize(): number;
|
||||
removeFirst(): LinkedListNode<T>;
|
||||
removeLast(): LinkedListNode<T>;
|
||||
indexOf(func: (t: T) => boolean): number;
|
||||
contains(func: (t: T) => boolean): boolean;
|
||||
forEachNode(func: (t: LinkedListNode<T>) => void): void;
|
||||
forEachValue(func: (t: T) => void): void;
|
||||
findFirstNode(func: (t: LinkedListNode<T>) => boolean): LinkedListNode<T>;
|
||||
findFirstValue(func: (t: T) => boolean): T;
|
||||
toList(): T[];
|
||||
}
|
||||
export declare class LinkedListNode<T> {
|
||||
private previous;
|
||||
private value;
|
||||
private next;
|
||||
constructor(value: T, previous?: LinkedListNode<T>, next?: LinkedListNode<T>);
|
||||
getValue(): T;
|
||||
getNextNode(): LinkedListNode<T>;
|
||||
setNextNode(node: LinkedListNode<T>): void;
|
||||
getPreviousNode(): LinkedListNode<T>;
|
||||
setPreviousNode(node: LinkedListNode<T>): void;
|
||||
}
|
9
TypeScript/11BundleLoadingSample/types/context/ApplicationContext.d.ts
vendored
Normal file
9
TypeScript/11BundleLoadingSample/types/context/ApplicationContext.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { ContextVariable } from "./ContextVariable";
|
||||
import { ContextVariableType } from "./ContextVariableType";
|
||||
export declare class ApplicationContext {
|
||||
private variables;
|
||||
private static holderMaxSize;
|
||||
getLatestValue(type: ContextVariableType): ContextVariable;
|
||||
getValues(type: ContextVariableType): ContextVariable[];
|
||||
addValue(type: ContextVariableType, value: any): void;
|
||||
}
|
10
TypeScript/11BundleLoadingSample/types/context/ContextVariable.d.ts
vendored
Normal file
10
TypeScript/11BundleLoadingSample/types/context/ContextVariable.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { ContextVariableType } from "./ContextVariableType";
|
||||
export declare class ContextVariable {
|
||||
private value;
|
||||
private timestamp;
|
||||
private type;
|
||||
constructor(value: any, type: ContextVariableType);
|
||||
getValue(): any;
|
||||
getTimestamp(): Date;
|
||||
getType(): ContextVariableType;
|
||||
}
|
4
TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts
vendored
Normal file
4
TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export declare enum ContextVariableType {
|
||||
SESSION_ID = 0,
|
||||
MATCH_INFO = 1
|
||||
}
|
@ -30,6 +30,6 @@ export declare class BotController {
|
||||
*/
|
||||
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
||||
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty;
|
||||
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||
getBotCap(): number;
|
||||
}
|
||||
|
@ -1,14 +1,15 @@
|
||||
import { ScavCaseRewardGenerator } from "../generators/ScavCaseRewardGenerator";
|
||||
import { HideoutHelper } from "../helpers/HideoutHelper";
|
||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
||||
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
||||
@ -42,26 +43,58 @@ export declare class HideoutController {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected hideoutHelper: HideoutHelper;
|
||||
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
||||
protected configServer: ConfigServer;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer);
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Create item in hideout slot item array, remove item from player inventory
|
||||
* @param pmcData Profile data
|
||||
* @param addItemToHideoutRequest reqeust from client to place item in area slot
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse object
|
||||
*/
|
||||
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
||||
/**
|
||||
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
|
||||
* @param sessionID Session id
|
||||
* @param pmcData Profile to update
|
||||
* @param removeResourceRequest client request
|
||||
* @param output response to send to client
|
||||
* @param hideoutArea Area fuel is being removed from
|
||||
* @returns IItemEventRouterResponse response
|
||||
*/
|
||||
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles event after clicking 'start' on the scav case hideout page
|
||||
* @param pmcData player profile
|
||||
* @param body client request object
|
||||
* @param sessionID session id
|
||||
* @returns item event router response
|
||||
*/
|
||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): {
|
||||
[x: string]: number;
|
||||
};
|
||||
protected getRandomisedScavRewards(rarityItemCounter: {
|
||||
[x: string]: number;
|
||||
}): Product[];
|
||||
/**
|
||||
* Add generated scav case rewards to player profile
|
||||
* @param pmcData player profile to add rewards to
|
||||
* @param rewards reward items to add to profile
|
||||
*/
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[]): void;
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||
* @param sessionID
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param output
|
||||
* @returns
|
||||
*/
|
||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
update(): void;
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
|
||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||
import { HealthHelper } from "../helpers/HealthHelper";
|
||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { QuestHelper } from "../helpers/QuestHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||
@ -12,20 +13,32 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { InsuranceService } from "../services/InsuranceService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class InraidController {
|
||||
protected saveServer: SaveServer;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected questHelper: QuestHelper;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected extendedProfileHelper: ExtendedProfileHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected playerScavGenerator: PlayerScavGenerator;
|
||||
protected healthHelper: HealthHelper;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected inRaidHelper: InRaidHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
||||
constructor(saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
||||
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||
/**
|
||||
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
||||
* @param offraidData Save Progress Request
|
||||
* @param pmcData player profile
|
||||
* @param isPlayerScav Was the player a pScav
|
||||
*/
|
||||
private markOrRemoveFoundInRaidItems;
|
||||
private handlePostRaidPlayerScavProcess;
|
||||
private handlePostRaidPlayerScavKarmaChanges;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
@ -21,9 +22,10 @@ export declare class MatchController {
|
||||
protected traderHelper: TraderHelper;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected configServer: ConfigServer;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected matchConfig: IMatchConfig;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, applicationContext: ApplicationContext);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
|
||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
||||
@ -21,9 +22,10 @@ export declare class ProfileController {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected playerScavGenerator: PlayerScavGenerator;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected extendedProfileHelper: ExtendedProfileHelper;
|
||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper);
|
||||
protected profileHelper: ProfileHelper;
|
||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, profileHelper: ProfileHelper);
|
||||
getMiniProfiles(): IMiniProfile[];
|
||||
getMiniProfile(sessionID: string): any;
|
||||
getCompleteProfile(sessionID: string): IPmcData[];
|
||||
|
@ -4,7 +4,8 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { Exit } from "../models/eft/common/ILocationBase";
|
||||
import { IPmcData, TraderInfo } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { TraderInfo } from "../models/eft/common/tables/IBotBase";
|
||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPmcDataRepeatableQuest, IRepeatableQuest, IReward, IRewards } from "../models/eft/common/tables/IRepeatableQuests";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||
|
@ -1,13 +1,14 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||
import { Health as PmcHealth } from "../models/eft/common/IPmcData";
|
||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType";
|
||||
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, IBotType, Inventory } from "../models/eft/common/tables/IBotType";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
@ -23,19 +24,30 @@ export declare class BotGenerator {
|
||||
protected hashUtil: HashUtil;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected botInventoryGenerator: BotInventoryGenerator;
|
||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||
protected botHelper: BotHelper;
|
||||
protected gameEventHelper: GameEventHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botEquipmentFilterService: BotEquipmentFilterService, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||
/**
|
||||
* Choose if a bot should become a Pmc by checking if bot type is allowed to become a Pmc in bot config
|
||||
* @param isPlayerScav is a player scav being generated, forces choice returned to never be a pmc
|
||||
* Generate a player scav bot object
|
||||
* @param role e.g. assault / pmcbot
|
||||
* @param difficulty easy/normal/hard/impossible
|
||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||
* @returns
|
||||
*/
|
||||
protected shouldBotBePmc(isPlayerScav: boolean, role: string): boolean;
|
||||
generatePlayerScav(role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||
/**
|
||||
* Choose if a bot should become a PMC by checking if bot type is allowed to become a Pmc in botConfig.convertFromChances and doing a random int check
|
||||
* @param botRole the bot role to check if should be a pmc
|
||||
* @returns true if should be a pmc
|
||||
*/
|
||||
protected shouldBotBePmc(botRole: string): boolean;
|
||||
/**
|
||||
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||
* @returns pmc side as string
|
||||
@ -46,7 +58,7 @@ export declare class BotGenerator {
|
||||
* @returns IBotBase object
|
||||
*/
|
||||
protected getCloneOfBotBase(): IBotBase;
|
||||
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
|
||||
protected generateBot(bot: IBotBase, role: string, node: IBotType, isPmc: boolean, isPlayerScav?: boolean): IBotBase;
|
||||
/**
|
||||
* Log the number of PMCs generated to the debug console
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||
import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -10,6 +11,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||
export declare class BotLootGenerator {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
@ -17,11 +19,106 @@ export declare class BotLootGenerator {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected botWeaponGenerator: BotWeaponGenerator;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||
generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, inventory: PmcInventory): void;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||
generateLoot(templateInventory: Inventory, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, botInventory: PmcInventory, equipmentChances: Chances): void;
|
||||
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void;
|
||||
/**
|
||||
* Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached
|
||||
* @param pool pool of items to pick from
|
||||
* @param equipmentSlots What equality slot will the loot items be added to
|
||||
* @param totalItemCount Max count of items to add
|
||||
* @param inventoryToAddItemsTo bot inventory loot will be added to
|
||||
* @param botRole role of the bot loot is being generated for (assault/pmcbot)
|
||||
* @param useLimits should item limit counts be used as defined in config/bot.json
|
||||
* @param totalValueLimitRub total value of loot allowed in roubles
|
||||
* @param isPmc is the bot being generated for a pmc
|
||||
*/
|
||||
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, useLimits?: boolean, totalValueLimitRub?: number, isPmc?: boolean): void;
|
||||
/**
|
||||
* Add generated weapons to inventory as loot
|
||||
* @param botInventory inventory to add preset to
|
||||
* @param equipmentSlot slot to place the preset in (backpack)
|
||||
* @param templateInventory bots template, assault.json
|
||||
* @param modChances chances for mods to spawn on weapon
|
||||
* @param botRole bots role, .e.g. pmcBot
|
||||
* @param isPmc are we generating for a pmc
|
||||
*/
|
||||
protected addLooseWeaponsToInventorySlot(botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean): void;
|
||||
/**
|
||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||
* @param pool pool of items to pick an item from
|
||||
* @param isPmc is the bot being created a pmc
|
||||
* @returns ITemplateItem object
|
||||
*/
|
||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||
/**
|
||||
* Get the loot nvalue from botconfig
|
||||
* @param isPmc if true the pmc nvalue is returned
|
||||
* @returns nvalue as number
|
||||
*/
|
||||
protected getBotLootNValue(isPmc: boolean): number;
|
||||
/**
|
||||
* Update item limit array to contain items that have a limit
|
||||
* All values are set to 0
|
||||
* @param isPmc is the bot a pmc
|
||||
* @param botRole role the bot has
|
||||
* @param limitCount
|
||||
*/
|
||||
protected initItemLimitArray(isPmc: boolean, botRole: string, limitCount: Record<string, number>): void;
|
||||
/**
|
||||
* Check if an item has reached its bot-specific spawn limit
|
||||
* @param itemTemplate Item we check to see if its reached spawn limit
|
||||
* @param botRole Bot type
|
||||
* @param isPmc Is bot we're working with a pmc
|
||||
* @param limitCount spawn limits for items on bot
|
||||
* @param itemSpawnLimits the limits this bot is allowed to have
|
||||
* @returns true if item has reached spawn limit
|
||||
*/
|
||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||
/**
|
||||
* Is the item an ammo box
|
||||
* @param props props of the item to check
|
||||
* @returns true if item is an ammo box
|
||||
*/
|
||||
protected isAmmoBox(props: Props): boolean;
|
||||
/**
|
||||
* Create an object that contains the ammo stack for an ammo box
|
||||
* @param parentId ammo box id
|
||||
* @param props ammo box props
|
||||
* @returns Item object
|
||||
*/
|
||||
protected createAmmoForAmmoBox(parentId: string, props: Props): Item;
|
||||
/**
|
||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||
* @param isPmc is this a PMC
|
||||
* @param itemTemplate item details
|
||||
* @param moneyItem Money stack to randomise
|
||||
*/
|
||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||
/**
|
||||
* Randomise the size of an ammo stack
|
||||
* @param isPmc is this a PMC
|
||||
* @param itemTemplate item details
|
||||
* @param ammoItem Ammo stack to randomise
|
||||
*/
|
||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
||||
/**
|
||||
* Get spawn limits for a specific bot type from bot.json config
|
||||
* If no limit found for a non pmc bot, fall back to defaults
|
||||
* @param isPmc is the bot we want limits for a pmc
|
||||
* @param botRole what role does the bot have
|
||||
* @returns dictionary of tplIds and limit
|
||||
*/
|
||||
protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record<string, number>;
|
||||
/**
|
||||
* Get the parentId or tplId of item inside spawnLimits object if it exists
|
||||
* @param itemTemplate item we want to look for in spawn limits
|
||||
* @param spawnLimits Limits to check for item
|
||||
* @returns id as string, otherwise undefined
|
||||
*/
|
||||
protected getMatchingIdFromSpawnLimits(itemTemplate: ITemplateItem, spawnLimits: Record<string, number>): string;
|
||||
}
|
||||
|
@ -1,15 +1,19 @@
|
||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||
import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { MinMax } from "../models/common/MinMax";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Inventory, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { GenerateWeaponResult } from "../models/spt/bots/GenerateWeaponResult";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class BotWeaponGenerator {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
@ -19,19 +23,69 @@ export declare class BotWeaponGenerator {
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected randomUtil: RandomUtil;
|
||||
private readonly modMagazineSlotId;
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
||||
generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
||||
protected configServer: ConfigServer;
|
||||
protected readonly modMagazineSlotId = "mod_magazine";
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||
/**
|
||||
* Get a random weapon from a bots pool of weapons (weighted)
|
||||
* @param equipmentSlot Primary/secondary/holster
|
||||
* @param botTemplateInventory e.g. assault.json
|
||||
* @returns weapon tpl
|
||||
*/
|
||||
pickWeightedWeaponTplFromPool(equipmentSlot: string, botTemplateInventory: Inventory): string;
|
||||
/**
|
||||
* Generated a weapon based on the supplied weapon tpl
|
||||
* @param weaponTpl weapon tpl to generate (use pickWeightedWeaponTplFromPool())
|
||||
* @param equipmentSlot slot to fit into, primary/secondary/holster
|
||||
* @param botTemplateInventory e.g. assault.json
|
||||
* @param weaponParentId
|
||||
* @param modChances
|
||||
* @param botRole
|
||||
* @param isPmc
|
||||
* @returns GenerateWeaponResult object
|
||||
*/
|
||||
generateWeaponByTpl(weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean): GenerateWeaponResult;
|
||||
/**
|
||||
* Generate an entirely random weapon
|
||||
* @param equipmentSlot Primary/secondary/holster
|
||||
* @param botTemplateInventory e.g. assault.json
|
||||
* @param weaponParentId
|
||||
* @param modChances
|
||||
* @param botRole
|
||||
* @param isPmc
|
||||
* @returns GenerateWeaponResult object
|
||||
*/
|
||||
generateRandomWeapon(equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean): GenerateWeaponResult;
|
||||
/**
|
||||
* Create array with weapon base as only element
|
||||
* Add additional properties as required
|
||||
* @param weaponTpl
|
||||
* @param weaponParentId
|
||||
* @param equipmentSlot
|
||||
* @param weaponItemTemplate
|
||||
* @param botRole for durability values
|
||||
* @returns
|
||||
*/
|
||||
constructWeaponBaseArray(weaponTpl: string, weaponParentId: string, equipmentSlot: string, weaponItemTemplate: ITemplateItem, botRole: string): Item[];
|
||||
/**
|
||||
* Add compatible magazines to an inventory based on a generated weapon
|
||||
* @param weaponDetails
|
||||
* @param magCounts
|
||||
* @param inventory
|
||||
* @param botRole the bot type we're getting generating extra mags for
|
||||
*/
|
||||
addExtraMagazinesToInventory(weaponDetails: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
|
||||
/**
|
||||
* Get the mods necessary to kit out a weapon to its preset level
|
||||
* @param weaponTpl weapon to find preset for
|
||||
* @param equipmentSlot the slot the weapon will be placed in
|
||||
* @param weaponParentId
|
||||
* @param weaponParentId Value used for the parentid
|
||||
* @returns array of weapon mods
|
||||
*/
|
||||
protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[];
|
||||
/** Checks if all required slots are occupied on a weapon and all it's mods */
|
||||
protected isWeaponValid(itemList: Item[]): boolean;
|
||||
protected isWeaponValid(weaponItemArray: Item[]): boolean;
|
||||
/**
|
||||
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
||||
* Additionally, adds extra bullets to SecuredContainer
|
||||
@ -40,9 +94,10 @@ export declare class BotWeaponGenerator {
|
||||
* @param magCounts
|
||||
* @param ammoTpl
|
||||
* @param inventory
|
||||
* @param botRole the bot type we're getting generating extra mags for
|
||||
* @returns
|
||||
*/
|
||||
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void;
|
||||
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory, botRole: string): void;
|
||||
/**
|
||||
* Get a randomised number of bullets for a specific magazine
|
||||
* @param magCounts min and max count of magazines
|
||||
@ -68,18 +123,31 @@ export declare class BotWeaponGenerator {
|
||||
* Get a weapons magazine tpl from a weapon template
|
||||
* @param weaponMods mods from a weapon template
|
||||
* @param weaponTemplate Weapon to get magazine tpl for
|
||||
* @param botRole the bot type we are getting the magazine for
|
||||
* @returns magazine tpl string
|
||||
*/
|
||||
protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string;
|
||||
protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem, botRole: string): string;
|
||||
/**
|
||||
* Get a weapons default magazine template id
|
||||
* @param weaponTemplate weapon to get default magazine for
|
||||
* @returns tpl of magazine
|
||||
*/
|
||||
protected getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string;
|
||||
protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void;
|
||||
/**
|
||||
* Finds and returns compatible ammo tpl
|
||||
*
|
||||
* @param {*} weaponMods
|
||||
* @param {*} weaponTemplate
|
||||
* @returns compatible ammo tpl
|
||||
* Finds and return a compatible ammo tpl based on the bots ammo weightings (x.json/inventory/equipment/ammo)
|
||||
* @param ammo a list of ammo tpls the weapon can use
|
||||
* @param weaponTemplate the weapon we want to pick ammo for
|
||||
* @param isPmc is the ammo being gathered for a pmc (runs pmc ammo filtering)
|
||||
* @returns an ammo tpl that works with the desired gun
|
||||
*/
|
||||
protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string;
|
||||
protected getCompatibleAmmo(ammo: Record<string, Record<string, number>>, weaponTemplate: ITemplateItem, isPmc: boolean): string;
|
||||
/**
|
||||
* Get a weapons compatible cartridge caliber
|
||||
* @param weaponTemplate Weapon to look up caliber of
|
||||
* @returns caliber as string
|
||||
*/
|
||||
protected getWeaponCaliber(weaponTemplate: ITemplateItem): string;
|
||||
/**
|
||||
* Fill existing magazines to full, while replacing their contents with specified ammo
|
||||
* @param weaponMods
|
||||
@ -87,6 +155,14 @@ export declare class BotWeaponGenerator {
|
||||
* @param ammoTpl
|
||||
*/
|
||||
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
|
||||
/**
|
||||
* Add cartridge item to weapon Item array, if it already exists, update
|
||||
* @param weaponMods Weapon items array to amend
|
||||
* @param magazine magazine item details we're adding cartridges to
|
||||
* @param chosenAmmo cartridge to put into the magazine
|
||||
* @param newStackSize how many cartridges should go into the magazine
|
||||
*/
|
||||
protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void;
|
||||
/**
|
||||
* Fill each Camora with a bullet
|
||||
* @param weaponMods Weapon mods to find and update camora mod(s) from
|
||||
|
67
TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts
vendored
Normal file
67
TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Skills, Stats } from "../models/eft/common/tables/IBotBase";
|
||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { IPlayerScavConfig, KarmaLevel } from "../models/spt/config/IPlayerScavConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { BotGenerator } from "./BotGenerator";
|
||||
export declare class PlayerScavGenerator {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected saveServer: SaveServer;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected botHelper: BotHelper;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected fenceService: FenceService;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected botGenerator: BotGenerator;
|
||||
protected configServer: ConfigServer;
|
||||
protected playerScavConfig: IPlayerScavConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, botGenerator: BotGenerator, configServer: ConfigServer);
|
||||
/**
|
||||
* Update a player profile to include a new player scav profile
|
||||
* @param sessionID session id to specify what profile is updated
|
||||
* @returns profile object
|
||||
*/
|
||||
generate(sessionID: string): IPmcData;
|
||||
/**
|
||||
* Get the scav karama level for a profile
|
||||
* Is also the fence trader rep level
|
||||
* @param pmcData pmc profile
|
||||
* @returns karma level
|
||||
*/
|
||||
protected getScavKarmaLevel(pmcData: IPmcData): number;
|
||||
/**
|
||||
* Get a baseBot template
|
||||
* If the parameter doesnt match "assault", take parts from the loot type and apply to the return bot template
|
||||
* @param botTypeForLoot bot type to use for inventory/chances
|
||||
* @returns IBotType object
|
||||
*/
|
||||
protected constructBotBaseTemplate(botTypeForLoot: string): IBotType;
|
||||
/**
|
||||
* Adjust equipment/mod/item generation values based on scav karma levels
|
||||
* @param karmaSettings Values to modify the bot template with
|
||||
* @param baseBotNode bot template to modify according to karama level settings
|
||||
*/
|
||||
protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void;
|
||||
protected getScavSkills(scavProfile: IPmcData): Skills;
|
||||
protected getDefaultScavSkills(): Skills;
|
||||
protected getScavStats(scavProfile: IPmcData): Stats;
|
||||
protected getScavLevel(scavProfile: IPmcData): number;
|
||||
protected getScavExperience(scavProfile: IPmcData): number;
|
||||
/**
|
||||
* Set cooldown till pscav is playable
|
||||
* take into account scav cooldown bonus
|
||||
* @param scavData scav profile
|
||||
* @param pmcData pmc profile
|
||||
* @returns
|
||||
*/
|
||||
protected setScavCooldownTimer(scavData: IPmcData, pmcData: IPmcData): IPmcData;
|
||||
}
|
105
TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts
vendored
Normal file
105
TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { Product } from "../models/eft/common/tables/IBotBase";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
|
||||
import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "../models/spt/hideout/ScavCaseRewardCountsAndPrices";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class ScavCaseRewardGenerator {
|
||||
protected logger: ILogger;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected scavCaseConfig: IScavCaseConfig;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Create an array of rewards that will be given to the player upon completing their scav case build
|
||||
* @param body client request
|
||||
* @returns Product array
|
||||
*/
|
||||
generate(body: IHideoutScavCaseStartRequestData): Product[];
|
||||
/**
|
||||
* Get all db items that are not blacklisted in scavcase config
|
||||
* @returns filtered array of db items
|
||||
*/
|
||||
protected getDbItems(): ITemplateItem[];
|
||||
/**
|
||||
* Check if a template id has a blacklisted parent id
|
||||
* @param tplid template id to check
|
||||
* @returns true if item is blacklisted
|
||||
*/
|
||||
protected itemHasBlacklistedParent(tplid: string): boolean;
|
||||
/**
|
||||
* Pick a number of items to be rewards, the count is defined by the values in
|
||||
* @param items item pool to pick rewards from
|
||||
* @param itemFilters how the rewards should be filtered down (by item count)
|
||||
* @returns
|
||||
*/
|
||||
protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[];
|
||||
/**
|
||||
* Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig
|
||||
* @returns true if reward should be money
|
||||
*/
|
||||
protected rewardShouldBeMoney(): boolean;
|
||||
/**
|
||||
* Choose if ammo should be a reward based on the ammoRewardChancePercent config chance in scavCaseConfig
|
||||
* @returns true if reward should be ammo
|
||||
*/
|
||||
protected rewardShouldBeAmmo(): boolean;
|
||||
/**
|
||||
* Choose from rouble/dollar/euro at random
|
||||
*/
|
||||
protected getRandomMoney(): ITemplateItem;
|
||||
/**
|
||||
* Get a random ammo from items.json that is not in the ammo blacklist AND inside the price rage defined in scavcase.json config
|
||||
* @param rarity The rarity this ammo reward is for
|
||||
* @returns random ammo item from items.json
|
||||
*/
|
||||
protected getRandomAmmo(rarity: string): ITemplateItem;
|
||||
/**
|
||||
* Take all the rewards picked create the Product object array ready to return to calling code
|
||||
* Also add a stack count to ammo and money
|
||||
* @param rewardItems items to convert
|
||||
* @returns Product array
|
||||
*/
|
||||
protected randomiseContainerItemRewards(rewardItems: ITemplateItem[], rarity: string): Product[];
|
||||
/**
|
||||
* Add a randomised stack count to ammo or money items
|
||||
* @param item money or ammo item
|
||||
* @param resultItem money or ammo item with a randomise stack size
|
||||
*/
|
||||
protected addStackCountToAmmoAndMoney(item: ITemplateItem, resultItem: {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd: any;
|
||||
}, rarity: string): void;
|
||||
/**
|
||||
*
|
||||
* @param dbItems all items from the items.json
|
||||
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
|
||||
* @returns filtered dbItems array
|
||||
*/
|
||||
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[];
|
||||
/**
|
||||
* Gathers the reward options from config and scavcase.json into a single object
|
||||
* @param scavCaseDetails scavcase.json values
|
||||
* @returns ScavCaseRewardCountsAndPrices object
|
||||
*/
|
||||
protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices;
|
||||
/**
|
||||
* Randomises the size of ammo and money stacks
|
||||
* @param itemToCalculate ammo or money item
|
||||
* @param rarity rarity (common/rare/superrare)
|
||||
* @returns value to set stack count to
|
||||
*/
|
||||
protected getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem, rarity: string): number;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
||||
import { Grid, ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
||||
@ -35,13 +35,6 @@ export declare class BotGeneratorHelper {
|
||||
* @returns true if it is cylinder related
|
||||
*/
|
||||
magazineIsCylinderRelated(magazineParentName: string): boolean;
|
||||
/**
|
||||
* Get a list of non black-listed cartridges from the PMC bot config
|
||||
* @param modSlot mod item slot
|
||||
* @param itemModPool
|
||||
* @returns string array of cartridges PMCs can use
|
||||
*/
|
||||
protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record<string, string[]>): string[];
|
||||
/**
|
||||
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
||||
* never return true for an item that has 0% spawn chance
|
||||
@ -53,6 +46,7 @@ export declare class BotGeneratorHelper {
|
||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||
/**
|
||||
* Get a list of containers that hold ammo
|
||||
* e.g. mod_magazine
|
||||
* @returns string array
|
||||
*/
|
||||
protected getAmmoContainers(): string[];
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||
import { Difficulty, IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -14,6 +14,7 @@ export declare class BotHelper {
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||
getBotDifficultySettings(type: string, difficulty: string): Difficulty;
|
||||
getBotTemplate(role: string): IBotType;
|
||||
getPmcDifficultySettings(type: string, difficulty: string): Difficulty;
|
||||
/**
|
||||
* Randomise the chance the PMC will attack their own side
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { Dialogue, MessageContent, MessagePreview } from "../models/eft/profile/IAkiProfile";
|
||||
import { MessageType } from "../models/enums/MessageType";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
@ -15,7 +16,25 @@ export declare class DialogueHelper {
|
||||
protected itemHelper: ItemHelper;
|
||||
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
|
||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||
/**
|
||||
* Add a templated message to the dialogue.
|
||||
* @param dialogueID
|
||||
* @param messageContent
|
||||
* @param sessionID
|
||||
* @param rewards
|
||||
*/
|
||||
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void;
|
||||
/**
|
||||
* Get the preview contents of the last message in a dialogue.
|
||||
* @param dialogue
|
||||
* @returns
|
||||
*/
|
||||
getMessagePreview(dialogue: Dialogue): MessagePreview;
|
||||
getMessageItemContents(messageID: string, sessionID: string): any[];
|
||||
/**
|
||||
* Get the item contents for a particular message.
|
||||
* @param messageID
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
getMessageItemContents(messageID: string, sessionID: string): Item[];
|
||||
}
|
||||
|
@ -1,27 +0,0 @@
|
||||
import { BotGenerator } from "../generators/BotGenerator";
|
||||
import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { Watermark } from "../utils/Watermark";
|
||||
import { ItemHelper } from "./ItemHelper";
|
||||
import { ProfileHelper } from "./ProfileHelper";
|
||||
/**
|
||||
* This class needs to exist outside of ProfileHelper to ensure cyclic deps don't cause the server to fail on load
|
||||
*/
|
||||
export declare class ExtendedProfileHelper extends ProfileHelper {
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected botGenerator: BotGenerator;
|
||||
constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, botLootCacheService: BotLootCacheService, fenceService: FenceService, botGenerator: BotGenerator);
|
||||
generatePlayerScav(sessionID: string): IPmcData;
|
||||
protected getScavSkills(sessionID: string): Skills;
|
||||
protected removeSecureContainer(profile: IPmcData): IPmcData;
|
||||
protected getDefaultScavSkills(): Skills;
|
||||
protected getScavStats(sessionID: string): Stats;
|
||||
protected getScavLevel(sessionID: string): number;
|
||||
protected getScavExperience(sessionID: string): number;
|
||||
protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Common, HideoutArea, Production, Productive } from "../models/eft/common/tables/IBotBase";
|
||||
import { Upd } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { StageBonus } from "../models/eft/hideout/IHideoutArea";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
@ -64,5 +64,4 @@ export declare class HideoutHelper {
|
||||
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
||||
isProduction(productive: Productive): productive is Production;
|
||||
getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { IPmcData, Victim } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Victim } from "../models/eft/common/tables/IBotBase";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -15,21 +16,72 @@ export declare class InRaidHelper {
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper);
|
||||
/**
|
||||
* Reset the SPT inraid property stored in a profile to 'none'
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
protected removePlayer(sessionID: string): void;
|
||||
/**
|
||||
* Some maps have one-time-use keys (e.g. Labs
|
||||
* Remove the relevant key from an inventory based on the post-raid request data passed in
|
||||
* @param offraidData post-raid data
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||
/**
|
||||
* Check an array of items and add an upd object to money items with a stack count of 1
|
||||
* Single stack money items have no upd object and thus no StackObjectsCount, causing issues
|
||||
* @param items Items array to check
|
||||
*/
|
||||
addUpdToMoneyFromRaid(items: Item[]): void;
|
||||
/**
|
||||
* Add positive karma for PMC kills
|
||||
* @param {*} existingFenceStanding
|
||||
* @param {*} victims
|
||||
* Add karma changes up and return the new value
|
||||
* @param existingFenceStanding Current fence standing level
|
||||
* @param victims Array of kills player performed
|
||||
* @returns adjusted karma level after kills are taken into account
|
||||
*/
|
||||
calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): void;
|
||||
setBaseStats(profileData: IPmcData, offraidData: ISaveProgressRequestData, sessionID: string): IPmcData;
|
||||
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
removeFoundInRaidStatusFromItems(profile: IPmcData): IPmcData;
|
||||
setInventory(sessionID: string, pmcData: IPmcData, profile: IPmcData): IPmcData;
|
||||
calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): number;
|
||||
/**
|
||||
* Reset a profile to a baseline, used post-raid
|
||||
* Reset points earned during session property
|
||||
* Increment exp
|
||||
* Remove Labs keycard
|
||||
* @param profileData Profile to update
|
||||
* @param saveProgressRequest post raid save data request data
|
||||
* @param sessionID Sessino id
|
||||
* @returns Reset profile object
|
||||
*/
|
||||
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData;
|
||||
/**
|
||||
* Adds SpawnedInSession property to items found in a raid
|
||||
* Removes SpawnedInSession for non-scav players if item was taken into raid with SpawnedInSession = true
|
||||
* @param preRaidProfile profile to update
|
||||
* @param postRaidProfile profile to upate inventory contents of
|
||||
* @param isPlayerScav Was this a p scav raid
|
||||
* @returns
|
||||
*/
|
||||
addSpawnedInSessionPropertyToItems(preRaidProfile: IPmcData, postRaidProfile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
/**
|
||||
* Iterate over inventory items and remove the property that defines an item as Found in Raid
|
||||
* Only removes property if item had FiR when entering raid
|
||||
* @param postRaidProfile profile to update items for
|
||||
* @returns Updated profile with SpawnedInSession removed
|
||||
*/
|
||||
removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData;
|
||||
/**
|
||||
* Update a players inventory post-raid
|
||||
* Remove equipped items from pre-raid
|
||||
* Add new items found in raid to profile
|
||||
* Store insurance items in profile
|
||||
* @param sessionID
|
||||
* @param pmcData Profile to update
|
||||
* @param postRaidProfile Profile returned by client after a raid
|
||||
* @returns Updated profile
|
||||
*/
|
||||
setInventory(sessionID: string, pmcData: IPmcData, postRaidProfile: IPmcData): IPmcData;
|
||||
/**
|
||||
* Clear pmc inventory of all items except those that are exempt
|
||||
* Used post-raid to remove items after death
|
||||
* @param pmcData Player profile
|
||||
* @param sessionID Session id
|
||||
* @returns Player profile with pmc inventory cleared
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { InsuredItem } from "../models/eft/common/tables/IBotBase";
|
||||
import { Item, Repairable } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -36,7 +37,7 @@ declare class ItemHelper {
|
||||
* @param {string} baseclassTpl the baseclass to check for
|
||||
* @return {boolean} is the tpl a descendent?
|
||||
*/
|
||||
isOfBaseclass(tpl: string, baseclassTpl: string): any;
|
||||
isOfBaseclass(tpl: string, baseclassTpl: string): boolean;
|
||||
/**
|
||||
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
||||
* found in the handbook. If the price can't be found at all return 0
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { IPmcData, Stats } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Stats } from "../models/eft/common/tables/IBotBase";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
@ -36,4 +37,10 @@ export declare class ProfileHelper {
|
||||
getDefaultCounters(): Stats;
|
||||
protected isWiped(sessionID: string): boolean;
|
||||
protected getServerVersion(): string;
|
||||
/**
|
||||
* Iterate over player profile inventory items and find the secure container and remove it
|
||||
* @param profile Profile to remove secure container from
|
||||
* @returns profile without secure container
|
||||
*/
|
||||
removeSecureContainer(profile: IPmcData): IPmcData;
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { IPmcData, Quest } from "../models/eft/common/IPmcData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||
import { QuestStatus } from "../models/enums/QuestStatus";
|
||||
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
@ -35,8 +36,7 @@ export declare class QuestHelper {
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||
static get STATUS(): Record<string, number>;
|
||||
questStatus(pmcData: IPmcData, questID: string): string;
|
||||
questStatus(pmcData: IPmcData, questID: string): QuestStatus;
|
||||
/**
|
||||
* returns true is the condition is satisfied
|
||||
*/
|
||||
@ -51,8 +51,14 @@ export declare class QuestHelper {
|
||||
dumpQuests(quests: any, label?: any): void;
|
||||
loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean;
|
||||
protected processReward(reward: Reward): any[];
|
||||
getQuestRewardItems(quest: IQuest, state: string): Reward[];
|
||||
addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void;
|
||||
getQuestRewardItems(quest: IQuest, state: QuestStatus): Reward[];
|
||||
/**
|
||||
* Add quest with new state value to pmc profile
|
||||
* @param pmcData profile to add quest to
|
||||
* @param newState state the new quest should be in when added
|
||||
* @param acceptedQuest Details of quest being added
|
||||
*/
|
||||
addQuestToPMCData(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): void;
|
||||
acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[];
|
||||
failedUnlocked(failedQuestId: string, sessionID: string): IQuest[];
|
||||
applyMoneyBoost(quest: IQuest, moneyBoost: number): IQuest;
|
||||
@ -83,6 +89,13 @@ export declare class QuestHelper {
|
||||
*/
|
||||
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
||||
getQuestLocaleIdFromDb(messageId: string): string;
|
||||
/**
|
||||
* Alter a quests state + Add a record to tis status timers object
|
||||
* @param pmcData Profile to update
|
||||
* @param newQuestState new state the qeust should be in
|
||||
* @param questId id of the quest to alter the status of
|
||||
*/
|
||||
updateQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void;
|
||||
/**
|
||||
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks
|
||||
* @param pmcData Player profile
|
||||
@ -91,7 +104,7 @@ export declare class QuestHelper {
|
||||
* @param sessionID Seession id
|
||||
* @returns array of reward objects
|
||||
*/
|
||||
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[];
|
||||
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: QuestStatus, sessionID: string): Reward[];
|
||||
/**
|
||||
* Get the intel center bonus a player has
|
||||
* @param pmcData player profile
|
||||
|
@ -14,7 +14,7 @@ export declare class RepairHelper {
|
||||
protected configServer: ConfigServer;
|
||||
protected repairConfig: IRepairConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item;
|
||||
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean, applyRandomDegradation?: boolean): Item;
|
||||
protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number;
|
||||
protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number;
|
||||
isWeaponTemplate(tpl: string): boolean;
|
||||
|
4
TypeScript/11BundleLoadingSample/types/models/common/MinMax.d.ts
vendored
Normal file
4
TypeScript/11BundleLoadingSample/types/models/common/MinMax.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export interface MinMax {
|
||||
max: number;
|
||||
min: number;
|
||||
}
|
@ -1,347 +1,3 @@
|
||||
import { IRagfairOffer } from "../ragfair/IRagfairOffer";
|
||||
import { IPmcDataRepeatableQuest } from "./tables/IRepeatableQuests";
|
||||
import { Item, Upd } from "./tables/IItem";
|
||||
import { HideoutAreas } from "../../enums/HideoutAreas";
|
||||
import { MemberCategory } from "../../enums/MemberCategory";
|
||||
export interface IPmcData {
|
||||
_id: string;
|
||||
aid: string;
|
||||
savage?: string;
|
||||
Info: Info;
|
||||
Customization: Customization;
|
||||
Health: Health;
|
||||
Inventory: Inventory;
|
||||
Skills: Skills;
|
||||
Stats: Stats;
|
||||
Encyclopedia: Record<string, boolean>;
|
||||
ConditionCounters: ConditionCounters;
|
||||
BackendCounters: Record<string, BackendCounter>;
|
||||
InsuredItems: InsuredItem[];
|
||||
Hideout: Hideout;
|
||||
Bonuses: Bonus[];
|
||||
Notes: Notes;
|
||||
Quests: Quest[];
|
||||
TradersInfo: Record<string, TraderInfo>;
|
||||
RagfairInfo: RagfairInfo;
|
||||
WishList: string[];
|
||||
RepeatableQuests: IPmcDataRepeatableQuest[];
|
||||
CarExtractCounts: CarExtractCounts;
|
||||
SurvivorClass: SurvivorClass;
|
||||
}
|
||||
export interface Info {
|
||||
EntryPoint: string;
|
||||
Nickname: string;
|
||||
LowerNickname: string;
|
||||
Side: string;
|
||||
Voice: string;
|
||||
Level: number;
|
||||
Experience: number;
|
||||
RegistrationDate: number;
|
||||
GameVersion: string;
|
||||
AccountType: number;
|
||||
MemberCategory: MemberCategory;
|
||||
lockedMoveCommands: boolean;
|
||||
SavageLockTime: number;
|
||||
LastTimePlayedAsSavage: number;
|
||||
Settings: Settings;
|
||||
NicknameChangeDate: number;
|
||||
IsStreamerModeAvailable: boolean;
|
||||
Bans: IBan[];
|
||||
BannedState: boolean;
|
||||
BannedUntil: number;
|
||||
NeedWipeOptions: any[];
|
||||
lastCompletedWipe: LastCompleted;
|
||||
lastCompletedEvent?: LastCompleted;
|
||||
}
|
||||
export interface Settings {
|
||||
Role: string;
|
||||
BotDifficulty: string;
|
||||
Experience: number;
|
||||
StandingForKill: number;
|
||||
AggressorBonus: number;
|
||||
}
|
||||
export interface IBan {
|
||||
type: BanType;
|
||||
dateTime: number;
|
||||
}
|
||||
export declare enum BanType {
|
||||
Chat = 0,
|
||||
RagFair = 1,
|
||||
Voip = 2,
|
||||
Trading = 3,
|
||||
Online = 4,
|
||||
Friends = 5,
|
||||
ChangeNickname = 6
|
||||
}
|
||||
export interface Notes {
|
||||
Notes: Note[];
|
||||
}
|
||||
export interface Note {
|
||||
Time: number;
|
||||
Text: string;
|
||||
}
|
||||
export interface Customization {
|
||||
Head: string;
|
||||
Body: string;
|
||||
Feet: string;
|
||||
Hands: string;
|
||||
}
|
||||
export interface Health {
|
||||
Hydration: CurrentMax;
|
||||
Energy: CurrentMax;
|
||||
Temperature: CurrentMax;
|
||||
BodyParts: BodyPartsHealth;
|
||||
UpdateTime: number;
|
||||
}
|
||||
export interface BodyPartsHealth {
|
||||
Head: BodyPartHealth;
|
||||
Chest: BodyPartHealth;
|
||||
Stomach: BodyPartHealth;
|
||||
LeftArm: BodyPartHealth;
|
||||
RightArm: BodyPartHealth;
|
||||
LeftLeg: BodyPartHealth;
|
||||
RightLeg: BodyPartHealth;
|
||||
}
|
||||
export interface BodyPartHealth {
|
||||
Health: CurrentMax;
|
||||
Effects?: Record<string, number>;
|
||||
}
|
||||
export interface CurrentMax {
|
||||
Current: number;
|
||||
Maximum: number;
|
||||
}
|
||||
export interface Inventory {
|
||||
items: Item[];
|
||||
equipment: string;
|
||||
stash: string;
|
||||
sortingTable: string;
|
||||
questRaidItems: string;
|
||||
questStashItems: string;
|
||||
fastPanel: FastPanel;
|
||||
}
|
||||
export interface FastPanel {
|
||||
}
|
||||
export interface Skills {
|
||||
Common: Common[];
|
||||
Mastering: Mastering[];
|
||||
Bonuses?: any[];
|
||||
Points: number;
|
||||
}
|
||||
export interface Common {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
PointsEarnedDuringSession: number;
|
||||
LastAccess: number;
|
||||
}
|
||||
export interface Mastering {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
}
|
||||
export interface Stats {
|
||||
CarriedQuestItems: string[];
|
||||
Victims: Victim[];
|
||||
TotalSessionExperience: number;
|
||||
LastSessionDate: number;
|
||||
SessionCounters: SessionCounters;
|
||||
OverallCounters: OverallCounters;
|
||||
SessionExperienceMult?: number;
|
||||
ExperienceBonusMult?: number;
|
||||
Aggressor?: Aggressor;
|
||||
DroppedItems?: IDroppedItem[];
|
||||
FoundInRaidItems?: FoundInRaidItem[];
|
||||
DamageHistory?: DamageHistory;
|
||||
DeathCause?: DeathCause;
|
||||
LastPlayerState?: LastPlayerState;
|
||||
TotalInGameTime: number;
|
||||
SurvivorClass?: string;
|
||||
}
|
||||
export interface IDroppedItem {
|
||||
QuestId: string;
|
||||
ItemId: string;
|
||||
ZoneId: string;
|
||||
}
|
||||
export interface FoundInRaidItem {
|
||||
QuestId: string;
|
||||
ItemId: string;
|
||||
}
|
||||
export interface Victim {
|
||||
AccountId: string;
|
||||
ProfileId: string;
|
||||
Name: string;
|
||||
Side: string;
|
||||
BodyPart: string;
|
||||
Time: string;
|
||||
Distance: number;
|
||||
Level: number;
|
||||
Weapon: string;
|
||||
Role: string;
|
||||
}
|
||||
export interface SessionCounters {
|
||||
Items: CounterKeyValue[];
|
||||
}
|
||||
export interface OverallCounters {
|
||||
Items: CounterKeyValue[];
|
||||
}
|
||||
export interface CounterKeyValue {
|
||||
Key: string[];
|
||||
Value: number;
|
||||
}
|
||||
export interface Aggressor {
|
||||
AccountId: string;
|
||||
ProfileId: string;
|
||||
MainProfileNickname: string;
|
||||
Name: string;
|
||||
Side: string;
|
||||
BodyPart: string;
|
||||
HeadSegment: string;
|
||||
WeaponName: string;
|
||||
Category: string;
|
||||
}
|
||||
export interface DamageHistory {
|
||||
LethalDamagePart: string;
|
||||
LethalDamage: LethalDamage;
|
||||
BodyParts: BodyPartsDamageHistory;
|
||||
}
|
||||
export interface LethalDamage {
|
||||
Amount: number;
|
||||
Type: string;
|
||||
SourceId: string;
|
||||
OverDamageFrom: string;
|
||||
Blunt: boolean;
|
||||
ImpactsCount: number;
|
||||
}
|
||||
export interface BodyPartsDamageHistory {
|
||||
Head: DamageStats[];
|
||||
Chest: DamageStats[];
|
||||
Stomach: DamageStats[];
|
||||
LeftArm: DamageStats[];
|
||||
RightArm: DamageStats[];
|
||||
LeftLeg: DamageStats[];
|
||||
RightLeg: DamageStats[];
|
||||
Common: DamageStats[];
|
||||
}
|
||||
export interface DamageStats {
|
||||
Amount: number;
|
||||
Type: string;
|
||||
SourceId: string;
|
||||
OverDamageFrom: string;
|
||||
Blunt: boolean;
|
||||
ImpactsCount: number;
|
||||
}
|
||||
export interface DeathCause {
|
||||
DamageType: string;
|
||||
Side: string;
|
||||
Role: string;
|
||||
WeaponId: string;
|
||||
}
|
||||
export interface LastPlayerState {
|
||||
Info: LastPlayerStateInfo;
|
||||
Customization: Record<string, string>;
|
||||
Equipment: any;
|
||||
}
|
||||
export interface LastPlayerStateInfo {
|
||||
Nickname: string;
|
||||
Side: string;
|
||||
Level: number;
|
||||
MemberCategory: string;
|
||||
}
|
||||
export interface ConditionCounters {
|
||||
Counters: Counter[];
|
||||
}
|
||||
export interface Counter {
|
||||
id: string;
|
||||
value: number;
|
||||
qid: string;
|
||||
}
|
||||
export interface BackendCounter {
|
||||
id: string;
|
||||
qid?: string;
|
||||
value: number;
|
||||
}
|
||||
export interface InsuredItem {
|
||||
tid: string;
|
||||
itemId: string;
|
||||
}
|
||||
export interface Hideout {
|
||||
Production: Record<string, Productive>;
|
||||
Areas: HideoutArea[];
|
||||
}
|
||||
export interface Productive {
|
||||
Products: Product[];
|
||||
Progress?: number;
|
||||
inProgress?: boolean;
|
||||
StartTimestamp?: number;
|
||||
}
|
||||
export interface Product {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd?: Upd;
|
||||
}
|
||||
export interface ScavCase extends Productive {
|
||||
}
|
||||
export interface Production extends Productive {
|
||||
RecipeId: string;
|
||||
SkipTime: number;
|
||||
ProductionTime: number;
|
||||
}
|
||||
export interface HideoutArea {
|
||||
type: HideoutAreas;
|
||||
level: number;
|
||||
active: boolean;
|
||||
passiveBonusesEnabled: boolean;
|
||||
completeTime: number;
|
||||
constructing: boolean;
|
||||
slots: HideoutSlot[];
|
||||
lastRecipe: string;
|
||||
}
|
||||
export interface HideoutSlot {
|
||||
item: HideoutItem[];
|
||||
}
|
||||
export interface HideoutItem {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd?: Upd;
|
||||
}
|
||||
export interface Bonus {
|
||||
type: string;
|
||||
templateId?: string;
|
||||
passive?: boolean;
|
||||
production?: boolean;
|
||||
visible?: boolean;
|
||||
value?: number;
|
||||
icon?: string;
|
||||
}
|
||||
export interface Quest {
|
||||
qid: string;
|
||||
startTime: number;
|
||||
status: string;
|
||||
statusTimers?: StatusTimer;
|
||||
completedConditions?: string[];
|
||||
}
|
||||
export interface StatusTimer {
|
||||
AvailableForStart?: number;
|
||||
}
|
||||
export interface TraderInfo {
|
||||
loyaltyLevel: number;
|
||||
salesSum: number;
|
||||
standing: number;
|
||||
nextResupply: number;
|
||||
unlocked: boolean;
|
||||
}
|
||||
export interface RagfairInfo {
|
||||
rating: number;
|
||||
isRatingGrowing: boolean;
|
||||
offers: IRagfairOffer[];
|
||||
}
|
||||
export interface CarExtractCounts {
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
Unknown = 0,
|
||||
Neutralizer = 1,
|
||||
Marauder = 2,
|
||||
Paramedic = 3,
|
||||
Survivor = 4
|
||||
}
|
||||
export interface LastCompleted {
|
||||
$oid: string;
|
||||
import { IBotBase } from "./tables/IBotBase";
|
||||
export interface IPmcData extends IBotBase {
|
||||
}
|
||||
|
@ -1,23 +1,36 @@
|
||||
import { BackendCounter, Bonus } from "../IPmcData";
|
||||
import { Item } from "./IItem";
|
||||
import { HideoutAreas } from "../../../enums/HideoutAreas";
|
||||
import { MemberCategory } from "../../../enums/MemberCategory";
|
||||
import { QuestStatus } from "../../../enums/QuestStatus";
|
||||
import { IRagfairOffer } from "../../ragfair/IRagfairOffer";
|
||||
import { Item, Upd } from "./IItem";
|
||||
import { IPmcDataRepeatableQuest } from "./IRepeatableQuests";
|
||||
export interface IBotBase {
|
||||
_id: string;
|
||||
aid: string;
|
||||
savage: any;
|
||||
savage?: string;
|
||||
Info: Info;
|
||||
Customization: Customization;
|
||||
Health: Health;
|
||||
Inventory: Inventory;
|
||||
Skills: Skills;
|
||||
Stats: Stats;
|
||||
Encyclopedia: any;
|
||||
Encyclopedia: Record<string, boolean>;
|
||||
ConditionCounters: ConditionCounters;
|
||||
BackendCounters: Record<string, BackendCounter>;
|
||||
InsuredItems: any[];
|
||||
InsuredItems: InsuredItem[];
|
||||
Hideout: Hideout;
|
||||
Quests: Quest[];
|
||||
TradersInfo: Record<string, TraderInfo>;
|
||||
RagfairInfo: RagfairInfo;
|
||||
RepeatableQuests: IPmcDataRepeatableQuest[];
|
||||
Bonuses: Bonus[];
|
||||
Notes: Notes;
|
||||
CarExtractCounts: CarExtractCounts;
|
||||
SurvivorClass: SurvivorClass;
|
||||
WishList: string[];
|
||||
}
|
||||
export interface Info {
|
||||
EntryPoint: string;
|
||||
Nickname: string;
|
||||
LowerNickname: string;
|
||||
Side: string;
|
||||
@ -27,17 +40,19 @@ export interface Info {
|
||||
RegistrationDate: number;
|
||||
GameVersion: string;
|
||||
AccountType: number;
|
||||
MemberCategory: number;
|
||||
MemberCategory: MemberCategory;
|
||||
lockedMoveCommands: boolean;
|
||||
SavageLockTime: number;
|
||||
LastTimePlayedAsSavage: number;
|
||||
Settings: Settings;
|
||||
NicknameChangeDate: number;
|
||||
NeedWipeOptions: any[];
|
||||
lastCompletedWipe: any;
|
||||
lastCompletedWipe: LastCompleted;
|
||||
Bans: IBan[];
|
||||
BannedState: boolean;
|
||||
BannedUntil: number;
|
||||
IsStreamerModeAvailable: boolean;
|
||||
lastCompletedEvent?: LastCompleted;
|
||||
}
|
||||
export interface Settings {
|
||||
Role: string;
|
||||
@ -46,6 +61,19 @@ export interface Settings {
|
||||
StandingForKill: number;
|
||||
AggressorBonus: number;
|
||||
}
|
||||
export interface IBan {
|
||||
type: BanType;
|
||||
dateTime: number;
|
||||
}
|
||||
export declare enum BanType {
|
||||
Chat = 0,
|
||||
RagFair = 1,
|
||||
Voip = 2,
|
||||
Trading = 3,
|
||||
Online = 4,
|
||||
Friends = 5,
|
||||
ChangeNickname = 6
|
||||
}
|
||||
export interface Customization {
|
||||
Head: string;
|
||||
Body: string;
|
||||
@ -53,6 +81,28 @@ export interface Customization {
|
||||
Hands: string;
|
||||
}
|
||||
export interface Health {
|
||||
Hydration: CurrentMax;
|
||||
Energy: CurrentMax;
|
||||
Temperature: CurrentMax;
|
||||
BodyParts: BodyPartsHealth;
|
||||
UpdateTime: number;
|
||||
}
|
||||
export interface BodyPartsHealth {
|
||||
Head: BodyPartHealth;
|
||||
Chest: BodyPartHealth;
|
||||
Stomach: BodyPartHealth;
|
||||
LeftArm: BodyPartHealth;
|
||||
RightArm: BodyPartHealth;
|
||||
LeftLeg: BodyPartHealth;
|
||||
RightLeg: BodyPartHealth;
|
||||
}
|
||||
export interface BodyPartHealth {
|
||||
Health: CurrentMax;
|
||||
Effects?: Record<string, number>;
|
||||
}
|
||||
export interface CurrentMax {
|
||||
Current: number;
|
||||
Maximum: number;
|
||||
}
|
||||
export interface Inventory {
|
||||
items: Item[];
|
||||
@ -66,36 +116,238 @@ export interface Inventory {
|
||||
export interface FastPanel {
|
||||
}
|
||||
export interface Skills {
|
||||
Common: any[];
|
||||
Mastering: any[];
|
||||
Common: Common[];
|
||||
Mastering: Mastering[];
|
||||
Bonuses?: any[];
|
||||
Points: number;
|
||||
}
|
||||
export interface Common {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
PointsEarnedDuringSession?: number;
|
||||
LastAccess?: number;
|
||||
max?: number;
|
||||
min?: number;
|
||||
}
|
||||
export interface Mastering {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
max?: number;
|
||||
min?: number;
|
||||
}
|
||||
export interface Stats {
|
||||
CarriedQuestItems: string[];
|
||||
Victims: Victim[];
|
||||
TotalSessionExperience: number;
|
||||
LastSessionDate: number;
|
||||
SessionCounters: SessionCounters;
|
||||
OverallCounters: OverallCounters;
|
||||
SessionExperienceMult?: number;
|
||||
ExperienceBonusMult?: number;
|
||||
Aggressor?: Aggressor;
|
||||
DroppedItems?: IDroppedItem[];
|
||||
FoundInRaidItems?: FoundInRaidItem[];
|
||||
DamageHistory?: DamageHistory;
|
||||
DeathCause?: DeathCause;
|
||||
LastPlayerState?: LastPlayerState;
|
||||
TotalInGameTime: number;
|
||||
SurvivorClass?: string;
|
||||
}
|
||||
export interface IDroppedItem {
|
||||
QuestId: string;
|
||||
ItemId: string;
|
||||
ZoneId: string;
|
||||
}
|
||||
export interface FoundInRaidItem {
|
||||
QuestId: string;
|
||||
ItemId: string;
|
||||
}
|
||||
export interface Victim {
|
||||
AccountId: string;
|
||||
ProfileId: string;
|
||||
Name: string;
|
||||
Side: string;
|
||||
BodyPart: string;
|
||||
Time: string;
|
||||
Distance: number;
|
||||
Level: number;
|
||||
Weapon: string;
|
||||
Role: string;
|
||||
}
|
||||
export interface SessionCounters {
|
||||
Items: any[];
|
||||
Items: CounterKeyValue[];
|
||||
}
|
||||
export interface OverallCounters {
|
||||
Items: any[];
|
||||
Items: CounterKeyValue[];
|
||||
}
|
||||
export interface CounterKeyValue {
|
||||
Key: string[];
|
||||
Value: number;
|
||||
}
|
||||
export interface ConditionCounters {
|
||||
Counters: any[];
|
||||
Counters: Counter[];
|
||||
}
|
||||
export interface Counter {
|
||||
id: string;
|
||||
value: number;
|
||||
qid: string;
|
||||
}
|
||||
export interface Aggressor {
|
||||
AccountId: string;
|
||||
ProfileId: string;
|
||||
MainProfileNickname: string;
|
||||
Name: string;
|
||||
Side: string;
|
||||
BodyPart: string;
|
||||
HeadSegment: string;
|
||||
WeaponName: string;
|
||||
Category: string;
|
||||
}
|
||||
export interface DamageHistory {
|
||||
LethalDamagePart: string;
|
||||
LethalDamage: LethalDamage;
|
||||
BodyParts: BodyPartsDamageHistory;
|
||||
}
|
||||
export interface LethalDamage {
|
||||
Amount: number;
|
||||
Type: string;
|
||||
SourceId: string;
|
||||
OverDamageFrom: string;
|
||||
Blunt: boolean;
|
||||
ImpactsCount: number;
|
||||
}
|
||||
export interface BodyPartsDamageHistory {
|
||||
Head: DamageStats[];
|
||||
Chest: DamageStats[];
|
||||
Stomach: DamageStats[];
|
||||
LeftArm: DamageStats[];
|
||||
RightArm: DamageStats[];
|
||||
LeftLeg: DamageStats[];
|
||||
RightLeg: DamageStats[];
|
||||
Common: DamageStats[];
|
||||
}
|
||||
export interface DamageStats {
|
||||
Amount: number;
|
||||
Type: string;
|
||||
SourceId: string;
|
||||
OverDamageFrom: string;
|
||||
Blunt: boolean;
|
||||
ImpactsCount: number;
|
||||
}
|
||||
export interface DeathCause {
|
||||
DamageType: string;
|
||||
Side: string;
|
||||
Role: string;
|
||||
WeaponId: string;
|
||||
}
|
||||
export interface LastPlayerState {
|
||||
Info: LastPlayerStateInfo;
|
||||
Customization: Record<string, string>;
|
||||
Equipment: any;
|
||||
}
|
||||
export interface LastPlayerStateInfo {
|
||||
Nickname: string;
|
||||
Side: string;
|
||||
Level: number;
|
||||
MemberCategory: string;
|
||||
}
|
||||
export interface BackendCounter {
|
||||
id: string;
|
||||
qid?: string;
|
||||
value: number;
|
||||
}
|
||||
export interface InsuredItem {
|
||||
tid: string;
|
||||
itemId: string;
|
||||
}
|
||||
export interface Hideout {
|
||||
Production: Production;
|
||||
Areas: Area[];
|
||||
Production: Record<string, Productive>;
|
||||
Areas: HideoutArea[];
|
||||
}
|
||||
export interface Production {
|
||||
export interface Productive {
|
||||
Products: Product[];
|
||||
Progress?: number;
|
||||
inProgress?: boolean;
|
||||
StartTimestamp?: number;
|
||||
}
|
||||
export interface Area {
|
||||
type: number;
|
||||
export interface Production extends Productive {
|
||||
RecipeId: string;
|
||||
SkipTime: number;
|
||||
ProductionTime: number;
|
||||
}
|
||||
export interface ScavCase extends Productive {
|
||||
RecipeId: string;
|
||||
}
|
||||
export interface Product {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd?: Upd;
|
||||
}
|
||||
export interface HideoutArea {
|
||||
type: HideoutAreas;
|
||||
level: number;
|
||||
active: boolean;
|
||||
passiveBonusesEnabled: boolean;
|
||||
completeTime: number;
|
||||
constructing: boolean;
|
||||
slots: any[];
|
||||
lastRecipe: any;
|
||||
slots: HideoutSlot[];
|
||||
lastRecipe: string;
|
||||
}
|
||||
export interface HideoutSlot {
|
||||
/** SPT specific value to keep track of what index this slot is (0,1,2,3 etc) */
|
||||
locationIndex: number;
|
||||
item?: HideoutItem[];
|
||||
}
|
||||
export interface HideoutItem {
|
||||
_id: string;
|
||||
_tpl: string;
|
||||
upd?: Upd;
|
||||
}
|
||||
export interface LastCompleted {
|
||||
$oid: string;
|
||||
}
|
||||
export interface Notes {
|
||||
Notes: Note[];
|
||||
}
|
||||
export interface CarExtractCounts {
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
Unknown = 0,
|
||||
Neutralizer = 1,
|
||||
Marauder = 2,
|
||||
Paramedic = 3,
|
||||
Survivor = 4
|
||||
}
|
||||
export interface Quest {
|
||||
qid: string;
|
||||
startTime: number;
|
||||
status: QuestStatus;
|
||||
statusTimers?: Record<string, number>;
|
||||
/** SPT specific property */
|
||||
completedConditions?: string[];
|
||||
}
|
||||
export interface TraderInfo {
|
||||
loyaltyLevel: number;
|
||||
salesSum: number;
|
||||
standing: number;
|
||||
nextResupply: number;
|
||||
unlocked: boolean;
|
||||
}
|
||||
export interface RagfairInfo {
|
||||
rating: number;
|
||||
isRatingGrowing: boolean;
|
||||
offers: IRagfairOffer[];
|
||||
}
|
||||
export interface Bonus {
|
||||
type: string;
|
||||
templateId?: string;
|
||||
passive?: boolean;
|
||||
production?: boolean;
|
||||
visible?: boolean;
|
||||
value?: number;
|
||||
icon?: string;
|
||||
}
|
||||
export interface Note {
|
||||
Time: number;
|
||||
Text: string;
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { MinMax } from "../../../common/MinMax";
|
||||
import { Skills } from "./IBotBase";
|
||||
export interface IBotType {
|
||||
appearance: Appearance;
|
||||
chances: Chances;
|
||||
@ -121,12 +123,9 @@ export interface BodyPart {
|
||||
RightLeg: MinMax;
|
||||
Stomach: MinMax;
|
||||
}
|
||||
export interface MinMax {
|
||||
max: number;
|
||||
min: number;
|
||||
}
|
||||
export interface Inventory {
|
||||
equipment: Equipment;
|
||||
Ammo: Record<string, Record<string, number>>;
|
||||
items: Items;
|
||||
mods: Mods;
|
||||
}
|
||||
@ -154,23 +153,3 @@ export interface Items {
|
||||
TacticalVest: string[];
|
||||
}
|
||||
export declare type Mods = Record<string, Record<string, string[]>>;
|
||||
export interface Skills {
|
||||
Common: Common[];
|
||||
Bonuses?: any;
|
||||
Mastering: Mastering[];
|
||||
Points: number;
|
||||
}
|
||||
export interface Mastering {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
max?: number;
|
||||
min?: number;
|
||||
}
|
||||
export interface Common {
|
||||
Id: string;
|
||||
Progress: number;
|
||||
PointsEarnedDuringSession?: number;
|
||||
LastAccess?: number;
|
||||
max?: number;
|
||||
min?: number;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { MinMax } from "../../common/MinMax";
|
||||
export interface IHideoutScavCase {
|
||||
_id: string;
|
||||
ProductionTime: number;
|
||||
@ -15,7 +16,3 @@ export interface EndProducts {
|
||||
Rare: MinMax;
|
||||
Superrare: MinMax;
|
||||
}
|
||||
export interface MinMax {
|
||||
min: string;
|
||||
max: string;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Skills } from "../common/IPmcData";
|
||||
import { Skills } from "../common/tables/IBotBase";
|
||||
import { Item, Upd } from "../common/tables/IItem";
|
||||
import { IQuest } from "../common/tables/IQuest";
|
||||
import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Skills } from "../common/IPmcData";
|
||||
import { Skills } from "../common/tables/IBotBase";
|
||||
export interface IPlayerIncrementSkillLevelRequestData {
|
||||
_id: string;
|
||||
experience: number;
|
||||
|
@ -49,16 +49,16 @@ export interface Message {
|
||||
uid: string;
|
||||
type: MessageType;
|
||||
dt: number;
|
||||
localDateTime: number;
|
||||
UtcDateTime?: number;
|
||||
Member?: IUpdatableChatMember;
|
||||
templateId: string;
|
||||
text?: string;
|
||||
hasRewards: boolean;
|
||||
rewardCollected: boolean;
|
||||
items: Items;
|
||||
items: MessageItems;
|
||||
maxStorageTime?: number;
|
||||
systemData?: ISystemData;
|
||||
profileChangeEvents?: any[];
|
||||
}
|
||||
export interface MessagePreview {
|
||||
uid: string;
|
||||
@ -67,7 +67,7 @@ export interface MessagePreview {
|
||||
templateId: string;
|
||||
text?: string;
|
||||
}
|
||||
export interface Items {
|
||||
export interface MessageItems {
|
||||
stash?: string;
|
||||
data?: Item[];
|
||||
}
|
||||
@ -153,15 +153,11 @@ export interface MessageContent {
|
||||
templateId: string;
|
||||
type: MessageType;
|
||||
maxStorageTime?: number;
|
||||
systemData?: MessageContentData;
|
||||
profileChangeEvents?: any[];
|
||||
systemData?: ISystemData;
|
||||
}
|
||||
export interface MessageContentRagfair {
|
||||
offerId: string;
|
||||
count: number;
|
||||
handbookId: string;
|
||||
}
|
||||
export interface MessageContentData {
|
||||
date: string;
|
||||
time: string;
|
||||
location: string;
|
||||
}
|
||||
|
208
TypeScript/11BundleLoadingSample/types/models/enums/AmmoTypes.d.ts
vendored
Normal file
208
TypeScript/11BundleLoadingSample/types/models/enums/AmmoTypes.d.ts
vendored
Normal file
@ -0,0 +1,208 @@
|
||||
export declare enum Grenade {
|
||||
M386_HE_GRENADE = "5ede475b549eed7c6d5c18fb",
|
||||
M576_MP_APERS_GRENADE = "5ede475339ee016e8c534742",
|
||||
M433_HEDP_GRENADE = "5f0c892565703e5c461894e9",
|
||||
M406_HE_GRENADE = "5ede4739e0350d05467f73e8",
|
||||
M381_HE_GRENADE = "5ede474b0c226a66f5402622",
|
||||
M441_HE_GRENADE = "5ede47405b097655935d7d16"
|
||||
}
|
||||
export declare enum Ammo762x51 {
|
||||
M62_TRACER = "5a608bf24f39f98ffc77720e",
|
||||
M80 = "58dd3ad986f77403051cba8f",
|
||||
M61 = "5a6086ea4f39f99cd479502f",
|
||||
BCP_FMJ = "5e023e53d4353e3302577c4c",
|
||||
ULTRA_NOSLER = "5e023e88277cce2b522ff2b1",
|
||||
TCW_SP = "5e023e6e34d52a55c3304f71",
|
||||
M993 = "5efb0c1bd79ff02a1f5e68d9"
|
||||
}
|
||||
export declare enum Ammo762x54 {
|
||||
SNB_GZH = "560d61e84bdc2da74d8b4571",
|
||||
LPS_GZH = "5887431f2459777e1612938f",
|
||||
PS_GZH = "59e77a2386f7742ee578960a",
|
||||
T46M_GZH = "5e023cf8186a883be655e54f",
|
||||
BT_GZH = "5e023d34e8a400319a28ed44",
|
||||
BS_GZH = "5e023d48186a883be655e551"
|
||||
}
|
||||
export declare enum Ammo338Lapua {
|
||||
TAC_X = "5fc382b6d6fa9c00c571bbc3",
|
||||
UCW = "5fc382c1016cce60e8341b20",
|
||||
AP = "5fc382a9d724d907e2077dab",
|
||||
FMJ = "5fc275cf85fd526b824a571a"
|
||||
}
|
||||
export declare enum Ammo46x30 {
|
||||
AP_SX = "5ba26835d4351e0035628ff5",
|
||||
ACTION_SX = "5ba26812d4351e003201fef1",
|
||||
FMJ_SX = "5ba2678ad4351e44f824b344",
|
||||
SUBSONIC_SX = "5ba26844d4351e00334c9475"
|
||||
}
|
||||
export declare enum Ammo57x28 {
|
||||
SS198LF = "5cc80f79e4a949033c7343b2",
|
||||
R37_F = "5cc86832d7f00c000d3a6e6c",
|
||||
SS190 = "5cc80f38e4a949001152b560",
|
||||
R37_X = "5cc86840d7f00c002412c56c",
|
||||
L191 = "5cc80f53e4a949000e1ea4f8",
|
||||
SS197SR = "5cc80f8fe4a949033b0224a2",
|
||||
SB193 = "5cc80f67e4a949035e43bbba"
|
||||
}
|
||||
export declare enum Ammo762x25 {
|
||||
FMJ43 = "5735ff5c245977640e39ba7e",
|
||||
LRN = "573601b42459776410737435",
|
||||
P_GL = "5736026a245977644601dc61",
|
||||
PST_GZH = "573603562459776430731618",
|
||||
LRNPC = "573602322459776445391df1",
|
||||
AKBS = "5735fdcd2459776445391d61",
|
||||
PT_GZH = "573603c924597764442bd9cb"
|
||||
}
|
||||
export declare enum Ammo9x18 {
|
||||
PM_SP8_GZH = "5737218f245977612125ba51",
|
||||
P_GZH = "573719762459775a626ccbc1",
|
||||
PSTM_GZH = "57371aab2459775a77142f22",
|
||||
RG028_GZH = "573720e02459776143012541",
|
||||
BZHT_GZH = "573718ba2459775a75491131",
|
||||
PM_PSV = "5737207f24597760ff7b25f2",
|
||||
SP7_GZH = "57372140245977611f70ee91",
|
||||
PBM_GZH = "573719df2459775a626ccbc2",
|
||||
PSO_GZH = "57371f8d24597761006c6a81",
|
||||
PST_GZH = "5737201124597760fc4431f1",
|
||||
PS_GS_PPO = "57371f2b24597761224311f1",
|
||||
PRS_GS = "57371eb62459776125652ac1",
|
||||
PPT_GZH = "57371e4124597760ff7b25f1",
|
||||
PPE_GZH = "57371b192459775a9f58a5e0"
|
||||
}
|
||||
export declare enum Ammo9x19 {
|
||||
PSO_GZH = "58864a4f2459770fcc257101",
|
||||
PST_GZH = "56d59d3ad2720bdb418b4577",
|
||||
GREEN_TRACER = "5c3df7d588a4501f290594e5",
|
||||
RIP = "5c0d56a986f774449d5de529",
|
||||
AP_63 = "5c925fa22e221601da359b7b",
|
||||
LUGER_CCI = "5a3c16fe86f77452b62de32a",
|
||||
PBP_GZH = "5efb0da7a29a85116f6ea05f",
|
||||
QUAKEMAKER = "5efb0e16aeb21837e749c7ff"
|
||||
}
|
||||
export declare enum Ammo9x21 {
|
||||
P_GZH = "5a26abfac4a28232980eabff",
|
||||
PS_GZH = "5a269f97c4a282000b151807",
|
||||
PE_GZH = "5a26ac06c4a282000c5a90a8",
|
||||
BT_GZH = "5a26ac0ec4a28200741e1e18"
|
||||
}
|
||||
export declare enum Ammo357Mag {
|
||||
FMJ = "62330b3ed4dc74626d570b95",
|
||||
HOLLOW_POINT = "62330bfadc5883093563729b",
|
||||
SOFT_POINT = "62330c40bdd19b369e1e53d1",
|
||||
JACKET_HP = "62330c18744e5e31df12f516"
|
||||
}
|
||||
export declare enum Ammo45ACP {
|
||||
MATCH_FMJ = "5e81f423763d9f754677bf2e",
|
||||
HYDRA_SHOK = "5efb0fc6aeb21837e749c801",
|
||||
LASERMATCH_FMJ = "5efb0d4f4bc50b58e81710f3",
|
||||
AP = "5efb0cabfb3e451d70735af5",
|
||||
RIP = "5ea2a8e200685063ec28c05a"
|
||||
}
|
||||
export declare enum Ammo545x39 {
|
||||
PS_GS = "56dff3afd2720bba668b4567",
|
||||
SP = "56dff421d2720b5f5a8b4567",
|
||||
PPBS_GS_IGOLNIK = "5c0d5e4486f77478390952fe",
|
||||
BS_7N40 = "61962b617c6c7b169525f168",
|
||||
PRS_GS = "56dff338d2720bbd668b4569",
|
||||
BT_GS = "56dff061d2720bb5668b4567",
|
||||
US_GS = "56dff4ecd2720b5f5a8b4568",
|
||||
BP_GS = "56dfef82d2720bbd668b4567",
|
||||
HP = "56dff216d2720bbd668b4568",
|
||||
BS_GS = "56dff026d2720bb8668b4567",
|
||||
T_GS = "56dff4a2d2720bbd668b456a",
|
||||
PP_GS = "56dff2ced2720bb4668b4567",
|
||||
FMJ = "56dff0bed2720bb0668b4567"
|
||||
}
|
||||
export declare enum Ammo556x45 {
|
||||
M856 = "59e68f6f86f7746c9f75e846",
|
||||
MK255_MOD_0_RRLP = "59e6918f86f7746c9f75e849",
|
||||
M995 = "59e690b686f7746c9f75e848",
|
||||
M855A1 = "54527ac44bdc2d36668b4567",
|
||||
M856A1 = "59e6906286f7746c9f75e847",
|
||||
M855 = "54527a984bdc2d4e668b4567",
|
||||
HP = "59e6927d86f77411da468256",
|
||||
FMJ = "59e6920f86f77411d82aa167",
|
||||
WARMAGEDDON = "5c0d5ae286f7741e46554302",
|
||||
MK_318_MOD_0_SOST = "60194943740c5d77f6705eea",
|
||||
SSA_AP = "601949593ae8f707c4608daa"
|
||||
}
|
||||
export declare enum Ammo300Blackout {
|
||||
M62_TRACER = "619636be6db0f2477964e710",
|
||||
BCP_FMJ = "5fbe3ffdf8b6a877a729ea82",
|
||||
AP = "5fd20ff893a8961fc660a954",
|
||||
V_MAX = "6196364158ef8c428c287d9f",
|
||||
WHISPER = "6196365d58ef8c428c287da1"
|
||||
}
|
||||
export declare enum Ammo762x39 {
|
||||
PS_GZH = "5656d7c34bdc2d9d198b4587",
|
||||
HP = "59e4d3d286f774176a36250a",
|
||||
US_GZH = "59e4d24686f7741776641ac7",
|
||||
T45M1_GZH = "59e4cf5286f7741778269d8a",
|
||||
BP_GZH = "59e0d99486f7744a32234762",
|
||||
MAI_AP = "601aa3d2b2bcb34913271e6d"
|
||||
}
|
||||
export declare enum Ammo9x39 {
|
||||
SP5_GS = "57a0dfb82459774d3078b56c",
|
||||
BP_GS = "5c0d688c86f77413ae3407b2",
|
||||
SP6_GS = "57a0e5022459774d1673f889",
|
||||
SPP_GS = "5c0d668f86f7747ccb7f13b2",
|
||||
PAB9_GS = "61962d879bb3d20b0946d385"
|
||||
}
|
||||
export declare enum Ammo366TKM {
|
||||
FMJ = "59e6542b86f77411dc52a77a",
|
||||
GEKSA = "59e6658b86f77411d949b250",
|
||||
EKO = "59e655cb86f77411dc52a77b",
|
||||
APM = "5f0596629e22f464da6bbdd9"
|
||||
}
|
||||
export declare enum Ammo127x55 {
|
||||
PS12 = "5cadf6ddae9215051e1c23b2",
|
||||
PS12B = "5cadf6eeae921500134b2799",
|
||||
PS12A = "5cadf6e5ae921500113bb973"
|
||||
}
|
||||
export declare enum Ammo12Gauge {
|
||||
BUCKSHOT_7MM = "560d5e524bdc2d25448b4571",
|
||||
MAGNUM_85MM = "5d6e6806a4b936088465b17e",
|
||||
RIP = "5c0d591486f7744c505b416f",
|
||||
BMG_SLUG_50CAL = "5d6e68c4a4b9361b93413f79",
|
||||
BUCKSHOT_525MM = "5d6e6772a4b936088465b17c",
|
||||
EXPRESS_65MM = "5d6e67fba4b9361bc73bc779",
|
||||
FLECHETTE = "5d6e6911a4b9361bd5780d52",
|
||||
FTX_CUSTOM_LITE_SLUG = "5d6e68e6a4b9361c140bcfe0",
|
||||
AP20_ARMOR_PIERCING_SLUG = "5d6e68a8a4b9360b6c0d54e2",
|
||||
DUAL_SABOT_SLUG = "5d6e68dea4b9361bcc29e659",
|
||||
POLEVA_6U_SLUG = "5d6e689ca4b9361bc8618956",
|
||||
POLEVA_3_SLUG = "5d6e6891a4b9361bd473feea",
|
||||
GRIZZLY_40_SLUG = "5d6e6869a4b9361c140bcfde",
|
||||
SUPERFORMANCE_HP_SLUG = "5d6e68d1a4b93622fe60e845",
|
||||
COPPER_SABOT_PREMIER_HP_SLUG = "5d6e68b3a4b9361bca7e50b5",
|
||||
LEAD_SLUG = "58820d1224597753c90aeb13"
|
||||
}
|
||||
export declare enum Ammo20Gauge {
|
||||
BUCKSHOT_75MM = "5a38ebd9c4a282000d722a5b",
|
||||
STAR_SLUG = "5d6e6a05a4b93618084f58d0",
|
||||
BUCKSHOT_73MM = "5d6e69c7a4b9360b6c0d54e4",
|
||||
DEVASTATOR_SLUG = "5d6e6a5fa4b93614ec501745",
|
||||
BUCKSHOT_56MM = "5d6e695fa4b936359b35d852",
|
||||
POLEVA_6U_SLUG = "5d6e6a42a4b9364f07165f52",
|
||||
POLEVA_3_SLUG = "5d6e6a53a4b9361bd473feec",
|
||||
BUCKSHOT_62MM = "5d6e69b9a4b9361bc8618958"
|
||||
}
|
||||
export declare enum Ammo23x75 {
|
||||
SHRAPNEL10_BUCKSHOT = "5e85a9a6eacf8c039e4e2ac1",
|
||||
SHRAPNEL25_BUCKSHOT = "5f647f31b6238e5dd066e196",
|
||||
ZVEZDA_FLASHBANG = "5e85a9f4add9fe03027d9bf1",
|
||||
BARRIKADA_SLUG = "5e85aa1a988a8701445df1f5"
|
||||
}
|
||||
export declare enum Ammo30x29 {
|
||||
VOG_30 = "5d70e500a4b9364de70d38ce"
|
||||
}
|
||||
export declare enum Ammo127x108 {
|
||||
B32 = "5cde8864d7f00c0010373be1",
|
||||
BZT_44M = "5d2f2ab648f03550091993ca"
|
||||
}
|
||||
export declare enum Ammo26x75 {
|
||||
GREEN_FLARE = "62389aaba63f32501b1b444f",
|
||||
RED_FLARE = "62389ba9a63f32501b1b4451",
|
||||
WHITE_FLARE = "62389bc9423ed1685422dc57",
|
||||
YELLOW_FLARE = "62389be94d5d474bf712e709"
|
||||
}
|
@ -11,9 +11,11 @@ export declare enum ConfigTypes {
|
||||
LOCALE = "aki-locale",
|
||||
LOCATION = "aki-location",
|
||||
MATCH = "aki-match",
|
||||
PLAYERSCAV = "aki-playerscav",
|
||||
QUEST = "aki-quest",
|
||||
RAGFAIR = "aki-ragfair",
|
||||
REPAIR = "aki-repair",
|
||||
SCAVCASE = "aki-scavcase",
|
||||
TRADER = "aki-trader",
|
||||
WEATHER = "aki-weather"
|
||||
}
|
||||
|
29
TypeScript/11BundleLoadingSample/types/models/enums/ContainerTypes.d.ts
vendored
Normal file
29
TypeScript/11BundleLoadingSample/types/models/enums/ContainerTypes.d.ts
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
export declare enum CommonContainers {
|
||||
AMMO_CASE = "5aafbde786f774389d0cbc0f",
|
||||
DOCUMENTS_CASE = "590c60fc86f77412b13fddcf",
|
||||
DOGTAG_CASE = "5c093e3486f77430cb02e593",
|
||||
GRENADE_CASE = "5e2af55f86f7746d4159f07c",
|
||||
INJECTOR_CASE = "619cbf7d23893217ec30b689",
|
||||
ITEM_CASE = "59fb042886f7746c5005a7b2",
|
||||
KEY_TOOL = "59fafd4b86f7745ca07e1232",
|
||||
KEYCARD_HOLDER = "619cbf9e0a7c3a1a2731940a",
|
||||
SCAV_JUNKBOX = "5b7c710788a4506dec015957",
|
||||
MAGAZINE_CASE = "5c127c4486f7745625356c13",
|
||||
MEDICINE_CASE = "5aafbcd986f7745e590fff23",
|
||||
MONEY_CASE = "59fb016586f7746d0d4b423a",
|
||||
HOLODILNICK_THERMAL_BAG = "5c093db286f7740a1b2617e3",
|
||||
PISTOL_CASE = "567143bf4bdc2d1a0f8b4567",
|
||||
SICC_ORGANIZATIONAL_POUCH = "5d235bb686f77443f4331278",
|
||||
SIMPLE_WALLET = "5783c43d2459774bbe137486",
|
||||
THICC_ITEM_CASE = "5c0a840b86f7742ffa4f2482",
|
||||
THICC_WEAPON_CASE = "5b6d9ce188a4501afc1b2b25",
|
||||
WEAPON_CASE = "59fb023c86f7746d0d4b423c",
|
||||
WZ_WALLET = "60b0f6c058e0b0481a09ad11"
|
||||
}
|
||||
export declare enum SecuredContainers {
|
||||
ALPHA = "544a11ac4bdc2d470e8b456a",
|
||||
BETA = "5857a8b324597729ab0a0e7d",
|
||||
EPSILON = "59db794186f77448bc595262",
|
||||
GAMMA = "5857a8bc2459772bad15db29",
|
||||
KAPPA = "5c093ca986f7740a1867ab12"
|
||||
}
|
@ -6,5 +6,6 @@ export declare enum QuestStatus {
|
||||
Success = 4,
|
||||
Fail = 5,
|
||||
FailRestartable = 6,
|
||||
MarkedAsFailed = 7
|
||||
MarkedAsFailed = 7,
|
||||
Expired = 8
|
||||
}
|
||||
|
9
TypeScript/11BundleLoadingSample/types/models/spt/bots/GenerateWeaponResult.d.ts
vendored
Normal file
9
TypeScript/11BundleLoadingSample/types/models/spt/bots/GenerateWeaponResult.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { Mods } from "../../eft/common/tables/IBotType";
|
||||
import { Item } from "../../eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../../eft/common/tables/ITemplateItem";
|
||||
export declare class GenerateWeaponResult {
|
||||
weapon: Item[];
|
||||
chosenAmmo: string;
|
||||
weaponMods: Mods;
|
||||
weaponTemplate: ITemplateItem;
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
import { MinMax } from "../../common/MinMax";
|
||||
import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IBotConfig extends IBaseConfig {
|
||||
kind: "aki-bot";
|
||||
@ -7,8 +8,11 @@ export interface IBotConfig extends IBaseConfig {
|
||||
lootNValue: LootNvalue;
|
||||
revenge: Record<string, string[]>;
|
||||
pmc: PmcConfig;
|
||||
itemSpawnLimits: Record<string, Record<string, number>>;
|
||||
equipment: Record<string, Equipment>;
|
||||
showTypeInNickname: boolean;
|
||||
maxBotCap: number;
|
||||
secureContainerAmmoStackCount: number;
|
||||
}
|
||||
export interface PresetBatch {
|
||||
assault: number;
|
||||
@ -90,9 +94,10 @@ export interface LootNvalue {
|
||||
pmc: number;
|
||||
}
|
||||
export interface PmcConfig {
|
||||
dynamicLoot: DynamicLoot;
|
||||
cartridgeBlacklist: string[];
|
||||
dynamicLoot: PmcDynamicLoot;
|
||||
difficulty: string;
|
||||
looseWeaponInBackpackChancePercent: number;
|
||||
looseWeaponInBackpackLootMinMax: MinMax;
|
||||
isUsec: number;
|
||||
chanceSameSideIsHostilePercent: number;
|
||||
usecType: string;
|
||||
@ -100,18 +105,19 @@ export interface PmcConfig {
|
||||
maxBackpackLootTotalRub: number;
|
||||
maxPocketLootTotalRub: number;
|
||||
maxVestLootTotalRub: number;
|
||||
types: Types;
|
||||
convertIntoPmcChance: Record<string, MinMax>;
|
||||
enemyTypes: string[];
|
||||
}
|
||||
export interface DynamicLoot {
|
||||
export interface PmcDynamicLoot {
|
||||
whitelist: string[];
|
||||
blacklist: string[];
|
||||
spawnLimits: Record<string, number>;
|
||||
moneyStackLimits: Record<string, number>;
|
||||
}
|
||||
export interface Types {
|
||||
assault: number;
|
||||
cursedAssault: number;
|
||||
pmcBot: number;
|
||||
exUsec: number;
|
||||
export interface Equipment {
|
||||
blacklist: EquipmentBlacklistDetails[];
|
||||
}
|
||||
export interface EquipmentBlacklistDetails {
|
||||
levelRange: MinMax;
|
||||
equipment: string[];
|
||||
cartridge: string[];
|
||||
}
|
||||
|
@ -2,26 +2,5 @@ import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IHideoutConfig extends IBaseConfig {
|
||||
kind: "aki-hideout";
|
||||
runIntervalSeconds: number;
|
||||
scavCase: ScavCase;
|
||||
fuelDrainRateMultipler: number;
|
||||
}
|
||||
export interface ScavCase {
|
||||
rewardParentBlacklist: string[];
|
||||
rewardItemBlacklist: any[];
|
||||
ammoRewards: AmmoRewards;
|
||||
moneyRewards: MoneyRewards;
|
||||
}
|
||||
export interface AmmoRewards {
|
||||
giveMultipleOfTen: boolean;
|
||||
minAmount: number;
|
||||
}
|
||||
export interface MoneyRewards {
|
||||
enabled: boolean;
|
||||
rub: MinMax;
|
||||
usd: MinMax;
|
||||
eur: MinMax;
|
||||
}
|
||||
export interface MinMax {
|
||||
min: number;
|
||||
max: 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