private static void JoinServerRequest(GameServerChangeRequested_t param) { if (BoltNetwork.isRunning || SteamClientDSConfig.Server != null) { return; } AutoJoinAfterMPInvite autoJoinAfterMPInvite = UnityEngine.Object.FindObjectOfType <AutoJoinAfterMPInvite>(); CoopSteamNGUI exists = UnityEngine.Object.FindObjectOfType <CoopSteamNGUI>(); SteamClientDSConfig.serverAddress = param.m_rgchServer; SteamClientDSConfig.password = SteamDSConfig.PasswordToHash(param.m_rgchPassword); if (exists) { if (CoopLobby.IsInLobby) { return; } Debug.Log("todo ?"); } else if (autoJoinAfterMPInvite) { autoJoinAfterMPInvite.invitedToPassword = param.m_rgchPassword; autoJoinAfterMPInvite.SetInvitedToServer(param.m_rgchServer); } }
private void OnEnable() { TheForest.Utils.Input.SetState(InputState.World, false); TheForest.Utils.Input.SetState(InputState.Menu, true); this.BreadCrumbLevel0(); CoopSteamNGUI coopSteamNGUI = UnityEngine.Object.FindObjectOfType <CoopSteamNGUI>(); if (coopSteamNGUI) { UnityEngine.Object.Destroy(coopSteamNGUI.gameObject); } if (BoltNetwork.isRunning) { BoltLauncher.Shutdown(); } if (MenuMain.exiting) { Application.Quit(); } else { MenuMain.exitingToMenu = false; } TheForest.Utils.Input.UnLockMouse(); }
private void InitLobby(CoopSteamNGUI ngui, Enum screen) { Interface.Oxide.LogInfo("InitLobby"); Type type = typeof(CoopSteamNGUI).GetNestedTypes(BindingFlags.NonPublic).FirstOrDefault(x => x.IsEnum && x.Name.Equals("Screens")); Interface.Oxide.LogInfo("Type: {0}", type); object enumValue = type.GetField("LobbySetup", BindingFlags.Static | BindingFlags.Public).GetValue(null); Interface.Oxide.LogInfo("Screen: {0} Value: {0} Name: {1}", Convert.ToInt32(screen), (int)enumValue, Enum.GetName(type, enumValue)); if (Convert.ToInt32(screen) != (int)enumValue) return; Interface.Oxide.NextTick(() => { Interface.Oxide.LogInfo("InitLobby NextTick"); var coop = UnityEngine.Object.FindObjectOfType<CoopSteamNGUI>(); coop.OnHostLobbySetup(); }); }
private static void LobbyInvite(LobbyInvite_t param) { if (BoltNetwork.isRunning) { return; } AutoJoinAfterMPInvite autoJoinAfterMPInvite = UnityEngine.Object.FindObjectOfType <AutoJoinAfterMPInvite>(); CoopSteamNGUI coopSteamNGUI = UnityEngine.Object.FindObjectOfType <CoopSteamNGUI>(); if (coopSteamNGUI) { if (CoopLobby.IsInLobby) { return; } coopSteamNGUI.SetJoinText(param); } else if (autoJoinAfterMPInvite) { autoJoinAfterMPInvite.SetInvitedToGameId(param.m_ulSteamIDLobby); } }
private void OpenScreen(CoopSteamNGUI.Screens screen) { this.ClearLoadingAndError(); this._prevScreen = this._currentScreen; this._modalScreen._screen.SetActive(screen == CoopSteamNGUI.Screens.ModalScreen); this._inviteReceivedScreen._screen.SetActive(screen == CoopSteamNGUI.Screens.InviteReceivedScreen); this._lobbySetupScreen._screen.SetActive(screen == CoopSteamNGUI.Screens.LobbySetup); this._lobbyScreen._screen.SetActive(screen == CoopSteamNGUI.Screens.Lobby); this._gameBrowserScreen._screen.SetActive(screen == CoopSteamNGUI.Screens.GameBrowser); this._currentScreen = screen; if (screen == CoopSteamNGUI.Screens.GameBrowser) { this._previouslyPlayedServers = SaveSlotUtils.GetPreviouslyPlayedServers(); } }