[PhysicsGunMod] fox

This commit is contained in:
NotAKidoS 2024-06-18 20:57:42 -05:00
parent 4b83846c39
commit e2e4463663
3 changed files with 13 additions and 11 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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<string>
{
"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<string>
// {
// "set_enabled",
// // TODO: expose more methods like release ?
// });
// apply patches
ApplyPatches(typeof(CVRInputManagerPatches));