17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00

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

This commit is contained in:
maj00r
2026-10-11 20:48:21 +02:00
parent 080e308d5e
commit 33360eb4e2

View File

@@ -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}',