poi.tscn now uses the checkerboard debug texture instead of the ruins
sprite, and poi.gd gained a marker_color export (multiplied into the
existing visited/undiscovered dimming) so each POI marker can be
tinted a distinct color. Six instances placed inside region k=0's
wedge (angle ~12-48°, radius ~18-38, clear of the border walls),
tagged with the "region1_pois" group, in red/orange/yellow/green/
blue/purple.
Simplified InteractionManager's "Erkunden" content to a plain
placeholder ("Das wurde besucht.") instead of the old random
animal-track flavor text, and removed the now-dead handle_explore()
submenu it drove. Added InteractionManager.open_message() for POIs
that need an info popup without the explore/rest/close menu.
New poi_gate.gd/.tscn: a portal placed near region k=0's table-edge
border. Checks whether every POI in "region1_pois" has been visited;
if not, shows a "not yet" message, otherwise teleports the player to
target_position (the center) — a one-way shortcut past the border
wall rather than an opening in it, matching the "explore everything,
then unlock the way onward" progression the user described (this
pattern will repeat per outer region later).
Verified headless: all 6 POIs register in the group with correct
names/colors, gate refuses the transition at 0/6 and 5/6 visited and
allows it at 6/6, and the teleport lands the player exactly on
target_position.
43 lines
1.1 KiB
GDScript
Executable File
43 lines
1.1 KiB
GDScript
Executable File
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()
|