Skip to content

Commit

Permalink
修正一个机制库函数不该是local
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Jul 18, 2024
1 parent 4e82aa6 commit 0aaf4c1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions assets/game/mechanicLib/brik/stack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ local lineFont={
95,95, -- 24,25
100, -- 26+
}
local function outStackState(P)
return not P.modeData.stack_enabled
end

---@type Map<Techmino.Event.Brik>
local stack={}

function stack._outStackState(P)
return not P.modeData.stack_enabled
end

---@param fall? boolean
---@param timeLimit? number Automatically quit when time up (if given)
function stack.turnOn_auto(P,fall,timeLimit)
Expand All @@ -50,7 +51,7 @@ function stack.switch_auto(P,fall,timeLimit)
setEvent(P,'afterLock',fall and stack.event_afterLock or stack.event_afterLock_noFall)
setEvent(P,'drawOnPlayer',stack.event_drawOnPlayer)
setEvent(P,'whenSuffocate',stack.event_whenSuffocate)
if P.modeData.stack_enabled and timeLimit then mechLib.common.timer.new(P,timeLimit,{timeUp=stack.event_whenSuffocate,draw='float',cancel=outStackState}) end
if P.modeData.stack_enabled and timeLimit then mechLib.common.timer.new(P,timeLimit,{timeUp=stack.event_whenSuffocate,draw='float',cancel=stack._outStackState}) end
end
function stack.switch(P)
local md=P.modeData
Expand Down

0 comments on commit 0aaf4c1

Please sign in to comment.