Remove flyHideFloors

This commit is contained in:
ckcz123 2021-07-31 00:32:08 +08:00
parent 0aff9f9062
commit 684379fab1
4 changed files with 35 additions and 122 deletions

View File

@ -63,12 +63,6 @@ var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "多角色"
},
"flyHideFloors": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "楼传可以跳过楼层"
},
"itemCategory": {
"_leaf": true,
"_type": "textarea",

View File

@ -30,41 +30,41 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
},
"terrains": {
"ground": 0,
"sWallT": 1,
"sWallL": 2,
"sWallR": 3,
"sWallB": 4,
"grass": 5,
"sWallTL": 6,
"sWallBR": 7,
"grass2": 8,
"sWallTR": 9,
"sWallBL": 10,
"ground2": 11,
"sWallTB": 12,
"ground3": 13,
"sWallLR": 14,
"blueShopLeft": 15,
"sWallBLR": 16,
"pinkShopLeft": 17,
"sWallTLR": 18,
"ice": 19,
"downFloor": 20,
"upFloor": 21,
"sWallTBR": 22,
"blueShopRight": 23,
"sWallTBL": 24,
"pinkShopRight": 25,
"arrowUp": 26,
"arrowDown": 27,
"arrowLeft": 28,
"arrowRight": 29,
"light": 30,
"darkLight": 31,
"ski": 32,
"flower": 33,
"box": 34,
"boxed": 35
"grass": 1,
"grass2": 2,
"ground2": 3,
"ground3": 4,
"ice": 5,
"downFloor": 6,
"upFloor": 7,
"blueShopLeft": 8,
"pinkShopLeft": 9,
"blueShopRight": 10,
"pinkShopRight": 11,
"arrowUp": 12,
"arrowDown": 13,
"arrowLeft": 14,
"arrowRight": 15,
"light": 16,
"darkLight": 17,
"ski": 18,
"flower": 19,
"box": 20,
"boxed": 21,
"sWallT": 22,
"sWallL": 23,
"sWallR": 24,
"sWallB": 25,
"sWallTL": 26,
"sWallBR": 27,
"sWallTR": 28,
"sWallBL": 29,
"sWallTB": 30,
"sWallLR": 31,
"sWallBLR": 32,
"sWallTLR": 33,
"sWallTBR": 34,
"sWallTBL": 35
},
"animates": {
"star": 0,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1082,87 +1082,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
]);
core.setFlag("heroId", toHeroId); // 保存切换到的角色ID
}
},
"flyHideFloors": function () {
// 此插件可以让用户在楼传页面手动隐藏某些楼层
// 原作:一桶天下
// 是否开启本插件,默认禁用;将此改成 true 将启用本插件。
var __enable = false;
if (!__enable) return;
var _drawFly = core.ui.drawFly;
core.ui.drawFly = function (page) {
_drawFly.call(core.ui, page);
// 绘制「显示本层」和「显示全部」
var __hideFloors__ = core.getFlag('__hideFloors__', {});
var __showAllFloor__ = core.getFlag('__showAllFloor__', false);
var floorId = core.floorIds[page];
core.fillText('ui', '显示该层', this.HPIXEL - 120, 60, __hideFloors__[floorId] ? '#FFFFFF' : 'yellow', this._buildFont(20, false));
core.fillText('ui', '显示全部', this.HPIXEL + 120, 60, !__showAllFloor__ ? '#FFFFFF' : 'yellow', this._buildFont(20, false));
}
var _clickFly = core.actions._clickFly;
core.actions._clickFly = function (x, y) {
_clickFly.call(core.actions, x, y);
var __hideFloors__ = core.getFlag('__hideFloors__', {})
var __showAllFloor__ = core.getFlag('__showAllFloor__', false)
var _floorId = core.floorIds[core.status.event.data]
if (y == 1 && x >= this.HSIZE - 5 && x <= this.HSIZE - 2) {
__hideFloors__[_floorId] = !__hideFloors__[_floorId]
core.setFlag('__hideFloors__', __hideFloors__)
core.ui.drawFly(this._getNextFlyFloor(0))
}
if (y == 1 && x >= this.HSIZE + 2 && x <= this.HSIZE + 5) {
core.setFlag('__showAllFloor__', !__showAllFloor__)
core.ui.drawFly(this._getNextFlyFloor(0))
}
}
var _keyUpFly = core.actions._keyUpFly;
core.actions._keyUpFly = function (keycode) {
_keyUpFly.call(core.actions, keycode);
var __hideFloors__ = core.getFlag('__hideFloors__', {})
var __showAllFloor__ = core.getFlag('__showAllFloor__', false)
var _floorId = core.floorIds[core.status.event.data]
// Q
if (keycode == 81) {
__hideFloors__[_floorId] = !__hideFloors__[_floorId]
core.setFlag('__hideFloors__', __hideFloors__)
core.ui.drawFly(this._getNextFlyFloor(0));
} else if (keycode == 69) {
// E
core.setFlag('__showAllFloor__', !__showAllFloor__)
core.ui.drawFly(this._getNextFlyFloor(0))
}
}
core.actions._getNextFlyFloor = function (delta, index) {
var __hideFloors__ = core.getFlag('__hideFloors__', {})
var __showAllFloor__ = core.getFlag('__showAllFloor__', false)
if (index == null) index = core.status.event.data;
if (delta == 0) return index;
var sign = Math.sign(delta);
delta = Math.abs(delta);
var ans = index;
while (true) {
index += sign;
if (index < 0 || index >= core.floorIds.length) break;
var floorId = core.floorIds[index];
if (core.status.maps[floorId].canFlyTo && core.hasVisitedFloor(floorId) && (__showAllFloor__ || !__hideFloors__[floorId])) {
delta--;
ans = index;
}
if (delta == 0) break;
}
return ans;
}
},
"itemCategory": function () {
// 物品分类插件。此插件允许你对消耗道具和永久道具进行分类,比如标记「宝物类」「剧情道具」「药品」等等。