Fix choices:none & input:none

This commit is contained in:
ckcz123 2020-07-24 22:49:31 +08:00
parent c4ea3def18
commit 7c00765b6d
2 changed files with 11 additions and 1 deletions

View File

@ -2139,7 +2139,7 @@ events.prototype._action_wait = function (data, x, y, prefix) {
if (code.indexOf("input:") == 0) { if (code.indexOf("input:") == 0) {
if (code == "input:none") { if (code == "input:none") {
core.status.route.push("input:none"); core.status.route.push("input:none");
core.removeFlag("type"); core.setFlag("type", -1);
} else { } else {
var value = parseInt(code.substring(6)); var value = parseInt(code.substring(6));
core.status.route.push("input:" + value); core.status.route.push("input:" + value);

View File

@ -515,6 +515,8 @@ utils.prototype._encodeRoute_encodeOne = function (t) {
return "e" + this._encodeRoute_id2number(t.substring(6)) + ":"; return "e" + this._encodeRoute_id2number(t.substring(6)) + ":";
else if (t.indexOf('fly:') == 0) else if (t.indexOf('fly:') == 0)
return "F" + t.substring(4) + ":"; return "F" + t.substring(4) + ":";
else if (t == 'choices:none')
return "c";
else if (t.indexOf('choices:') == 0) else if (t.indexOf('choices:') == 0)
return "C" + t.substring(8); return "C" + t.substring(8);
else if (t.indexOf('shop:') == 0) else if (t.indexOf('shop:') == 0)
@ -525,6 +527,8 @@ utils.prototype._encodeRoute_encodeOne = function (t) {
return "t" + t.substring(5).substring(0, 1).toUpperCase() + ":"; return "t" + t.substring(5).substring(0, 1).toUpperCase() + ":";
else if (t == 'getNext') else if (t == 'getNext')
return 'G'; return 'G';
else if (t == 'input:none')
return 'p';
else if (t.indexOf('input:') == 0) else if (t.indexOf('input:') == 0)
return "P" + t.substring(6); return "P" + t.substring(6);
else if (t.indexOf('input2:') == 0) else if (t.indexOf('input2:') == 0)
@ -621,6 +625,9 @@ utils.prototype._decodeRoute_decodeOne = function (decodeObj, c) {
case "F": case "F":
decodeObj.ans.push("fly:" + nxt); decodeObj.ans.push("fly:" + nxt);
break; break;
case 'c':
decodeObj.ans.push('choices:none');
break;
case "C": case "C":
decodeObj.ans.push("choices:" + nxt); decodeObj.ans.push("choices:" + nxt);
break; break;
@ -649,6 +656,9 @@ utils.prototype._decodeRoute_decodeOne = function (decodeObj, c) {
case "G": case "G":
decodeObj.ans.push("getNext"); decodeObj.ans.push("getNext");
break; break;
case "p":
decodeObj.ans.push("input:none");
break;
case "P": case "P":
decodeObj.ans.push("input:" + nxt); decodeObj.ans.push("input:" + nxt);
break; break;