fix: added minigames description to Gemini.md, fixed song end note, fixed custom songs not loading, added another test song
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline failed

This commit is contained in:
Zoltan Timar
2026-02-13 15:25:01 +01:00
parent facf37dc96
commit f553b09004
5 changed files with 184 additions and 16 deletions

View File

@@ -150,7 +150,7 @@ end
function MinigameDDRWindow.update()
local mg = Context.minigame_ddr
-- Check for completion
-- Check for completion (bar filled to 100%)
if mg.bar_fill >= mg.max_fill then
Context.active_window = mg.return_window
return
@@ -159,6 +159,16 @@ function MinigameDDRWindow.update()
-- Increment frame counter
mg.frame_counter = mg.frame_counter + 1
-- Check if song has ended (pattern mode only)
if mg.use_pattern and mg.current_song and mg.current_song.end_frame then
-- Song has ended if we've passed the end frame AND all arrows are cleared
if mg.frame_counter > mg.current_song.end_frame and #mg.arrows == 0 then
-- Song complete! Return to previous window
Context.active_window = mg.return_window
return
end
end
-- Spawn arrows based on mode (pattern or random)
if mg.use_pattern and mg.current_song and mg.current_song.pattern then
-- Pattern-based spawning (synced to song)
@@ -177,13 +187,6 @@ function MinigameDDRWindow.update()
break
end
end
-- If we've finished the pattern, check if we should loop or end
if mg.pattern_index > #pattern then
-- Pattern complete - could loop or switch to random mode
-- For now, keep playing but stop spawning new arrows
-- Optionally: mg.pattern_index = 1 to loop
end
else
-- Random spawning mode (original behavior)
mg.arrow_spawn_timer = mg.arrow_spawn_timer + 1

View File

@@ -13,16 +13,18 @@ function PopupWindow.set_dialog_node(node_key)
-- Special handling for DDR minigame trigger
-- Format: __MINIGAME_DDR__ or __MINIGAME_DDR:song_key__
local song_key = node_key:match("^__MINIGAME_DDR:(.+)__$")
if song_key then
-- Extract song key from the node (format: __MINIGAME_DDR/test_song__)
trace('Playing song: ' .. song_key)
MinigameDDRWindow.start(WINDOW_GAME, song_key)
return
end
if node_key == "__MINIGAME_DDR__" then
MinigameDDRWindow.start(WINDOW_GAME, nil)
return
end
if node_key:sub(1, 16) == "__MINIGAME_DDR:" then
-- Extract song key from the node (format: __MINIGAME_DDR:test_song__)
local song_key = node_key:sub(17, -3) -- Remove prefix "__MINIGAME_DDR:" and trailing "__"
MinigameDDRWindow.start(WINDOW_GAME, song_key)
return
end
local npc = Context.dialog.active_entity
local node = npc.dialog[node_key]