RynthSuite as of 2026-12-02 (internal 152e13d): release 2026.12.1.1
This commit is contained in:
parent
e8e4228d15
commit
6b5a9c7e99
65 changed files with 3920 additions and 237 deletions
|
|
@ -43,7 +43,7 @@ internal static class AfFileWriter
|
|||
.OrderBy(g => g.Key)
|
||||
.ToList();
|
||||
|
||||
// Collect embedded nav routes referenced by rules
|
||||
// Collect embedded nav routes referenced by rules (cleaned, as the parser and MetaManager read them)
|
||||
var navNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
CollectNavNames(rules, navNames);
|
||||
|
||||
|
|
@ -69,6 +69,18 @@ internal static class AfFileWriter
|
|||
{
|
||||
if (embeddedNavs.TryGetValue(navName, out var content))
|
||||
WriteNavSection(writer, navName, content);
|
||||
else
|
||||
{
|
||||
// A key kept in another spelling ("None]" from an old settings file): the route still goes in.
|
||||
foreach (var kv in embeddedNavs)
|
||||
{
|
||||
if (string.Equals(EmbedNavName.Clean(kv.Key), navName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
WriteNavSection(writer, navName, kv.Value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -94,6 +106,9 @@ internal static class AfFileWriter
|
|||
|
||||
// ── Rule writing ────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>The name written for an Embedded Nav Route with no route (metaf needs a tag); read back as none.</summary>
|
||||
internal const string EmptyNavName = "empty";
|
||||
|
||||
/// <summary>A rule name on one line (it is written as a "~~ @name" comment line).</summary>
|
||||
internal static string OneLine(string? text)
|
||||
{
|
||||
|
|
@ -275,7 +290,7 @@ internal static class AfFileWriter
|
|||
|
||||
case MetaActionType.EmbeddedNavRoute:
|
||||
{
|
||||
string navName = string.IsNullOrEmpty(data) ? "empty" : data.Split(';')[0];
|
||||
string navName = string.IsNullOrEmpty(data) ? EmptyNavName : data.Split(';')[0];
|
||||
writer.Write($"{keyword} {navName} {{[none]}}");
|
||||
break;
|
||||
}
|
||||
|
|
@ -354,7 +369,8 @@ internal static class AfFileWriter
|
|||
if (rule.Action == MetaActionType.EmbeddedNavRoute &&
|
||||
!string.IsNullOrEmpty(rule.ActionData))
|
||||
{
|
||||
navNames.Add(rule.ActionData.Split(';')[0]);
|
||||
string name = EmbedNavName.Clean(rule.ActionData.Split(';')[0]);
|
||||
if (name.Length > 0) navNames.Add(name);
|
||||
}
|
||||
|
||||
if (rule.ActionChildren != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue