From 56e4fee0c3800935644c5a8a44bb609c8e806668 Mon Sep 17 00:00:00 2001 From: chomp Date: Sun, 4 Aug 2024 20:44:22 +0000 Subject: [PATCH] Updated for 3.9.5 (#36) Co-authored-by: Dev Reviewed-on: https://dev.sp-tarkov.com/chomp/ModExamples/pulls/36 --- README.md | 2 +- .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../10ScopesAndTypes/types/servers/HttpServer.d.ts | 2 +- .../10ScopesAndTypes/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../13AddTrader/types/servers/HttpServer.d.ts | 2 +- .../13AddTrader/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../16ImporterUtil/types/servers/HttpServer.d.ts | 2 +- .../16ImporterUtil/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../1LogToConsole/types/servers/HttpServer.d.ts | 2 +- .../1LogToConsole/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../20CustomChatBot/types/servers/HttpServer.d.ts | 2 +- .../20CustomChatBot/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../24WebSocket/types/servers/HttpServer.d.ts | 2 +- .../24WebSocket/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../2EditDatabase/types/servers/HttpServer.d.ts | 2 +- .../2EditDatabase/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../5ReplaceMethod/types/servers/HttpServer.d.ts | 2 +- .../5ReplaceMethod/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../types/servers/HttpServer.d.ts | 2 +- .../types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../7OnLoadHook/types/servers/HttpServer.d.ts | 2 +- .../7OnLoadHook/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../8OnUpdateHook/types/servers/HttpServer.d.ts | 2 +- .../8OnUpdateHook/types/servers/SaveServer.d.ts | 2 ++ .../types/generators/BotLevelGenerator.d.ts | 14 +++----------- .../9RouterHooks/types/servers/HttpServer.d.ts | 2 +- .../9RouterHooks/types/servers/SaveServer.d.ts | 2 ++ 85 files changed, 169 insertions(+), 337 deletions(-) diff --git a/README.md b/README.md index 5abeab2..2c7e2e5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Mod examples for v3.9.4 +# Mod examples for v3.9.5 A collection of example mods that perform typical actions in SPT diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/10ScopesAndTypes/types/servers/HttpServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/HttpServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/11BundleLoadingSample/types/servers/HttpServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/HttpServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/HttpServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/HttpServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLevelGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/servers/HttpServer.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/servers/HttpServer.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/servers/SaveServer.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/servers/SaveServer.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/13AddTrader/types/servers/HttpServer.d.ts b/TypeScript/13AddTrader/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/13AddTrader/types/servers/HttpServer.d.ts +++ b/TypeScript/13AddTrader/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/13AddTrader/types/servers/SaveServer.d.ts b/TypeScript/13AddTrader/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/13AddTrader/types/servers/SaveServer.d.ts +++ b/TypeScript/13AddTrader/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/14AfterDBLoadHook/types/servers/HttpServer.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/HttpServer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/14AfterDBLoadHook/types/servers/SaveServer.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/SaveServer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/15HttpListenerExample/types/servers/HttpServer.d.ts b/TypeScript/15HttpListenerExample/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/15HttpListenerExample/types/servers/HttpServer.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/15HttpListenerExample/types/servers/SaveServer.d.ts b/TypeScript/15HttpListenerExample/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/15HttpListenerExample/types/servers/SaveServer.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/16ImporterUtil/types/servers/HttpServer.d.ts b/TypeScript/16ImporterUtil/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/16ImporterUtil/types/servers/HttpServer.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/16ImporterUtil/types/servers/SaveServer.d.ts b/TypeScript/16ImporterUtil/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/16ImporterUtil/types/servers/SaveServer.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/HttpServer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/HttpServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/SaveServer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/SaveServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/HttpServer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/HttpServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/SaveServer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/SaveServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLevelGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/servers/HttpServer.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/servers/HttpServer.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/servers/SaveServer.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/servers/SaveServer.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/18CustomItemService/types/servers/HttpServer.d.ts b/TypeScript/18CustomItemService/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/18CustomItemService/types/servers/HttpServer.d.ts +++ b/TypeScript/18CustomItemService/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/18CustomItemService/types/servers/SaveServer.d.ts b/TypeScript/18CustomItemService/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/18CustomItemService/types/servers/SaveServer.d.ts +++ b/TypeScript/18CustomItemService/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/19UseExternalLibraries/types/servers/HttpServer.d.ts b/TypeScript/19UseExternalLibraries/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/HttpServer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/19UseExternalLibraries/types/servers/SaveServer.d.ts b/TypeScript/19UseExternalLibraries/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/SaveServer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/1LogToConsole/types/servers/HttpServer.d.ts b/TypeScript/1LogToConsole/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/1LogToConsole/types/servers/HttpServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts b/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/20CustomChatBot/types/servers/HttpServer.d.ts b/TypeScript/20CustomChatBot/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/20CustomChatBot/types/servers/HttpServer.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/20CustomChatBot/types/servers/SaveServer.d.ts b/TypeScript/20CustomChatBot/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/20CustomChatBot/types/servers/SaveServer.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/21CustomCommandoCommand/types/servers/HttpServer.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/HttpServer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/21CustomCommandoCommand/types/servers/SaveServer.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/SaveServer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/22CustomSptCommand/types/servers/HttpServer.d.ts b/TypeScript/22CustomSptCommand/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/22CustomSptCommand/types/servers/HttpServer.d.ts +++ b/TypeScript/22CustomSptCommand/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/22CustomSptCommand/types/servers/SaveServer.d.ts b/TypeScript/22CustomSptCommand/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/22CustomSptCommand/types/servers/SaveServer.d.ts +++ b/TypeScript/22CustomSptCommand/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/HttpServer.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/HttpServer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/SaveServer.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/SaveServer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/24WebSocket/types/servers/HttpServer.d.ts b/TypeScript/24WebSocket/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/24WebSocket/types/servers/HttpServer.d.ts +++ b/TypeScript/24WebSocket/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/24WebSocket/types/servers/SaveServer.d.ts b/TypeScript/24WebSocket/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/24WebSocket/types/servers/SaveServer.d.ts +++ b/TypeScript/24WebSocket/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/2EditDatabase/types/servers/HttpServer.d.ts b/TypeScript/2EditDatabase/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/2EditDatabase/types/servers/HttpServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts b/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/3GetSptConfigFile/types/servers/HttpServer.d.ts b/TypeScript/3GetSptConfigFile/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/HttpServer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/3GetSptConfigFile/types/servers/SaveServer.d.ts b/TypeScript/3GetSptConfigFile/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/SaveServer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/HttpServer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/HttpServer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/SaveServer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/SaveServer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/HttpServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/HttpServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/5ReplaceMethod/types/servers/HttpServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/5ReplaceMethod/types/servers/HttpServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/HttpServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/HttpServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/7OnLoadHook/types/servers/HttpServer.d.ts b/TypeScript/7OnLoadHook/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/7OnLoadHook/types/servers/HttpServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts b/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/8OnUpdateHook/types/servers/HttpServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/8OnUpdateHook/types/servers/HttpServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes diff --git a/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts index a8a8895..855b0db 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts @@ -22,19 +22,11 @@ export declare class BotLevelGenerator { generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** - * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param botGenerationDetails Details to help generate a bot - * @param levelDetails - * @param maxLevel Max possible level - * @returns Highest level possible for bot - */ - protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; - /** - * Get the lowest level a bot can be relative to the players level, but no lower than 1 + * Return the min and max bot level based on a relative delta from the PMC level * @param botGenerationDetails Details to help generate a bot * @param levelDetails * @param maxlevel Max level allowed - * @returns Lowest level possible for bot + * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; + protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/9RouterHooks/types/servers/HttpServer.d.ts b/TypeScript/9RouterHooks/types/servers/HttpServer.d.ts index 0024ba3..52c59da 100644 --- a/TypeScript/9RouterHooks/types/servers/HttpServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/HttpServer.d.ts @@ -25,7 +25,7 @@ export declare class HttpServer { * Handle server loading event */ load(): void; - protected handleRequest(req: IncomingMessage, resp: ServerResponse): void; + protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise; /** * Check against hardcoded values that determine its from a local address * @param remoteAddress Address to check diff --git a/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts b/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts index 54c0f0a..15e1109 100644 --- a/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts @@ -1,5 +1,6 @@ import { SaveLoadRouter } from "@spt/di/Router"; import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -18,6 +19,7 @@ export declare class SaveServer { protected profiles: {}; protected onBeforeSaveCallbacks: {}; protected saveMd5: {}; + protected coreConfig: ICoreConfig; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer); /** * Add callback to occur prior to saving profile changes