diff --git a/LuaScript/Engine/NativeFieldMap.cs b/LuaScript/Engine/NativeFieldMap.cs index aa4f9f5..12a561c 100644 --- a/LuaScript/Engine/NativeFieldMap.cs +++ b/LuaScript/Engine/NativeFieldMap.cs @@ -38,6 +38,11 @@ namespace LuaScript.Engine f[NativeProtocol.Track1] = ctx.Track1; f[NativeProtocol.Track2] = ctx.Track2; f[NativeProtocol.Track3] = ctx.Track3; + f[NativeProtocol.Check0] = ctx.Check0 ? 1d : 0d; + f[NativeProtocol.Check1] = ctx.Check1 ? 1d : 0d; + f[NativeProtocol.Check2] = ctx.Check2 ? 1d : 0d; + f[NativeProtocol.Check3] = ctx.Check3 ? 1d : 0d; + f[NativeProtocol.Color] = ctx.HasColor ? ctx.ColorValue : -1d; f[NativeProtocol.Time] = ctx.Time; f[NativeProtocol.Frame] = ctx.Frame; f[NativeProtocol.TotalFrame] = ctx.TotalFrame; diff --git a/LuaScript/Engine/NativeProtocol.cs b/LuaScript/Engine/NativeProtocol.cs index 62695ee..36ad513 100644 --- a/LuaScript/Engine/NativeProtocol.cs +++ b/LuaScript/Engine/NativeProtocol.cs @@ -104,6 +104,11 @@ namespace LuaScript.Engine public const int IsPaused = 50; public const int TimelineFrame = 51; public const int TimelineTime = 52; + public const int Check0 = 53; + public const int Check1 = 54; + public const int Check2 = 55; + public const int Check3 = 56; + public const int Color = 57; public const int FirstWritableField = X; public const int LastWritableField = Rzr; diff --git a/native/worker.lua b/native/worker.lua index 22d4465..8740dec 100644 --- a/native/worker.lua +++ b/native/worker.lua @@ -227,6 +227,8 @@ local function loadFields() ymm4.is_saving = f64[48] ~= 0; ymm4.is_playing = f64[49] ~= 0; ymm4.is_paused = f64[50] ~= 0 ymm4.group_ratio = (f64[44] ~= 0) and (f64[43] / f64[44]) or 0 obj.timelineframe = f64[51]; obj.timelinetime = f64[52] + obj.check0 = f64[53] ~= 0; obj.check1 = f64[54] ~= 0; obj.check2 = f64[55] ~= 0; obj.check3 = f64[56] ~= 0 + sandbox.color = (f64[57] >= 0) and f64[57] or nil end local function storeFields()