fix(구조물표): 323-9 ③ M02 부품 끔 막힘 안내 — 형상 부품을 꺼서 형상이 「없음」이 된 것이면 「부품 「맹암거」 끔 — 이 부품을 쓰는 종류(A 횡단배수 · 맹암거)의 횡단도를 「안 만듦」으로 바꿔야 저장」 한 줄(부품 이름 + 쓰는 종류 전부) · 막음은 그대로 · 화면 · 서버 짝
- M02_SO_Def_Check.ts ↔ M02_SO_Check.py: 부품 끄기 전 표로 끈 탓 가름 · 부품마다 한 줄 - 시험: test_322_2_check_mirror(벽 끔 = 다섯 종류 한 줄 · 맹암거 끔 = A 횡단배수 · 맹암거 · 짝 같음) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ji4nuyLVHcxrXWHTdb5nRD
This commit is contained in:
@@ -104,13 +104,20 @@ def _row_errors(doc: dict[str, Any], before: dict[str, Any] | None) -> list[str]
|
||||
"""표 줄 — 218 규칙 · 부품 자리꼴 · 정본 · 읽는 칸 보임(새로 숨김만)."""
|
||||
parts = load_parts()["parts"]
|
||||
rows = resolve_catalog(doc)
|
||||
raw = resolve_catalog({**doc, "부품": {}}) # 부품 끄기 전 — 끈 탓 가름(323-9)
|
||||
off_users: dict[str, list[str]] = {} # 끈 형상 부품 → 횡단도를 바꿔야 하는 종류
|
||||
out: list[str] = []
|
||||
for t in doc.get("types") or []:
|
||||
row = rows.get(t["type_id"])
|
||||
if row is None:
|
||||
continue
|
||||
if row["shape"] == "none" and row["station"] != "none":
|
||||
out.append(f"「{row['name']}」 형상이 「없음」이면 횡단도도 「안 만듦」")
|
||||
was = raw[t["type_id"]]["shape"]
|
||||
if was != "none" and (doc.get("부품") or {}).get(f"형상.{was}") is False:
|
||||
label = f"{row['groupName']} · {row['name']}"
|
||||
off_users.setdefault(was, []).append(label)
|
||||
else:
|
||||
out.append(f"「{row['name']}」 형상이 「없음」이면 횡단도도 「안 만듦」")
|
||||
# 앞 판 없음 = 새로 숨긴 것 없음 · 복사한 종류 = 본보기가 앞 판에서 숨긴 칸도 그대로(323-7)
|
||||
kept = [k for tid in (t["type_id"], row["base"]) for k in _hidden_in(before or doc, tid)]
|
||||
hidden = [key for key in _hidden_in(doc, t["type_id"]) if key not in kept]
|
||||
@@ -142,6 +149,12 @@ def _row_errors(doc: dict[str, Any], before: dict[str, Any] | None) -> list[str]
|
||||
f"「{row['name']}」 {branch} 「{name}」 이 쓰는 칸 「{labels[key]}」 — "
|
||||
"숨길 수 없음"
|
||||
)
|
||||
for part_id, names in off_users.items():
|
||||
name = short_name((parts["형상"].get(part_id) or {}).get("이름", part_id))
|
||||
out.append(
|
||||
f"부품 「{name}」 끔 — 이 부품을 쓰는 종류({', '.join(names)})의 "
|
||||
"횡단도를 「안 만듦」으로 바꿔야 저장"
|
||||
)
|
||||
return out
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user