Class S100LuaHost
Prepares an ILuaContext with the S-100 host environment that portrayal catalogue Lua scripts expect. This includes colour-token lookup, context parameters (safety contour, etc.), and standard helper functions defined by the S-100 Portrayal Model.
public static class S100LuaHost
- Inheritance
-
S100LuaHost
- Inherited Members
Methods
Configure(ILuaContext, Func<string, string>, IReadOnlyDictionary<string, object?>)
Configures the Lua context with standard S-100 host functions and the provided colour palette and context parameters.
public static void Configure(ILuaContext context, Func<string, string> colorLookup, IReadOnlyDictionary<string, object?> contextParameters)
Parameters
contextILuaContextThe Lua context to configure.
colorLookupFunc<string, string>A function that resolves an S-52 colour token (e.g. "DEPVS") to an sRGB hex string (e.g. "#61B7FF") for the active palette.
contextParametersIReadOnlyDictionary<string, object>Named context parameters (e.g. "SafetyContour" → 30.0) exposed to scripts.