Fix server file list fallback
This commit is contained in:
@@ -442,6 +442,9 @@ const bridgeActions = Array.isArray(plugin.bridgeActions) ? plugin.bridgeActions
|
||||
const lifecycleProfiles = plugin.runtimeProfiles?.lifecycleProfiles ?? [];
|
||||
const logSources = plugin.runtimeProfiles?.logSources ?? [];
|
||||
const pageKeys = (plugin.pages ?? []).map((page) => page.key);
|
||||
const fileWorkspace = plugin.fileWorkspace ?? {};
|
||||
const fileWorkspaceDirectoryKeys = (fileWorkspace.directories ?? []).map((directory) => directory.key);
|
||||
const fileWorkspaceFileKeys = (fileWorkspace.files ?? []).map((file) => file.key);
|
||||
if (plugin.version !== expectedVersion) {
|
||||
missing.push(`version ${expectedVersion}`);
|
||||
}
|
||||
@@ -473,6 +476,19 @@ if (!createFields.some((field) => field.key === "queryPort" && field.defaultValu
|
||||
if (!createFields.some((field) => field.key === "maxPlayers" && field.defaultValue === "128")) {
|
||||
missing.push("SCUM max players create field");
|
||||
}
|
||||
if (fileWorkspace.defaultDirectoryKey !== "scum-config") {
|
||||
missing.push("SCUM file workspace default directory");
|
||||
}
|
||||
for (const directoryKey of ["scum-config", "scum-logs"]) {
|
||||
if (!fileWorkspaceDirectoryKeys.includes(directoryKey)) {
|
||||
missing.push(`SCUM file workspace directory ${directoryKey}`);
|
||||
}
|
||||
}
|
||||
for (const fileKey of ["scum-server-settings", "scum-chat-log"]) {
|
||||
if (!fileWorkspaceFileKeys.includes(fileKey)) {
|
||||
missing.push(`SCUM file workspace file ${fileKey}`);
|
||||
}
|
||||
}
|
||||
if (!plugin.gameClientBridge?.commands?.length) {
|
||||
missing.push("game client bridge declarations");
|
||||
}
|
||||
@@ -1146,6 +1162,7 @@ const manifest = {
|
||||
ai: source.ai,
|
||||
productionLifecycle: source.productionLifecycle,
|
||||
remoteAccess: source.remoteAccess,
|
||||
fileWorkspace: source.fileWorkspace,
|
||||
runtimeProfiles: localRuntimeProfiles,
|
||||
gameClientBridge: localGameClientBridge
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user