extends Node ## Autoload "Session" -- carries the "which world am I joining" handoff from ## the world browser to the game scene. ## ## world_list.gd calls begin() with the address returned by ## POST /api/worlds/{id}/join; game.gd reads it in _ready() to decide whether ## to run networked or fall back to local single-player (e.g. game.tscn opened ## directly, or the backend has no orchestration). var world_id: int = 0 var host: String = "" var port: int = 0 var active: bool = false func begin(p_world_id: int, p_host: String, p_port: int) -> void: world_id = p_world_id host = p_host port = p_port active = true func clear() -> void: world_id = 0 host = "" port = 0 active = false