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,7 +1,7 @@
import {
type CustomWorldThemeMode,
detectCustomWorldThemeMode,
resolveCustomWorldAnchorWorldType,
resolveCustomWorldCompatibilityTemplateWorldType,
} from '../services/customWorldTheme';
import { CustomWorldItem, CustomWorldProfile, InventoryItem, WorldTemplateType, WorldType } from '../types';
@@ -15,13 +15,15 @@ export function getRuntimeCustomWorldProfile() {
return runtimeCustomWorldProfile;
}
export function resolveRuleWorldType(
export function resolveCompatibilityTemplateWorldType(
worldType: WorldType | null | undefined,
customWorldProfile: CustomWorldProfile | null | undefined = runtimeCustomWorldProfile,
): WorldTemplateType | null {
if (!worldType) return null;
if (worldType === WorldType.CUSTOM) {
return customWorldProfile ? resolveCustomWorldAnchorWorldType(customWorldProfile) : WorldType.WUXIA;
return customWorldProfile
? resolveCustomWorldCompatibilityTemplateWorldType(customWorldProfile)
: WorldType.WUXIA;
}
return worldType;
}