fix types of some eval-blocks

This commit is contained in:
YouWei Zhao 2020-05-16 11:51:26 +08:00
parent 7d05e23d4c
commit f264ba9e53
2 changed files with 17 additions and 25 deletions

View File

@ -2510,6 +2510,10 @@ expression
| idString_e | idString_e
| evFlag_e | evFlag_e
| evTemp_e | evTemp_e
| enemyattr_e
| blockId_e
| blockCls_e
| equip_e
| evalString_e | evalString_e
@ -2597,13 +2601,11 @@ return [code, Blockly.JavaScript.ORDER_ATOMIC];
*/; */;
//这一条不会被antlr识别,总是会被归到idString_e enemyattr_e
idString_3_e
: '怪物' IdString '的' EnemyId_List : '怪物' IdString '的' EnemyId_List
/* idString_3_e /* enemyattr_e
colour : this.idstring_eColor
default : ['greenSlime',"攻击"] default : ['greenSlime',"攻击"]
//todo 将其output改成'idString_e' //todo 将其output改成'idString_e'
var code = 'enemy:'+IdString_0+':'+EnemyId_List_0; var code = 'enemy:'+IdString_0+':'+EnemyId_List_0;
@ -2611,39 +2613,33 @@ return [code, Blockly.JavaScript.ORDER_ATOMIC];
*/; */;
//这一条不会被antlr识别,总是会被归到idString_e blockId_e
idString_4_e
: '图块ID:' Int ',' Int : '图块ID:' Int ',' Int
/* idString_4_e /* blockId_e
colour : this.idstring_eColor
default : [0,0] default : [0,0]
var code = 'blockId:'+Int_0+','+Int_1; var code = 'blockId:'+Int_0+','+Int_1;
return [code, Blockly.JavaScript.ORDER_ATOMIC]; return [code, Blockly.JavaScript.ORDER_ATOMIC];
*/; */;
//这一条不会被antlr识别,总是会被归到idString_e blockCls_e
idString_5_e
: '图块类别:' Int ',' Int : '图块类别:' Int ',' Int
/* idString_5_e /* blockCls_e
colour : this.idstring_eColor
default : [0,0] default : [0,0]
var code = 'blockCls:'+Int_0+','+Int_1; var code = 'blockCls:'+Int_0+','+Int_1;
return [code, Blockly.JavaScript.ORDER_ATOMIC]; return [code, Blockly.JavaScript.ORDER_ATOMIC];
*/; */;
//这一条不会被antlr识别,总是会被归到idString_e equip_e
idString_6_e
: '装备孔:' Int : '装备孔:' Int
/* idString_6_e /* equip_e
colour : this.idstring_eColor
default : [0] default : [0]
var code = 'equip:'+Int_0; var code = 'equip:'+Int_0;
return [code, Blockly.JavaScript.ORDER_ATOMIC]; return [code, Blockly.JavaScript.ORDER_ATOMIC];
@ -2901,10 +2897,6 @@ this.evisitor.mapColor=175;
delete(this.block('negate_e').inputsInline); delete(this.block('negate_e').inputsInline);
this.block('idString_1_e').output='idString_e'; this.block('idString_1_e').output='idString_e';
this.block('idString_2_e').output='idString_e'; this.block('idString_2_e').output='idString_e';
this.block('idString_3_e').output='idString_e';
this.block('idString_4_e').output='idString_e';
this.block('idString_5_e').output='idString_e';
this.block('idString_6_e').output='idString_e';
this.block('evFlag_e').output='idString_e'; this.block('evFlag_e').output='idString_e';
this.block('evTemp_e').output='idString_e'; this.block('evTemp_e').output='idString_e';
*/ */

View File

@ -227,10 +227,10 @@ editor_blockly = function () {
MotaActionBlocks['idString_e'].xmlText(), MotaActionBlocks['idString_e'].xmlText(),
MotaActionBlocks['idString_1_e'].xmlText(), MotaActionBlocks['idString_1_e'].xmlText(),
MotaActionBlocks['idString_2_e'].xmlText(), MotaActionBlocks['idString_2_e'].xmlText(),
MotaActionBlocks['idString_3_e'].xmlText(), MotaActionBlocks['enemyattr_e'].xmlText(),
MotaActionBlocks['idString_4_e'].xmlText(), MotaActionBlocks['blockId_e'].xmlText(),
MotaActionBlocks['idString_5_e'].xmlText(), MotaActionBlocks['blockCls_e'].xmlText(),
MotaActionBlocks['idString_6_e'].xmlText(), MotaActionBlocks['equip_e'].xmlText(),
MotaActionBlocks['evalString_e'].xmlText(), MotaActionBlocks['evalString_e'].xmlText(),
], ],
'常见事件模板':[ '常见事件模板':[
@ -1011,7 +1011,7 @@ function omitedcheckUpdateFunction(event) {
} }
// 对怪物ID提供补全 // 对怪物ID提供补全
if ((type == 'idString_3_e' || type == 'battle_s' || type == 'setEnemy_s') && name == 'IdString_0') { if ((type == 'enemyattr_e' || type == 'battle_s' || type == 'setEnemy_s') && name == 'IdString_0') {
return filter(allEnemys, content); return filter(allEnemys, content);
} }