Files
2026-11-06 12:34:01 +05:00

16 lines
1023 B
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Play → выполнить Luau-файл на клиенте (проверка) → вывод консоли → стоп.
// node tools/mcp/play-check.js <client-check.lua>
const fs = require('fs'), path = require('path'), os = require('os'), { execFileSync } = require('child_process');
const code = fs.readFileSync(process.argv[2], 'utf8').replace(/^/, '');
const steps = [
{ tool: 'start_stop_play', args: { is_start: true }, waitAfter: 20000 },
{ tool: 'execute_luau', args: { datamodel_type: 'Client', code } },
{ tool: 'get_console_output' },
{ tool: 'start_stop_play', args: { is_start: false } },
];
const tmp = path.join(os.tmpdir(), 'fishing-check-' + process.pid + '.json');
fs.writeFileSync(tmp, JSON.stringify(steps));
const res = execFileSync('node', [path.join(__dirname, 'run.js'), tmp], { encoding: 'utf8', maxBuffer: 1 << 26 });
fs.unlinkSync(tmp);
console.log(res.split('\n').filter(l => !/MaterialVariant|TexturePack|LowPolyFlat|not authorized|81504106|203785492/.test(l)).join('\n'));