Show PZF on status bar

This commit is contained in:
ckcz123 2018-08-27 17:21:05 +08:00
parent 1a2b797859
commit 6471f61e35
11 changed files with 86 additions and 17 deletions

View File

@ -426,6 +426,12 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_bool": "bool",
"_data": "是否在状态栏显示三色钥匙数量"
},
"enablePZF": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示破炸飞数量"
},
"enableDebuff": {
"_leaf": true,
"_type": "checkbox",

View File

@ -372,11 +372,16 @@
<img id="img-up">
<p class='statusLabel' id='up'></p>
</div>
<div class="status">
<div class="status" id='keyCol'>
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
<span class='statusLabel' id='redKey' style="color:#FF8888"></span>
</div>
<div class="status" id='pzfCol'>
<span class='statusLabel' id='pickaxe' style="color: #804000"></span>
<span class='statusLabel' id='bomb' style="color: #99007F"></span>
<span class='statusLabel' id='fly' style="color: #8DB600"></span>
</div>
<div class="status" id="debuffCol">
<span class='statusLabel' id='poison' style="color: #AFFCA8;"></span>
<span class='statusLabel' id='weak' style="color: #FECCD0;"></span>

View File

@ -357,11 +357,16 @@
<img id="img-up">
<p class='statusLabel' id='up'></p>
</div>
<div class="status">
<div class="status" id='keyCol'>
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
<span class='statusLabel' id='redKey' style="color:#FF8888"></span>
</div>
<div class="status" id='pzfCol'>
<span class='statusLabel' id='pickaxe' style="color: #804000"></span>
<span class='statusLabel' id='bomb' style="color: #99007F"></span>
<span class='statusLabel' id='fly' style="color: #8DB600"></span>
</div>
<div class="status" id="debuffCol">
<span class='statusLabel' id='poison' style="color: #AFFCA8;"></span>
<span class='statusLabel' id='weak' style="color: #FECCD0;"></span>

View File

@ -87,6 +87,11 @@
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
<span class='statusLabel' id='redKey' style="color:#FF8888"></span>
</div>
<div class="status" id='pzfCol'>
<span class='statusLabel' id='pickaxe' style="color: #804000"></span>
<span class='statusLabel' id='bomb' style="color: #99007F"></span>
<span class='statusLabel' id='fly' style="color: #8DB600"></span>
</div>
<div class="status" id="debuffCol">
<span class='statusLabel' id='poison' style="color: #AFFCA8;"></span>
<span class='statusLabel' id='weak' style="color: #FECCD0;"></span>

View File

@ -13,7 +13,8 @@ actions.prototype.init = function () {
////// 按下某个键时 //////
actions.prototype.onkeyDown = function (e) {
if (core.isset(core.status.replay)&&core.status.replay.replaying&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0) return;
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
if (!core.isset(core.status.holdingKeys))core.status.holdingKeys=[];
var isArrow={37:true,38:true,39:true,40:true}[e.keyCode]
if(isArrow && !core.status.lockControl){
@ -32,7 +33,8 @@ actions.prototype.onkeyDown = function (e) {
////// 放开某个键时 //////
actions.prototype.onkeyUp = function(e) {
if (core.isset(core.status.replay)&&core.status.replay.replaying&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0) {
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') {
if (e.keyCode==27) // ESCAPE
core.stopReplay();
else if (e.keyCode==90) // Z
@ -47,6 +49,8 @@ actions.prototype.onkeyUp = function(e) {
core.saveReplay();
else if (e.keyCode==67)
core.bookReplay();
else if (e.keyCode==33||e.keyCode==34)
core.viewMapReplay();
return;
}
@ -77,7 +81,8 @@ actions.prototype.pressKey = function (keyCode) {
////// 根据按下键的code来执行一系列操作 //////
actions.prototype.keyDown = function(keyCode) {
if (core.isset(core.status.replay)&&core.status.replay.replaying&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0) return;
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
if (core.status.lockControl) {
// Ctrl跳过对话
if (keyCode==17) {
@ -171,8 +176,8 @@ actions.prototype.keyDown = function(keyCode) {
////// 根据放开键的code来执行一系列操作 //////
actions.prototype.keyUp = function(keyCode, fromReplay) {
if (!fromReplay&&core.isset(core.status.replay)&&core.status.replay.replaying&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0)
return;
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
if (core.status.lockControl) {
core.status.holdingKeys = [];
@ -393,7 +398,8 @@ actions.prototype.keyUp = function(keyCode, fromReplay) {
////// 点击(触摸)事件按下时 //////
actions.prototype.ondown = function (x ,y) {
if (core.isset(core.status.replay)&&core.status.replay.replaying&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0) return;
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
if (!core.status.played || core.status.lockControl) {
this.onclick(x, y, []);
if (core.timeout.onDownTimeout==null) {
@ -421,7 +427,8 @@ actions.prototype.ondown = function (x ,y) {
////// 当在触摸屏上滑动时 //////
actions.prototype.onmove = function (x ,y) {
if (core.isset(core.status.replay)&&core.status.replay.replaying&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0) return;
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
// if (core.status.holdingPath==0){return;}
//core.status.mouseOutCheck =1;
var pos={'x':x,'y':y};
@ -445,7 +452,8 @@ actions.prototype.onmove = function (x ,y) {
////// 当点击(触摸)事件放开时 //////
actions.prototype.onup = function () {
if (core.isset(core.status.replay)&&core.status.replay.replaying&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0) return;
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
clearTimeout(core.timeout.onDownTimeout);
core.timeout.onDownTimeout = null;
@ -508,7 +516,8 @@ actions.prototype.getClickLoc = function (x, y) {
////// 具体点击屏幕上(x,y)点时,执行的操作 //////
actions.prototype.onclick = function (x, y, stepPostfix) {
if (core.isset(core.status.replay)&&core.status.replay.replaying&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0) return;
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
// console.log("Click: (" + x + "," + y + ")");
stepPostfix=stepPostfix||[];
@ -650,7 +659,8 @@ actions.prototype.onclick = function (x, y, stepPostfix) {
////// 滑动鼠标滚轮时的操作 //////
actions.prototype.onmousewheel = function (direct) {
if (core.isset(core.status.replay)&&core.status.replay.replaying&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0) return;
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
// 向下滚动是 -1 ,向上是 1
// 楼层飞行器
@ -1379,8 +1389,17 @@ actions.prototype.clickSL = function(x,y) {
}
// 删除
if (x>=0 && x<=2 && y==12) {
core.status.event.selection=!core.status.event.selection;
core.ui.drawSLPanel(index);
if (core.status.event.id=='save') {
core.status.event.selection=!core.status.event.selection;
core.ui.drawSLPanel(index);
}
else {
var index = parseInt(prompt("请输入读档编号"))||0;
if (index>0) {
core.doSL(index, core.status.event.id);
}
}
return;
}
@ -1485,6 +1504,13 @@ actions.prototype.keyUpSL = function (keycode) {
}
return;
}
if (keycode==69 && core.status.event.id == 'load') { // E
var index = parseInt(prompt("请输入读档编号"))||0;
if (index>0) {
core.doSL(index, core.status.event.id);
}
return;
}
if (keycode==46) {
if (offset==0) {
core.drawTip("无法删除自动存档!");

View File

@ -2600,6 +2600,11 @@ control.prototype.updateStatusBar = function () {
core.statusBar.weak.innerHTML = core.hasFlag('weak')?"衰":"";
core.statusBar.curse.innerHTML = core.hasFlag('curse')?"咒":"";
}
if (core.flags.enablePZF) {
core.statusBar.pickaxe.innerHTML = "破"+core.itemCount('pickaxe');
core.statusBar.bomb.innerHTML = "炸"+core.itemCount('bomb');
core.statusBar.fly.innerHTML = "飞"+core.itemCount('centerFly');
}
core.statusBar.hard.innerHTML = core.status.hard;
@ -2983,6 +2988,12 @@ control.prototype.resize = function(clientWidth, clientHeight) {
display: !core.isset(core.flags.enableKeys)||core.flags.enableKeys?'block':'none'
}
},
{
id: 'pzfCol',
rules: {
display: core.flags.enablePZF?'block':'none'
}
},
{
'id': 'debuffCol',
rules: {

View File

@ -1755,8 +1755,10 @@ ui.prototype.drawSLPanel = function(index) {
if (core.status.event.selection)
core.setFillStyle('ui', '#FF6A6A');
core.fillText('ui', '删除模式', 48, 403);
if (core.status.event.id=='save')
core.fillText('ui', '删除模式', 48, 403);
else
core.fillText('ui', '输入编号', 48, 403);
}
////// 绘制一个缩略图 //////

View File

@ -59,6 +59,7 @@ function main() {
'expCol': document.getElementById('expCol'),
'upCol': document.getElementById('upCol'),
'keyCol': document.getElementById('keyCol'),
'pzfCol': document.getElementById('pzfCol'),
'debuffCol': document.getElementById('debuffCol'),
'hard': document.getElementById('hard'),
};
@ -134,6 +135,9 @@ function main() {
'poison': document.getElementById('poison'),
'weak':document.getElementById('weak'),
'curse': document.getElementById('curse'),
'pickaxe': document.getElementById('pickaxe'),
'bomb': document.getElementById('bomb'),
'fly': document.getElementById('fly'),
'hard': document.getElementById("hard")
}
this.floors = {}

View File

@ -142,6 +142,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"enableExperience": false,
"enableLevelUp": false,
"enableKeys": true,
"enablePZF": true,
"enableDebuff": false,
"flyNearStair": true,
"pickaxeFourDirections": false,

View File

@ -222,7 +222,7 @@ p#hard {
margin: 0 6px 6px 0;
}
span#poison, span#weak, span#curse {
span#poison, span#weak, span#curse, span#pickaxe, span#bomb, span#fly {
font-style: normal;
font-size: 1em;
}

View File

@ -2,6 +2,10 @@
大地图的支持
修复超大数值领域导致自动寻路卡死的问题
同点多事件的颜色块绘制
录像播放时可以按PgUp/PgDn浏览地图
可以在读档时E键直接指定编号
破炸飞可以在状态栏显示个数
部分细节优化
-----------------------------------------------------------------------