更改虚拟按键可见性的逻辑,修复mod不会影响虚拟按键的显示
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -42,7 +42,7 @@ return{
|
||||
visible="show",
|
||||
freshLimit=1e99,easyFresh=true,
|
||||
|
||||
Fkey=NULL,
|
||||
Fkey=false,
|
||||
keyCancel={},
|
||||
fine=false,fineKill=false,
|
||||
b2bKill=false,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user