Move isBeta to a compile time variable (!257)

Split isBeta and isModdable into two seperate variables

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/257
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
This commit is contained in:
DrakiaXYZ 2024-03-11 08:45:05 +00:00 committed by chomp
parent 15257ea263
commit 7fdb9083a5
7 changed files with 10 additions and 2 deletions

View File

@ -6,7 +6,6 @@
"profileSaveIntervalSeconds": 15,
"sptFriendNickname": "SPT",
"release": {
"isBeta": true,
"betaDisclaimerTimeoutDelay": 30
},
"fixes": {

View File

@ -37,6 +37,9 @@ export class ClientLogCallbacks
const data: IRelease = this.configServer.getConfig<ICoreConfig>(ConfigTypes.CORE).release;
data.betaDisclaimer = this.localisationService.getText("beta-disclaimer");
data.releaseSummary = this.localisationService.getText("release-summary");
data.isBeta = globalThis.G_WATERMARK_ENABLED;
data.isModdable = globalThis.G_MODS_ENABLED;
return this.httpResponse.noBody(data);
}
}

View File

@ -8,6 +8,7 @@ globalThis.G_RELEASE_CONFIGURATION = true;
globalThis.G_MODS_ENABLED = false;
globalThis.G_MODS_TRANSPILE_TS = true;
globalThis.G_LOG_REQUESTS = true;
globalThis.G_WATERMARK_ENABLED = true;
const program = new Program();
program.start();

View File

@ -8,6 +8,7 @@ globalThis.G_RELEASE_CONFIGURATION = true;
globalThis.G_MODS_ENABLED = true;
globalThis.G_MODS_TRANSPILE_TS = true;
globalThis.G_LOG_REQUESTS = true;
globalThis.G_WATERMARK_ENABLED = false;
const program = new Program();
program.start();

View File

@ -8,6 +8,7 @@ globalThis.G_RELEASE_CONFIGURATION = true;
globalThis.G_MODS_ENABLED = true;
globalThis.G_MODS_TRANSPILE_TS = true;
globalThis.G_LOG_REQUESTS = false;
globalThis.G_WATERMARK_ENABLED = false;
const program = new Program();
program.start();

View File

@ -8,6 +8,7 @@ globalThis.G_RELEASE_CONFIGURATION = false;
globalThis.G_MODS_ENABLED = true;
globalThis.G_MODS_TRANSPILE_TS = false;
globalThis.G_LOG_REQUESTS = true;
globalThis.G_WATERMARK_ENABLED = true;
const program = new Program();
program.start();

View File

@ -21,7 +21,9 @@ export interface ICoreConfig extends IBaseConfig
export interface IRelease
{
// Enables the cool watermark in-game
isBeta: boolean;
isBeta?: boolean;
// Whether mods are enabled
isModdable?: boolean;
// Disclaimer outlining the intended usage of bleeding edge
betaDisclaimer?: string;
// How long before the messagebox times out and closes the game