From 0c08bcd6b1d9c527a2c038c2a279ebdb59edd4fa Mon Sep 17 00:00:00 2001 From: Michael Long <mlong@mlong.us> Date: Tue, 26 Jan 2021 09:58:15 -0500 Subject: [PATCH] enhancements to install scripts --- xtrn/3rdp-install/bigwinslotto.js | 2 +- xtrn/3rdp-install/carlton-blackjack.js | 6 +++--- xtrn/3rdp-install/carlton-crazy8.js | 6 +++--- xtrn/3rdp-install/carlton-doormania.js | 6 +++--- xtrn/3rdp-install/carlton-milleborne.js | 2 +- xtrn/3rdp-install/carlton-minezone.js | 6 +++--- xtrn/3rdp-install/carlton-navgrid.js | 6 +++--- xtrn/3rdp-install/carlton-plinko.js | 6 +++--- xtrn/3rdp-install/carlton-rockin.js | 6 +++--- xtrn/3rdp-install/carlton-wordguess.js | 6 +++--- xtrn/3rdp-install/disoft-futurerunner.js | 4 ++-- xtrn/3rdp-install/disoft-islandempires.js | 4 ++-- xtrn/3rdp-install/disoft-nuclearwar.js | 4 ++-- xtrn/3rdp-install/disoft-rebelkingdom.js | 4 ++-- xtrn/3rdp-install/dreamware-data.js | 4 ++-- xtrn/3rdp-install/dreamware.js | 4 ++-- xtrn/3rdp-install/gutterbowl32.js | 4 ++-- xtrn/3rdp-install/sunrise-3pairpoker.js | 10 +++++----- xtrn/3rdp-install/sunrise-4corners.js | 14 +++++++------- xtrn/3rdp-install/sunrise-aceydeucey.js | 12 ++++++------ xtrn/3rdp-install/sunrise-atlantis.js | 12 ++++++------ xtrn/3rdp-install/sunrise-baseballdice.js | 12 ++++++------ xtrn/3rdp-install/sunrise-betsyross.js | 12 ++++++------ xtrn/3rdp-install/sunrise-blackjack.js | 12 ++++++------ xtrn/3rdp-install/sunrise-boxdice.js | 12 ++++++------ xtrn/3rdp-install/sunrise-boxpoker.js | 8 ++++---- xtrn/3rdp-install/sunrise-chainreaction.js | 6 +++--- xtrn/3rdp-install/sunrise-colonies.js | 8 ++++---- xtrn/3rdp-install/sunrise-concentration.js | 8 ++++---- xtrn/3rdp-install/sunrise-cribbage.js | 10 +++++----- xtrn/3rdp-install/sunrise-crypto.js | 10 +++++----- xtrn/3rdp-install/sunrise-dominoes.js | 11 ++++++----- xtrn/3rdp-install/sunrise-ganglandwars.js | 7 ++++--- xtrn/3rdp-install/sunrise-groandice.js | 2 +- xtrn/3rdp-install/sunrise-hackarama.js | 7 ++++--- xtrn/3rdp-install/sunrise-hexxwars.js | 7 ++++--- xtrn/3rdp-install/sunrise-hilo.js | 2 +- xtrn/3rdp-install/sunrise-hirolldice.js | 2 +- xtrn/3rdp-install/sunrise-keno.js | 2 +- xtrn/3rdp-install/sunrise-laddersdice.js | 2 +- xtrn/3rdp-install/sunrise-legendsofole.js | 14 ++++++++------ xtrn/3rdp-install/sunrise-lettermatch.js | 2 +- xtrn/3rdp-install/sunrise-lostinspace.js | 7 ++++--- xtrn/3rdp-install/sunrise-lottomania.js | 7 ++++--- xtrn/3rdp-install/sunrise-montecarlo.js | 2 +- xtrn/3rdp-install/sunrise-overunder.js | 2 +- xtrn/3rdp-install/sunrise-pentasim.js | 7 ++++--- xtrn/3rdp-install/sunrise-questfornora.js | 7 ++++--- xtrn/3rdp-install/sunrise-rescue.js | 3 +-- xtrn/3rdp-install/sunrise-rockinradio.js | 2 +- xtrn/3rdp-install/sunrise-rocklandtrivia.js | 2 +- xtrn/3rdp-install/sunrise-stairway.js | 2 +- xtrn/3rdp-install/sunrise-states.js | 2 +- xtrn/3rdp-install/sunrise-sweepstakes.js | 2 +- xtrn/3rdp-install/sunrise-timetravel.js | 7 ++++--- xtrn/3rdp-install/sunrise-trianglesolitaire.js | 2 +- xtrn/3rdp-install/sunrise-tripleyahtzee.js | 2 +- xtrn/3rdp-install/sunrise-trivia.js | 2 +- xtrn/3rdp-install/sunrise-virtualescape.js | 2 +- xtrn/3rdp-install/sunrise-wheeloffortune.js | 2 +- xtrn/3rdp-install/sunrise-wordshuffle.js | 2 +- xtrn/3rdp-install/sunrise-wordwar.js | 2 +- 62 files changed, 180 insertions(+), 170 deletions(-) diff --git a/xtrn/3rdp-install/bigwinslotto.js b/xtrn/3rdp-install/bigwinslotto.js index f62d545626..be7ba177b2 100644 --- a/xtrn/3rdp-install/bigwinslotto.js +++ b/xtrn/3rdp-install/bigwinslotto.js @@ -18,7 +18,7 @@ if (!file.open("r")) { var lines = file.readAll(); file.close(); -lines[0] = '%PCBDIR%\DOOR.SYS'; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); diff --git a/xtrn/3rdp-install/carlton-blackjack.js b/xtrn/3rdp-install/carlton-blackjack.js index 7f4889d653..ea4a063f41 100644 --- a/xtrn/3rdp-install/carlton-blackjack.js +++ b/xtrn/3rdp-install/carlton-blackjack.js @@ -6,7 +6,7 @@ var i; var gamedir = fullpath(js.startup_dir); -var cfg_filename = js.startup_dir + 'BLAKJACK.CFG'; +var cfg_filename = gamedir + 'BLAKJACK.CFG'; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -20,8 +20,8 @@ lines[4] = gamedir + "BLAKJACK.ASC"; lines[5] = gamedir + "BLAKJACK.ANS"; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[0] = system.node_list[i].dir + 'door.sys'; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/carlton-crazy8.js b/xtrn/3rdp-install/carlton-crazy8.js index a275bdb1fc..64edd1eac5 100644 --- a/xtrn/3rdp-install/carlton-crazy8.js +++ b/xtrn/3rdp-install/carlton-crazy8.js @@ -6,7 +6,7 @@ var i; var gamedir = fullpath(js.startup_dir); -var cfg_filename = js.startup_dir + 'CRAZY8.CFG'; +var cfg_filename = gamedir + 'CRAZY8.CFG'; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -19,8 +19,8 @@ file.close(); lines[4] = gamedir; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[0] = system.node_list[i].dir + 'door.sys'; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/carlton-doormania.js b/xtrn/3rdp-install/carlton-doormania.js index 2ee52a96fe..b43dba8a4e 100644 --- a/xtrn/3rdp-install/carlton-doormania.js +++ b/xtrn/3rdp-install/carlton-doormania.js @@ -6,7 +6,7 @@ var i; var gamedir = fullpath(js.startup_dir); -var cfg_filename = js.startup_dir + 'SAMPLE.CFG'; +var cfg_filename = gamedir + 'SAMPLE.CFG'; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -19,8 +19,8 @@ file.close(); lines[4] = gamedir; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[0] = system.node_list[i].dir + 'door.sys'; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/carlton-milleborne.js b/xtrn/3rdp-install/carlton-milleborne.js index b3d9bb4bb0..6cc71ba0f1 100644 --- a/xtrn/3rdp-install/carlton-milleborne.js +++ b/xtrn/3rdp-install/carlton-milleborne.js @@ -8,7 +8,7 @@ var gamedir = fullpath(js.startup_dir); file_backup(gamedir + "MB.CFG", 3); -var cfg_filename = js.startup_dir + 'MB.CFG'; +var cfg_filename = gamedir + 'MB.CFG'; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); diff --git a/xtrn/3rdp-install/carlton-minezone.js b/xtrn/3rdp-install/carlton-minezone.js index 77c60fcb9e..044d605077 100644 --- a/xtrn/3rdp-install/carlton-minezone.js +++ b/xtrn/3rdp-install/carlton-minezone.js @@ -6,7 +6,7 @@ var i; var gamedir = fullpath(js.startup_dir); -var cfg_filename = js.startup_dir + 'MINEZONE.CFG'; +var cfg_filename = gamedir + 'MINEZONE.CFG'; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -20,8 +20,8 @@ lines[4] = gamedir + "MINESCOR.ASC"; lines[5] = gamedir + "MINESCOR.ANS"; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[0] = system.node_list[i].dir + 'door.sys'; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/carlton-navgrid.js b/xtrn/3rdp-install/carlton-navgrid.js index 63ef2dab79..8f4d6a2c00 100644 --- a/xtrn/3rdp-install/carlton-navgrid.js +++ b/xtrn/3rdp-install/carlton-navgrid.js @@ -6,7 +6,7 @@ var i; var gamedir = fullpath(js.startup_dir); -var cfg_filename = js.startup_dir + 'SAMPLE.CFG'; +var cfg_filename = gamedir + 'SAMPLE.CFG'; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -19,8 +19,8 @@ file.close(); lines[4] = gamedir; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[0] = system.node_list[i].dir + 'door.sys'; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/carlton-plinko.js b/xtrn/3rdp-install/carlton-plinko.js index 208dc4b9a8..45f5449537 100644 --- a/xtrn/3rdp-install/carlton-plinko.js +++ b/xtrn/3rdp-install/carlton-plinko.js @@ -6,7 +6,7 @@ var i; var gamedir = fullpath(js.startup_dir); -var cfg_filename = js.startup_dir + 'PLINKO.CFG'; +var cfg_filename = gamedir + 'PLINKO.CFG'; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -29,8 +29,8 @@ lines[10] = "@PAUSE@"; lines[11] = "1537381269776M"; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[3] = system.node_list[i].dir; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/carlton-rockin.js b/xtrn/3rdp-install/carlton-rockin.js index a1d57922e4..60981f657d 100644 --- a/xtrn/3rdp-install/carlton-rockin.js +++ b/xtrn/3rdp-install/carlton-rockin.js @@ -6,7 +6,7 @@ var i; var gamedir = fullpath(js.startup_dir); -var cfg_filename = js.startup_dir + 'ROCK.CFG'; +var cfg_filename = gamedir + 'ROCK.CFG'; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -20,8 +20,8 @@ lines[4] = gamedir + "ROCKSCOR.ASC"; lines[5] = gamedir + "ROCKSCOR.ANS"; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[0] = system.node_list[i].dir + 'door.sys'; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/carlton-wordguess.js b/xtrn/3rdp-install/carlton-wordguess.js index d83ea6be5d..a7ff6aee6e 100644 --- a/xtrn/3rdp-install/carlton-wordguess.js +++ b/xtrn/3rdp-install/carlton-wordguess.js @@ -6,7 +6,7 @@ var i; var gamedir = fullpath(js.startup_dir); -var cfg_filename = js.startup_dir + 'SAMPLE.CFG'; +var cfg_filename = gamedir + 'SAMPLE.CFG'; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -19,8 +19,8 @@ file.close(); lines[6] = gamedir; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[0] = system.node_list[i].dir + 'door.sys'; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/disoft-futurerunner.js b/xtrn/3rdp-install/disoft-futurerunner.js index c0988be0da..a768ca0c70 100644 --- a/xtrn/3rdp-install/disoft-futurerunner.js +++ b/xtrn/3rdp-install/disoft-futurerunner.js @@ -8,8 +8,8 @@ var lines = []; lines[0] = "@ECHO OFF"; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; var nodenumpad = ("00" + nodenum).slice(-2); lines[1] = "FUTURE _FUTURE.C" + nodenumpad; diff --git a/xtrn/3rdp-install/disoft-islandempires.js b/xtrn/3rdp-install/disoft-islandempires.js index c09090d50c..6fe00f265e 100644 --- a/xtrn/3rdp-install/disoft-islandempires.js +++ b/xtrn/3rdp-install/disoft-islandempires.js @@ -8,8 +8,8 @@ var lines = []; lines[0] = "@ECHO OFF"; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; var nodenumpad = ("00" + nodenum).slice(-2); lines[1] = "ISLAND _ISLAND.C" + nodenumpad; diff --git a/xtrn/3rdp-install/disoft-nuclearwar.js b/xtrn/3rdp-install/disoft-nuclearwar.js index c012d0be85..e2117e1067 100644 --- a/xtrn/3rdp-install/disoft-nuclearwar.js +++ b/xtrn/3rdp-install/disoft-nuclearwar.js @@ -8,8 +8,8 @@ var lines = []; lines[0] = "@ECHO OFF"; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; var nodenumpad = ("00" + nodenum).slice(-2); lines[1] = "NUKE _NUKE.C" + nodenumpad; diff --git a/xtrn/3rdp-install/disoft-rebelkingdom.js b/xtrn/3rdp-install/disoft-rebelkingdom.js index 6910155977..d3b4a1d50f 100644 --- a/xtrn/3rdp-install/disoft-rebelkingdom.js +++ b/xtrn/3rdp-install/disoft-rebelkingdom.js @@ -8,8 +8,8 @@ var lines = []; lines[0] = "@ECHO OFF"; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; var nodenumpad = ("00" + nodenum).slice(-2); lines[1] = "REbEL _REBEL.C" + nodenumpad; diff --git a/xtrn/3rdp-install/dreamware-data.js b/xtrn/3rdp-install/dreamware-data.js index 73987d7a6a..82774bbce1 100644 --- a/xtrn/3rdp-install/dreamware-data.js +++ b/xtrn/3rdp-install/dreamware-data.js @@ -18,8 +18,8 @@ lines[3] = system.operator; lines[4] = '38400'; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[1] = system.node_list[i].dir; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/dreamware.js b/xtrn/3rdp-install/dreamware.js index 13e1a08a86..ac0593af95 100644 --- a/xtrn/3rdp-install/dreamware.js +++ b/xtrn/3rdp-install/dreamware.js @@ -13,8 +13,8 @@ lines[3] = system.operator; lines[4] = '38400'; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[1] = system.node_list[i].dir; writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg'); diff --git a/xtrn/3rdp-install/gutterbowl32.js b/xtrn/3rdp-install/gutterbowl32.js index 3ab21f26c1..731a65f46f 100644 --- a/xtrn/3rdp-install/gutterbowl32.js +++ b/xtrn/3rdp-install/gutterbowl32.js @@ -18,8 +18,8 @@ lines[8] = '0'; lines[9] = '0'; writeln("Beginning node config generation..."); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; lines[1] = system.node_list[i].dir; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CTL'); diff --git a/xtrn/3rdp-install/sunrise-3pairpoker.js b/xtrn/3rdp-install/sunrise-3pairpoker.js index 3fbbef0e60..9288ca69de 100644 --- a/xtrn/3rdp-install/sunrise-3pairpoker.js +++ b/xtrn/3rdp-install/sunrise-3pairpoker.js @@ -6,15 +6,15 @@ var i; var gamedir = fullpath(js.startup_dir); var conffile = "PAIR3.CFG"; +var cfg_filename = gamedir + conffile; -if (!file_exists(gamedir + conffile)) { - writeln("Conf not found: " + gamedir + conffile); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -file_backup(gamedir + conffile, 3); +file_backup(cfg_filename, 3); -var cfg_filename = js.startup_dir + conffile; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -24,7 +24,7 @@ if (!file.open("r")) { var lines = file.readAll(); file.close(); -lines[0] = '%PCBDRIVE%%PCBDIR%\DOOR.SYS'; +lines[0] = '%PCBDRIVE%%PCBDIR%door.sys'; lines[1] = system.name; var op = system.operator.split(" ", 2); diff --git a/xtrn/3rdp-install/sunrise-4corners.js b/xtrn/3rdp-install/sunrise-4corners.js index fff2c11f6d..ed6c3735ab 100644 --- a/xtrn/3rdp-install/sunrise-4corners.js +++ b/xtrn/3rdp-install/sunrise-4corners.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "SAMPLE.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -27,11 +27,11 @@ lines[3] = system.operator; lines[5] = gamedir + "4corn.ans"; lines[6] = gamedir + "4corn.asc"; lines[7] = gamedir + "cornhof.ans"; -lines[8] = gamedir + "cornhof.asc"; +lines[8] = gamedir + "cornhof.asc"; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[1] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + lines[1] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-aceydeucey.js b/xtrn/3rdp-install/sunrise-aceydeucey.js index ad43907a98..0214c91436 100644 --- a/xtrn/3rdp-install/sunrise-aceydeucey.js +++ b/xtrn/3rdp-install/sunrise-aceydeucey.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "ACEY.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -34,9 +34,9 @@ lines[9] = gamedir + "aceydhof.ans"; lines[10] = gamedir + "aceydhof.asc"; lines[11] = "1"; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-atlantis.js b/xtrn/3rdp-install/sunrise-atlantis.js index c9ffbe0e41..7064d20743 100644 --- a/xtrn/3rdp-install/sunrise-atlantis.js +++ b/xtrn/3rdp-install/sunrise-atlantis.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "ATLANTIS.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -28,9 +28,9 @@ var op = system.operator.split(" ", 2); lines[2] = op[0]; lines[3] = op[1]; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-baseballdice.js b/xtrn/3rdp-install/sunrise-baseballdice.js index cb41046386..3074ea2e31 100644 --- a/xtrn/3rdp-install/sunrise-baseballdice.js +++ b/xtrn/3rdp-install/sunrise-baseballdice.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "BBDICE.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -33,9 +33,9 @@ lines[9] = gamedir + "bbdhof.ans"; lines[10] = gamedir + "bbdhof.asc"; lines[11] = "1"; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-betsyross.js b/xtrn/3rdp-install/sunrise-betsyross.js index 8eccece0da..8906ed4a53 100644 --- a/xtrn/3rdp-install/sunrise-betsyross.js +++ b/xtrn/3rdp-install/sunrise-betsyross.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "BETSY.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -32,9 +32,9 @@ lines[7] = gamedir + "betsy.asc"; lines[8] = gamedir + "betsyhof.ans"; lines[9] = gamedir + "betsyhof.asc"; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-blackjack.js b/xtrn/3rdp-install/sunrise-blackjack.js index 54629542aa..8143740f1a 100644 --- a/xtrn/3rdp-install/sunrise-blackjack.js +++ b/xtrn/3rdp-install/sunrise-blackjack.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "BJACK.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -33,9 +33,9 @@ lines[9] = gamedir + "srbjhof.ans"; lines[10] = gamedir + "srbjhof.asc"; lines[11] = "1"; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-boxdice.js b/xtrn/3rdp-install/sunrise-boxdice.js index 363c893f45..4b17e3f1f3 100644 --- a/xtrn/3rdp-install/sunrise-boxdice.js +++ b/xtrn/3rdp-install/sunrise-boxdice.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "BOXDICE.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -32,9 +32,9 @@ lines[8] = gamedir + "srboxd.asc"; lines[9] = gamedir + "srboxd.ans"; lines[10] = gamedir + "srboxd.asc"; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-boxpoker.js b/xtrn/3rdp-install/sunrise-boxpoker.js index d710621f1d..262f09bcc4 100644 --- a/xtrn/3rdp-install/sunrise-boxpoker.js +++ b/xtrn/3rdp-install/sunrise-boxpoker.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "BOXPOKER.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -34,7 +34,7 @@ lines[11] = gamedir + "srboxpkr.asc"; for (i in system.node_list) { var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-chainreaction.js b/xtrn/3rdp-install/sunrise-chainreaction.js index 372a9a9ac2..642c9f688b 100644 --- a/xtrn/3rdp-install/sunrise-chainreaction.js +++ b/xtrn/3rdp-install/sunrise-chainreaction.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "SAMPLE.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); diff --git a/xtrn/3rdp-install/sunrise-colonies.js b/xtrn/3rdp-install/sunrise-colonies.js index dd1990d207..e66d17fa1c 100644 --- a/xtrn/3rdp-install/sunrise-colonies.js +++ b/xtrn/3rdp-install/sunrise-colonies.js @@ -15,11 +15,11 @@ lines[4] = 'N'; lines[5] = '2'; lines[6] = '60'; lines[7] = '5'; -lines[8] = strftime("%m-%d-%Y", time()); +lines[8] = strftime("%m-%d-%Y"); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-concentration.js b/xtrn/3rdp-install/sunrise-concentration.js index 8d180ba3f6..e70023bbf8 100644 --- a/xtrn/3rdp-install/sunrise-concentration.js +++ b/xtrn/3rdp-install/sunrise-concentration.js @@ -6,13 +6,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "CONCENT.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -35,7 +35,7 @@ lines[10] = gamedir + "srconhof.asc"; for (i in system.node_list) { var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-cribbage.js b/xtrn/3rdp-install/sunrise-cribbage.js index 70d9358efb..8d7a2dc4b8 100644 --- a/xtrn/3rdp-install/sunrise-cribbage.js +++ b/xtrn/3rdp-install/sunrise-cribbage.js @@ -6,15 +6,15 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "CRIBSQ.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -file_backup(gamedir + conffilesrc, 3); +file_backup(cfg_filename, 3); -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -24,7 +24,7 @@ if (!file.open("r")) { var lines = file.readAll(); file.close(); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); diff --git a/xtrn/3rdp-install/sunrise-crypto.js b/xtrn/3rdp-install/sunrise-crypto.js index 77b8c0f2cf..3c1613d574 100644 --- a/xtrn/3rdp-install/sunrise-crypto.js +++ b/xtrn/3rdp-install/sunrise-crypto.js @@ -6,15 +6,15 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "CRYPTO.CFG"; +var cfg_filename = gamedir + conffilesrc; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -file_backup(gamedir + conffilesrc, 3); +file_backup(cfg_filename, 3); -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -24,7 +24,7 @@ if (!file.open("r")) { var lines = file.readAll(); file.close(); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); diff --git a/xtrn/3rdp-install/sunrise-dominoes.js b/xtrn/3rdp-install/sunrise-dominoes.js index 11c6601a08..90b8022c2c 100644 --- a/xtrn/3rdp-install/sunrise-dominoes.js +++ b/xtrn/3rdp-install/sunrise-dominoes.js @@ -7,14 +7,15 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "DOMINOES.CFG"; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +var cfg_filename = gamedir + conffilesrc; + +if (!file_exists(cfg_filename) { + writeln("Conf not found: " + cfg_filename); exit(1); } -file_backup(gamedir + conffilesrc, 3); +file_backup(cfg_filename, 3); -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -24,7 +25,7 @@ if (!file.open("r")) { var lines = file.readAll(); file.close(); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); diff --git a/xtrn/3rdp-install/sunrise-ganglandwars.js b/xtrn/3rdp-install/sunrise-ganglandwars.js index dfa28c8e9e..5d569355ba 100644 --- a/xtrn/3rdp-install/sunrise-ganglandwars.js +++ b/xtrn/3rdp-install/sunrise-ganglandwars.js @@ -21,9 +21,10 @@ lines[6] = "3"; lines[7] = "3"; lines[8] = "G"; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-groandice.js b/xtrn/3rdp-install/sunrise-groandice.js index 4c3ab94acb..1a87fad788 100644 --- a/xtrn/3rdp-install/sunrise-groandice.js +++ b/xtrn/3rdp-install/sunrise-groandice.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-hackarama.js b/xtrn/3rdp-install/sunrise-hackarama.js index 0dfdace525..d84cea5d98 100644 --- a/xtrn/3rdp-install/sunrise-hackarama.js +++ b/xtrn/3rdp-install/sunrise-hackarama.js @@ -18,9 +18,10 @@ lines[6] = "3"; lines[7] = "3"; lines[8] = "3"; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-hexxwars.js b/xtrn/3rdp-install/sunrise-hexxwars.js index 1d792dfd0f..0619fd640d 100644 --- a/xtrn/3rdp-install/sunrise-hexxwars.js +++ b/xtrn/3rdp-install/sunrise-hexxwars.js @@ -20,10 +20,11 @@ lines[10] = "3"; lines[11] = "20"; lines[12] = "3"; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + lines[0] = nodenum; - lines[1] = system.node_list[i].dir + "\DOOR.SYS"; + lines[1] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-hilo.js b/xtrn/3rdp-install/sunrise-hilo.js index 6cdc173dff..77978a59e2 100644 --- a/xtrn/3rdp-install/sunrise-hilo.js +++ b/xtrn/3rdp-install/sunrise-hilo.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-hirolldice.js b/xtrn/3rdp-install/sunrise-hirolldice.js index e1013a1142..5fbd459206 100644 --- a/xtrn/3rdp-install/sunrise-hirolldice.js +++ b/xtrn/3rdp-install/sunrise-hirolldice.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-keno.js b/xtrn/3rdp-install/sunrise-keno.js index 2b94e77a07..93416cef80 100644 --- a/xtrn/3rdp-install/sunrise-keno.js +++ b/xtrn/3rdp-install/sunrise-keno.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-laddersdice.js b/xtrn/3rdp-install/sunrise-laddersdice.js index 5cc6b15150..7285c49ae2 100644 --- a/xtrn/3rdp-install/sunrise-laddersdice.js +++ b/xtrn/3rdp-install/sunrise-laddersdice.js @@ -24,7 +24,7 @@ if (!file.open("r")) { var lines = file.readAll(); file.close(); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); diff --git a/xtrn/3rdp-install/sunrise-legendsofole.js b/xtrn/3rdp-install/sunrise-legendsofole.js index 7f2638978a..71c36791eb 100644 --- a/xtrn/3rdp-install/sunrise-legendsofole.js +++ b/xtrn/3rdp-install/sunrise-legendsofole.js @@ -7,12 +7,13 @@ var i; var gamedir = fullpath(js.startup_dir); var conffilesrc = "LOO.CFG"; -if (!file_exists(gamedir + conffilesrc)) { - writeln("Conf not found: " + gamedir + conffilesrc); +var cfg_filename = gamedir + conffilesrc; + +if (!file_exists(cfg_filename)) { + writeln("Conf not found: " + cfg_filename); exit(1); } -var cfg_filename = js.startup_dir + conffilesrc; var file = new File(cfg_filename); if (!file.open("r")) { writeln("Error " + file.error + " opening " + file.name); @@ -27,9 +28,10 @@ var op = system.operator.split(" ", 2); lines[2] = op[0]; lines[3] = op[1]; -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-lettermatch.js b/xtrn/3rdp-install/sunrise-lettermatch.js index e72cac5eec..5371f7a182 100644 --- a/xtrn/3rdp-install/sunrise-lettermatch.js +++ b/xtrn/3rdp-install/sunrise-lettermatch.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-lostinspace.js b/xtrn/3rdp-install/sunrise-lostinspace.js index 822da2ecdc..97e5f3e52a 100644 --- a/xtrn/3rdp-install/sunrise-lostinspace.js +++ b/xtrn/3rdp-install/sunrise-lostinspace.js @@ -17,9 +17,10 @@ lines[5] = "20"; // enemy engages per day lines[6] = "2"; // player engages per day lines[7] = "0"; // ? -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'LIS' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-lottomania.js b/xtrn/3rdp-install/sunrise-lottomania.js index b516609005..d7095681bc 100644 --- a/xtrn/3rdp-install/sunrise-lottomania.js +++ b/xtrn/3rdp-install/sunrise-lottomania.js @@ -18,9 +18,10 @@ lines[6] = "1"; // hockey wagers per day lines[7] = "1"; // football wagers per day lines[8] = "1"; // basketball wagers per day -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-montecarlo.js b/xtrn/3rdp-install/sunrise-montecarlo.js index 0f743923d1..a20e5c36dd 100644 --- a/xtrn/3rdp-install/sunrise-montecarlo.js +++ b/xtrn/3rdp-install/sunrise-montecarlo.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-overunder.js b/xtrn/3rdp-install/sunrise-overunder.js index 99b9bdd48d..ae8216315a 100644 --- a/xtrn/3rdp-install/sunrise-overunder.js +++ b/xtrn/3rdp-install/sunrise-overunder.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-pentasim.js b/xtrn/3rdp-install/sunrise-pentasim.js index a9fd1db1e8..94268a813b 100644 --- a/xtrn/3rdp-install/sunrise-pentasim.js +++ b/xtrn/3rdp-install/sunrise-pentasim.js @@ -17,9 +17,10 @@ lines[5] = "20"; // cyborg battles per day lines[6] = "2"; // ckm card games per day lines[7] = "1"; // scripts allowed per day -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-questfornora.js b/xtrn/3rdp-install/sunrise-questfornora.js index 0d03b98439..2a4b9b5a9f 100644 --- a/xtrn/3rdp-install/sunrise-questfornora.js +++ b/xtrn/3rdp-install/sunrise-questfornora.js @@ -18,9 +18,10 @@ lines[6] = "30"; // warrior battles player gets per day lines[7] = "2"; // player battles player gets per day lines[8] = "N"; // cleasn mode -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'QUEST' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-rescue.js b/xtrn/3rdp-install/sunrise-rescue.js index 97fd981271..9a4a6ba4dd 100644 --- a/xtrn/3rdp-install/sunrise-rescue.js +++ b/xtrn/3rdp-install/sunrise-rescue.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; @@ -37,7 +37,6 @@ lines[9] = gamedir + "srreshof.asc"; lines[10] = gamedir + "srreshof.ans"; lines[11] = "1"; // do not display adopt a door - writeln("Creating " + cfg_filename); var file = new File(cfg_filename); diff --git a/xtrn/3rdp-install/sunrise-rockinradio.js b/xtrn/3rdp-install/sunrise-rockinradio.js index 997da76a1c..c53175d363 100644 --- a/xtrn/3rdp-install/sunrise-rockinradio.js +++ b/xtrn/3rdp-install/sunrise-rockinradio.js @@ -18,7 +18,7 @@ lines[7] = "3"; // promos per day for (i in system.node_list) { var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-rocklandtrivia.js b/xtrn/3rdp-install/sunrise-rocklandtrivia.js index b695370cf2..0c1804e874 100644 --- a/xtrn/3rdp-install/sunrise-rocklandtrivia.js +++ b/xtrn/3rdp-install/sunrise-rocklandtrivia.js @@ -30,7 +30,7 @@ file.close(); for (i in system.node_list) { var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'ROCKLAN' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-stairway.js b/xtrn/3rdp-install/sunrise-stairway.js index 2453ea5fe2..4d13918de8 100644 --- a/xtrn/3rdp-install/sunrise-stairway.js +++ b/xtrn/3rdp-install/sunrise-stairway.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-states.js b/xtrn/3rdp-install/sunrise-states.js index 0766dd918a..d0aba0b306 100644 --- a/xtrn/3rdp-install/sunrise-states.js +++ b/xtrn/3rdp-install/sunrise-states.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-sweepstakes.js b/xtrn/3rdp-install/sunrise-sweepstakes.js index 68adca881b..d9ed95a882 100644 --- a/xtrn/3rdp-install/sunrise-sweepstakes.js +++ b/xtrn/3rdp-install/sunrise-sweepstakes.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-timetravel.js b/xtrn/3rdp-install/sunrise-timetravel.js index 0018f6a4b1..0b0b1aac2e 100644 --- a/xtrn/3rdp-install/sunrise-timetravel.js +++ b/xtrn/3rdp-install/sunrise-timetravel.js @@ -35,9 +35,10 @@ if (!file.open("w")) { file.writeAll(lines); file.close(); -for (i in system.node_list) { - var nodenum = parseInt(i, 10) + 1; - lines[0] = system.node_list[i].dir + "\DOOR.SYS"; +for(i = 0; i < system.nodes; i++) { + var nodenum = i + 1; + + lines[0] = system.node_list[i].dir + "door.sys"; writeln("Creating " + js.startup_dir + 'TTRAVEL' + nodenum + '.CFG'); diff --git a/xtrn/3rdp-install/sunrise-trianglesolitaire.js b/xtrn/3rdp-install/sunrise-trianglesolitaire.js index 74622d2991..f8792c9214 100644 --- a/xtrn/3rdp-install/sunrise-trianglesolitaire.js +++ b/xtrn/3rdp-install/sunrise-trianglesolitaire.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-tripleyahtzee.js b/xtrn/3rdp-install/sunrise-tripleyahtzee.js index 1d93bd5fa0..566b1c41a3 100644 --- a/xtrn/3rdp-install/sunrise-tripleyahtzee.js +++ b/xtrn/3rdp-install/sunrise-tripleyahtzee.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-trivia.js b/xtrn/3rdp-install/sunrise-trivia.js index 1ad36d9121..4ca37e8043 100644 --- a/xtrn/3rdp-install/sunrise-trivia.js +++ b/xtrn/3rdp-install/sunrise-trivia.js @@ -25,7 +25,7 @@ file.close(); file_backup(cfg_filename, 3); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-virtualescape.js b/xtrn/3rdp-install/sunrise-virtualescape.js index 5caf899f2f..f4c8f7a38e 100644 --- a/xtrn/3rdp-install/sunrise-virtualescape.js +++ b/xtrn/3rdp-install/sunrise-virtualescape.js @@ -13,7 +13,7 @@ file_backup(cfg_filename, 3); var lines = []; -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-wheeloffortune.js b/xtrn/3rdp-install/sunrise-wheeloffortune.js index d9e0ba8868..7ffba596c4 100644 --- a/xtrn/3rdp-install/sunrise-wheeloffortune.js +++ b/xtrn/3rdp-install/sunrise-wheeloffortune.js @@ -20,7 +20,7 @@ if (!file.open("r")) { var lines = file.readAll(); file.close(); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-wordshuffle.js b/xtrn/3rdp-install/sunrise-wordshuffle.js index 3148546880..5056b6ab17 100644 --- a/xtrn/3rdp-install/sunrise-wordshuffle.js +++ b/xtrn/3rdp-install/sunrise-wordshuffle.js @@ -20,7 +20,7 @@ if (!file.open("r")) { var lines = file.readAll(); file.close(); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; diff --git a/xtrn/3rdp-install/sunrise-wordwar.js b/xtrn/3rdp-install/sunrise-wordwar.js index f39fb33ab0..886759f3c0 100644 --- a/xtrn/3rdp-install/sunrise-wordwar.js +++ b/xtrn/3rdp-install/sunrise-wordwar.js @@ -20,7 +20,7 @@ if (!file.open("r")) { var lines = file.readAll(); file.close(); -lines[0] = "%PCBDRIVE%%PCBDIR%\DOOR.SYS"; +lines[0] = "%PCBDRIVE%%PCBDIR%door.sys"; lines[1] = system.name; var op = system.operator.split(" ", 2); lines[2] = op[0]; -- GitLab