Ship item nicknames, Tiny fear override, and ensure-match API.

Add 冰眼/蛇矛 aliases, correct Tiny fears to Hydra's Breath, and fix production match detail POST 405.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
voson
2026-08-01 04:05:48 +08:00
co-authored by Cursor
parent cafd0651b1
commit 820c3fb1f1
17 changed files with 656 additions and 53 deletions
+16 -1
View File
@@ -300,13 +300,21 @@ def load_items_meta_index() -> dict:
if not isinstance(row, dict) or not row.get("key"):
continue
key = str(row["key"])
out[key] = {
cell = {
"key": key,
"name_loc": row.get("name_loc") or row.get("dname") or key,
"cost": row.get("cost"),
"desc_loc": row.get("desc_loc") or "",
"tags": list(row.get("tags") or []),
}
aliases = [
str(a).strip()
for a in (row.get("aliases") or [])
if str(a).strip()
]
if aliases:
cell["aliases"] = aliases
out[key] = cell
return out
@@ -340,6 +348,13 @@ def load_item_shop() -> dict:
row = dict(row)
row["tags"] = list(m.get("tags") or [])
row["desc_loc"] = m.get("desc_loc") or ""
aliases = [
str(a).strip()
for a in (m.get("aliases") or [])
if str(a).strip()
]
if aliases:
row["aliases"] = aliases
items[key] = row
except (OSError, json.JSONDecodeError):
pass