Skip to content

Commit d6c1136

Browse files
committed
own_waytype only works with electrified_track
1 parent a82991a commit d6c1136

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

simutrans_dat.sublime-completions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
{ "trigger": "no_foreground", "contents": "no_foreground=${1:1}" },
131131
{ "trigger": "noconstruction", "contents": "noconstruction=${1:1}" },
132132
{ "trigger": "noinfo", "contents": "noinfo=${1:1}" },
133-
{ "trigger": "own_waytype", "contents": "own_waytype=${1:1}" },
133+
{ "trigger": "own_waytype", "contents": "own_waytype=${1:electricfied_track}" },
134134
{ "trigger": "pillar_asymmetric", "contents": "pillar_asymmetric=${1:1}" },
135135
{ "trigger": "single_way", "contents": "single_way=${1:1}" },
136136
{ "trigger": "trees_on_top", "contents": "trees_on_top=${1:1}" },

simutrans_dat.tmLanguage

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@
9494
<key>comment</key>
9595
<string>
9696
parameters with boolean values
97-
draw_as_ding, enables_pax, enables_post, enables_ware, end_of_choose, free_route, is_longblocksignal, is_presignal, is_private, is_signal, needs_ground, no_foreground, noconstruction, noinfo, own_waytype, pillar_asymmetric, single_way, trees_on_top
97+
draw_as_ding, enables_pax, enables_post, enables_ware, end_of_choose, free_route, is_longblocksignal, is_presignal, is_private, is_signal, needs_ground, no_foreground, noconstruction, noinfo, pillar_asymmetric, single_way, trees_on_top
9898
</string>
9999
<key>match</key>
100-
<string>(^([dD]raw_[aA]s_[dD]ing|[eE](nables_([pP](ax|ost)|[wW]are)|nd_[oO]f_[cC]hoose)|[fF]ree_[rR]oute|[iI]s_([pP]rivate|([lL]ong[bB]lock|[pP]re)?[sS]ignal)|[nN](eeds_[gG]round|o(_[fF]oreground|[cC]onstruction|[iI]nfo))|[oO]wn_[wW]aytype|[pP]illar_[aA]symmetric|[sS]ingle_[wW]ay|[tT]rees_[oO]n_[tT]op))\b([ \t]*=[ \t]*((0|1)|(true|false))$)?</string>
100+
<string>(^([dD]raw_[aA]s_[dD]ing|[eE](nables_([pP](ax|ost)|[wW]are)|nd_[oO]f_[cC]hoose)|[fF]ree_[rR]oute|[iI]s_([pP]rivate|([lL]ong[bB]lock|[pP]re)?[sS]ignal)|[nN](eeds_[gG]round|o(_[fF]oreground|[cC]onstruction|[iI]nfo))|[pP]illar_[aA]symmetric|[sS]ingle_[wW]ay|[tT]rees_[oO]n_[tT]op))\b([ \t]*=[ \t]*((0|1)|(true|false))$)?</string>
101101
<key>captures</key>
102102
<dict>
103103
<key>1</key>
@@ -443,6 +443,25 @@
443443
</dict>
444444
</dict>
445445
</dict>
446+
<dict>
447+
<key>comment</key>
448+
<string>own_waytype parameter</string>
449+
<key>match</key>
450+
<string>([oO]wn_[wW]aytype)([ \t]*=[ \t]*([eE]lectrified_[tT]rack)$)?</string>
451+
<key>captures</key>
452+
<dict>
453+
<key>1</key>
454+
<dict>
455+
<key>name</key>
456+
<string>entity.name.tag.parameter.simutrans_dat</string>
457+
</dict>
458+
<key>3</key>
459+
<dict>
460+
<key>name</key>
461+
<string>constant.language.value.simutrans_dat</string>
462+
</dict>
463+
</dict>
464+
</dict>
446465
<dict>
447466
<key>comment</key>
448467
<string>seasons parameter</string>

snippets/obj_way-object.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ waytype=${4:string}
66
topspeed=${5:number}
77
cost=${6:number}
88
maintenance=${7:number}
9-
own_waytype=${8:number}
9+
own_waytype=${8:electrified_track}
1010
intro_month=${9:number}
1111
intro_year=${10:number}
1212
retire_month=${11:number}

0 commit comments

Comments
 (0)