17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 05:09:20 +02:00

feat(editor): every switch laid gets its drive at once, also the one made by pulling a free end into a straight (named z1, z2... like the others): the drive marked default: true in its //$e description (mech_komin) until another is picked, on the diverging side or the other; the drive goes into the same undo step as the switch; a switch with a drive puts it on the other side with one button, as one undo step; drive_headers.py marks mech_komin as the default; self-test commands drives and driveflip; Polish translation

This commit is contained in:
maj00r
2026-10-11 19:06:44 +02:00
parent 2751c085d8
commit dae97f7169
7 changed files with 141 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ LINEMARK = '//$e'
FOLDER = 'scenery/tory/napedy'
PATTERN = re.compile(r'^(ele1?|mech[12]?)-rz([lp])-([lp])((?:_[a-z]+)*)\.inc$')
KINDS = {'ele': 'elektryczny', 'mech': 'mechaniczny'}
DEFAULT = 'mech_komin'
def examine(path, file):
@@ -48,7 +49,7 @@ def examine(path, file):
'name: ' + family,
'category: switch drive',
'description: "' + description + '"',
'switch: {hand: %s, drive: %s}' % (hand, side),
'switch: {hand: %s, drive: %s%s}' % (hand, side, ', default: true' if family == DEFAULT else ''),
'params:',
' - {id: 1, role: track, label: Switch}',
' - {id: 2, role: pos.x}',