@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user