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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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 {
|
||||
protected inventoryController: InventoryController;
|
||||
constructor(inventoryController: InventoryController);
|
||||
/** Handle "move" */
|
||||
/** Handle Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, 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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
|
@ -149,6 +149,16 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -160,7 +170,7 @@ export declare class HideoutHelper {
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @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 { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -27,6 +28,7 @@ export declare class InRaidHelper {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
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);
|
||||
/**
|
||||
* 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 { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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;
|
||||
/**
|
||||
* Handle Remove event
|
||||
* Remove item from player inventory + insured items array
|
||||
* Also deletes child items
|
||||
* @param pmcData Profile to remove item from
|
||||
@ -89,6 +91,7 @@ export declare class InventoryHelper {
|
||||
* @returns 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;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): 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
|
||||
*/
|
||||
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
|
||||
* @param magazine Magazine to add child items to
|
||||
|
@ -74,13 +74,19 @@ export interface LootNvalue {
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
weaponModLimits: ModLimits;
|
||||
/** Whitelsit for weapons allowed per gun */
|
||||
/** Whitelist for weapon sight types allowed per gun */
|
||||
weaponSightWhitelist: Record<string, string[]>;
|
||||
/** Chance face shield is down/active */
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the day */
|
||||
lightIsActiveDayChancePercent?: number;
|
||||
/** Chance gun flashlight is active during the night */
|
||||
lightIsActiveNightChancePercent?: number;
|
||||
/** Chance gun laser is active during the day */
|
||||
laserIsActiveChancePercent?: number;
|
||||
/** Chance NODS are down/active during the day */
|
||||
nvgIsActiveChanceDayPercent?: number;
|
||||
/** Chance NODS are down/active during the night */
|
||||
nvgIsActiveChanceNightPercent?: number;
|
||||
/** Adjust weighting/chances of items on bot by level of bot */
|
||||
randomisation: RandomisationDetails[];
|
||||
@ -88,9 +94,10 @@ export interface EquipmentFilters {
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
/** Whitelist equipment by level of bot */
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
/** Adjust clothing choice weighting by level of bot */
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
/** Adjust equipment/ammo */
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** 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;
|
||||
/** Fence rep gain when successfully extracting as pscav */
|
||||
scavExtractGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -35,6 +35,8 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
minFillStaticMagazinePercent: number;
|
||||
makeWishingTreeAlwaysGiveGift: boolean;
|
||||
allowDuplicateItemsInStaticContainers: boolean;
|
||||
/** Key: map, value: loose loot ids to ignore */
|
||||
looseLootBlacklist: Record<string, string[]>;
|
||||
}
|
||||
export interface IContainerRandomistionSettings {
|
||||
enabled: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { EquipmentChances, Generation, GenerationData, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
@ -7,17 +8,19 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected botHelper: BotHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
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
|
||||
* @param sessionId Players id
|
||||
* @param baseBotNode bots json data to filter
|
||||
* @param botLevel Level of the 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
|
||||
* @param equipmentChanges Changes to apply
|
||||
@ -57,19 +60,19 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
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 playerLevel level of player
|
||||
* @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
|
||||
* @param botLevel Level of bot
|
||||
* @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
|
||||
* 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