fix bug
This commit is contained in:
@@ -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}"
|
||||
|
||||
|
||||
@@ -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 [
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user