From 33360eb4e21ccd968a092e03c1060587e92f8e16 Mon Sep 17 00:00:00 2001 From: maj00r Date: Sun, 11 Oct 2026 20:48:21 +0200 Subject: [PATCH] fix(editor): drive_headers.py writes height 0.05 for the electric drives ele and ele1, which looked 5 cm too low on a switch laid in the editor --- tools/editor/drive_headers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/editor/drive_headers.py b/tools/editor/drive_headers.py index 9d38ed20..85550274 100644 --- a/tools/editor/drive_headers.py +++ b/tools/editor/drive_headers.py @@ -17,6 +17,7 @@ FOLDER = 'scenery/tory/napedy' PATTERN = re.compile(r'^(ele1?|mech[12]?)-rz([lp])-([lp])((?:_[a-z]+)*)\.inc$') KINDS = {'ele': 'elektryczny', 'mech': 'mechaniczny'} DEFAULT = 'ele' +HEIGHTS = {'ele': 0.05, 'ele1': 0.05} def examine(path, file): @@ -49,7 +50,7 @@ def examine(path, file): 'name: ' + family, 'category: switch drive', 'description: "' + description + '"', - 'switch: {hand: %s, drive: %s, height: 0%s}' % (hand, side, ', default: true' if family == DEFAULT else ''), + 'switch: {hand: %s, drive: %s, height: %s%s}' % (hand, side, HEIGHTS.get(family, 0), ', default: true' if family == DEFAULT else ''), 'params:', ' - {id: 1, role: track, label: Switch}', ' - {id: 2, role: pos.x}',