mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-23 00:24:41 +01:00
fix: an include in other letter case is no fault, as eu07 opens it
eu07 now finds files whatever the case of their names on Linux too (MaSzyna-EU07/maszyna#362), so the starter no longer folds an include or a scenery's .sbt to lower case to judge whether the simulator opens it: it looks them up through CaseInsensitivePaths. The IncludeLetterCase fault and its texts go, being a false alarm now, and the parser takes a plain yes or no for each include.
This commit is contained in:
@@ -20,11 +20,11 @@ public sealed class SceneryParser
|
||||
_random = random;
|
||||
}
|
||||
|
||||
/// <param name="findInclude">
|
||||
/// What the simulator makes of an include, as the include names it; null leaves
|
||||
/// <param name="opensInclude">
|
||||
/// Whether the simulator opens an include, as the include names it; null leaves
|
||||
/// includes unchecked.
|
||||
/// </param>
|
||||
public Scenery Parse(string path, string content, Func<string, IncludeLookup>? findInclude = null)
|
||||
public Scenery Parse(string path, string content, Func<string, bool>? opensInclude = null)
|
||||
{
|
||||
string original = content;
|
||||
|
||||
@@ -38,7 +38,7 @@ public sealed class SceneryParser
|
||||
|
||||
// Read from the text with its optional includes blanked, which keeps every
|
||||
// place where it was, so a fault's line is the line in the file.
|
||||
var syntax = ScenerySyntax.Scan(content, System.IO.Path.GetFileName(path), findInclude);
|
||||
var syntax = ScenerySyntax.Scan(content, System.IO.Path.GetFileName(path), opensInclude);
|
||||
var faults = syntax.Faults.ToList();
|
||||
var inlined = SceneryIncludes.Ranges(content);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user