Files
OpenMaidEngine/engine/Age.Engine/Hosting/CaptureHost.cs
2026-07-06 13:53:03 -04:00

11 lines
492 B
C#

namespace Age.Engine.Hosting;
public sealed class CaptureHost : IHost
{
public List<(int Offset, string Text)> Emitted { get; } = new();
public int CallScriptCount { get; private set; }
public Dictionary<int, int> Stubs { get; } = new();
public void ShowText(int offset, string text) => Emitted.Add((offset, text));
public void CallScript(long id) => CallScriptCount++;
public void OnStub(int opcode) { Stubs.TryGetValue(opcode, out var c); Stubs[opcode] = c + 1; }
}