public static void DoLoadSelectedGame_Postfix() { if (Multiplayer.IsInMultiplayerMenu) { Log.Info($"Listening server on port {Config.Options.HostPort}"); Multiplayer.HostGame(new Server(Config.Options.HostPort, true)); } }
private static void OnMultiplayerNewGameButtonClick() { Log.Info($"Listening server on port {Config.Options.HostPort}"); Multiplayer.HostGame(new Server(Config.Options.HostPort)); Multiplayer.Session.IsInLobby = true; UIRoot.instance.galaxySelect._Open(); UIRoot.instance.uiMainMenu._Close(); }
public static void StartDedicatedServer(string saveName) { // Mimic UI buttons clicking UIMainMenu_Patch.OnMultiplayerButtonClick(); if (GameSave.SaveExist(saveName)) { // Modified from DoLoadSelectedGame Log.Info($"Start dedicated server, loading save : {saveName}"); DSPGame.StartGame(saveName); Log.Info($"Listening server on port {NebulaModel.Config.Options.HostPort}"); Multiplayer.HostGame(new Server(NebulaModel.Config.Options.HostPort, true)); if (command_ups != 0) { FPSController.SetFixUPS(command_ups); } } }
private void BeginHostingGame() { Multiplayer.HostGame(AppId, Port, NetTypes); Scene.NavigateTo(new WaitingForConnectionScene($"Hosting on Port: {Port}")); }