feat: added minigames (button_mash, rhythm, ddr), correction in makefiles readline, placed games in init.context
This commit is contained in:
@@ -19,11 +19,18 @@ function GameWindow.update()
|
||||
end
|
||||
|
||||
if Input.player_interact() then
|
||||
-- Get the current screen's NPCs
|
||||
local currentScreenData = Context.screens[Context.current_screen]
|
||||
if currentScreenData and currentScreenData.npcs and #currentScreenData.npcs > 0 then
|
||||
-- For now, interact with the first NPC on the screen
|
||||
-- TODO: Add proximity detection to find nearest NPC
|
||||
local npc = currentScreenData.npcs[1]
|
||||
PopupWindow.show_menu_dialog(npc, {
|
||||
{label = "Talk to", action = NPC.talk_to},
|
||||
{label = "Fight", action = NPC.fight},
|
||||
{label = "Go back", action = NPC.go_back}
|
||||
}, WINDOW_POPUP)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user