update mubea with BTMT information
This commit is contained in:
+60
-1
@@ -339,6 +339,10 @@ def process_blocks(blocks, lookup):
|
||||
strecke_bezeichnungen = [] # Bezeichnung-Attribut loser Strecke-Elemente
|
||||
vario_list = [] # Liste von VarioFoerderer-Compound-Bloecken (VF_N), je einer Zeile
|
||||
gefaelle_list = [] # Liste von Gefaellestrecke-Bloecken (GF_*), je einer Zeile
|
||||
btmt_beladung_ids = [] # IDs aller BTMT-Beladung*-Bloecke (eine gruppierte Zeile)
|
||||
btmt_beladung_bezeichnungen = []
|
||||
btmt_entladung_ids = [] # IDs aller SC_Entladung*-Bloecke (eine gruppierte Zeile)
|
||||
btmt_entladung_bezeichnungen = []
|
||||
|
||||
counters = {
|
||||
"anzahl_boegen": 0,
|
||||
@@ -381,6 +385,23 @@ def process_blocks(blocks, lookup):
|
||||
if matches_any(bname, SEP_SCANNER_PATTERNS):
|
||||
continue
|
||||
|
||||
# --- BTMT-Beladestation ---
|
||||
# Anders als Separator/Scanner wird sie von keinem Carrier-Attribut
|
||||
# mitgezaehlt, darum eigene (gruppierte) Zeile UND eigener Zaehler in
|
||||
# der ILS-Automation-Summierungszeile (siehe unten).
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_btmt_beladung", [])):
|
||||
btmt_beladung_ids.append(get_id(block))
|
||||
btmt_beladung_bezeichnungen.append(block.get("attribs", {}).get("Bezeichnung", ""))
|
||||
counters["anzahl_btbeladung"] += 1
|
||||
continue
|
||||
|
||||
# --- BTMT-Entladestation (Abwurfstation) ---
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_btmt_entladung", [])):
|
||||
btmt_entladung_ids.append(get_id(block))
|
||||
btmt_entladung_bezeichnungen.append(block.get("attribs", {}).get("Bezeichnung", ""))
|
||||
counters["anzahl_abwurfstationen"] += 1
|
||||
continue
|
||||
|
||||
# --- Omniflo Bogen oder Weiche (erkannt via Katalog) ---
|
||||
if bname in lookup:
|
||||
typ, eintrag = lookup[bname]
|
||||
@@ -649,6 +670,42 @@ def process_blocks(blocks, lookup):
|
||||
})
|
||||
nr += 1
|
||||
|
||||
# BTMT-Beladestationen: eine gruppierte Zeile fuer alle Instanzen (wie die
|
||||
# losen Strecke-Elemente oben) - Stueckzahl zusaetzlich im Automation-
|
||||
# Zaehler "Anzahl aller BTBeladung" (siehe counters oben).
|
||||
if btmt_beladung_ids:
|
||||
sivasnr, teileart = ILS_SIVASNR["bt_beladung"]
|
||||
items.append({
|
||||
"nr": nr,
|
||||
"teileart": teileart,
|
||||
"sivasnr": sivasnr,
|
||||
"sivasnr_quoted": True,
|
||||
"bezeichnung": ", ".join(b for b in btmt_beladung_bezeichnungen if b),
|
||||
"dispgruppe": 20,
|
||||
"anzahl": len(btmt_beladung_ids),
|
||||
"laenge_mm": "",
|
||||
"ids": btmt_beladung_ids,
|
||||
"details": {},
|
||||
})
|
||||
nr += 1
|
||||
|
||||
# BTMT-Entladestationen (Abwurfstationen): analog gruppiert.
|
||||
if btmt_entladung_ids:
|
||||
sivasnr, teileart = ILS_SIVASNR["bg_entladung"]
|
||||
items.append({
|
||||
"nr": nr,
|
||||
"teileart": teileart,
|
||||
"sivasnr": sivasnr,
|
||||
"sivasnr_quoted": True,
|
||||
"bezeichnung": ", ".join(b for b in btmt_entladung_bezeichnungen if b),
|
||||
"dispgruppe": 20,
|
||||
"anzahl": len(btmt_entladung_ids),
|
||||
"laenge_mm": "",
|
||||
"ids": btmt_entladung_ids,
|
||||
"details": {},
|
||||
})
|
||||
nr += 1
|
||||
|
||||
# VarioFoerderer-Compound-Bloecke (VF_N) - je Block eine eigene Zeile mit
|
||||
# vollstaendigen Gefaelle-/Angetrieben-Teilgruppen (immer TYP "Streckengruppe").
|
||||
for block in vario_list:
|
||||
@@ -699,7 +756,9 @@ def process_blocks(blocks, lookup):
|
||||
has_ils = (counters["anzahl_kreisel"] > 0
|
||||
or counters["anzahl_eckraeder"] > 0
|
||||
or counters["anzahl_variofoerderer"] > 0
|
||||
or counters["anzahl_gefaellestrecken"] > 0)
|
||||
or counters["anzahl_gefaellestrecken"] > 0
|
||||
or counters["anzahl_btbeladung"] > 0
|
||||
or counters["anzahl_abwurfstationen"] > 0)
|
||||
if has_ils:
|
||||
automation_details = {
|
||||
"Anzahl Kreisel": counters["anzahl_kreisel"],
|
||||
|
||||
Reference in New Issue
Block a user