更改虚拟按键可见性的逻辑,修复mod不会影响虚拟按键的显示

This commit is contained in:
MrZ626
2020-11-23 01:38:11 +08:00
parent b33cf65593
commit 467c8f44d6
3 changed files with 9 additions and 11 deletions

View File

@@ -56,15 +56,9 @@ function restoreVirtualKey()
B.isDown=false
B.pressTime=0
end
if not GAME.modeEnv.Fkey then
virtualkey[9].ava=false
end
if not GAME.modeEnv.holdCount or GAME.modeEnv.holdCount==0 then
virtualkey[8].ava=false
end
if GAME.modeEnv.keyCancel then
for _,v in next,GAME.modeEnv.keyCancel do
virtualkey[v].ava=false
for k,v in next,PLAYERS[1].keyAvailable do
if not v then
virtualkey[k].ava=false
end
end
end
@@ -467,8 +461,8 @@ function resetGameData(replaying)
TASK.removeTask_code(TICK.autoPause)
destroyPlayers()
restoreVirtualKey()
GAME.curMode.load()
restoreVirtualKey()
if GAME.modeEnv.task then
for i=1,#PLAYERS do
PLAYERS[i]:newTask(GAME.modeEnv.task)

View File

@@ -42,7 +42,7 @@ return{
visible="show",
freshLimit=1e99,easyFresh=true,
Fkey=NULL,
Fkey=false,
keyCancel={},
fine=false,fineKill=false,
b2bKill=false,

View File

@@ -243,9 +243,13 @@ local function applyGameEnv(P)--Finish gameEnv processing
end
end
end
if not ENV.Fkey then
P.keyAvailable[9]=false
end
for _,v in next,ENV.keyCancel do
P.keyAvailable[v]=false
end
P:setInvisible(
ENV.visible=="show"and -1 or
ENV.visible=="time"and 300 or