From 30d472bf43c277b1693b5f14d8c38aa35388dfaa Mon Sep 17 00:00:00 2001 From: min Date: Mon, 8 Jun 2026 11:35:11 +0300 Subject: [PATCH] =?UTF-8?q?feat(lua):=20=D0=B4=D1=83=D0=B1=D0=BB=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20Lua=20print()=20=D0=B2?= =?UTF-8?q?=20DevTools=20Console=20=D0=B4=D0=BB=D1=8F=20=D0=BE=D1=82=D0=BB?= =?UTF-8?q?=D0=B0=D0=B4=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/editor/engine/GameRuntime.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/editor/engine/GameRuntime.js b/src/editor/engine/GameRuntime.js index 9261130..7062b70 100644 --- a/src/editor/engine/GameRuntime.js +++ b/src/editor/engine/GameRuntime.js @@ -4426,6 +4426,13 @@ export class GameRuntime { } _log(level, text, scriptId = null, scriptName = null) { + // Дублируем в DevTools Console — удобно для отладки скриптов + try { + const fn = level === 'error' ? console.error + : level === 'warn' ? console.warn + : console.log; + fn(`[script${scriptName ? ' ' + scriptName : ''}] ${text}`); + } catch (_) {} if (this._onLog) { try { this._onLog({ level, text, ts: Date.now(), scriptId, scriptName }); } catch (e) { /* ignore */ } }