commit
9295967e6d
@ -39,24 +39,28 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
|
||||
"itemEffect": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_string": true,
|
||||
"_lint": true,
|
||||
"_data": "cls为items的即捡即用类物品的效果,如需设置可以先将其设置为空字符串\"\",然后双击进行编辑。"
|
||||
},
|
||||
"itemEffectTip": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_string": true,
|
||||
"_lint": true,
|
||||
"_data": "cls为items的即捡即用类物品,在获得时左上角额外显示的文字,如需设置可以先将其设置为空字符串\"\",然后双击进行编辑。"
|
||||
},
|
||||
"useItemEffect": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_string": true,
|
||||
"_lint": true,
|
||||
"_data": "cls为tools或contants时的使用物品效果,如需设置可以先将其设置为空字符串\"\",然后双击进行编辑。"
|
||||
},
|
||||
"canUseItemEffect": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_string": true,
|
||||
"_lint": true,
|
||||
"_data": "cls为tools或contants时对当前能否使用该物品的判断,如需设置可以先将其设置为空字符串\"\",然后双击进行编辑。"
|
||||
}
|
||||
|
||||
@ -413,6 +413,18 @@ document.getElementById('blocklyDiv').onmousewheel = function(e){
|
||||
editor_blockly.id = '';
|
||||
return;
|
||||
}
|
||||
if(editor_blockly.workspace.topBlocks_.length>=2){
|
||||
codeAreaHL.setValue('入口方块只能有一个');
|
||||
return;
|
||||
}
|
||||
var eventType = document.getElementById('entryType').value;
|
||||
if(editor_blockly.workspace.topBlocks_.length==1){
|
||||
var blockType = editor_blockly.workspace.topBlocks_[0].type;
|
||||
if(blockType!==eventType+'_m'){
|
||||
codeAreaHL.setValue('入口方块类型错误');
|
||||
return;
|
||||
}
|
||||
}
|
||||
var setvalue = function (value) {
|
||||
var thisTr = document.getElementById(editor_blockly.id);
|
||||
editor_blockly.id = '';
|
||||
@ -422,7 +434,7 @@ document.getElementById('blocklyDiv').onmousewheel = function(e){
|
||||
input.onchange();
|
||||
}
|
||||
if (codeAreaHL.getValue() === '') {
|
||||
setvalue('null');
|
||||
eventType==='shop'?setvalue('[]'):setvalue('null');
|
||||
return;
|
||||
}
|
||||
var code = Blockly.JavaScript.workspaceToCode(editor_blockly.workspace);
|
||||
|
||||
@ -120,7 +120,7 @@ editor_mode = function (editor) {
|
||||
}
|
||||
input.ondblclick = function () {
|
||||
if (cobj._type === 'event') editor_blockly.import(guid, {type: cobj._event});
|
||||
if (cobj._type === 'textarea') editor_multi.import(guid, {lint: cobj._lint});
|
||||
if (cobj._type === 'textarea') editor_multi.import(guid, {lint: cobj._lint, string: cobj._string});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@ -72,7 +72,7 @@ editor_multi = function () {
|
||||
editor_multi.lintAutocomplete = false;
|
||||
if (args.lint === true) editor_multi.lintAutocomplete = true;
|
||||
if (field.indexOf('Effect') !== -1) editor_multi.lintAutocomplete = true;
|
||||
if (input.value.slice(0, 1) === '"') {
|
||||
if (input.value.slice(0, 1) === '"' || args.string) {
|
||||
editor_multi.isString = true;
|
||||
codeEditor.setValue(JSON.parse(input.value) || '');
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user