Snapshot for release 2026.10.15.2 (internal 9094d68)
This commit is contained in:
parent
8bb1c3aa23
commit
516ad2bdf2
121 changed files with 6486 additions and 781 deletions
|
|
@ -41,6 +41,8 @@ internal static class EngineSettings
|
|||
private static bool _serverMessageStream = true;
|
||||
private static bool _flightRecorder = true;
|
||||
private static bool _insertReleasesUi;
|
||||
// "LoadAllServerPlugins": hand-set only, written back only when true (PluginManifestGate).
|
||||
private static bool _loadAllServerPlugins;
|
||||
// Read-only, like EnableLargeAddressAlignmentFix: only a hand-set value is written back.
|
||||
private static int _maxHotReloads = ReloadCapNotice.DefaultMaxHotReloads;
|
||||
// "IltServerNames" / "IltHosts": what counts as Infinite Leaftide (Compatibility/IltInfo.cs).
|
||||
|
|
@ -110,6 +112,21 @@ internal static class EngineSettings
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// True: every installed server plugin (RynthColdeve, RynthILT, ...) loads, whatever server the
|
||||
/// client connects to; each still shows only on its own server. Default false: the connect host
|
||||
/// picks the one plugin for this server (PluginManifestGate.SelectServerPlugins). Set
|
||||
/// "LoadAllServerPlugins": true in engine.json by hand (testing a plugin with /rc server ... on).
|
||||
/// </summary>
|
||||
public static bool LoadAllServerPlugins
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureLoaded();
|
||||
return _loadAllServerPlugins;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>When false, AvaloniaOverlay.Start() is skipped so the Avalonia STA thread,
|
||||
/// the offscreen overlay window, and all OverlayHost-registered panels never instantiate.
|
||||
/// Eliminates the entire Avalonia/Skia surface from the process. Compatibility hooks and
|
||||
|
|
@ -425,7 +442,8 @@ internal static class EngineSettings
|
|||
|
||||
/// <summary>"IltServerNames" in engine.json: world-name patterns ('*' wildcard, case-insensitive)
|
||||
/// treated as Infinite Leaftide; null when the file has none (IltDetect.DefaultServerNames).
|
||||
/// An empty array turns the world-name signal off. Read only: edited in the file.</summary>
|
||||
/// An empty array turns the world-name signal off. Edited in the file, or with
|
||||
/// "/rc server names ilt add|remove" (EditIltServerName).</summary>
|
||||
public static IReadOnlyList<string>? IltServerNames
|
||||
{
|
||||
get
|
||||
|
|
@ -435,6 +453,31 @@ internal static class EngineSettings
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>Longest world-name pattern EditIltServerName takes.</summary>
|
||||
public const int MaxIltServerNameLength = 64;
|
||||
|
||||
/// <summary>
|
||||
/// Adds (<paramref name="add"/>) or removes a world-name pattern in "IltServerNames" and saves
|
||||
/// engine.json. With none in the file the list starts from IltDetect.DefaultServerNames, so
|
||||
/// adding one keeps the defaults. False when nothing changed (already there, not there, or
|
||||
/// an empty / too long pattern).
|
||||
/// </summary>
|
||||
public static bool EditIltServerName(string pattern, bool add)
|
||||
{
|
||||
EnsureLoaded();
|
||||
string p = (pattern ?? string.Empty).Trim();
|
||||
if (p.Length == 0 || p.Length > MaxIltServerNameLength) return false;
|
||||
var list = new List<string>(_iltServerNames ?? (IEnumerable<string>)Compatibility.IltDetect.DefaultServerNames);
|
||||
int at = list.FindIndex(x => x.Equals(p, StringComparison.OrdinalIgnoreCase));
|
||||
if (add == (at >= 0)) return false;
|
||||
if (add) list.Add(p);
|
||||
else list.RemoveAt(at);
|
||||
// Replaced, never edited in place: IltInfo reads the old list on other threads.
|
||||
_iltServerNames = list;
|
||||
Save();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>"IltHosts" in engine.json: launch hosts (a domain covers its subdomains, '*' allowed)
|
||||
/// treated as Infinite Leaftide; null when the file has none (IltDetect.DefaultHosts).</summary>
|
||||
public static IReadOnlyList<string>? IltHosts
|
||||
|
|
@ -538,6 +581,12 @@ internal static class EngineSettings
|
|||
_enableLargeAddressAlignmentFix = laaEl.GetBoolean();
|
||||
}
|
||||
|
||||
if (doc.RootElement.TryGetProperty("LoadAllServerPlugins", out var lasEl) &&
|
||||
(lasEl.ValueKind == JsonValueKind.True || lasEl.ValueKind == JsonValueKind.False))
|
||||
{
|
||||
_loadAllServerPlugins = lasEl.GetBoolean();
|
||||
}
|
||||
|
||||
if (doc.RootElement.TryGetProperty("EnableAvaloniaOverlay", out var avEl) &&
|
||||
(avEl.ValueKind == JsonValueKind.True || avEl.ValueKind == JsonValueKind.False))
|
||||
{
|
||||
|
|
@ -694,6 +743,7 @@ internal static class EngineSettings
|
|||
"DecalInGameImGui", "DecalStandDown", "DisabledUiHooks", "ServerMessageStream",
|
||||
"FlightRecorder", "InsertReleasesUi", "IltServerNames", "IltHosts", "EnableLargeAddressAlignmentFix",
|
||||
"MaxHotReloads", "ReportEndpoint", "CloseOnServerDisconnect", "AutoIdMode", "EnablePluginOverlayWindows", "LoggingLevel",
|
||||
"LoadAllServerPlugins",
|
||||
};
|
||||
|
||||
private static void Save()
|
||||
|
|
@ -747,6 +797,8 @@ internal static class EngineSettings
|
|||
w.WriteBoolean("InsertReleasesUi", true);
|
||||
if (!_closeOnServerDisconnect) // default true: leave the file as it was
|
||||
w.WriteBoolean("CloseOnServerDisconnect", false);
|
||||
if (_loadAllServerPlugins) // default false: only a hand-set true is written
|
||||
w.WriteBoolean("LoadAllServerPlugins", true);
|
||||
if (_maxHotReloads != ReloadCapNotice.DefaultMaxHotReloads) // only a hand-set value is written
|
||||
w.WriteNumber("MaxHotReloads", _maxHotReloads);
|
||||
if (_reportEndpoint != null) // only a hand-set value is written
|
||||
|
|
|
|||
Loading…
Reference in a new issue