From 9ea2655ad05be7c4704e1f48eead11cfd8552e36 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 17 Mar 2024 15:42:37 +0000 Subject: [PATCH] Update types --- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- .../types/callbacks/ClientLogCallbacks.d.ts | 4 ++++ .../types/controllers/InraidController.d.ts | 2 ++ .../types/ide/BleedingEdgeModsEntry.d.ts | 2 ++ .../types/models/spt/config/ICoreConfig.d.ts | 17 +++++++++++++++++ .../types/models/spt/config/IRagfairConfig.d.ts | 6 ++++++ .../types/models/spt/config/ITraderConfig.d.ts | 2 +- .../types/services/RagfairPriceService.d.ts | 2 +- .../TraderPurchasePersisterService.d.ts | 4 +++- 192 files changed, 864 insertions(+), 72 deletions(-) create mode 100644 TypeScript/10ScopesAndTypes/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/13AddTrader/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/16ImporterUtil/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/18CustomItemService/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/1LogToConsole/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/20CustomChatBot/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/2EditDatabase/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/7OnLoadHook/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/ide/BleedingEdgeModsEntry.d.ts create mode 100644 TypeScript/9RouterHooks/types/ide/BleedingEdgeModsEntry.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/10ScopesAndTypes/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/10ScopesAndTypes/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/11BundleLoadingSample/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/11BundleLoadingSample/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/12ClassExtensionOverride/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/12ClassExtensionOverride/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/13AddTrader/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/13AddTrader/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/13AddTrader/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/13AddTrader/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/13AddTrader/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/13AddTrader/types/services/RagfairPriceService.d.ts b/TypeScript/13AddTrader/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/13AddTrader/types/services/RagfairPriceService.d.ts +++ b/TypeScript/13AddTrader/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/14AfterDBLoadHook/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/14AfterDBLoadHook/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/14AfterDBLoadHook/types/services/RagfairPriceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/RagfairPriceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/15HttpListenerExample/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/15HttpListenerExample/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/15HttpListenerExample/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/15HttpListenerExample/types/services/RagfairPriceService.d.ts b/TypeScript/15HttpListenerExample/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/15HttpListenerExample/types/services/RagfairPriceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/16ImporterUtil/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/16ImporterUtil/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/16ImporterUtil/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/16ImporterUtil/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/16ImporterUtil/types/services/RagfairPriceService.d.ts b/TypeScript/16ImporterUtil/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/16ImporterUtil/types/services/RagfairPriceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/17AsyncImporterWithDependency1/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairPriceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairPriceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/17AsyncImporterWithDependency2/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairPriceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairPriceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/18CustomItemService/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/18CustomItemService/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/18CustomItemService/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/18CustomItemService/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/18CustomItemService/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/18CustomItemService/types/services/RagfairPriceService.d.ts b/TypeScript/18CustomItemService/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/18CustomItemService/types/services/RagfairPriceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/19UseExternalLibraries/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/19UseExternalLibraries/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/19UseExternalLibraries/types/services/RagfairPriceService.d.ts b/TypeScript/19UseExternalLibraries/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/19UseExternalLibraries/types/services/RagfairPriceService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/19UseExternalLibraries/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/19UseExternalLibraries/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/19UseExternalLibraries/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/1LogToConsole/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/1LogToConsole/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/1LogToConsole/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/1LogToConsole/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/1LogToConsole/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/1LogToConsole/types/services/RagfairPriceService.d.ts b/TypeScript/1LogToConsole/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/1LogToConsole/types/services/RagfairPriceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/1LogToConsole/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/1LogToConsole/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/1LogToConsole/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/1LogToConsole/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/20CustomChatBot/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts b/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/20CustomChatBot/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/20CustomChatBot/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/20CustomChatBot/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/20CustomChatBot/types/services/RagfairPriceService.d.ts b/TypeScript/20CustomChatBot/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/20CustomChatBot/types/services/RagfairPriceService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/20CustomChatBot/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/20CustomChatBot/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/20CustomChatBot/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/21CustomCommandoCommand/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/21CustomCommandoCommand/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/21CustomCommandoCommand/types/services/RagfairPriceService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/RagfairPriceService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/21CustomCommandoCommand/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/22CustomAkiCommand/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/22CustomAkiCommand/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/22CustomAkiCommand/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/22CustomAkiCommand/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/22CustomAkiCommand/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/22CustomAkiCommand/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/22CustomAkiCommand/types/services/RagfairPriceService.d.ts b/TypeScript/22CustomAkiCommand/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/22CustomAkiCommand/types/services/RagfairPriceService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/22CustomAkiCommand/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/22CustomAkiCommand/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/22CustomAkiCommand/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/2EditDatabase/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/2EditDatabase/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/2EditDatabase/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/2EditDatabase/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/2EditDatabase/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/2EditDatabase/types/services/RagfairPriceService.d.ts b/TypeScript/2EditDatabase/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/2EditDatabase/types/services/RagfairPriceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/2EditDatabase/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/2EditDatabase/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/2EditDatabase/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/2EditDatabase/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/3GetSptConfigFile/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/3GetSptConfigFile/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/3GetSptConfigFile/types/services/RagfairPriceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/3GetSptConfigFile/types/services/RagfairPriceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/3GetSptConfigFile/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/3GetSptConfigFile/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/3GetSptConfigFile/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RagfairPriceService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RagfairPriceService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/4UseACustomConfigFile/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/4UseACustomConfigFile/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/5ReplaceMethod/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/5ReplaceMethod/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/5ReplaceMethod/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts b/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/6ReferenceAnotherClass/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/6ReferenceAnotherClass/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/7OnLoadHook/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/7OnLoadHook/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/7OnLoadHook/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/7OnLoadHook/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts b/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/8OnUpdateHook/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/8OnUpdateHook/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/8OnUpdateHook/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts b/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id diff --git a/TypeScript/9RouterHooks/types/callbacks/ClientLogCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/ClientLogCallbacks.d.ts index 3d7a0cb..1fb7acc 100644 --- a/TypeScript/9RouterHooks/types/callbacks/ClientLogCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/ClientLogCallbacks.d.ts @@ -21,4 +21,8 @@ export declare class ClientLogCallbacks { * Handle /singleplayer/release */ releaseNotes(): string; + /** + * Handle /singleplayer/enableBSGlogging + */ + bsgLogging(): string; } diff --git a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts index 93f542f..368ddc2 100644 --- a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts @@ -15,6 +15,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig"; import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; 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 { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -58,6 +59,7 @@ export declare class InraidController { protected inRaidConfig: IInRaidConfig; protected traderConfig: ITraderConfig; 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); /** * Save locationId to active profiles inraid object AND app context diff --git a/TypeScript/9RouterHooks/types/ide/BleedingEdgeModsEntry.d.ts b/TypeScript/9RouterHooks/types/ide/BleedingEdgeModsEntry.d.ts new file mode 100644 index 0000000..62f714e --- /dev/null +++ b/TypeScript/9RouterHooks/types/ide/BleedingEdgeModsEntry.d.ts @@ -0,0 +1,2 @@ +import "reflect-metadata"; +import "source-map-support/register"; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts index e6a1bbe..74604b0 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts @@ -7,6 +7,7 @@ export interface ICoreConfig extends IBaseConfig { serverName: string; profileSaveIntervalSeconds: number; sptFriendNickname: string; + bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; features: IServerFeatures; @@ -15,6 +16,22 @@ export interface ICoreConfig extends IBaseConfig { /** Timestamp of server build */ 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 { betaDisclaimerText?: string; betaDisclaimerAcceptText: string; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts index fdccc98..79465d2 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts @@ -4,12 +4,18 @@ export interface IRagfairConfig extends IBaseConfig { kind: "aki-ragfair"; /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ runIntervalSeconds: number; + /** Default values used to hydrate `runIntervalSeconds` with */ + runIntervalValues: IRunIntervalValues; /** Player listing settings */ sell: Sell; /** Trader ids + should their assorts be listed on flea*/ traders: Record; dynamic: Dynamic; } +export interface IRunIntervalValues { + inRaid: number; + outOfRaid: number; +} export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts index e8f9d83..6bc4f5f 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts @@ -16,7 +16,7 @@ export interface ITraderConfig extends IBaseConfig { export interface UpdateTime { traderId: string; /** Seconds between trader resets */ - seconds: number; + seconds: MinMax; } export interface FenceConfig { discountOptions: DiscountOptions; diff --git a/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts b/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts index 1834f96..da30740 100644 --- a/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts @@ -73,7 +73,7 @@ export declare class RagfairPriceService implements OnLoad { */ 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 */ getAllFleaPrices(): Record; diff --git a/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts index bff6d4c..92aaec3 100644 --- a/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** * 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 { protected logger: ILogger; protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; 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 * @param sessionId Session id