新建楼层保留创建的属性

This commit is contained in:
ckcz123 2021-08-20 13:37:26 +08:00
parent 3e8cb47dd9
commit 2592d293d3
2 changed files with 10 additions and 2 deletions

View File

@ -322,7 +322,7 @@ ActionParser.prototype.parseAction = function() {
data.time, data.lineHeight||1.4, data.async||false, this.EvalString_Multi(data.text), this.next]);
break;
case "comment": // 注释
this.next = MotaActionBlocks['comment_s'].xmlText([this.EvalString_Multi(data.text),this.next],null,data.text);
this.next = MotaActionBlocks['comment_s'].xmlText([this.EvalString_Multi(data.text),this.next]);
break;
case "setText": // 设置剧情文本的属性
data.title=this.Colour(data.title);

View File

@ -219,7 +219,15 @@ editor_file = function (editor, callback) {
color: currData.color,
weather: currData.weather,
}:{});
// 继承配置表格新增的基本楼层属性
if (saveStatus) {
for (var x in currData) {
if (editor.currentFloorData[x] == null && (typeof currData[x] == 'number' || typeof currData[x] == 'string')) {
editor.currentFloorData[x] = currData[x];
}
}
}
Object.keys(editor.currentFloorData).forEach(function (t) {
if (editor.currentFloorData[t] == null)
delete editor.currentFloorData[t];