1
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-11 15:43:32 +08:00
parent f19e482c8f
commit 0981d6ee1b
78 changed files with 1102 additions and 8510 deletions

View File

@@ -1,5 +1,5 @@
import {validateWorldAttributeSchema} from '../data/attributeValidation';
import {getPresetWorldAttributeSchema} from '../data/worldAttributeSchemas';
import {getTemplateWorldAttributeSchema} from '../data/worldAttributeSchemas';
import type {
AttributeSchemaGenerationInput,
WorldAttributeSchema,
@@ -96,17 +96,17 @@ function buildCustomThemeSlots(input: AttributeSchemaGenerationInput) {
return {
schemaName: '叙境六维',
slots: getPresetWorldAttributeSchema(WorldType.WUXIA).slots,
slots: getTemplateWorldAttributeSchema(WorldType.WUXIA).slots,
};
}
export function generateWorldAttributeSchema(input: AttributeSchemaGenerationInput) {
if (input.worldType === WorldType.WUXIA) {
return getPresetWorldAttributeSchema(WorldType.WUXIA);
return getTemplateWorldAttributeSchema(WorldType.WUXIA);
}
if (input.worldType === WorldType.XIANXIA) {
return getPresetWorldAttributeSchema(WorldType.XIANXIA);
return getTemplateWorldAttributeSchema(WorldType.XIANXIA);
}
const generated = buildCustomThemeSlots(input);
@@ -116,7 +116,7 @@ export function generateWorldAttributeSchema(input: AttributeSchemaGenerationInp
if (issues.length > 0) {
const fallbackWorldType = /||||/u.test(input.settingText) ? WorldType.XIANXIA : WorldType.WUXIA;
return {
...getPresetWorldAttributeSchema(fallbackWorldType),
...getTemplateWorldAttributeSchema(fallbackWorldType),
id: `schema:custom-fallback:${input.worldName}`,
worldId: `custom:${input.worldName}`,
generatedFrom: {