Merge pull request #163 from zhaouv/v2.x

V2 x
This commit is contained in:
Zhang Chen 2018-07-01 22:09:35 +08:00 committed by GitHub
commit 63e06c5af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 16 deletions

View File

@ -27,11 +27,13 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "名称"
},
"text": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "道具在道具栏中显示的描述"
}
}
@ -41,28 +43,28 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "cls为items的即捡即用类物品的效果,如需设置可以先将其设置为空字符串\"\",然后双击进行编辑。"
"_data": "cls为items的即捡即用类物品的效果。"
},
"itemEffectTip": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "cls为items的即捡即用类物品在获得时左上角额外显示的文字,如需设置可以先将其设置为空字符串\"\",然后双击进行编辑。"
"_data": "cls为items的即捡即用类物品在获得时左上角额外显示的文字。"
},
"useItemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "cls为tools或contants时的使用物品效果,如需设置可以先将其设置为空字符串\"\",然后双击进行编辑。"
"_data": "cls为tools或contants时的使用物品效果。"
},
"canUseItemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "cls为tools或contants时对当前能否使用该物品的判断,如需设置可以先将其设置为空字符串\"\",然后双击进行编辑。"
"_data": "cls为tools或contants时对当前能否使用该物品的判断。"
}
}
},
@ -74,6 +76,7 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "名称"
},
"hp": {

View File

@ -674,8 +674,8 @@ editor.prototype.listen = function () {
var locStr='('+editor.lastRightButtonPos[1].x+','+editor.lastRightButtonPos[1].y+')';
var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
copyLoc.children[0].innerHTML='复制事件'+locStr;
moveLoc.children[0].innerHTML='移动此事件到'+locStr;
copyLoc.children[0].innerHTML='复制事件'+locStr+'到此处';
moveLoc.children[0].innerHTML='交换事件'+locStr+'与此事件的位置';
midMenu.style='top:'+(y+scrollTop)+'px;left:'+(x+scrollLeft)+'px;';
}
editor.hideMidMenu=function(){midMenu.style='display:none';}
@ -730,21 +730,22 @@ editor.prototype.listen = function () {
e.stopPropagation();
preMapData = null;
reDo = null;
var thisevent = editor.map[editor.pos.y][editor.pos.x];
if(thisevent==0){
editor.info = 0;
} else {
var ids=editor.indexs[thisevent.idnum];
ids=ids[0]?ids[0]:ids;
editor.info=editor.ids[ids];
}
editor_mode.onmode('');
var now = editor.pos;
var last = editor.lastRightButtonPos[1];
editor.map[last.y][last.x]=editor.info;
var lastevent = editor.map[last.y][last.x];
var lastinfo = 0;
if(lastevent==0){
lastinfo = 0;
} else {
var ids=editor.indexs[lastevent.idnum];
ids=ids[0]?ids[0]:ids;
lastinfo=editor.ids[ids];
}
editor.map[now.y][now.x]=lastinfo;
editor.updateMap();
fields.forEach(function(v){
editor.currentFloorData[v][last.x+','+last.y]=editor.currentFloorData[v][now.x+','+now.y]
editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y]
})
editor.file.saveFloorFile(function (err) {
if (err) {