Implement tiled multiplayer city simulation and scaling stages

This commit is contained in:
mrleo1nid committed 2026-10-30 22:06:56 +03:00
1 parent 3d4b29fedf
commit 3b1fcd996a
53 files changed
+7354 -13

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { existsSync } from 'node:fs';
import { resolve, delimiter } from 'node:path';
import { spawn } from 'node:child_process';
const local = resolve('.tools/cargo');
const executable = resolve(local,'bin',process.platform === 'win32' ? 'cargo.exe' : 'cargo');
const env = {...process.env};
if (existsSync(executable)) {
env.CARGO_HOME = local; env.RUSTUP_HOME = resolve('.tools/rustup');
const pathKey=Object.keys(env).find(key=>key.toLowerCase()==='path') || 'PATH';
env[pathKey] = `${resolve(local,'bin')}${delimiter}${env[pathKey] || ''}`;
}
const child = spawn(existsSync(executable) ? executable : 'cargo',process.argv.slice(2),{stdio:'inherit',env});
child.on('error',error=>{console.error(`Rust toolchain is required: ${error.message}`);process.exitCode=1;});
child.on('exit',code=>{process.exitCode=code ?? 1;});