Weitere TOS Nummern für Zusatzmodul, Weichen Strecke und Automation in den Code für Export eingepflegt
This commit is contained in:
+60
-9
@@ -103,7 +103,18 @@ def build_kreisel_details(block):
|
||||
# --- Bekannte Bloecke ignorieren ---
|
||||
SKIP_BLOCKS = {"K1", "K2", "K3", "K4", "KS_EIN", "KS_AUS"}
|
||||
|
||||
VARIO_BLOCKS = {
|
||||
# Sivas-Nummern und Bezeichnungen je ILS-Elementtyp
|
||||
ILS_SIVASNR = {
|
||||
"kreisel": ("6200", "ILS 2.0 Kreisel"),
|
||||
"eckrad": ("6210", "ILS 2.0 Eckrad"),
|
||||
"zusatzmodul":("6215", "ILS 2.0 Zusatzmodul"),
|
||||
"ils_weiche": ("6216", "ILS 2.0 Weichen"),
|
||||
"strecke": ("6220", "ILS 2.0 Strecke - Module"),
|
||||
"automation": ("6269", "ILS 2.0 Automation und Pneumatik - Gesamtanlage"),
|
||||
}
|
||||
|
||||
# Strecken-Module: Blocknamen-Fragmente fuer Vario/Staustrecke-Elemente
|
||||
STRECKE_BLOCKS = {
|
||||
"AUS_Element_links", "EIN_Element_links",
|
||||
"Staustrecke_SP_1000_mm", "Staustrecke_Separator_SP_300_mm",
|
||||
"Vario_Spannstation_SP_500mm", "Vario_Motorstation_SP_500mm",
|
||||
@@ -233,9 +244,14 @@ def process_blocks(blocks, lookup):
|
||||
counters["anzahl_streckengruppen"] = 1
|
||||
continue
|
||||
|
||||
# --- VarioFoerderer ---
|
||||
for vb in VARIO_BLOCKS:
|
||||
if vb in bname:
|
||||
# --- ILS Eckrad ---
|
||||
if bname.startswith("ECKRAD_"):
|
||||
counters["anzahl_eckraeder"] += 1
|
||||
continue
|
||||
|
||||
# --- ILS Strecke-Module (Vario/Staustrecke) ---
|
||||
for sb in STRECKE_BLOCKS:
|
||||
if sb in bname:
|
||||
counters["anzahl_variofoerderer"] += 1
|
||||
break
|
||||
|
||||
@@ -286,10 +302,11 @@ def process_blocks(blocks, lookup):
|
||||
nr += 1
|
||||
|
||||
for block in kreisel_list:
|
||||
sivasnr, teileart = ILS_SIVASNR["kreisel"]
|
||||
items.append({
|
||||
"nr": nr,
|
||||
"teileart": "ILS 2.0 Kreisel",
|
||||
"sivasnr": "6200",
|
||||
"teileart": teileart,
|
||||
"sivasnr": sivasnr,
|
||||
"sivasnr_quoted": True,
|
||||
"dispgruppe": 20,
|
||||
"anzahl": 1,
|
||||
@@ -299,8 +316,41 @@ def process_blocks(blocks, lookup):
|
||||
})
|
||||
nr += 1
|
||||
|
||||
if counters["anzahl_eckraeder"] > 0:
|
||||
sivasnr, teileart = ILS_SIVASNR["eckrad"]
|
||||
items.append({
|
||||
"nr": nr,
|
||||
"teileart": teileart,
|
||||
"sivasnr": sivasnr,
|
||||
"sivasnr_quoted": True,
|
||||
"dispgruppe": 20,
|
||||
"anzahl": counters["anzahl_eckraeder"],
|
||||
"laenge_mm": "",
|
||||
"hoehe_m": "",
|
||||
"details": {},
|
||||
})
|
||||
nr += 1
|
||||
|
||||
if counters["anzahl_variofoerderer"] > 0:
|
||||
sivasnr, teileart = ILS_SIVASNR["strecke"]
|
||||
items.append({
|
||||
"nr": nr,
|
||||
"teileart": teileart,
|
||||
"sivasnr": sivasnr,
|
||||
"sivasnr_quoted": True,
|
||||
"dispgruppe": 20,
|
||||
"anzahl": counters["anzahl_variofoerderer"],
|
||||
"laenge_mm": "",
|
||||
"hoehe_m": "",
|
||||
"details": {},
|
||||
})
|
||||
nr += 1
|
||||
|
||||
# ILS Automation Summierungszeile (nur wenn ILS-Elemente vorhanden)
|
||||
if counters["anzahl_kreisel"] > 0 or counters["anzahl_variofoerderer"] > 0:
|
||||
has_ils = (counters["anzahl_kreisel"] > 0
|
||||
or counters["anzahl_eckraeder"] > 0
|
||||
or counters["anzahl_variofoerderer"] > 0)
|
||||
if has_ils:
|
||||
automation_details = {
|
||||
"Anzahl Kreisel": counters["anzahl_kreisel"],
|
||||
"Anzahl Kreisel mit Pinband": counters["anzahl_kreisel_pinband"],
|
||||
@@ -323,10 +373,11 @@ def process_blocks(blocks, lookup):
|
||||
"Anzahl aller BTBeladung": counters["anzahl_btbeladung"],
|
||||
"Anzahl aller Abwurfstationen": counters["anzahl_abwurfstationen"],
|
||||
}
|
||||
auto_sivasnr, auto_teileart = ILS_SIVASNR["automation"]
|
||||
items.append({
|
||||
"nr": nr,
|
||||
"teileart": "ILS 2.0 Automation",
|
||||
"sivasnr": "6270",
|
||||
"teileart": auto_teileart,
|
||||
"sivasnr": auto_sivasnr,
|
||||
"sivasnr_quoted": True,
|
||||
"dispgruppe": 20,
|
||||
"anzahl": 1,
|
||||
|
||||
Reference in New Issue
Block a user