@@ -10,6 +10,7 @@ import {
|
||||
type WorldTemplateType,
|
||||
WorldType,
|
||||
} from '../types';
|
||||
import { resolveCustomWorldCompatibilityTemplateWorldType } from '../services/customWorldTheme';
|
||||
|
||||
const CUSTOM_WORLD_NPC_IMAGE_POOL = [
|
||||
'/character/Sword%20Princess/Original/Hero/idle/Idle01.png',
|
||||
@@ -80,7 +81,7 @@ const SCENE_MATCH_STOP_CHARS = new Set([
|
||||
'桥',
|
||||
]);
|
||||
|
||||
const WUXIA_SCENE_IMAGE_REFERENCES: SceneImageReference[] = [
|
||||
const MARTIAL_TEMPLATE_SCENE_IMAGE_REFERENCES: SceneImageReference[] = [
|
||||
{
|
||||
name: '山门石阶',
|
||||
keywords: ['山门', '石阶', '门派', '山路', '石门', '宗门'],
|
||||
@@ -131,7 +132,7 @@ const WUXIA_SCENE_IMAGE_REFERENCES: SceneImageReference[] = [
|
||||
},
|
||||
] as const;
|
||||
|
||||
const XIANXIA_SCENE_IMAGE_REFERENCES: SceneImageReference[] = [
|
||||
const ARCANE_TEMPLATE_SCENE_IMAGE_REFERENCES: SceneImageReference[] = [
|
||||
{
|
||||
name: '云海仙门',
|
||||
keywords: ['云海', '仙门', '山门', '灵门', '云阶', '门阙'],
|
||||
@@ -182,12 +183,12 @@ const XIANXIA_SCENE_IMAGE_REFERENCES: SceneImageReference[] = [
|
||||
},
|
||||
] as const;
|
||||
|
||||
const WORLD_SCENE_IMAGE_REFERENCES: Record<
|
||||
const COMPATIBILITY_TEMPLATE_SCENE_IMAGE_REFERENCES: Record<
|
||||
WorldTemplateType,
|
||||
readonly SceneImageReference[]
|
||||
> = {
|
||||
[WorldType.WUXIA]: WUXIA_SCENE_IMAGE_REFERENCES,
|
||||
[WorldType.XIANXIA]: XIANXIA_SCENE_IMAGE_REFERENCES,
|
||||
[WorldType.WUXIA]: MARTIAL_TEMPLATE_SCENE_IMAGE_REFERENCES,
|
||||
[WorldType.XIANXIA]: ARCANE_TEMPLATE_SCENE_IMAGE_REFERENCES,
|
||||
};
|
||||
|
||||
type CustomWorldSceneImageMatchOptions = {
|
||||
@@ -259,7 +260,7 @@ function uniqueStrings(values: Array<string | null | undefined>) {
|
||||
|
||||
function buildSceneReferencePool(worldType: WorldTemplateType) {
|
||||
const pool = collectWorldSceneImagePool(worldType);
|
||||
const references = WORLD_SCENE_IMAGE_REFERENCES[worldType] ?? [];
|
||||
const references = COMPATIBILITY_TEMPLATE_SCENE_IMAGE_REFERENCES[worldType] ?? [];
|
||||
|
||||
return references.map((reference, index) => ({
|
||||
...reference,
|
||||
@@ -488,6 +489,7 @@ export function resolveCustomWorldLandmarkImage(
|
||||
| 'playerGoal'
|
||||
| 'settingText'
|
||||
| 'templateWorldType'
|
||||
| 'compatibilityTemplateWorldType'
|
||||
| 'ownedSettingLayers'
|
||||
>,
|
||||
landmark: Pick<CustomWorldLandmark, 'id' | 'name' | 'description' | 'dangerLevel' | 'imageSrc'>,
|
||||
@@ -502,7 +504,7 @@ export function resolveCustomWorldLandmarkImage(
|
||||
return getDefaultCustomWorldSceneImage(
|
||||
profile.id || profile.name,
|
||||
index,
|
||||
profile.templateWorldType,
|
||||
resolveCustomWorldCompatibilityTemplateWorldType(profile),
|
||||
{
|
||||
profile,
|
||||
landmark,
|
||||
@@ -521,6 +523,7 @@ export function resolveCustomWorldLandmarkImageMap(
|
||||
| 'playerGoal'
|
||||
| 'settingText'
|
||||
| 'templateWorldType'
|
||||
| 'compatibilityTemplateWorldType'
|
||||
| 'landmarks'
|
||||
| 'camp'
|
||||
| 'ownedSettingLayers'
|
||||
@@ -559,6 +562,7 @@ export function resolveCustomWorldCampSceneImage(
|
||||
| 'playerGoal'
|
||||
| 'settingText'
|
||||
| 'templateWorldType'
|
||||
| 'compatibilityTemplateWorldType'
|
||||
| 'landmarks'
|
||||
| 'camp'
|
||||
| 'ownedSettingLayers'
|
||||
@@ -575,7 +579,7 @@ export function resolveCustomWorldCampSceneImage(
|
||||
return getDefaultCustomWorldSceneImage(
|
||||
profile.id || profile.name,
|
||||
-1,
|
||||
profile.templateWorldType,
|
||||
resolveCustomWorldCompatibilityTemplateWorldType(profile),
|
||||
{
|
||||
profile,
|
||||
landmark: {
|
||||
|
||||
Reference in New Issue
Block a user