* Pause after tooManyArt
This commit is contained in:
parent
608d4dc094
commit
36a8d771e8
|
@ -76,14 +76,16 @@ function AbracadabraModule(options) {
|
|||
|
||||
if(_.isString(self.config.tooManyArt)) {
|
||||
theme.displayThemeArt( { client : self.client, name : self.config.tooManyArt }, function displayed() {
|
||||
theme.displayThemedPause( { client : self.client }, function keyPressed() {
|
||||
callback(new Error('Too many active instances'));
|
||||
});
|
||||
});
|
||||
} else {
|
||||
self.client.term.write('\nToo many active instances. Try again later.\n');
|
||||
|
||||
setTimeout(function timeout() {
|
||||
theme.displayThemedPause( { client : self.client }, function keyPressed() {
|
||||
callback(new Error('Too many active instances'));
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// :TODO: JS elegant way to do this?
|
||||
|
@ -113,6 +115,7 @@ function AbracadabraModule(options) {
|
|||
],
|
||||
function complete(err) {
|
||||
if(err) {
|
||||
self.lastError = err;
|
||||
self.fallbackModule();
|
||||
} else {
|
||||
self.finishedLoading();
|
||||
|
@ -164,7 +167,9 @@ AbracadabraModule.prototype.enter = function(client) {
|
|||
AbracadabraModule.prototype.leave = function() {
|
||||
AbracadabraModule.super_.prototype.leave.call(this);
|
||||
|
||||
if(!this.lastError) {
|
||||
activeDoorNodeInstances[this.config.name] -= 1;
|
||||
}
|
||||
};
|
||||
|
||||
AbracadabraModule.prototype.finishedLoading = function() {
|
||||
|
|
|
@ -266,7 +266,8 @@
|
|||
"args" : [
|
||||
"-quiet", "-f", "/home/nuskooler/DOS/X/LORD/dosemu.conf", "X:\\PW\\START.BAT {dropfile} {node}"
|
||||
],
|
||||
"nodeMax" : 1
|
||||
"nodeMax" : 1,
|
||||
"tooManyArt" : "doortoomany.ans"
|
||||
}
|
||||
},
|
||||
"doorLORD" : {
|
||||
|
|
Loading…
Reference in New Issue