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