30 lines
817 B
C#
30 lines
817 B
C#
using HarmonyLib;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ScarletMansion.Configs
|
|
{
|
|
public class ConfigPatch {
|
|
|
|
[HarmonyPatch(typeof(GameNetcodeStuff.PlayerControllerB), "ConnectClientToPlayerObject")]
|
|
[HarmonyPostfix]
|
|
public static void InitializeLocalPlayerPatch(){
|
|
ConfigMain.InitializeLocalPlayer();
|
|
ConfigDungeonFoyer.InitializeLocalPlayer();
|
|
ConfigDungeonBasement.InitializeLocalPlayer();
|
|
}
|
|
|
|
[HarmonyPatch(typeof(GameNetworkManager), "StartDisconnect")]
|
|
[HarmonyPostfix]
|
|
public static void PlayerLeavePatch(){
|
|
ConfigMain.RevertSync();
|
|
ConfigDungeonFoyer.RevertSync();
|
|
ConfigDungeonBasement.RevertSync();
|
|
}
|
|
|
|
}
|
|
}
|