Files
OpenMaidEngine/godot/OmeRuntimeMetadata.cs
gamer147 551f14cd86
Some checks failed
Core validation / Linux core gate (push) Failing after 1m28s
Release builds / Linux x64 artifact (push) Failing after 38s
Release builds / Windows x64 artifact (push) Failing after 45s
Release builds / Publish tagged Gitea release (push) Has been skipped
Rename release outputs and managed project to OME
2026-08-18 08:39:15 -04:00

25 lines
904 B
C#

using System;
using System.IO;
using System.Reflection;
using Age.Engine.Model;
using Age.Engine.Sys4;
/// <summary>
/// OME profile metadata that must travel with every Godot build. Repository discovery belongs to
/// development tooling; exported runtimes read the generator output embedded into this assembly.
/// </summary>
internal static class OmeRuntimeMetadata
{
internal const string OpcodeTableResourceName = "OME.Runtime.opcodes.json";
internal static OpcodeTable LoadOpcodeTable()
{
Assembly assembly = typeof(OmeRuntimeMetadata).Assembly;
using Stream stream = assembly.GetManifestResourceStream(OpcodeTableResourceName)
?? throw new InvalidDataException(
$"Embedded runtime metadata '{OpcodeTableResourceName}' is missing from " +
$"{assembly.GetName().Name}.");
return OpcodeTableJson.Load(stream);
}
}