extends Node

# Overlay-Zustand pro Spieler (nur auf dem DM-Client befüllt via RPC)
# "default" = kein Overlay aktiv
var overlay_states: Dictionary = {}  # peer_id (int) → String

# Spieler-Positionen (nur auf dem DM-Client befüllt via sync_player_position)
var player_positions: Dictionary = {}  # peer_id (int) → {position: Vector3, rotation: Vector3}


func get_overlay(peer_id: int) -> String:
	return overlay_states.get(peer_id, "default")


func set_overlay_local(peer_id: int, overlay_name: String) -> void:
	overlay_states[peer_id] = overlay_name
	print("[GameState] Overlay für %d → %s" % [peer_id, overlay_name])


func update_player_transform(peer_id: int, position: Vector3, rotation: Vector3) -> void:
	player_positions[peer_id] = {position = position, rotation = rotation}
