Remove flyHideFloors
This commit is contained in:
parent
0aff9f9062
commit
684379fab1
@ -63,12 +63,6 @@ var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
|||||||
"_range": "typeof(thiseval)=='string' || thiseval==null",
|
"_range": "typeof(thiseval)=='string' || thiseval==null",
|
||||||
"_data": "多角色"
|
"_data": "多角色"
|
||||||
},
|
},
|
||||||
"flyHideFloors": {
|
|
||||||
"_leaf": true,
|
|
||||||
"_type": "textarea",
|
|
||||||
"_range": "typeof(thiseval)=='string' || thiseval==null",
|
|
||||||
"_data": "楼传可以跳过楼层"
|
|
||||||
},
|
|
||||||
"itemCategory": {
|
"itemCategory": {
|
||||||
"_leaf": true,
|
"_leaf": true,
|
||||||
"_type": "textarea",
|
"_type": "textarea",
|
||||||
|
|||||||
@ -30,41 +30,41 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
|
|||||||
},
|
},
|
||||||
"terrains": {
|
"terrains": {
|
||||||
"ground": 0,
|
"ground": 0,
|
||||||
"sWallT": 1,
|
"grass": 1,
|
||||||
"sWallL": 2,
|
"grass2": 2,
|
||||||
"sWallR": 3,
|
"ground2": 3,
|
||||||
"sWallB": 4,
|
"ground3": 4,
|
||||||
"grass": 5,
|
"ice": 5,
|
||||||
"sWallTL": 6,
|
"downFloor": 6,
|
||||||
"sWallBR": 7,
|
"upFloor": 7,
|
||||||
"grass2": 8,
|
"blueShopLeft": 8,
|
||||||
"sWallTR": 9,
|
"pinkShopLeft": 9,
|
||||||
"sWallBL": 10,
|
"blueShopRight": 10,
|
||||||
"ground2": 11,
|
"pinkShopRight": 11,
|
||||||
"sWallTB": 12,
|
"arrowUp": 12,
|
||||||
"ground3": 13,
|
"arrowDown": 13,
|
||||||
"sWallLR": 14,
|
"arrowLeft": 14,
|
||||||
"blueShopLeft": 15,
|
"arrowRight": 15,
|
||||||
"sWallBLR": 16,
|
"light": 16,
|
||||||
"pinkShopLeft": 17,
|
"darkLight": 17,
|
||||||
"sWallTLR": 18,
|
"ski": 18,
|
||||||
"ice": 19,
|
"flower": 19,
|
||||||
"downFloor": 20,
|
"box": 20,
|
||||||
"upFloor": 21,
|
"boxed": 21,
|
||||||
"sWallTBR": 22,
|
"sWallT": 22,
|
||||||
"blueShopRight": 23,
|
"sWallL": 23,
|
||||||
"sWallTBL": 24,
|
"sWallR": 24,
|
||||||
"pinkShopRight": 25,
|
"sWallB": 25,
|
||||||
"arrowUp": 26,
|
"sWallTL": 26,
|
||||||
"arrowDown": 27,
|
"sWallBR": 27,
|
||||||
"arrowLeft": 28,
|
"sWallTR": 28,
|
||||||
"arrowRight": 29,
|
"sWallBL": 29,
|
||||||
"light": 30,
|
"sWallTB": 30,
|
||||||
"darkLight": 31,
|
"sWallLR": 31,
|
||||||
"ski": 32,
|
"sWallBLR": 32,
|
||||||
"flower": 33,
|
"sWallTLR": 33,
|
||||||
"box": 34,
|
"sWallTBR": 34,
|
||||||
"boxed": 35
|
"sWallTBL": 35
|
||||||
},
|
},
|
||||||
"animates": {
|
"animates": {
|
||||||
"star": 0,
|
"star": 0,
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
@ -1082,87 +1082,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
]);
|
]);
|
||||||
core.setFlag("heroId", toHeroId); // 保存切换到的角色ID
|
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 () {
|
"itemCategory": function () {
|
||||||
// 物品分类插件。此插件允许你对消耗道具和永久道具进行分类,比如标记「宝物类」「剧情道具」「药品」等等。
|
// 物品分类插件。此插件允许你对消耗道具和永久道具进行分类,比如标记「宝物类」「剧情道具」「药品」等等。
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user