Added setting to allow/deny player wiping a profile via launcher - default true

This commit is contained in:
Dev 2024-04-10 22:49:26 +01:00
parent adc71829f3
commit e48362ae6e
3 changed files with 12 additions and 0 deletions

View File

@ -5,6 +5,7 @@
"serverName": "SPT Server", "serverName": "SPT Server",
"profileSaveIntervalSeconds": 15, "profileSaveIntervalSeconds": 15,
"sptFriendNickname": "SPT", "sptFriendNickname": "SPT",
"allowProfileWipe": true,
"bsgLogging": { "bsgLogging": {
"verbosity": 6, "verbosity": 6,
"sendToServer": false "sendToServer": false

View File

@ -172,8 +172,18 @@ export class LauncherController
return sessionID; return sessionID;
} }
/**
* Handle launcher requesting profile be wiped
* @param info IRegisterData
* @returns Session id
*/
public wipe(info: IRegisterData): string public wipe(info: IRegisterData): string
{ {
if (!this.coreConfig.allowProfileWipe)
{
return;
}
const sessionID = this.login(info); const sessionID = this.login(info);
if (sessionID) if (sessionID)

View File

@ -9,6 +9,7 @@ export interface ICoreConfig extends IBaseConfig
serverName: string; serverName: string;
profileSaveIntervalSeconds: number; profileSaveIntervalSeconds: number;
sptFriendNickname: string; sptFriendNickname: string;
allowProfileWipe: boolean;
bsgLogging: IBsgLogging; bsgLogging: IBsgLogging;
release: IRelease; release: IRelease;
fixes: IGameFixes; fixes: IGameFixes;