RynthSuite as of 2026-11-12 (internal b899791): release 2026.11.12.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tom Bohar 2026-11-12 19:56:37 -05:00
commit b48c49f76e
110 changed files with 12476 additions and 340 deletions

View file

@ -527,6 +527,7 @@ public sealed partial class RynthLuaPlugin
_recorder.Begin(hud, _maxOps, _maxBytes);
string? error = null;
long alloc0 = LuaScriptHost.AllocationMark();
try
{
DynValue co = s.CreateCoroutine(runner);
@ -541,8 +542,20 @@ public sealed partial class RynthLuaPlugin
}
}
catch (InterpreterException ex) { error = ex.DecoratedMessage ?? ex.Message; }
catch (OutOfMemoryException) { error = "the game ran out of memory"; }
catch (Exception ex) { error = ex.Message; }
// The memory guard (LuaScriptHost.ChargeAllocation): a pass that used too much stops the script.
if (error == "the game ran out of memory")
hud.Ctx.Host.StopForMemory("the game ran out of memory during its hud pass", "the game ran out of memory in a hud pass");
else
hud.Ctx.Host.ChargeAllocation(LuaScriptHost.AllocationMark() - alloc0, $"hud pass ({hud.Name})");
if (!hud.Ctx.Host.Loaded)
{
_recorder.Abort();
return;
}
if (error != null)
{
// An error can quote a huge string (error(string.rep(...))): keep what the window,