修复重复注册问题
This commit is contained in:
parent
f16f9b5855
commit
5bcf8a5f6d
@ -191,7 +191,7 @@ editor_datapanel_wrapper = function (editor) {
|
||||
if (!floorIds) return;
|
||||
var from = parseInt(document.getElementById('newMapsFrom').value),
|
||||
to = parseInt(document.getElementById('newMapsTo').value);
|
||||
if (!core.isset(from) || !core.isset(to) || from > to || from < 0 || to < 0) {
|
||||
if (!core.isset(from) || !core.isset(to) || from > to) {
|
||||
printe("请输入有效的起始和终止楼层");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -311,13 +311,11 @@ editor_file = function (editor, callback) {
|
||||
}
|
||||
var c=image.toUpperCase().charAt(0);
|
||||
|
||||
// terrains id
|
||||
var terrainsId = [];
|
||||
Object.keys(core.material.icons.terrains).forEach(function (id) {
|
||||
terrainsId[core.material.icons.terrains[id]]=id;
|
||||
})
|
||||
|
||||
var allIds = [];
|
||||
Object.keys(icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1[image] || {}).forEach(function (v) {
|
||||
allIds[icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1[image][v]] = v;
|
||||
});
|
||||
|
||||
editor.ids.forEach(function (v) {
|
||||
if (v.images==image) {
|
||||
allIds[v.y]=v;
|
||||
@ -339,12 +337,7 @@ editor_file = function (editor, callback) {
|
||||
// get id num
|
||||
var id = c+idnum;
|
||||
|
||||
if (image=='terrains' && terrainsId[y] != null) {
|
||||
id=terrainsId[y];
|
||||
}
|
||||
else {
|
||||
iconActions.push(["add", "['" + image + "']['" + id + "']", y])
|
||||
}
|
||||
iconActions.push(["add", "['" + image + "']['" + id + "']", y])
|
||||
mapActions.push(["add", "['" + idnum + "']", {'cls': image, 'id': id}]);
|
||||
faceIds.push({idnum: idnum, id: id});
|
||||
if (image=='items')
|
||||
|
||||
@ -2387,8 +2387,8 @@ control.prototype.clearRouteFolding = function () {
|
||||
|
||||
////// 检查录像折叠 //////
|
||||
control.prototype.checkRouteFolding = function () {
|
||||
// 未开启、未开始游戏、正在事件中:不执行
|
||||
if (!core.flags.enableRouteFolding || !core.isPlaying() || core.status.event.id) {
|
||||
// 未开启、未开始游戏、录像播放中、正在事件中:不执行
|
||||
if (!core.flags.enableRouteFolding || !core.isPlaying() || core.isReplaying() || core.status.event.id) {
|
||||
return this.clearRouteFolding();
|
||||
}
|
||||
var hero = core.clone(core.status.hero, function (name, value) {
|
||||
|
||||
@ -50,7 +50,7 @@ maps.prototype.loadFloor = function (floorId, map) {
|
||||
if (map instanceof Array) {
|
||||
map = {"map": map};
|
||||
}
|
||||
if (!map.map) map.map = floor.map;
|
||||
if (!map.map) map.map = core.clone(floor.map);
|
||||
var content = {};
|
||||
var notCopy = this._loadFloor_doNotCopy();
|
||||
for (var name in floor) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user