Table of Contents

Class LobbyPatch

Namespace
ConfigurableWarning.Patches
Assembly
RedstoneWizard08.ContentLibrary.dll

Patches the lobby system to allow truly private games.

[HarmonyPatch]
public class LobbyPatch
Inheritance
LobbyPatch
Inherited Members

Methods

AddSteamClient(SteamLobbyHandler, CSteamID)

Patches the steam client adder to kick if they are not friends (and the private host setting is true)

[HarmonyPrefix]
[HarmonyPatch(typeof(SteamLobbyHandler), "AddSteamClient")]
public static bool AddSteamClient(SteamLobbyHandler __instance, CSteamID cSteamID)

Parameters

__instance SteamLobbyHandler

The current instance of the SteamLobbyHandler.

cSteamID CSteamID

The new player's Steam ID

Returns

bool

HarmonyLib.HarmonyPrefix continue-or-not flag (this is a prefix)

IsPlayingWithRandoms(SteamLobbyHandler, ref bool)

Patches the random player allower thingamajig to apply the privacy setting

[HarmonyPostfix]
[HarmonyPatch(typeof(SteamLobbyHandler), "IsPlayingWithRandoms")]
public static void IsPlayingWithRandoms(SteamLobbyHandler __instance, ref bool __result)

Parameters

__instance SteamLobbyHandler

The current instance of the SteamLobbyHandler.

__result bool

The bool result

OnNetworkingSessionRequest(SteamLobbyHandler, SteamNetworkingMessagesSessionRequest_t)

Patches the networking session responder to apply our settings.

[HarmonyPrefix]
[HarmonyPatch(typeof(SteamLobbyHandler), "OnNetworkingSessionRequest")]
public static bool OnNetworkingSessionRequest(SteamLobbyHandler __instance, SteamNetworkingMessagesSessionRequest_t param)

Parameters

__instance SteamLobbyHandler

The current instance of the SteamLobbyHandler.

param SteamNetworkingMessagesSessionRequest_t

The session request

Returns

bool

HarmonyLib.HarmonyPrefix continue-or-not flag (this is a prefix)

OpenLobby(SteamLobbyHandler)

Patches the lobby opener to allow private games.

[HarmonyPrefix]
[HarmonyPatch(typeof(SteamLobbyHandler), "OpenLobby")]
public static bool OpenLobby(SteamLobbyHandler __instance)

Parameters

__instance SteamLobbyHandler

The current instance of the SteamLobbyHandler.

Returns

bool

HarmonyLib.HarmonyPrefix continue-or-not flag (this is a prefix)