Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (3)
......@@ -342,11 +342,13 @@
@#VIEWLIST
@do `p20 is 0
@do `p41 is 0
@label FINDNEXT2
@do `p20 + 1
@do `s08 is `p20.auc
@if `s08 exists true then do
@begin
@do `p41 + 1
@do move 1 1
@clear screen
@readfile `s08
......@@ -482,6 +484,8 @@
@end
@end
@if `p20 > 50 then `p20 is 0
@if `p41 is 0 then goto start
`p41 is 0
@do goto FINDNEXT2
@#DONEAUC
......
......@@ -837,14 +837,14 @@ menu('`r0`c `r1 `%LORD II: CONFIGURE JS `r0', true, [
dk.console.cleareol();
ctx.opts = options();
}},
{text:' `2(`%D`2) Experience : `%'+pretty_int(player.p[0])+'`r0`2', shortcut:'D', callback:function(ctx) {
{text:' `2(`%D`2) Experience : `%'+pretty_int(player.experience)+'`r0`2', shortcut:'D', callback:function(ctx) {
dk.console.gotoxy(26, 6);
conio.setcursortype(2);
player.p[0] = parseInt(dk.console.getstr({edit:player.p[0].toString(), crlf:false, input_box:true, select:false, attr:new Attribute(31), len:10, integer:true, min:0, max:2147483647}), 10);
player.experience = parseInt(dk.console.getstr({edit:player.experience.toString(), crlf:false, input_box:true, select:false, attr:new Attribute(31), len:10, integer:true, min:0, max:2147483647}), 10);
conio.setcursortype(0);
dk.console.gotoxy(26, 6);
dk.console.attr.value = 2;
lw(pretty_int(player.p[0]));
lw(pretty_int(player.experience));
dk.console.cleareol();
ctx.opts = options();
}},
......@@ -893,9 +893,9 @@ menu('`r0`c `r1 `%LORD II: CONFIGURE JS `r0', true, [
while(1) {
lln('`r0`2`c `r1`%Byte variables that are not set to 0...`r0');
sln('');
for (i = 0; i < 99; i++) {
for (i = 0; i < 100; i++) {
if (varnames.t[i] !== undefined) {
lln(' `2Var `0'+space_pad(i.toString(), 2)+'`2 is `%'+space_pad(player.t[i].toString(),10)+'`r0`2(`0'+varnames.t[i]+'`2)');
lln(' `2Var `0'+space_pad(i.toString(), 2)+'`2 is `%'+space_pad(player.t[i-1].toString(),10)+'`r0`2(`0'+varnames.t[i]+'`2)');
}
}
sln('');
......@@ -929,9 +929,9 @@ menu('`r0`c `r1 `%LORD II: CONFIGURE JS `r0', true, [
while(1) {
lln('`r0`2`c `r1`%Long vars being used...`r0');
sln('');
for (i = 0; i < 99; i++) {
for (i = 0; i < 100; i++) {
if (varnames.p[i] !== undefined) {
lln(' `2Var `0'+space_pad(i.toString(), 2)+'`2 is `%'+space_pad(player.p[i].toString(),10)+'`r0`2(`0'+varnames.p[i]+'`2)');
lln(' `2Var `0'+space_pad(i.toString(), 2)+'`2 is `%'+space_pad(player.p[i-1].toString(),10)+'`r0`2(`0'+varnames.p[i]+'`2)');
}
}
sln('');
......
......@@ -455,14 +455,15 @@ function insane_run_ref(sec, fname, refret)
'readspecial':function(args) {
var attr = scr.attr.value;
var ch;
var opts = args[1].toUpperCase();
if (args.length < 2)
throw new Error('@do readspecial requires two arguments');
do {
ch = getkey().toUpperCase();
if (ch === '\r' || ch === '\x1b')
ch = args[1].substr(0, 1);
} while (args[1].indexOf(ch) === -1);
ch = opts.substr(0, 1);
} while (opts.indexOf(ch) === -1);
setvar(args[0], ch);
dk.console.attr = 15;
sln(ch);
......@@ -813,14 +814,14 @@ function insane_run_ref(sec, fname, refret)
l = l.substr(m[0].length);
switch(m[1]) {
case '=':
if (left.toString().toLowerCase() !== right.toLowerCase()) {
if (left.toString().toLowerCase() !== right.toString().toLowerCase()) {
if (cur > i)
cur--;
return;
}
break;
case '!':
if (left.toString().toLowerCase() === right.toLowerCase()) {
if (left.toString().toLowerCase() === right.toString().toLowerCase()) {
if (cur > i)
cur--;
return;
......@@ -1067,9 +1068,28 @@ function insane_run_ref(sec, fname, refret)
},
'display':function(args) {
if (args.length > 2 && args[1].toLowerCase() === 'in') {
// TODO: Implement this!
throw new Error('@display not implemented!');
}
var label = getvar(args[0]).toString().toLowerCase();
var f = new File(getfname(getvar(args[2])));
var l;
var found = false;
if (!f.open('rb'))
throw new Error('@display unable to open '+f.name);
// First, find the label...
while ((l = f.readln()) !== null) {
if (l.toLowerCase().indexOf('@#'+label) === 0) {
found = true;
break;
}
}
if (!found)
throw new Error('@display unable to find label @#'+label+' in '+f.name);
while ((l = f.readln()) !== null) {
if (l.indexOf('@#') === 0)
break;
lln(l);
}
y }
throw new Error('@display not implemented');
},
'displayfile':function(args) {
......@@ -1132,7 +1152,7 @@ function insane_run_ref(sec, fname, refret)
else if (args[2].toLowerCase() === 'getname') {
tmp = clamp_integer(getvar(args[3]), '8') - 1;
if (tmp === player.Record) {
setvar(args[0], tmp.name);
setvar(args[0], player.name);
}
else {
if (tmp >= pfile.length || tmp < 0)
......