Skip to content

Commit

Permalink
Fix Tech Finesse Lock DAS bug on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Not-A-Normal-Robot authored Aug 26, 2023
1 parent 2e59378 commit ceeaba7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions parts/eventsets/tech_finesse_lock.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ local function onMove(P)
if not P.cur then return end
P.holdTime=0
VK.keys[8].ava=false
VK.release(8)
P.modeData.moveCount=P.modeData.moveCount+1
if P.modeData.moveCount>=2 and (P.curY>P.gameEnv.fieldH-2 or P:_roofCheck()) then
P.keyAvailable[1]=false
P.keyAvailable[2]=false
VK.keys[1].ava=false
VK.keys[2].ava=false
VK.release(1)
VK.release(2)
end
end
local function onRotate(P)
if not P.cur then return end
P.holdTime=0
VK.keys[8].ava=false
VK.release(8)
P.modeData.rotations=P.modeData.rotations+1
if P.modeData.rotations>=2 and (P.curY>P.gameEnv.fieldH-2 or P:_roofCheck()) then
P.keyAvailable[3]=false
Expand All @@ -22,6 +26,9 @@ local function onRotate(P)
VK.keys[3].ava=false
VK.keys[4].ava=false
VK.keys[5].ava=false
VK.release(3)
VK.release(4)
VK.release(5)
end
end
local function resetLock(P)
Expand Down
7 changes: 7 additions & 0 deletions parts/eventsets/tech_finesse_lock_f.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ local function onMove(P)
if not P.cur then return end
P.holdTime=0
VK.keys[8].ava=false
VK.release(8)
P.modeData.moveCount=P.modeData.moveCount+1
if P.modeData.moveCount>=2 and (P.curY>P.gameEnv.fieldH-2 or P:_roofCheck()) then
P.keyAvailable[1]=false
P.keyAvailable[2]=false
VK.keys[1].ava=false
VK.keys[2].ava=false
VK.release(1)
VK.release(2)
end
end
local function onRotate(P)
if not P.cur then return end
P.holdTime=0
VK.keys[8].ava=false
VK.release(8)
P.modeData.rotations=P.modeData.rotations+1
if P.modeData.rotations>=2 and (P.curY>P.gameEnv.fieldH-2 or P:_roofCheck()) then
P.keyAvailable[3]=false
Expand All @@ -22,6 +26,9 @@ local function onRotate(P)
VK.keys[3].ava=false
VK.keys[4].ava=false
VK.keys[5].ava=false
VK.release(3)
VK.release(4)
VK.release(5)
end
end
local function resetLock(P)
Expand Down

0 comments on commit ceeaba7

Please sign in to comment.