five-on-it / apps/client/src/ui/online
apps/client/src/ui/online
Where the main menu's two ways to play go. Play online plays the cities on a game server: the one the page names (?server=) or its own origin's when the page came over HTTP (the hosted site, the dev server), else the one a platform says (its /info, at the address the page's query, the player or the build gives: platform.ts), else nowhere yet. Play local hosts a city on the desktop app's own server, or joins a friend's at the address they read out (192.168.1.23:7777). A game started from the menu carries from, so that leaving it returns to the menu of its way to play (menuHref, boot.ts). A city played online asks the platform which of its game servers holds it (placedServer), as the page's session: on a platform for the game's owners only a player who signed in through Steam with a copy is placed (with the join token its servers ask for, a fresh one each time the page joins, after a drop too), and anyone else is told why and where to get the game instead of falling back to a guest.