mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
24 lines
No EOL
654 B
C#
24 lines
No EOL
654 B
C#
using HarmonyLib;
|
|
using ABI_RC.Core.Player;
|
|
|
|
namespace NAK.InteractionTest.HarmonyPatches;
|
|
|
|
class PuppetMasterPatches
|
|
{
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch(typeof(PuppetMaster), nameof(PuppetMaster.AvatarInstantiated))]
|
|
static void Postfix_PuppetMaster_SetupAvatar(ref PuppetMaster __instance)
|
|
{
|
|
__instance.avatarObject.AddComponent<AvatarColliders>();
|
|
}
|
|
}
|
|
|
|
class PlayerSetupPatches
|
|
{
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.SetupAvatar))]
|
|
static void Postfix_PlayerSetup_SetupAvatar(ref PlayerSetup __instance)
|
|
{
|
|
__instance._avatar.AddComponent<AvatarColliders>();
|
|
}
|
|
} |