From b49fbc6c22c692091a176236aa519e42d3e7f9f8 Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Tue, 23 Apr 2019 17:08:31 -0400 Subject: [PATCH] editor_file --- _server/editor_file_unsorted.js | 42 +++++++++++++-------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/_server/editor_file_unsorted.js b/_server/editor_file_unsorted.js index 471adb69..72e204ae 100644 --- a/_server/editor_file_unsorted.js +++ b/_server/editor_file_unsorted.js @@ -14,31 +14,16 @@ editor_file = function (editor, callback) { } */ var filename = 'project/floors/' + editor.currentFloorId + '.js'; var datastr = ['main.floors.', editor.currentFloorId, '=\n']; - if (editor.currentFloorData.map == 'new') { - /* - editor.currentFloorData.map = editor.map.map(function (v) { - return v.map(function () { - return 0 + + for(var ii=0,name;name=['map','bgmap','fgmap'][ii];ii++){ + var mapArray=editor[name].map(function (v) { + return v.map(function (v) { + return v.idnum || v || 0 }) }); - */ - var width = parseInt(document.getElementById('newMapWidth').value); - var height = parseInt(document.getElementById('newMapHeight').value); - var row = []; - for (var i=0;i