Fix 281 bugs

This commit is contained in:
ckcz123 2021-08-13 23:52:10 +08:00
parent e21ed4877c
commit a2b4376782
3 changed files with 6 additions and 6 deletions

View File

@ -3058,7 +3058,7 @@ return '';
waitAsync_s waitAsync_s
: '等待所有异步事件执行完毕' '不等待动画' Bool '等待音效' Bool : '等待所有异步事件执行完毕' '不等待动画' Bool '等待音效' Bool
/* waitAsync_s /* waitAsync_s
@ -3067,7 +3067,7 @@ helpUrl : /_docs/#/instruction
default : [false, false] default : [false, false]
colour : this.soundColor colour : this.soundColor
Bool_0 = Bool_0 ? ', "excludeAnimates": true' : ''; Bool_0 = Bool_0 ? ', "excludeAnimates": true' : '';
Bool_1 = Bool_1 ? ', "excludeSounds": true' : ''; Bool_1 = Bool_1 ? ', "includeSounds": true' : '';
var code = '{"type": "waitAsync"'+Bool_0+Bool_1+'},\n'; var code = '{"type": "waitAsync"'+Bool_0+Bool_1+'},\n';
return code; return code;
*/; */;

View File

@ -969,7 +969,7 @@ ActionParser.prototype.parseAction = function() {
break; break;
case "waitAsync": // 等待所有异步事件执行完毕 case "waitAsync": // 等待所有异步事件执行完毕
this.next = MotaActionBlocks['waitAsync_s'].xmlText([ this.next = MotaActionBlocks['waitAsync_s'].xmlText([
data.excludeAnimates||false, data.excludeSounds||false, this.next]); data.excludeAnimates||false, data.includeSounds||false, this.next]);
break; break;
case "callBook": // 呼出怪物手册 case "callBook": // 呼出怪物手册
this.next = MotaActionBlocks['callBook_s'].xmlText([ this.next = MotaActionBlocks['callBook_s'].xmlText([

View File

@ -510,7 +510,7 @@ events.prototype.openDoor = function (x, y, needKey, callback) {
core.removeBlock(x, y); core.removeBlock(x, y);
setTimeout(function () { setTimeout(function () {
core.status.replay.animate = false; core.status.replay.animate = false;
core.events.afterOpenDoor(id, x, y); core.events.afterOpenDoor(block.event.id, x, y);
if (callback) callback(); if (callback) callback();
}, 1); // +1是为了录像检测系统 }, 1); // +1是为了录像检测系统
} else { } else {
@ -2495,8 +2495,8 @@ events.prototype._precompile_wait = function (data) {
events.prototype._action_waitAsync = function (data, x, y, prefix) { events.prototype._action_waitAsync = function (data, x, y, prefix) {
var test = window.setInterval(function () { var test = window.setInterval(function () {
if (!core.hasAsync() if (!core.hasAsync()
&& (data.excludeAnimates || core.getAnimates().length == 0) && (data.excludeAnimates || core.isReplaying() || core.getAnimates().length == 0)
&& (data.excludeSounds || core.getSounds().length == 0)) { && (!data.includeSounds || core.isReplaying() || core.getSounds().length == 0)) {
clearInterval(test); clearInterval(test);
core.doAction(); core.doAction();
} }