diff --git a/assets/game/mechanicLib/brik/stack.lua b/assets/game/mechanicLib/brik/stack.lua index 51738f16..fba839d9 100644 --- a/assets/game/mechanicLib/brik/stack.lua +++ b/assets/game/mechanicLib/brik/stack.lua @@ -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 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) @@ -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