toolboxReplay
This commit is contained in:
parent
6b23361b61
commit
ba7eccbf5e
@ -1851,20 +1851,22 @@ return code;
|
|||||||
|
|
||||||
|
|
||||||
autoSave_s
|
autoSave_s
|
||||||
: '自动存档'
|
: '自动存档' '不提示' Bool Newline
|
||||||
|
|
||||||
|
|
||||||
/* autoSave_s
|
/* autoSave_s
|
||||||
tooltip : autoSave: 自动存档
|
tooltip : autoSave: 自动存档
|
||||||
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=autoSave%ef%bc%9a%e8%87%aa%e5%8a%a8%e5%ad%98%e6%a1%a3
|
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=autoSave%ef%bc%9a%e8%87%aa%e5%8a%a8%e5%ad%98%e6%a1%a3
|
||||||
colour : this.soundColor
|
colour : this.soundColor
|
||||||
var code = '{"type": "autoSave"},\n';
|
default : [false]
|
||||||
|
Bool_0 = Bool_0 ? (', "nohint": true') : '';
|
||||||
|
var code = '{"type": "autoSave"'+Bool_0+'},\n';
|
||||||
return code;
|
return code;
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
|
|
||||||
callLoad_s
|
callLoad_s
|
||||||
: '呼出读档页面'
|
: '呼出读档页面' Newline
|
||||||
|
|
||||||
|
|
||||||
/* callLoad_s
|
/* callLoad_s
|
||||||
@ -1903,7 +1905,7 @@ return code;
|
|||||||
|
|
||||||
|
|
||||||
clearMap_1_s
|
clearMap_1_s
|
||||||
: '清空画布'
|
: '清空画布' Newline
|
||||||
|
|
||||||
/* clearMap_1_s
|
/* clearMap_1_s
|
||||||
tooltip : clearMap: 清除画布
|
tooltip : clearMap: 清除画布
|
||||||
@ -3202,7 +3204,7 @@ ActionParser.prototype.parseAction = function() {
|
|||||||
break;
|
break;
|
||||||
case "autoSave": // 自动存档
|
case "autoSave": // 自动存档
|
||||||
this.next = MotaActionBlocks['autoSave_s'].xmlText([
|
this.next = MotaActionBlocks['autoSave_s'].xmlText([
|
||||||
this.next]);
|
this.nohint, this.next]);
|
||||||
break;
|
break;
|
||||||
case "callLoad": // 呼出读档界面
|
case "callLoad": // 呼出读档界面
|
||||||
this.next = MotaActionBlocks['callLoad_s'].xmlText([
|
this.next = MotaActionBlocks['callLoad_s'].xmlText([
|
||||||
|
|||||||
@ -15,13 +15,15 @@ editor_file = function (editor, callback) {
|
|||||||
var filename = 'project/floors/' + editor.currentFloorId + '.js';
|
var filename = 'project/floors/' + editor.currentFloorId + '.js';
|
||||||
var datastr = ['main.floors.', editor.currentFloorId, '=\n'];
|
var datastr = ['main.floors.', editor.currentFloorId, '=\n'];
|
||||||
|
|
||||||
for(var ii=0,name;name=['map','bgmap','fgmap'][ii];ii++){
|
if (core.floorIds.indexOf(editor.currentFloorId) >= 0) {
|
||||||
var mapArray=editor[name].map(function (v) {
|
for(var ii=0,name;name=['map','bgmap','fgmap'][ii];ii++){
|
||||||
return v.map(function (v) {
|
var mapArray=editor[name].map(function (v) {
|
||||||
return v.idnum || v || 0
|
return v.map(function (v) {
|
||||||
})
|
return v.idnum || v || 0
|
||||||
});
|
})
|
||||||
editor.currentFloorData[name]=mapArray;
|
});
|
||||||
|
editor.currentFloorData[name]=mapArray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// format 更改实现方式以支持undefined删除
|
// format 更改实现方式以支持undefined删除
|
||||||
|
|||||||
@ -113,7 +113,8 @@ actions.prototype.doRegisteredAction = function (action) {
|
|||||||
|
|
||||||
actions.prototype._checkReplaying = function () {
|
actions.prototype._checkReplaying = function () {
|
||||||
if (core.isReplaying() && core.status.event.id != 'save'
|
if (core.isReplaying() && core.status.event.id != 'save'
|
||||||
&& (core.status.event.id || "").indexOf('book') != 0 && core.status.event.id != 'viewMaps')
|
&& (core.status.event.id || "").indexOf('book') != 0 && core.status.event.id != 'viewMaps'
|
||||||
|
&& core.status.event.id != 'toolbox' && core.status.event.id != 'equipbox')
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -170,6 +171,10 @@ actions.prototype._sys_onkeyUp_replay = function (e) {
|
|||||||
core.viewMapReplay();
|
core.viewMapReplay();
|
||||||
else if (e.keyCode == 78) // N
|
else if (e.keyCode == 78) // N
|
||||||
core.stepReplay();
|
core.stepReplay();
|
||||||
|
else if (e.keyCode == 84) // T
|
||||||
|
core.toolboxReplay();
|
||||||
|
else if (e.keyCode == 81) // Q
|
||||||
|
core.equipboxReplay();
|
||||||
else if (e.keyCode >= 49 && e.keyCode <= 51) // 1-3
|
else if (e.keyCode >= 49 && e.keyCode <= 51) // 1-3
|
||||||
core.setReplaySpeed(e.keyCode - 48);
|
core.setReplaySpeed(e.keyCode - 48);
|
||||||
else if (e.keyCode == 52) // 4
|
else if (e.keyCode == 52) // 4
|
||||||
@ -1317,7 +1322,10 @@ actions.prototype._clickToolbox = function (x, y) {
|
|||||||
// 装备栏
|
// 装备栏
|
||||||
if (x >= this.LAST - 2 && y == 0) {
|
if (x >= this.LAST - 2 && y == 0) {
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
core.openEquipbox();
|
if (core.isReplaying())
|
||||||
|
core.equipboxReplay();
|
||||||
|
else
|
||||||
|
core.openEquipbox();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (x >= this.LAST - 2 && y == this.LAST) {
|
if (x >= this.LAST - 2 && y == this.LAST) {
|
||||||
@ -1376,6 +1384,7 @@ actions.prototype._clickToolboxIndex = function (index) {
|
|||||||
if (select >= items.length) return;
|
if (select >= items.length) return;
|
||||||
var itemId = items[select];
|
var itemId = items[select];
|
||||||
if (itemId == core.status.event.data.selectId) {
|
if (itemId == core.status.event.data.selectId) {
|
||||||
|
if (core.isReplaying()) return;
|
||||||
core.events.tryUseItem(itemId);
|
core.events.tryUseItem(itemId);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1478,7 +1487,10 @@ actions.prototype._keyDownToolbox = function (keycode) {
|
|||||||
actions.prototype._keyUpToolbox = function (keycode) {
|
actions.prototype._keyUpToolbox = function (keycode) {
|
||||||
if (keycode == 81) {
|
if (keycode == 81) {
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
core.openEquipbox();
|
if (core.isReplaying())
|
||||||
|
core.equipboxReplay();
|
||||||
|
else
|
||||||
|
core.openEquipbox();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (keycode == 84 || keycode == 27 || keycode == 88) {
|
if (keycode == 84 || keycode == 27 || keycode == 88) {
|
||||||
@ -1498,7 +1510,10 @@ actions.prototype._clickEquipbox = function (x, y) {
|
|||||||
// 道具栏
|
// 道具栏
|
||||||
if (x >= this.LAST - 2 && y == 0) {
|
if (x >= this.LAST - 2 && y == 0) {
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
core.openToolbox();
|
if (core.isReplaying())
|
||||||
|
core.toolboxReplay();
|
||||||
|
else
|
||||||
|
core.openToolbox();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 返回
|
// 返回
|
||||||
@ -1547,6 +1562,7 @@ actions.prototype._clickEquipboxIndex = function (index) {
|
|||||||
if (index < this.LAST) {
|
if (index < this.LAST) {
|
||||||
if (index >= core.status.globalAttribute.equipName.length) return;
|
if (index >= core.status.globalAttribute.equipName.length) return;
|
||||||
if (index == core.status.event.selection && core.status.hero.equipment[index]) {
|
if (index == core.status.event.selection && core.status.hero.equipment[index]) {
|
||||||
|
if (core.isReplaying()) return;
|
||||||
core.unloadEquip(index);
|
core.unloadEquip(index);
|
||||||
core.status.route.push("unEquip:" + index);
|
core.status.route.push("unEquip:" + index);
|
||||||
}
|
}
|
||||||
@ -1554,6 +1570,7 @@ actions.prototype._clickEquipboxIndex = function (index) {
|
|||||||
else {
|
else {
|
||||||
var equips = Object.keys(core.status.hero.items.equips || {}).sort();
|
var equips = Object.keys(core.status.hero.items.equips || {}).sort();
|
||||||
if (index == core.status.event.selection) {
|
if (index == core.status.event.selection) {
|
||||||
|
if (core.isReplaying()) return;
|
||||||
var equipId = equips[index - this.LAST + (core.status.event.data.page - 1) * this.LAST];
|
var equipId = equips[index - this.LAST + (core.status.event.data.page - 1) * this.LAST];
|
||||||
core.loadEquip(equipId);
|
core.loadEquip(equipId);
|
||||||
core.status.route.push("equip:" + equipId);
|
core.status.route.push("equip:" + equipId);
|
||||||
@ -1645,7 +1662,10 @@ actions.prototype._keyUpEquipbox = function (keycode, altKey) {
|
|||||||
}
|
}
|
||||||
if (keycode == 84) {
|
if (keycode == 84) {
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
core.openToolbox();
|
if (core.isReplaying())
|
||||||
|
core.toolboxReplay();
|
||||||
|
else
|
||||||
|
core.openToolbox();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (keycode == 81 || keycode == 27 || keycode == 88) {
|
if (keycode == 81 || keycode == 27 || keycode == 88) {
|
||||||
|
|||||||
@ -1223,6 +1223,28 @@ control.prototype.viewMapReplay = function () {
|
|||||||
core.ui.drawMaps();
|
core.ui.drawMaps();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
control.prototype.toolboxReplay = function () {
|
||||||
|
if (!core.isPlaying() || !core.isReplaying()) return;
|
||||||
|
if (!core.status.replay.pausing) return core.drawTip("请先暂停录像");
|
||||||
|
if (core.isMoving() || core.status.replay.animate || core.status.event.id)
|
||||||
|
return core.drawTip("请等待当前事件的处理结束");
|
||||||
|
|
||||||
|
core.lockControl();
|
||||||
|
core.status.event.id='toolbox';
|
||||||
|
core.ui.drawToolbox();
|
||||||
|
}
|
||||||
|
|
||||||
|
control.prototype.equipboxReplay = function () {
|
||||||
|
if (!core.isPlaying() || !core.isReplaying()) return;
|
||||||
|
if (!core.status.replay.pausing) return core.drawTip("请先暂停录像");
|
||||||
|
if (core.isMoving() || core.status.replay.animate || core.status.event.id)
|
||||||
|
return core.drawTip("请等待当前事件的处理结束");
|
||||||
|
|
||||||
|
core.lockControl();
|
||||||
|
core.status.event.id='equipbox';
|
||||||
|
core.ui.drawEquipbox();
|
||||||
|
}
|
||||||
|
|
||||||
////// 是否正在播放录像 //////
|
////// 是否正在播放录像 //////
|
||||||
control.prototype.isReplaying = function () {
|
control.prototype.isReplaying = function () {
|
||||||
return (core.status.replay||{}).replaying;
|
return (core.status.replay||{}).replaying;
|
||||||
|
|||||||
@ -1603,7 +1603,7 @@ events.prototype._action_callSave = function (data, x, y, prefix) {
|
|||||||
|
|
||||||
events.prototype._action_autoSave = function (data, x, y, prefix) {
|
events.prototype._action_autoSave = function (data, x, y, prefix) {
|
||||||
core.autosave();
|
core.autosave();
|
||||||
core.drawTip("已自动存档");
|
if (!data.nohint) core.drawTip("已自动存档");
|
||||||
core.doAction();
|
core.doAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user