Added ability to blacklist profile from being created in launcher
(cherry picked from commit 5260b16a18
)
This commit is contained in:
parent
0b9e61dcdc
commit
e88521fe54
@ -30,7 +30,8 @@
|
|||||||
"commandUseLimits": {
|
"commandUseLimits": {
|
||||||
"StashRows": 15
|
"StashRows": 15
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"createNewProfileTypesBlacklist": []
|
||||||
},
|
},
|
||||||
"customWatermarkLocaleKeys": []
|
"customWatermarkLocaleKeys": []
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,14 @@ export class LauncherController
|
|||||||
|
|
||||||
public connect(): IConnectResponse
|
public connect(): IConnectResponse
|
||||||
{
|
{
|
||||||
|
// Get all possible profile types + filter out any that are blacklisted
|
||||||
|
const profileKeys = Object.keys(this.databaseService.getProfiles())
|
||||||
|
.filter((key) => !this.coreConfig.features.createNewProfileTypesBlacklist.includes(key));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
backendUrl: this.httpServerHelper.getBackendUrl(),
|
backendUrl: this.httpServerHelper.getBackendUrl(),
|
||||||
name: this.coreConfig.serverName,
|
name: this.coreConfig.serverName,
|
||||||
editions: Object.keys(this.databaseService.getProfiles()),
|
editions: profileKeys,
|
||||||
profileDescriptions: this.getProfileDescriptions(),
|
profileDescriptions: this.getProfileDescriptions(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,8 @@ export interface IServerFeatures
|
|||||||
autoInstallModDependencies: boolean
|
autoInstallModDependencies: boolean
|
||||||
compressProfile: boolean
|
compressProfile: boolean
|
||||||
chatbotFeatures: IChatbotFeatures
|
chatbotFeatures: IChatbotFeatures
|
||||||
|
/** Keyed to profile type e.g. "Standard" or "SPT Developer" */
|
||||||
|
createNewProfileTypesBlacklist: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IChatbotFeatures
|
export interface IChatbotFeatures
|
||||||
|
Loading…
Reference in New Issue
Block a user