Updating HUD, Gold Config, and finishing off Play flow for 9player map.

This commit is contained in:
Matt F 2026-05-22 12:18:23 -07:00
parent a7be12fa9b
commit 3dcc0e7edd
28 changed files with 2272 additions and 9601 deletions

View file

@ -293,8 +293,29 @@ namespace TD.UI
pms.SetRaceSelection(RaceId.Race1);
pms.SetReady(true);
// Skip Lobby — drop straight into the Match scene.
NetworkBootstrap.LoadSceneAsHost(SceneNames.Match);
// Skip Lobby — drop straight into the default map's scene. Pulls from
// MapRegistry.Default (the first map authored in the registry — by convention
// the 9-player map). Falls back to the hardcoded SceneNames.Match if the
// registry isn't present (e.g. testing in editor without going through MainMenu,
// though that's the very scene this controller lives in, so it should always
// resolve in practice).
string sceneToLoad;
var registry = MapRegistry.Instance;
var defaultMap = registry != null ? registry.Default : null;
if (defaultMap != null && !string.IsNullOrEmpty(defaultMap.SceneName))
{
sceneToLoad = defaultMap.SceneName;
Debug.Log($"[MainMenu] Quick Start loading default map '{defaultMap.MapName}' " +
$"(scene='{sceneToLoad}').");
}
else
{
sceneToLoad = SceneNames.Match;
Debug.LogWarning($"[MainMenu] Quick Start: MapRegistry default unavailable, " +
$"falling back to hardcoded scene '{sceneToLoad}'.");
}
NetworkBootstrap.LoadSceneAsHost(sceneToLoad);
}
}
}