380 #24

Merged
chomp merged 13 commits from 380 into master 2024-04-04 17:29:49 -04:00
192 changed files with 864 additions and 72 deletions
Showing only changes of commit 9ea2655ad0 - Show all commits

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

View File

@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig {
kind: "aki-ragfair"; kind: "aki-ragfair";
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */ /** How many seconds should pass before expired offers and procesed + player offers checked if sold */
runIntervalSeconds: number; runIntervalSeconds: number;
/** Default values used to hydrate `runIntervalSeconds` with */
runIntervalValues: IRunIntervalValues;
/** Player listing settings */ /** Player listing settings */
sell: Sell; sell: Sell;
/** Trader ids + should their assorts be listed on flea*/ /** Trader ids + should their assorts be listed on flea*/
traders: Record<string, boolean>; traders: Record<string, boolean>;
dynamic: Dynamic; dynamic: Dynamic;
} }
export interface IRunIntervalValues {
inRaid: number;
outOfRaid: number;
}
export interface Sell { export interface Sell {
/** Should a fee be deducted from player when liting an item for sale */ /** Should a fee be deducted from player when liting an item for sale */
fees: boolean; fees: boolean;

View File

@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig {
export interface UpdateTime { export interface UpdateTime {
traderId: string; traderId: string;
/** Seconds between trader resets */ /** Seconds between trader resets */
seconds: number; seconds: MinMax;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions; discountOptions: DiscountOptions;

View File

@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad {
*/ */
getStaticPriceForItem(itemTpl: string): number; getStaticPriceForItem(itemTpl: string): number;
/** /**
* Get prices for all items on flea, priorities dynamic prices from prices.json, use handbook prices if missing * Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";
/** /**
* Help with storing limited item purchases from traders in profile to persist them over server restarts * Help with storing limited item purchases from traders in profile to persist them over server restarts
@ -11,11 +12,12 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
export declare class TraderPurchasePersisterService { export declare class TraderPurchasePersisterService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Get the purchases made from a trader for this profile before the last trader reset * Get the purchases made from a trader for this profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id

View File

@ -21,4 +21,8 @@ export declare class ClientLogCallbacks {
* Handle /singleplayer/release * Handle /singleplayer/release
*/ */
releaseNotes(): string; releaseNotes(): string;
/**
* Handle /singleplayer/enableBSGlogging
*/
bsgLogging(): string;
} }

View File

@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
@ -58,6 +59,7 @@ export declare class InraidController {
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context

View File

@ -0,0 +1,2 @@
import "reflect-metadata";
import "source-map-support/register";

View File

@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig {
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;
features: IServerFeatures; features: IServerFeatures;
@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig {
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string; buildTime?: string;
} }
export interface IBsgLogging {
/**
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
* complain to them about it! In all cases, better exceptions will be logged.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
*/
verbosity: number;
sendToServer: boolean;
}
export interface IRelease { export interface IRelease {
betaDisclaimerText?: string; betaDisclaimerText?: string;
betaDisclaimerAcceptText: string; betaDisclaimerAcceptText: string;

Some files were not shown because too many files have changed in this diff Show More