Commit f33a98a8 authored by Michael Long's avatar Michael Long

Enable the option to ask for continuation/enter door when displaying...

Enable the option to ask for continuation/enter door when displaying info/intro ans/msg file. This could be useful when displaying info about a door, showing rules, etc.
parent acdd7086
Pipeline #760 passed with stage
in 17 minutes and 15 seconds
......@@ -95,6 +95,10 @@
; multicolumn_fmt: \1h\1c%3u \xb3 \1n\1c%-26.26s\1h %5u
; singlecolumn_fmt: \1h\1c%3u \xb3 \1n\1c%-26.26s\1h %5u
; to ask for continuation after showing DOOR intro/message file, enable this
; prompt_on_info = true
; prompt_on_info_fmt: \r\n\x01n\x01cDo you wish to continue
[chat_sec]
; Over-ride default IRC server/port and channel (if desired) here:
irc_server = irc.synchro.net 6667
......
......@@ -14,6 +14,15 @@ function exec_xtrn_pre(prog)
options = {}; // default values
}
// If displaying CODE.ans file, prompt the user to continue to enter the game or not
if (typeof options.prompt_on_info === "undefined") {
options.prompt_on_info = false;
}
if (typeof options.prompt_on_info_fmt === "undefined") {
options.prompt_on_info_fmt = "\r\n\x01n\x01cDo you wish to continue";
}
require("nodedefs.js", "NODE_LOGN");
if (bbs.node_action == NODE_LOGN) {
if (options.disable_pre_on_logon_event) {
......@@ -33,7 +42,15 @@ function exec_xtrn_pre(prog)
if (bbs.menu_exists("xtrn/" + prog.code)) {
bbs.menu("xtrn/" + prog.code);
console.pause();
// If displaying CODE.ans file, prompt the user to continue to enter the game or not
if (options.prompt_on_info) {
if (!console.yesno(options.prompt_on_info_fmt)) {
exit(1);
}
} else {
console.pause();
}
console.line_counter=0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment