Skip to content

Commit

Permalink
做一些TTGM的准备
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Nov 17, 2024
1 parent 0092c3c commit 5254ad0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
6 changes: 6 additions & 0 deletions assets/progress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ local prgs=setmetatable({

-- Utility
musicTime=0,

-- Extra
TTGM={
stage=0,-- 0 = not unlocked, other = max level can start with
medal='00000000000000000000000000',
},
},{
__index=function(_,k)
LOG("Attempt to read undefined progress data: "..tostring(k))
Expand Down
26 changes: 24 additions & 2 deletions assets/scene/simulation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
---@type Techmino.simulation[]
local sims={
{ -- Exterior 1
unlock=function()
return PROGRESS.get('styles').brik
end,
trigger=function()
TASK.yieldUntilNextScene()
if SCN.cur=='simulation' then
Expand Down Expand Up @@ -52,6 +55,24 @@ local sims={
-- -108 ,-32
-- )
-- end,
{ -- TTGM
unlock=function()
return PROGRESS.get('TTGM').stage>0
end,
trigger=function()
TASK.yieldUntilNextScene()
if SCN.cur=='simulation' then
-- SCN.go('tetra_galaxy_machine','flash')
MSG.new('warn',"Coming soon?")
end
end,
draw=function()
GC.setColor(COLOR.DL)
GC.translate(-150,-100)
GC.rectangle('fill',0,0,300,100)
GC.rectangle('fill',100,100,100,100)
end,
},
}

---@type integer|false
Expand All @@ -63,14 +84,15 @@ local scene={}
function scene.load(prev)
for _,s in next,sims do
s.valid=false
if type(s.unlock)=='function' then
s.valid=s.unlock() or s.valid
end
s.active=0
s.x,s.y=nil
s.size=nil
s.trigTimer=false
end
subjectFocused=false
sims[1].valid=true -- TODO
-- sims[2].valid=false -- TODO
scene.update(0)
PROGRESS.applyExteriorBG()
PROGRESS.applyExteriorBGM()
Expand Down

0 comments on commit 5254ad0

Please sign in to comment.