0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Added ability to insert custom text into the server watermark at the bottom via core.json config

This commit is contained in:
Dev 2024-05-23 21:40:59 +01:00
parent 198f864fe6
commit f68827bdc2
3 changed files with 12 additions and 1 deletions

View File

@ -28,5 +28,6 @@
"giveCommandEnabled": true "giveCommandEnabled": true
} }
} }
} },
"customWatermarkLocaleKeys": []
} }

View File

@ -18,6 +18,8 @@ export interface ICoreConfig extends IBaseConfig
commit?: string commit?: string
/** Timestamp of server build */ /** Timestamp of server build */
buildTime?: string buildTime?: string
/** Server locale keys that will be added to the bottom of the startup watermark */
customWatermarkLocaleKeys?: string[]
} }
export interface IBsgLogging export interface IBsgLogging

View File

@ -95,6 +95,14 @@ export class Watermark
this.text = this.text.concat([...modding]); this.text = this.text.concat([...modding]);
} }
if (this.sptConfig.customWatermarkLocaleKeys?.length > 0)
{
for (const key of this.sptConfig.customWatermarkLocaleKeys)
{
this.text.push(...["", this.localisationService.getText(key)]);
}
}
this.setTitle(); this.setTitle();
this.resetCursor(); this.resetCursor();
this.draw(); this.draw();