Update types for 370
This commit is contained in:
parent
58593864c1
commit
bb1fe2e422
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
@ -21,9 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
/** Handle "move" */
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -76,6 +76,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
|
@ -2,6 +2,7 @@ import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
|
@ -4,6 +4,7 @@ import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRe
|
|||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -80,6 +81,7 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* Also deletes child items
|
* Also deletes child items
|
||||||
* @param pmcData Profile to remove item from
|
* @param pmcData Profile to remove item from
|
||||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
@ -237,6 +237,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
minFillStaticMagazinePercent: number;
|
minFillStaticMagazinePercent: number;
|
||||||
makeWishingTreeAlwaysGiveGift: boolean;
|
makeWishingTreeAlwaysGiveGift: boolean;
|
||||||
allowDuplicateItemsInStaticContainers: boolean;
|
allowDuplicateItemsInStaticContainers: boolean;
|
||||||
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
export interface IContainerRandomistionSettings {
|
export interface IContainerRandomistionSettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||||
constructor(logger: ILogger, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
|
* @param sessionId Players id
|
||||||
* @param baseBotNode bots json data to filter
|
* @param baseBotNode bots json data to filter
|
||||||
* @param botLevel Level of the bot
|
* @param botLevel Level of the bot
|
||||||
* @param botGenerationDetails details on how to generate a bot
|
* @param botGenerationDetails details on how to generate a bot
|
||||||
*/
|
*/
|
||||||
filterBotEquipment(baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Iterate over the changes passed in and alter data in baseValues
|
* Iterate over the changes passed in and alter data in baseValues
|
||||||
* @param equipmentChanges Changes to apply
|
* @param equipmentChanges Changes to apply
|
||||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Retrieve clothing weighting adjustments from bot.json config
|
* Retrieve item weighting adjustments from bot.json config based on bot level
|
||||||
* @param botRole Bot type to get adjustments for
|
* @param botRole Bot type to get adjustments for
|
||||||
* @param playerLevel level of player
|
* @param botLevel Level of bot
|
||||||
* @returns Weighting adjustments for bots clothing
|
|
||||||
*/
|
|
||||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
|
||||||
/**
|
|
||||||
* Retrieve item weighting adjustments from bot.json config
|
|
||||||
* @param botRole Bot type to get adjustments for
|
|
||||||
* @param playerLevel level of player
|
|
||||||
* @returns Weighting adjustments for bot items
|
* @returns Weighting adjustments for bot items
|
||||||
*/
|
*/
|
||||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails;
|
||||||
|
/**
|
||||||
|
* Retrieve item weighting adjustments from bot.json config based on player level
|
||||||
|
* @param botRole Bot type to get adjustments for
|
||||||
|
* @param playerlevel Level of bot
|
||||||
|
* @returns Weighting adjustments for bot items
|
||||||
|
*/
|
||||||
|
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||||
|
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