remove items and npcs

This commit is contained in:
2026-02-17 16:51:30 +01:00
parent 971acb02ca
commit 9a65891afa
10 changed files with 44 additions and 398 deletions

View File

@@ -17,21 +17,6 @@ function GameWindow.update()
Context.current_screen = Context.current_screen + 1
end
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
function GameWindow.set_state(new_state)