public static void Prefix(MultiplayerLobbyConnectionController __instance) { var nextConnectionType = __instance.GetProperty <MultiplayerLobbyConnectionController.LobbyConnectionType, MultiplayerLobbyConnectionController>("connectionType"); if (nextConnectionType != ConnectionType) { ConnectionType = nextConnectionType; Plugin.Log?.Debug($"Lobby connection type change: {ConnectionType} (IsPartyMultiplayer: {IsPartyMultiplayer}, IsPartyHost: {IsPartyHost})"); GameStateManager.HandleUpdate(); } }
/// <summary> /// Gets the current lobby type. /// </summary> static void Prefix(MultiplayerLobbyConnectionController __instance) { ConnectionType = __instance.GetProperty <MultiplayerLobbyConnectionController.LobbyConnectionType, MultiplayerLobbyConnectionController>("connectionType"); Plugin.Log?.Debug($"Joining a {ConnectionType} lobby."); }
private static void Postfix(MultiplayerLobbyConnectionController __instance) { connectionType = __instance.connectionType; }