diff --git a/_server/comment.js b/_server/comment.js index 85f7b315..65089877 100644 --- a/_server/comment.js +++ b/_server/comment.js @@ -228,14 +228,9 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc = }, "canBreak": { "_leaf": true, - "_type": "select", - "_select": { - "values": [ - true, - false - ] - }, - "_data": "该图块是否可被破炸;true代表可以,false代表不可以" + "_type": "checkbox", + "_bool": "bool", + "_data": "该图块是否可被破炸" } } }, diff --git a/_server/editor.js b/_server/editor.js index 1372d04f..e7cd0523 100644 --- a/_server/editor.js +++ b/_server/editor.js @@ -81,7 +81,12 @@ editor.prototype.init = function (callback) { editor.prototype.idsInit = function (maps, icons) { editor.ids = [0]; editor.indexs = []; - var MAX_NUM = Math.max.apply(null,Object.keys(maps_90f36752_8815_4be8_b32b_d7fad1d0542e)); + var MAX_NUM = 0; + var keys=Object.keys(maps_90f36752_8815_4be8_b32b_d7fad1d0542e); + for(var ii=0;iiMAX_NUM && v 0) { - actionList.forEach(function (value) { + var tempmap=[]; + for(var ii=0;ii=editor.core.icons.tilesetStartOffset && !isset(editor.core.maps.blocksInfo[idnum]) && tempmap.indexOf(idnum)===-1){ + actionList.splice(ii,0,["add","['" + idnum + "']",{"cls": "tileset", "id": "X"+idnum, "noPass": true}]); + ii++; + } value[1] = "['" + idnum + "']" + value[1]; - }); + } saveSetting('maps', actionList, function (err) { callback([ (function () { - var locObj = Object.assign({}, editor.core.maps.blocksInfo[idnum]); + var sourceobj=editor.core.maps.blocksInfo[idnum]; + if(!isset(sourceobj) && idnum>=editor.core.icons.tilesetStartOffset)sourceobj={"cls": "tileset", "id": "X"+idnum, "noPass": true} + var locObj = Object.assign({}, sourceobj); Object.keys(editor_file.comment._data.maps._data).forEach(function (v) { - if (!isset(editor.core.maps.blocksInfo[idnum][v])) + if (!isset(sourceobj[v])) locObj[v] = null; }); locObj.idnum = idnum; @@ -496,9 +505,11 @@ editor_file = function (editor, callback) { } else { callback([ (function () { - var locObj = Object.assign({}, editor.core.maps.blocksInfo[idnum]); + var sourceobj=editor.core.maps.blocksInfo[idnum]; + if(!isset(sourceobj) && idnum>=editor.core.icons.tilesetStartOffset)sourceobj={"cls": "tileset", "id": "X"+idnum, "noPass": true} + var locObj = Object.assign({}, sourceobj); Object.keys(editor_file.comment._data.maps._data).forEach(function (v) { - if (!isset(editor.core.maps.blocksInfo[idnum][v])) + if (!isset(sourceobj[v])) locObj[v] = null; }); locObj.idnum = idnum; diff --git a/_server/editor_mode.js b/_server/editor_mode.js index ab18694b..0c231b0a 100644 --- a/_server/editor_mode.js +++ b/_server/editor_mode.js @@ -320,18 +320,11 @@ editor_mode = function (editor) { if (!core.isset(editor_mode.info.id)) { // document.getElementById('table_a3f03d4c_55b8_4ef6_b362_b345783acd72').innerHTML = ''; document.getElementById('enemyItemTable').style.display = 'none'; - document.getElementById('tilesetsDiv').style.display = 'none'; document.getElementById('newIdIdnum').style.display = 'block'; return; } - if (editor_mode.info.isTile) { - document.getElementById('enemyItemTable').style.display = 'none'; - document.getElementById('tilesetsDiv').style.display = 'block'; - document.getElementById('newIdIdnum').style.display = 'none'; - return; - } + document.getElementById('newIdIdnum').style.display = 'none'; - document.getElementById('tilesetsDiv').style.display = 'none'; document.getElementById('enemyItemTable').style.display = 'block'; var objs = []; diff --git a/editor-mobile.html b/editor-mobile.html index 2ceee529..da2a340d 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -95,9 +95,6 @@

图块属性  

-
-

tilesets不允许编辑图块属性

-
diff --git a/editor.html b/editor.html index ac6381aa..b1526e10 100644 --- a/editor.html +++ b/editor.html @@ -94,9 +94,6 @@

图块属性  

-
-

tilesets不允许编辑图块属性

-