non-null in location
This commit is contained in:
parent
4db79dec3f
commit
105d73e0af
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,7 +1,7 @@
|
|||||||
.vscode
|
.vscode
|
||||||
*ce5eec52_2fa1_447b_8dad_764e267a7fab*
|
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
MTBuilder.app
|
||||||
|
|
||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|||||||
@ -1009,6 +1009,7 @@ editor.prototype.listen = function () {
|
|||||||
editor.updateMap();
|
editor.updateMap();
|
||||||
fields.forEach(function(v){
|
fields.forEach(function(v){
|
||||||
editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y]
|
editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y]
|
||||||
|
if (!core.isset(editor.currentFloorData[v][now.x+','+now.y])) delete editor.currentFloorData[v][now.x+','+now.y];
|
||||||
})
|
})
|
||||||
editor.file.saveFloorFile(function (err) {
|
editor.file.saveFloorFile(function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
@ -1053,8 +1054,10 @@ editor.prototype.listen = function () {
|
|||||||
|
|
||||||
fields.forEach(function(v){
|
fields.forEach(function(v){
|
||||||
var temp_atsfcytaf=editor.currentFloorData[v][now.x+','+now.y];
|
var temp_atsfcytaf=editor.currentFloorData[v][now.x+','+now.y];
|
||||||
editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y];
|
if (!core.isset(editor.currentFloorData[v][last.x+','+last.y])) delete editor.currentFloorData[v][now.x+','+now.y];
|
||||||
editor.currentFloorData[v][last.x+','+last.y]=temp_atsfcytaf
|
else editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y];
|
||||||
|
if (!core.isset(temp_atsfcytaf)) delete editor.currentFloorData[v][last.x+','+last.y];
|
||||||
|
else editor.currentFloorData[v][last.x+','+last.y]=temp_atsfcytaf
|
||||||
})
|
})
|
||||||
editor.file.saveFloorFile(function (err) {
|
editor.file.saveFloorFile(function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
@ -1078,7 +1081,7 @@ editor.prototype.listen = function () {
|
|||||||
editor.map[now.y][now.x]=editor.info;
|
editor.map[now.y][now.x]=editor.info;
|
||||||
editor.updateMap();
|
editor.updateMap();
|
||||||
fields.forEach(function(v){
|
fields.forEach(function(v){
|
||||||
editor.currentFloorData[v][now.x+','+now.y]=null;
|
delete editor.currentFloorData[v][now.x+','+now.y];
|
||||||
})
|
})
|
||||||
editor.file.saveFloorFile(function (err) {
|
editor.file.saveFloorFile(function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
@ -901,7 +901,11 @@ editor_file = function (editor, callback) {
|
|||||||
}
|
}
|
||||||
if (file == 'floors') {
|
if (file == 'floors') {
|
||||||
actionList.forEach(function (value) {
|
actionList.forEach(function (value) {
|
||||||
|
// 检测null/undefined
|
||||||
|
if (core.isset(value[2]))
|
||||||
eval("editor.currentFloorData" + value[1] + '=' + JSON.stringify(value[2]));
|
eval("editor.currentFloorData" + value[1] + '=' + JSON.stringify(value[2]));
|
||||||
|
else
|
||||||
|
eval("delete editor.currentFloorData"+value[1]);
|
||||||
});
|
});
|
||||||
editor_file.saveFloorFile(callback);
|
editor_file.saveFloorFile(callback);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -79,7 +79,9 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
|||||||
'65':{'cls': 'items', 'id': 'hammer'}, // 圣锤
|
'65':{'cls': 'items', 'id': 'hammer'}, // 圣锤
|
||||||
'68':{'cls': 'items', 'id': 'lifeWand'}, // 生命魔杖
|
'68':{'cls': 'items', 'id': 'lifeWand'}, // 生命魔杖
|
||||||
'69':{'cls': 'items', 'id': 'jumpShoes'}, // 生命魔杖
|
'69':{'cls': 'items', 'id': 'jumpShoes'}, // 生命魔杖
|
||||||
'70':{'cls': 'items', 'id': 'skill1'}, // 技能:二倍斩
|
'70':{'cls': 'items', 'id': 'sword0'},
|
||||||
|
'71':{'cls': 'items', 'id': 'shield0'},
|
||||||
|
'72':{'cls': 'items', 'id': 'skill1'}, // 技能:二倍斩
|
||||||
|
|
||||||
|
|
||||||
////////////////////////// 门、楼梯、传送点部分 //////////////////////////
|
////////////////////////// 门、楼梯、传送点部分 //////////////////////////
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user