This commit is contained in:
React User
2026-04-04 18:43:36 +00:00
parent 4bbba45642
commit 37934c3d84
186 changed files with 2546 additions and 61 deletions
+4 -1
View File
@@ -4,8 +4,11 @@ export function GetRandomPort(min: number, max: number): number {
return randomIntFromInterval(min, max);
}
export function OpenGameInstance(path: string, port: number): void {
export function OpenGameInstance(path: string, port: number, matchId?: number): void {
const args = ["-port", port.toString()];
if (matchId != null && Number.isFinite(matchId)) {
args.push("-matchId", String(Math.trunc(matchId)));
}
const child = spawn(path, args);
child.stdout.on('data', (data: Buffer) => {