Update types to match server changes
This commit is contained in:
parent
f200c11869
commit
10072a9c04
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -13,7 +13,7 @@ This project is designed to streamline the initial setup process for building an
|
||||
|
||||
## **NodeJS Setup**
|
||||
|
||||
Before you begin, ensure to install NodeJS version `v18.15.0`, which has been tested thoroughly with our mod templates and build scripts. Download it from the [official NodeJS website](https://nodejs.org/).
|
||||
Before you begin, ensure to install NodeJS version `v20.11.1`, which has been tested thoroughly with our mod templates and build scripts. Download it from the [official NodeJS website](https://nodejs.org/).
|
||||
|
||||
After installation, it's advised to reboot your system.
|
||||
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
@ -26,6 +26,12 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
* @returns True if its local
|
||||
*/
|
||||
protected isLocalRequest(remoteAddress: string): boolean;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ export declare class BotLootCacheService {
|
||||
protected isGrenade(props: Props): boolean;
|
||||
protected isFood(tpl: string): boolean;
|
||||
protected isDrink(tpl: string): boolean;
|
||||
protected isCurrency(tpl: string): boolean;
|
||||
/**
|
||||
* Check if a bot type exists inside the loot cache
|
||||
* @param botRole role to check for
|
||||
|
@ -45,7 +45,7 @@ export declare class RagfairPriceService implements OnLoad {
|
||||
/**
|
||||
* Create a dictionary and store prices from prices.json in it
|
||||
*/
|
||||
protected generateDynamicPrices(): void;
|
||||
generateDynamicPrices(): void;
|
||||
/**
|
||||
* Get the dynamic price for an item. If value doesn't exist, use static (handbook) value.
|
||||
* if no static value, return 1
|
||||
|
@ -18,6 +18,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -38,10 +39,11 @@ export declare class InsuranceController {
|
||||
protected paymentService: PaymentService;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected mailSendService: MailSendService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected roubleTpl: string;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
@ -145,7 +147,7 @@ export declare class InsuranceController {
|
||||
*/
|
||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||
/**
|
||||
* Sorts the attachment items by their max price in descending order.
|
||||
* Sorts the attachment items by their dynamic price in descending order.
|
||||
*
|
||||
* @param attachments The array of attachments items.
|
||||
* @returns An array of items enriched with their max price and common locale-name.
|
||||
@ -220,6 +222,6 @@ export declare class InsuranceController {
|
||||
}
|
||||
interface EnrichedItem extends Item {
|
||||
name: string;
|
||||
maxPrice: number;
|
||||
dynamicPrice: number;
|
||||
}
|
||||
export {};
|
||||
|
@ -111,6 +111,7 @@ export interface GenerationWeightingItems {
|
||||
drugs: GenerationData;
|
||||
food: GenerationData;
|
||||
drink: GenerationData;
|
||||
currency: GenerationData;
|
||||
stims: GenerationData;
|
||||
backpackLoot: GenerationData;
|
||||
pocketLoot: GenerationData;
|
||||
|
@ -9,6 +9,7 @@ export interface IBotLootCache {
|
||||
drugItems: Record<string, number>;
|
||||
foodItems: Record<string, number>;
|
||||
drinkItems: Record<string, number>;
|
||||
currencyItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
}
|
||||
@ -24,5 +25,6 @@ export declare enum LootCacheType {
|
||||
STIM_ITEMS = "StimItems",
|
||||
GRENADE_ITEMS = "GrenadeItems",
|
||||
FOOD_ITEMS = "FoodItems",
|
||||
DRINK_ITEMS = "DrinkItems"
|
||||
DRINK_ITEMS = "DrinkItems",
|
||||
CURRENCY_ITEMS = "CurrencyItems"
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user