diff --git a/PhysicsGunMod/Components/ObjectSyncBridge.cs b/PhysicsGunMod/Components/ObjectSyncBridge.cs index b97eff9..fe3c563 100644 --- a/PhysicsGunMod/Components/ObjectSyncBridge.cs +++ b/PhysicsGunMod/Components/ObjectSyncBridge.cs @@ -53,7 +53,7 @@ public class ObjectSyncBridge : MonoBehaviour if (pickup) { - pickup.grabbedBy = MetaPort.Instance.ownerId; + pickup.GrabbedBy = MetaPort.Instance.ownerId; pickup._grabStartTime = Time.time; } if (spawnable) spawnable.isPhysicsSynced = true; diff --git a/PhysicsGunMod/Components/PhysicsGunInteractionBehavior.cs b/PhysicsGunMod/Components/PhysicsGunInteractionBehavior.cs index 4364b58..bce3321 100644 --- a/PhysicsGunMod/Components/PhysicsGunInteractionBehavior.cs +++ b/PhysicsGunMod/Components/PhysicsGunInteractionBehavior.cs @@ -1,5 +1,6 @@ using ABI_RC.Core.Player; using ABI_RC.Systems.InputManagement; +using ABI.CCK.Attributes; using UnityEngine; using UnityEngine.Events; using UnityEngine.Scripting.APIUpdating; @@ -16,6 +17,7 @@ using UnityEngine.Scripting.APIUpdating; namespace NAK.PhysicsGunMod.Components; +[CCKWhitelistComponent(spawnable: true)] public class PhysicsGunInteractionBehavior : MonoBehaviour { public static PhysicsGunInteractionBehavior Instance; diff --git a/PhysicsGunMod/Main.cs b/PhysicsGunMod/Main.cs index c3360ba..b431ca1 100644 --- a/PhysicsGunMod/Main.cs +++ b/PhysicsGunMod/Main.cs @@ -13,16 +13,16 @@ public class PhysicsGunMod : MelonMod { Logger = LoggerInstance; - // add to prop whitelist - SharedFilter._spawnableWhitelist.Add(typeof(PhysicsGunInteractionBehavior)); - - // add to event whitelist - SharedFilter._allowedEventComponents.Add(typeof(PhysicsGunInteractionBehavior)); - SharedFilter._allowedEventFunctions.Add(typeof(PhysicsGunInteractionBehavior), new List - { - "set_enabled", - // TODO: expose more methods like release ? - }); + // // add to prop whitelist + // //SharedFilter._spawnableWhitelist.Add(typeof(PhysicsGunInteractionBehavior)); + // + // // add to event whitelist + // SharedFilter._allowedEventComponents.Add(typeof(PhysicsGunInteractionBehavior)); + // SharedFilter._allowedEventFunctions.Add(typeof(PhysicsGunInteractionBehavior), new List + // { + // "set_enabled", + // // TODO: expose more methods like release ? + // }); // apply patches ApplyPatches(typeof(CVRInputManagerPatches));