fix:设置快捷键录像bug
This commit is contained in:
parent
9fbd97eeac
commit
c8956a15ae
@ -2252,6 +2252,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
form.append('towername', towerName);
|
form.append('towername', towerName);
|
||||||
form.append('comment', comment);
|
form.append('comment', comment);
|
||||||
form.append('tags', tags);
|
form.append('tags', tags);
|
||||||
|
form.append('userid', 2324);
|
||||||
|
form.append('password', '77c8fd5ff49c370342e4472ebdda5903');
|
||||||
utils.prototype.http(
|
utils.prototype.http(
|
||||||
'POST',
|
'POST',
|
||||||
'https://h5mota.com/backend/tower/barrage.php',
|
'https://h5mota.com/backend/tower/barrage.php',
|
||||||
@ -2265,8 +2267,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
} else {
|
} else {
|
||||||
core.drawTip('提交失败!' + res?.message);
|
core.drawTip('提交失败!' + res?.message);
|
||||||
}
|
}
|
||||||
}
|
} catch (err) {
|
||||||
catch (err) {
|
|
||||||
core.drawFailTip('提交失败!' + err.message);
|
core.drawFailTip('提交失败!' + err.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3572,8 +3573,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
core.registerReplayAction("equip", core.control._replayAction_equip);
|
core.registerReplayAction("equip", core.control._replayAction_equip);
|
||||||
core.registerReplayAction("unEquip", core.control._replayAction_unEquip);
|
core.registerReplayAction("unEquip", core.control._replayAction_unEquip);
|
||||||
},
|
},
|
||||||
"autoChangeEquip":
|
"autoChangeEquip": function () {
|
||||||
function () {
|
|
||||||
// 调用方法:在合适的位置调用函数figureEquip即可,例如在脚本编辑-按键处理加入case 89: core.plugin.figureEquip(); break;
|
// 调用方法:在合适的位置调用函数figureEquip即可,例如在脚本编辑-按键处理加入case 89: core.plugin.figureEquip(); break;
|
||||||
// 即按Y键进入切装模式
|
// 即按Y键进入切装模式
|
||||||
|
|
||||||
@ -4278,7 +4278,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
const aimItem = Object.values(itemInfo).find((item) => item.name === value || item.id === value);
|
const aimItem = Object.values(itemInfo).find((item) => item.name === value || item.id === value);
|
||||||
if (aimItem) {
|
if (aimItem) {
|
||||||
if (['constants', 'tools'].includes(aimItem.cls)) {
|
if (['constants', 'tools'].includes(aimItem.cls)) {
|
||||||
core.setFlag('hotkey' + num, aimItem.id);
|
core.setLocalStorage('hotkey' + num, aimItem.id);
|
||||||
this.menu.drawContent();
|
this.menu.drawContent();
|
||||||
}
|
}
|
||||||
else core.drawFailTip('错误:该类型的物品不支持快捷使用!');
|
else core.drawFailTip('错误:该类型的物品不支持快捷使用!');
|
||||||
@ -4289,10 +4289,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
'给选定的数字键绑定一个可快捷使用的物品。',
|
'给选定的数字键绑定一个可快捷使用的物品。',
|
||||||
true,
|
false,
|
||||||
function (ctx) {
|
function (ctx) {
|
||||||
const num = this.eventArgs[0];
|
const num = this.eventArgs[0];
|
||||||
const item = core.getFlag('hotkey' + num, null);
|
const item = core.getLocalStorage('hotkey' + num, null);
|
||||||
let icon, itemName;
|
let icon, itemName;
|
||||||
if (item && core.material.items.hasOwnProperty(item)) {
|
if (item && core.material.items.hasOwnProperty(item)) {
|
||||||
icon = item;
|
icon = item;
|
||||||
@ -4300,28 +4300,28 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch (num) {
|
switch (num) {
|
||||||
case 1:
|
case '1':
|
||||||
icon = 'pickaxe';
|
icon = 'pickaxe';
|
||||||
itemName = '破墙镐';
|
itemName = '破墙镐';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case '2':
|
||||||
icon = 'bomb';
|
icon = 'bomb';
|
||||||
itemName = '炸弹';
|
itemName = '炸弹';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case '3':
|
||||||
icon = 'centerFly';
|
icon = 'centerFly';
|
||||||
itemName = '中心飞';
|
itemName = '中心飞';
|
||||||
break;
|
break;
|
||||||
case 4:
|
case '4':
|
||||||
itemName = '杂物';
|
itemName = '杂物';
|
||||||
break;
|
break;
|
||||||
case 5:
|
case '5':
|
||||||
itemName = '回退一步';
|
itemName = '回退一步';
|
||||||
break;
|
break;
|
||||||
case 6:
|
case '6':
|
||||||
itemName = '撤销回退';
|
itemName = '撤销回退';
|
||||||
break;
|
break;
|
||||||
case 7:
|
case '7':
|
||||||
itemName = '轻按';
|
itemName = '轻按';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4338,20 +4338,20 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
() => '',
|
() => '',
|
||||||
function () {
|
function () {
|
||||||
for (let i = 1; i <= 7; i++) {
|
for (let i = 1; i <= 7; i++) {
|
||||||
core.setFlag('hotkey' + i, null);
|
core.setLocalStorage('hotkey' + i, null);
|
||||||
}
|
}
|
||||||
this.menu.drawContent();
|
this.menu.drawContent();
|
||||||
core.drawSuccessTip('快捷键已重置到默认状态。')
|
core.drawSuccessTip('快捷键已重置到默认状态。')
|
||||||
},
|
},
|
||||||
'重置本页面所有快捷键到默认状态。',
|
'重置本页面所有快捷键到默认状态。',
|
||||||
true,
|
false,
|
||||||
function (ctx) {
|
function (ctx) {
|
||||||
core.fillRoundRect(ctx, this.x, this.y, this.w, this.h, 3, ' #D3D3D3');
|
core.fillRoundRect(ctx, this.x, this.y, this.w, this.h, 3, ' #D3D3D3');
|
||||||
core.strokeRoundRect(ctx, this.x, this.y, this.w, this.h, 3, ' #888888');
|
core.strokeRoundRect(ctx, this.x, this.y, this.w, this.h, 3, ' #888888');
|
||||||
core.fillText(ctx, '重置', this.x + 5, this.y + this.h / 2 + 5, ' #333333', '16px Verdana');
|
core.fillText(ctx, '重置', this.x + 5, this.y + this.h / 2 + 5, ' #333333', '16px Verdana');
|
||||||
},
|
},
|
||||||
)],
|
)],
|
||||||
['wallHacking', new Setting(
|
['debug_wallHacking', new Setting(
|
||||||
() => ' 穿墙:' + (core.hasFlag('debug_wallHacking') ? '开' : '关'),
|
() => ' 穿墙:' + (core.hasFlag('debug_wallHacking') ? '开' : '关'),
|
||||||
() => {
|
() => {
|
||||||
core.setFlag('debug', true);
|
core.setFlag('debug', true);
|
||||||
@ -4596,7 +4596,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
super(x, y, w, h);
|
super(x, y, w, h);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
/**
|
/**
|
||||||
* @type {Array<unknown>}
|
* @type {Array<string>}
|
||||||
*/
|
*/
|
||||||
this.eventArgs = eventArgs || [];
|
this.eventArgs = eventArgs || [];
|
||||||
/**
|
/**
|
||||||
@ -4616,7 +4616,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
if (this.disable) return;
|
if (this.disable) return;
|
||||||
this.setting.effect.apply(this, eventArgs);
|
this.setting.effect.apply(this, eventArgs);
|
||||||
this.menu.drawContent();
|
this.menu.drawContent();
|
||||||
if (this.setting.replay) core.status.route.push('cSet:' + name);
|
if (this.setting.replay) {
|
||||||
|
let actionString = 'cSet:' + name;
|
||||||
|
if (this.eventArgs.length > 0) {
|
||||||
|
actionString += ':' + this.eventArgs.map(arg => encodeURIComponent(arg)).join(':');
|
||||||
|
}
|
||||||
|
core.status.route.push(actionString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4626,7 +4632,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
if (strArr[0] !== 'cSet') return false;
|
if (strArr[0] !== 'cSet') return false;
|
||||||
const btn = settingMap.get(strArr[1]);
|
const btn = settingMap.get(strArr[1]);
|
||||||
if (!btn.replay || strArr[1].startsWith('debug')) return false;
|
if (!btn.replay || strArr[1].startsWith('debug')) return false;
|
||||||
btn.effect();
|
|
||||||
|
let params = strArr.slice(2);
|
||||||
|
|
||||||
|
if (params.length > 0) {
|
||||||
|
btn.effect.apply(btn, params);
|
||||||
|
} else {
|
||||||
|
btn.effect.call(btn);
|
||||||
|
}
|
||||||
|
|
||||||
core.status.route.push(action);
|
core.status.route.push(action);
|
||||||
core.replay();
|
core.replay();
|
||||||
return true;
|
return true;
|
||||||
@ -4900,19 +4914,19 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
const keyMenu = new SettingOnePage('key');
|
const keyMenu = new SettingOnePage('key');
|
||||||
keyMenu.initBtnList([
|
keyMenu.initBtnList([
|
||||||
['1,1', new SettingButton(40, 160, 150, 25, 'leftHand')],
|
['1,1', new SettingButton(40, 160, 150, 25, 'leftHand')],
|
||||||
['1,2', new SettingButton(40, 220, 150, 25, 'setHotKey', [1])],
|
['1,2', new SettingButton(40, 220, 150, 25, 'setHotKey', ['1'])],
|
||||||
['2,2', new SettingButton(220, 220, 150, 25, 'setHotKey', [2])],
|
['2,2', new SettingButton(220, 220, 150, 25, 'setHotKey', ['2'])],
|
||||||
['1,3', new SettingButton(40, 250, 150, 25, 'setHotKey', [3])],
|
['1,3', new SettingButton(40, 250, 150, 25, 'setHotKey', ['3'])],
|
||||||
['2,3', new SettingButton(220, 250, 150, 25, 'setHotKey', [4])],
|
['2,3', new SettingButton(220, 250, 150, 25, 'setHotKey', ['4'])],
|
||||||
['1,4', new SettingButton(40, 280, 150, 25, 'setHotKey', [5])],
|
['1,4', new SettingButton(40, 280, 150, 25, 'setHotKey', ['5'])],
|
||||||
['2,4', new SettingButton(220, 280, 150, 25, 'setHotKey', [6])],
|
['2,4', new SettingButton(220, 280, 150, 25, 'setHotKey', ['6'])],
|
||||||
['1,5', new SettingButton(40, 310, 150, 25, 'setHotKey', [7])],
|
['1,5', new SettingButton(40, 310, 150, 25, 'setHotKey', ['7'])],
|
||||||
['1,6', new SettingButton(300, 350, 42, 25, 'clearHotKeys')],
|
['1,6', new SettingButton(300, 350, 42, 25, 'clearHotKeys')],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const consoleMenu = new SettingOnePage('console');
|
const consoleMenu = new SettingOnePage('console');
|
||||||
consoleMenu.initBtnList([
|
consoleMenu.initBtnList([
|
||||||
['1,1', new SettingButton(40, 220, 150, 25, 'wallHacking')],
|
['1,1', new SettingButton(40, 220, 150, 25, 'debug_wallHacking')],
|
||||||
['1,2', new SettingButton(80, 250, 80, 20, 'debug_statusName')],
|
['1,2', new SettingButton(80, 250, 80, 20, 'debug_statusName')],
|
||||||
['2,2', new SettingButton(210, 250, 80, 20, 'debug_statusValue')],
|
['2,2', new SettingButton(210, 250, 80, 20, 'debug_statusValue')],
|
||||||
['3,2', new SettingButton(340, 250, 40, 20, 'debug_setStatus')],
|
['3,2', new SettingButton(340, 250, 40, 20, 'debug_setStatus')],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user