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

@@ -12,7 +12,11 @@ import {
type SceneArchetypeBucket,
WorldType,
} from '../types';
import { type CustomWorldThemeMode, detectCustomWorldThemeMode } from './customWorldTheme';
import {
type CustomWorldThemeMode,
detectCustomWorldThemeMode,
resolveCustomWorldCompatibilityTemplateWorldType,
} from './customWorldTheme';
import {
buildThemePackFromWorldProfile,
normalizeThemePack,
@@ -407,7 +411,7 @@ function buildThemePackSeed(profile: CustomWorldProfile) {
summary: profile.summary,
tone: profile.tone,
playerGoal: profile.playerGoal,
templateWorldType: profile.templateWorldType,
templateWorldType: resolveCustomWorldCompatibilityTemplateWorldType(profile),
majorFactions: profile.majorFactions,
coreConflicts: profile.coreConflicts,
ownedSettingLayers: null,
@@ -502,8 +506,12 @@ function compileReferenceProfile(
}
function compileCompatibilityProfile(profile: CustomWorldProfile) {
const compatibilityTemplateWorldType =
resolveCustomWorldCompatibilityTemplateWorldType(profile);
return {
legacyTemplateWorldType: profile.templateWorldType ?? WorldType.WUXIA,
compatibilityTemplateWorldType,
legacyTemplateWorldType: compatibilityTemplateWorldType,
migrationVersion: OWNED_SETTING_LAYER_MIGRATION_VERSION,
} satisfies CustomWorldCompatibilityProfile;
}
@@ -629,6 +637,8 @@ export function compileOwnedSettingLayersFromLegacyTemplate(
tone: profile.tone,
playerGoal: profile.playerGoal,
templateWorldType: profile.templateWorldType,
compatibilityTemplateWorldType:
profile.compatibilityTemplateWorldType ?? profile.templateWorldType,
ownedSettingLayers: null,
});
const semanticAnchor = compileSemanticAnchor(profile, mode);
@@ -920,6 +930,12 @@ export function normalizeCustomWorldOwnedSettingLayers(
),
},
compatibilityProfile: {
compatibilityTemplateWorldType:
compatibilityProfileItem.compatibilityTemplateWorldType === WorldType.XIANXIA
? WorldType.XIANXIA
: compatibilityProfileItem.compatibilityTemplateWorldType === WorldType.WUXIA
? WorldType.WUXIA
: fallback.compatibilityProfile?.compatibilityTemplateWorldType ?? null,
legacyTemplateWorldType:
compatibilityProfileItem.legacyTemplateWorldType === WorldType.XIANXIA
? WorldType.XIANXIA