feat: 50 игр на Lua + импорт Roblox для всех + поддержка Lua в плеере #39
@ -4426,6 +4426,13 @@ export class GameRuntime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_log(level, text, scriptId = null, scriptName = null) {
|
_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) {
|
if (this._onLog) {
|
||||||
try { this._onLog({ level, text, ts: Date.now(), scriptId, scriptName }); } catch (e) { /* ignore */ }
|
try { this._onLog({ level, text, ts: Date.now(), scriptId, scriptName }); } catch (e) { /* ignore */ }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user