This commit is contained in:
bridge
2025-12-11 00:43:00 +08:00
parent 9a16e2aa16
commit f6bd854eaf
4 changed files with 13 additions and 10 deletions

View File

@@ -231,6 +231,9 @@ class CityRegion(Region):
def get_region_type(self) -> str:
return "city"
def _get_desc(self) -> str:
return "(城市)"
def __str__(self) -> str:
return f"城市区域:{self.name} - {self.desc}"

View File

@@ -17,6 +17,9 @@ class SectRegion(Region):
def get_region_type(self) -> str:
return "sect"
def _get_desc(self) -> str:
return f"(宗门:{self.sect_name}"
def get_hover_info(self) -> list[str]:
# 覆盖基础 hover明确显示“宗门驻地”
return [

View File

@@ -123,13 +123,13 @@ async function renderMap() {
// 处理普通地块
let tex = getTileTexture(type, x, y)
// SECT 地块由 renderLargeRegions 渲染,这里跳过
if (type === 'SECT') {
// Legacy placeholder
tex = textures.value['CITY']
continue
}
if (!tex) {
tex = textures.value['PLAIN']
throw new Error(`Missing texture for tile type: ${type} at (${x}, ${y})`)
}
if (!tex) continue

View File

@@ -142,13 +142,10 @@ export function useTextures() {
const tex = await Assets.load(url)
textures.value[key] = tex
} catch (e) {
try {
const encodedUrl = `/assets/sects/${encodeURIComponent(`${sectName}_${i}`)}.png`
const tex = await Assets.load(encodedUrl)
textures.value[key] = tex
} catch (e2) {
console.warn(`Failed to load sect slice: ${key}`)
}
// 尝试 URL 编码后加载
const encodedUrl = `/assets/sects/${encodeURIComponent(`${sectName}_${i}`)}.png`
const tex = await Assets.load(encodedUrl)
textures.value[key] = tex
}
})