mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 23:59:12 +01: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:
@@ -17,6 +17,7 @@ FOLDER = 'scenery/tory/napedy'
|
|||||||
PATTERN = re.compile(r'^(ele1?|mech[12]?)-rz([lp])-([lp])((?:_[a-z]+)*)\.inc$')
|
PATTERN = re.compile(r'^(ele1?|mech[12]?)-rz([lp])-([lp])((?:_[a-z]+)*)\.inc$')
|
||||||
KINDS = {'ele': 'elektryczny', 'mech': 'mechaniczny'}
|
KINDS = {'ele': 'elektryczny', 'mech': 'mechaniczny'}
|
||||||
DEFAULT = 'ele'
|
DEFAULT = 'ele'
|
||||||
|
HEIGHTS = {'ele': 0.05, 'ele1': 0.05}
|
||||||
|
|
||||||
|
|
||||||
def examine(path, file):
|
def examine(path, file):
|
||||||
@@ -49,7 +50,7 @@ def examine(path, file):
|
|||||||
'name: ' + family,
|
'name: ' + family,
|
||||||
'category: switch drive',
|
'category: switch drive',
|
||||||
'description: "' + description + '"',
|
'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:',
|
'params:',
|
||||||
' - {id: 1, role: track, label: Switch}',
|
' - {id: 1, role: track, label: Switch}',
|
||||||
' - {id: 2, role: pos.x}',
|
' - {id: 2, role: pos.x}',
|
||||||
|
|||||||
Reference in New Issue
Block a user