Skip to content

Commit eb7a123

Browse files
committed
整理代码
1 parent f622a5f commit eb7a123

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

main.lua

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ local versionText = gc.newText(FONT.get(20))
120120
versionText:set(require 'version'.appVer)
121121

122122
local egg = {
123-
AD_BC = false,
124-
back_to_future = false,
125123
bingo_clicker = 0,
126124
bingo_target = 1,
127125
}
@@ -476,9 +474,8 @@ local function selectDate(option)
476474
if m == 0 then m, y = 12, y - 1 end
477475
if y == -1 then
478476
y = 99
479-
if not egg.AD_BC then
477+
if TASK.lock('AD_BC') then
480478
MSG.new('check', "We can travel to AD, to BC", 4.2)
481-
egg.AD_BC = true
482479
end
483480
end
484481
SCN.swapTo('main', 'swipeR', ('%02d%02d%02d'):format(y, m, d))
@@ -489,17 +486,15 @@ local function selectDate(option)
489486
if m == 13 then m, y = 1, y + 1 end
490487
if y == 100 then
491488
y = 0
492-
if not egg.AD_BC then
489+
if TASK.lock('AD_BC') then
493490
MSG.new('check', "We can travel to AD, to BC", 4.2)
494-
egg.AD_BC = true
495491
end
496492
end
497493
if ('%02d%02d%02d'):format(y, m, d) <= os.date('!%y%m%d') then
498494
SCN.swapTo('main', 'swipeL', ('%02d%02d%02d'):format(y, m, d))
499495
else
500-
if not egg.back_to_future then
496+
if TASK.lock('back_to_future') then
501497
MSG.new('check', "Back To The Future", 4.2)
502-
egg.back_to_future = true
503498
end
504499
end
505500
elseif option == 'now' then

0 commit comments

Comments
 (0)