mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[PhysicsGunMod] fox
This commit is contained in:
parent
4b83846c39
commit
e2e4463663
3 changed files with 13 additions and 11 deletions
|
@ -53,7 +53,7 @@ public class ObjectSyncBridge : MonoBehaviour
|
||||||
|
|
||||||
if (pickup)
|
if (pickup)
|
||||||
{
|
{
|
||||||
pickup.grabbedBy = MetaPort.Instance.ownerId;
|
pickup.GrabbedBy = MetaPort.Instance.ownerId;
|
||||||
pickup._grabStartTime = Time.time;
|
pickup._grabStartTime = Time.time;
|
||||||
}
|
}
|
||||||
if (spawnable) spawnable.isPhysicsSynced = true;
|
if (spawnable) spawnable.isPhysicsSynced = true;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.Player;
|
||||||
using ABI_RC.Systems.InputManagement;
|
using ABI_RC.Systems.InputManagement;
|
||||||
|
using ABI.CCK.Attributes;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
using UnityEngine.Scripting.APIUpdating;
|
using UnityEngine.Scripting.APIUpdating;
|
||||||
|
@ -16,6 +17,7 @@ using UnityEngine.Scripting.APIUpdating;
|
||||||
|
|
||||||
namespace NAK.PhysicsGunMod.Components;
|
namespace NAK.PhysicsGunMod.Components;
|
||||||
|
|
||||||
|
[CCKWhitelistComponent(spawnable: true)]
|
||||||
public class PhysicsGunInteractionBehavior : MonoBehaviour
|
public class PhysicsGunInteractionBehavior : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static PhysicsGunInteractionBehavior Instance;
|
public static PhysicsGunInteractionBehavior Instance;
|
||||||
|
|
|
@ -13,16 +13,16 @@ public class PhysicsGunMod : MelonMod
|
||||||
{
|
{
|
||||||
Logger = LoggerInstance;
|
Logger = LoggerInstance;
|
||||||
|
|
||||||
// add to prop whitelist
|
// // add to prop whitelist
|
||||||
SharedFilter._spawnableWhitelist.Add(typeof(PhysicsGunInteractionBehavior));
|
// //SharedFilter._spawnableWhitelist.Add(typeof(PhysicsGunInteractionBehavior));
|
||||||
|
//
|
||||||
// add to event whitelist
|
// // add to event whitelist
|
||||||
SharedFilter._allowedEventComponents.Add(typeof(PhysicsGunInteractionBehavior));
|
// SharedFilter._allowedEventComponents.Add(typeof(PhysicsGunInteractionBehavior));
|
||||||
SharedFilter._allowedEventFunctions.Add(typeof(PhysicsGunInteractionBehavior), new List<string>
|
// SharedFilter._allowedEventFunctions.Add(typeof(PhysicsGunInteractionBehavior), new List<string>
|
||||||
{
|
// {
|
||||||
"set_enabled",
|
// "set_enabled",
|
||||||
// TODO: expose more methods like release ?
|
// // TODO: expose more methods like release ?
|
||||||
});
|
// });
|
||||||
|
|
||||||
// apply patches
|
// apply patches
|
||||||
ApplyPatches(typeof(CVRInputManagerPatches));
|
ApplyPatches(typeof(CVRInputManagerPatches));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue