Implement native layout-3 save restoration

This commit is contained in:
gamer147
2026-07-24 16:23:01 -04:00
parent 3b63c42826
commit 3ace5371e6
21 changed files with 1659 additions and 81 deletions

View File

@@ -176,8 +176,14 @@ internal class RecordingHost : IHost
internal sealed class MapProvider : IScriptProvider
{
private readonly Dictionary<long, Script> _m;
public MapProvider(Dictionary<long, Script> m) => _m = m;
private readonly Dictionary<string, Script> _byName;
public MapProvider(Dictionary<long, Script> m, Dictionary<string, Script>? byName = null)
{
_m = m;
_byName = byName ?? new(StringComparer.OrdinalIgnoreCase);
}
public Script? GetById(long id) => _m.TryGetValue(id, out var s) ? s : null;
public Script? GetByName(string name) => _byName.TryGetValue(name, out var s) ? s : null;
}
/// <summary>A controlled test double: every call-script id resolves to the same script (typically a