...
 
Commits (3)
......@@ -27,6 +27,7 @@
//
// [prog:<code>]
// name = program name or description (40 chars max)
// cats = additional target installation categories (sections)
// cmd = command-line to execute (63 chars max)
// clean_cmd = clean-up command-line, if needed (63 chars max)
// settings = bit-flags (see XTRN_* in sbbsdefs.js)
......@@ -90,7 +91,7 @@
"use strict";
const REVISION = "$Revision: 1.14 $".split(' ')[1];
const REVISION = "3.18b";
const ini_fname = "install-xtrn.ini";
load("sbbsdefs.js");
......@@ -115,7 +116,12 @@ function install_xtrn_item(cnf, type, name, desc, item, cats)
if (!item.name)
item.name = name || item.code;
if(item.cats)
item.cats = item.cats.split(',').concat(cats);
else
item.cats = cats;
function find_code(objs, code)
{
if (!options.overwrite) {
......@@ -160,7 +166,7 @@ function install_xtrn_item(cnf, type, name, desc, item, cats)
return "No external program sections have been created";
for (var i = 0; i < xtrn_area.sec_list.length; i++) {
if(cats.indexOf(xtrn_area.sec_list[i].name) >= 0
if(item.cats.indexOf(xtrn_area.sec_list[i].name) >= 0
&& confirm("Install " + item.name + " into " + xtrn_area.sec_list[i].name + " section")) {
item.sec = xtrn_area.sec_list[i].number;
break;
......
......@@ -3,13 +3,19 @@ Desc: A multiplayer game that is a cross between a war game and a space trading
By: Chris Sherrick, ported to Sync-JS by Deuce (Stephen Hurd)
Cats: Games
Subs: Space, War, Trade, Classic, Multiplayer, JavaScript, Port
Inst: $Id: install-xtrn.ini,v 1.2 2020/04/21 03:25:59 rswindell Exp $
Inst: 2020/09/20
[prog:TW2]
cmd = ?tw2.js
settings = XTRN_MULTIUSER
required = true
[prog:TW2-CFG]
name = Trade Wars v.ii - Configure / Reset
cats = Operator
cmd = ?twint500.js
ars = SYSOP
!include install-json-service.ini
[ini:json-service.ini:tw2]
......
......@@ -36,7 +36,7 @@ function ConfigureSettings()
for(i=0; i<GameSettingProperties.length; i++)
list.push(format("%-35s %s",GameSettingProperties[i].name,Settings[GameSettingProperties[i].prop]));
i=uifc.list(WIN_MID|WIN_ORG|WIN_ACT|WIN_ESC, 0, 0, 0, last, last, "Configuration", list);
i=uifc.list(WIN_MID|WIN_ORG|WIN_ACT|WIN_ESC, 0, 0, 0, last, last, "Trade Wars 2 Configuration", list);
if(i==-1) {
if(uifc.changes) {
var q=uifc.list(WIN_MID|WIN_SAV, 0, 0, 0, 0, 0, "Save Changes?", ["Yes", "No"]);
......@@ -104,7 +104,7 @@ var reset = false;
if(this.uifc == undefined) {
while(!js.terminated && (!this.console || !console.aborted)) {
print("Configuration:");
print("Trade Wars 2 Configuration:");
print();
for(var i=0; i< GameSettingProperties.length; i++)
print(format("%2d: %-35s = %s", i + 1, GameSettingProperties[i].name, Settings[GameSettingProperties[i].prop]));
......@@ -149,7 +149,7 @@ if(this.uifc == undefined) {
alert("WARNING: Unable to connect to server: " + e);
}
} else {
uifc.init("TradeWars 2 Initialization", /* ciolibmode: */argv[0]);
uifc.init("Trade Wars 2 Initialization", /* ciolibmode: */argv[0]);
ConfigureSettings();
if(js.global.db != undefined) {
......