File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -4426,6 +4426,22 @@ OpenRails subfolder that uses the second possibility is as follows::
4426
4426
4427
4427
Take into account that the first line must be blank (before the include line).
4428
4428
4429
+ In case of more trainsets residing in the same folder and requiring the same
4430
+ additional .wag or .eng files with exactly the same contents, it is useful to
4431
+ use the conventional filename ``##SameName## ``.
4432
+ OR wil replace that filename with the filename of the file containing the Include
4433
+ statement. So, in the case of the example above, instead of::
4434
+
4435
+ include ( ../bc13ge70tonner.eng )
4436
+
4437
+ the following can be written::
4438
+
4439
+ include ( ../##SameName## )
4440
+
4441
+ This way all additional .wag or .eng files referring to similar trainsets would
4442
+ have exactly the same contents, drastically reducing editing time.
4443
+
4444
+
4429
4445
.. index ::
4430
4446
single: ORTSMaxTractiveForceCurves
4431
4447
Original file line number Diff line number Diff line change @@ -1827,6 +1827,9 @@ private string ReadItem(bool skip_mode, bool string_mode)
1827
1827
filename = ReadItem ( skip_mode , string_mode ) ;
1828
1828
SkipRestOfBlock ( ) ;
1829
1829
}
1830
+ var purefilename = Path . GetFileName ( filename ) . ToLower ( ) ;
1831
+ if ( purefilename == "##samename##" )
1832
+ filename = Path . GetDirectoryName ( filename ) + @"\" + Path . GetFileName ( FileName ) ;
1830
1833
var includeFileName = Path . GetDirectoryName ( FileName ) + @"\" + filename ;
1831
1834
if ( ! File . Exists ( includeFileName ) )
1832
1835
STFException . TraceWarning ( this , string . Format ( "'{0}' not found" , includeFileName ) ) ;
You can’t perform that action at this time.
0 commit comments