From 3d682abbcff2143ea8e6ef4bf62ef00091b2e5d9 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Fri, 15 May 2020 15:41:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A0=E6=9D=90=E9=80=89=E6=8B=A9=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A2=84=E8=A7=88=E5=9B=BE=E7=89=87=E5=92=8C=E9=9F=B3?= =?UTF-8?q?=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/editor_table.js | 1 - _server/table/data.comment.js | 40 +++++++++++++++++------------------ libs/control.js | 2 +- project/data.js | 4 ++-- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/_server/editor_table.js b/_server/editor_table.js index c9d0ce31..48f6d2de 100644 --- a/_server/editor_table.js +++ b/_server/editor_table.js @@ -192,7 +192,6 @@ editor_table_wrapper = function (editor) { // 当cobj的参数为函数时,代入args算出值 for (var key in cobj) { if (key === '_data') continue; - if (key === '_transform' || key == '_onconfirm') cobj[key] = cobj[key].toString(); if (cobj[key] instanceof Function) cobj[key] = cobj[key](args); } pvobj[ii] = vobj = args.vobj; diff --git a/_server/table/data.comment.js b/_server/table/data.comment.js index d92b6349..a32e5ee6 100644 --- a/_server/table/data.comment.js +++ b/_server/table/data.comment.js @@ -22,11 +22,11 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_type": "material", "_range": "editor.mode.checkImages(thiseval)", "_directory": "./project/images/", - "_transform": function (one) { + "_transform": (function (one) { if (one.endsWith('.png') || one.endsWith('.jpg') || one.endsWith('.jpeg') || end.endsWith('.gif')) return one; return null; - }, + }).toString(), "_docs": "本塔使用图片", "_data": "在此存放所有可能使用的图片(tilesets除外) \n图片可以被作为背景图(的一部分),也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加", }, @@ -35,12 +35,12 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_type": "material", "_range": "editor.mode.checkImages(thiseval)", "_directory": "./project/images/", - "_transform": function (one) { + "_transform": (function (one) { if (one.endsWith('.png')) return one; return null; - }, - "_onconfirm": function (previous, current) { + }).toString(), + "_onconfirm": (function (previous, current) { // 额外素材是有序的,因此根据之前的内容进行排序,然后在之后追加新的 previous = previous || []; return current.sort(function (a, b) { @@ -49,7 +49,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { if (i >= 0 && j >= 0) return i - j; return j >= 0 ? 1 : -1; }); - }, + }).toString(), "_docs": "本塔额外素材", "_data": "在此存放额外素材的图片名, \n可以自定导入任意张素材图片,无需PS,无需注册,即可直接在游戏中使用 \n 形式如[\"1.png\", \"2.png\"] ,将需要的素材图片放在images目录下 \n 素材的宽高必须都是32的倍数,且图片上的总图块数不超过1000(即最多有1000个32*32的图块在该图片上)" }, @@ -58,10 +58,10 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_type": "material", "_range": "editor.mode.checkUnique(thiseval)", "_directory": "./project/animates/", - "_transform": function (one) { + "_transform": (function (one) { if (one.endsWith(".animate")) return one.substring(0, one.lastIndexOf('.')); return null; - }, + }).toString(), "_docs": "本塔使用动画", "_data": "在此存放所有可能使用的动画,必须是animate格式,在这里不写后缀名 \n动画必须放在animates目录下;文件名不能使用中文,不能带空格或特殊字符 \n \"jianji\", \"thunder\" 根据需求自行添加" }, @@ -70,11 +70,11 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_type": "material", "_range": "editor.mode.checkUnique(thiseval)", "_directory": "./project/sounds/", - "_transform": function (one) { + "_transform": (function (one) { if (one.endsWith('.mp3') || one.endsWith('.wmv') || one.endsWith('.ogg') || end.endsWith('.wav')) return one; return null; - }, + }).toString(), "_docs": "本塔使用音乐", "_data": "在此存放所有的bgm,和文件名一致。 \n音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好" }, @@ -83,11 +83,11 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_type": "material", "_range": "editor.mode.checkUnique(thiseval)", "_directory": "./project/sounds/", - "_transform": function (one) { + "_transform": (function (one) { if (one.endsWith('.mp3') || one.endsWith('.wmv') || one.endsWith('.ogg') || end.endsWith('.wav')) return one; return null; - }, + }).toString(), "_docs": "本塔使用音效", "_data": "在此存放所有的SE,和文件名一致 \n音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好" }, @@ -503,7 +503,14 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_type": "textarea", "_docs": "全局动画时间", "_data": "全局动画时间,即怪物振动频率,一般300比较合适" - } + }, + "statusCanvasRowsOnMobile": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==null || (thiseval>0 && thiseval<=4)", + "_docs": "竖屏自绘行数", + "_data": "竖屏模式下,顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度,如果设置则不小于1且不大于4。\n仅在statusCanvas开启时才有效" + }, } }, "flags": { @@ -628,13 +635,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_docs": "自绘状态栏", "_data": "是否状态栏canvas化,即手动自定义绘制状态栏。\n如果此项开启,则可在脚本编辑的drawStatusBar中自定义绘制菜单栏。" }, - "statusCanvasRowsOnMobile": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==null || (thiseval>0 && thiseval<=4)", - "_docs": "竖屏自绘行数", - "_data": "竖屏模式下,顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度,如果设置则不小于1且不大于4。\n仅在statusCanvas开启时才有效" - }, "displayEnemyDamage": { "_leaf": true, "_type": "checkbox", diff --git a/libs/control.js b/libs/control.js index e7ba51c1..f1dc628c 100644 --- a/libs/control.js +++ b/libs/control.js @@ -2671,7 +2671,7 @@ control.prototype.resize = function() { } var statusDisplayArr = this._shouldDisplayStatus(), count = statusDisplayArr.length; - var statusCanvas = core.flags.statusCanvas, statusCanvasRows = core.flags.statusCanvasRowsOnMobile || 3; + var statusCanvas = core.flags.statusCanvas, statusCanvasRows = core.values.statusCanvasRowsOnMobile || 3; var col = statusCanvas ? statusCanvasRows : Math.ceil(count / 3); if (col > 4) { if (statusCanvas) alert("自绘状态栏的在竖屏下的行数应不超过4!"); diff --git a/project/data.js b/project/data.js index 49445eab..4644db20 100644 --- a/project/data.js +++ b/project/data.js @@ -473,7 +473,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "counterAttack": 0.1, "purify": 3, "hatred": 2, - "animateSpeed": 400 + "animateSpeed": 400, + "statusCanvasRowsOnMobile": 3 }, "flags": { "statusBarItems": [ @@ -497,7 +498,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "startUsingCanvas": false, "startDirectly": false, "statusCanvas": false, - "statusCanvasRowsOnMobile": 3, "displayEnemyDamage": true, "displayCritical": true, "displayExtraDamage": true,