From a25803fa30b9d00e85e5c35fa893df18e6e0e968 Mon Sep 17 00:00:00 2001 From: routersys Date: Wed, 1 Jul 2026 13:49:35 +0900 Subject: [PATCH] =?UTF-8?q?setoption=E3=81=AEdraw=5Fstate=E3=82=92?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=81=B8?= =?UTF-8?q?=E6=A9=8B=E6=B8=A1=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaScript/LuaScriptEngine.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/LuaScript/LuaScriptEngine.cs b/LuaScript/LuaScriptEngine.cs index 7b79a92..098c652 100644 --- a/LuaScript/LuaScriptEngine.cs +++ b/LuaScript/LuaScriptEngine.cs @@ -653,7 +653,13 @@ namespace LuaScript _activeCancellation.ThrowIfCancellationRequested(); if (args.Count == 0 || args[0].Type != DataType.String) return DynValue.Void; - _options[args[0].String] = args.Count > 1 ? args[1] : DynValue.True; + var name = args[0].String; + var value = args.Count > 1 ? args[1] : DynValue.True; + _options[name] = value; + if (name == "draw_state" && _activeContext is not null) + _activeContext.DrawStateOverride = value.Type == DataType.Boolean + ? value.Boolean + : (value.CastToNumber() ?? 0d) != 0d; return DynValue.Void; });