extends Node signal interaction_opened signal interaction_closed var active: bool = false var current_poi: Node = null func open_poi(poi: Node) -> void: active = true current_poi = poi InteractionUI.show_menu(poi.poi_name, _get_main_options()) func _get_main_options() -> Array: return [ { "label": "Erkunden", "action": "explore" }, { "label": "Ausruhen", "action": "rest" }, { "label": "Beenden", "action": "close" }, ] func handle_selection(action: String) -> void: match action: "explore": # Platzhalter, bis echte Erkunden-Events pro POI existieren InteractionUI.show_text("Das wurde besucht.") "rest": InteractionUI.show_text("Du rastest eine Weile...\nDu fühlst dich erholt.") "close": close() # Für POIs außerhalb des generischen Menüs (z.B. Portale): Panel mit reinem # Info-Text öffnen, ohne die Erkunden/Ausruhen/Beenden-Optionen. func open_message(poi: Node, title: String, text: String) -> void: active = true current_poi = poi InteractionUI.show_menu(title, []) InteractionUI.show_text(text) func close() -> void: active = false current_poi = null InteractionUI.hide_menu()