hideInReplay

This commit is contained in:
ckcz123 2018-11-29 21:35:21 +08:00
parent 90179a9eb0
commit 1e2238985a
3 changed files with 39 additions and 22 deletions

View File

@ -42,6 +42,12 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_type": "textarea",
"_data": "装备属性设置仅对cls为equips有效。\n如果此项不为null需要是一个对象里面可含\"type\"\"atk\"\"def\"\"mdef\"\"animate\"五项,分别对应装备部位、攻防魔防和动画。\n具体详见文档元件说明-装备)和已有的几个装备的写法。"
},
"hideInReplay": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否回放时绘制道具栏。\n如果此项为true则在回放录像时使用本道具将不会绘制道具栏页面而是直接使用。\n此项建议在会频繁连续多次使用的道具开启如开启技能或者《镜子》那样的镜像切换等等"
}
}
},
"itemEffect": {

View File

@ -1909,6 +1909,14 @@ control.prototype.replay = function () {
else if (action.indexOf("item:")==0) {
var itemId = action.substring(5);
if (core.canUseItem(itemId)) {
// 是否绘制道具栏
if (core.material.items[itemId].hideInReplay) {
core.useItem(itemId, function () {
core.replay();
});
return;
}
else {
var tools = Object.keys(core.status.hero.items.tools).sort();
var constants = Object.keys(core.status.hero.items.constants).sort();
var index=-1;
@ -1932,6 +1940,7 @@ control.prototype.replay = function () {
}
}
}
}
else if (action.indexOf("unEquip:")==0) {
var equipType = parseInt(action.substring(8));
if (core.isset(equipType)) {

View File

@ -184,7 +184,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"fly": {
"cls": "constants",
"name": "楼层传送器",
"text": "可以自由往来去过的楼层"
"text": "可以自由往来去过的楼层",
"hideInReplay": true
},
"coin": {
"cls": "constants",
@ -299,7 +300,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"skill1": {
"cls": "constants",
"name": "技能:二倍斩",
"text": "可以打开或关闭主动技能二倍斩"
"text": "可以打开或关闭主动技能二倍斩",
"hideInReplay": true
}
},
"itemEffect": {