public unsafe override void OnApplicationStart() { SteamClient.Init(823500); Features.Guard.GetSteamFriends(); Features.Guard.GetLocalGuard(); #if DEBUG MelonModLogger.LogWarning("Debug build!"); #endif MelonModLogger.Log($"Multiplayer initialising with protocol version {PROTOCOL_VERSION}."); // Set up prefs ModPrefs.RegisterCategory("MPMod", "Multiplayer Settings"); ModPrefs.RegisterPrefBool("MPMod", "BaldFord", false, "90% effective hair removal solution"); // Initialise transport layer TransportLayer = new SteamTransportLayer(); // Create the UI and cache the PlayerRep's model ui = new MultiplayerUI(); client = new Client(ui, TransportLayer); server = new Server(ui, TransportLayer); PlayerRep.LoadFord(); // Configures if the PlayerRep's are showing or hiding certain parts PlayerRep.showBody = true; PlayerRep.showHair = ModPrefs.GetBool("MPMod", "BaldFord"); // Initialize Discord's RichPresence RichPresence.Initialise(701895326600265879); client.SetupRP(); #region Unused Code //PlayerHooks.OnPlayerGrabObject += PlayerHooks_OnPlayerGrabObject; //PlayerHooks.OnPlayerLetGoObject += PlayerHooks_OnPlayerLetGoObject; //BWUtil.InitialiseGunPrefabs(); #endregion }
public unsafe override void OnApplicationStart() { if (!SteamClient.IsValid) { SteamClient.Init(823500); } #if DEBUG MelonModLogger.LogWarning("Debug build!"); #endif MelonLogger.Log($"Multiplayer initialising with protocol version {PROTOCOL_VERSION}."); // Set up prefs MelonPrefs.RegisterCategory("MPMod", "Multiplayer Settings"); MelonPrefs.RegisterBool("MPMod", "BaldFord", false, "90% effective hair removal solution"); // Initialise transport layer TransportLayer = new SteamTransportLayer(); // Create the UI and cache the PlayerRep's model ui = new MultiplayerUI(); client = new Client(ui, TransportLayer); server = new Server(ui, TransportLayer); PlayerRep.LoadFord(); // Configures if the PlayerRep's are showing or hiding certain parts PlayerRep.showBody = true; PlayerRep.showHair = MelonPrefs.GetBool("MPMod", "BaldFord"); // Initialize Discord's RichPresence RichPresence.Initialise(701895326600265879); client.SetupRP(); BWUtil.Hook(); UnhollowerRuntimeLib.ClassInjector.RegisterTypeInIl2Cpp <SyncedObject>(); }