320 types update #6
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
@ -41,5 +41,4 @@ export declare class InsuranceController {
|
|||||||
* @returns response object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
doAbsolutelyNothing(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,11 @@ export interface PmcDynamicLoot {
|
|||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Equipment {
|
export interface Equipment {
|
||||||
blacklist: EquipmentBlacklistDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
|
whitelist: EquipmentFilterDetails[];
|
||||||
}
|
}
|
||||||
export interface EquipmentBlacklistDetails {
|
export interface EquipmentFilterDetails {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
equipment: string[];
|
equipment: Record<string, string[]>;
|
||||||
cartridge: string[];
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { Equipment, EquipmentBlacklistDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class BotEquipmentFilterService {
|
export declare class BotEquipmentFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected botEquipmentBlacklists: Record<string, Equipment>;
|
protected botEquipmentFilterlists: Record<string, Equipment>;
|
||||||
constructor(logger: ILogger, configServer: ConfigServer);
|
constructor(logger: ILogger, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||||
@ -18,24 +18,33 @@ export declare class BotEquipmentFilterService {
|
|||||||
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
filterBotEquipment(baseBotNode: IBotType, playerLevel: number, isPmc: boolean, role: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param isPmc Is the bot we want the blacklist for a PMC
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
* @param role Role of the bot we want the blacklist for
|
|
||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentBlacklist(isPmc: boolean, role: string, playerLevel: number): EquipmentBlacklistDetails;
|
protected getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
/**
|
/**
|
||||||
* Filter bot equipment based on blacklist from config/bot.json
|
* Get the whitelist for a specific bot type that's within the players level
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param playerLevel Players level
|
||||||
|
* @returns EquipmentFilterDetails object
|
||||||
|
*/
|
||||||
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||||
|
/**
|
||||||
|
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment blacklist
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterEquipment(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
/**
|
/**
|
||||||
* Filter bot cartridges based on blacklist from config/bot.json
|
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||||
|
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||||
* @param baseBotNode bot .json file to update
|
* @param baseBotNode bot .json file to update
|
||||||
* @param equipmentBlacklist equipment blacklist
|
* @param blacklist equipment on this list should be excluded from the bot
|
||||||
|
* @param whitelist equipment on this list should be used exclusivly
|
||||||
* @returns Filtered bot file
|
* @returns Filtered bot file
|
||||||
*/
|
*/
|
||||||
protected filterCartridges(baseBotNode: IBotType, equipmentBlacklist: EquipmentBlacklistDetails): void;
|
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected templatesById: {};
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
@ -32,8 +31,12 @@ export declare class InsuranceService {
|
|||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
||||||
getItemPrice(_tpl: string): number;
|
/**
|
||||||
generateTemplatesById(): void;
|
* Get the rouble price for an item by templateId
|
||||||
|
* @param itemTpl item tpl to get handbook price for
|
||||||
|
* @returns handbook price in roubles, Return 0 if not found
|
||||||
|
*/
|
||||||
|
getItemPrice(itemTpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to modify
|
||||||
|
Loading…
x
Reference in New Issue
Block a user