From b4ef78911ac7f2304452035ec86ed6e52603687e Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 30 Sep 2020 23:18:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=85=B1=E4=BA=8B=E4=BB=B6=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=A1=A5=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/MotaAction.g4 | 1 + _server/editor_blockly.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index 65856cf1..a29585c8 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -1164,6 +1164,7 @@ insert_1_s /* insert_1_s tooltip : insert: 插入公共事件并执行 helpUrl : /_docs/#/instruction +allEvents : ['EvalString_0'] default : ["加点事件", ""] colour : this.eventColor if (JsonEvalString_0) { diff --git a/_server/editor_blockly.js b/_server/editor_blockly.js index 70a9ee07..21cb675c 100644 --- a/_server/editor_blockly.js +++ b/_server/editor_blockly.js @@ -669,6 +669,7 @@ editor_blockly = function () { .map(function (key) { return maps_90f36752_8815_4be8_b32b_d7fad1d0542e[key]; }) .filter(function (one) { return one.doorInfo != null; }) .map(function (one) { return one.id; })); + namesObj.allEvents = Object.keys(core.events.commonEvent); var filter = function (list, content) { return list.filter(function (one) { return one != content && one.startsWith(content); @@ -684,7 +685,7 @@ editor_blockly = function () { // 对音效进行补全 // 对全局商店进行补全 // 对楼层名进行补全 - for(var ii=0,names;names=['allIds','allEnemys','allItems','allImages','allAnimates','allBgms','allSounds','allShops','allFloorIds','allDoors'][ii];ii++){ + for(var ii=0,names;names=['allIds','allEnemys','allItems','allImages','allAnimates','allBgms','allSounds','allShops','allFloorIds','allDoors','allEvents'][ii];ii++){ if (MotaActionBlocks[type][names] && eval(MotaActionBlocks[type][names]).indexOf(name)!==-1) { return filter(namesObj[names], content); }