maybe fixed static buttons
This commit is contained in:
@@ -10,7 +10,6 @@ using StressLevelZero.Rig;
|
||||
using StressLevelZero.VRMK;
|
||||
using UnhollowerBaseLib;
|
||||
using UnityEngine;
|
||||
using StressLevelZero.Player;
|
||||
|
||||
namespace BoneSync.Data
|
||||
{
|
||||
|
||||
@@ -12,7 +12,8 @@ using StressLevelZero.Interaction;
|
||||
namespace BoneSync.Patching
|
||||
{
|
||||
|
||||
// Credit: Entanglement, this patch is based on the one from Entanglement
|
||||
// Credit: Entanglement
|
||||
// this patch is based on the one from Entanglement
|
||||
[HarmonyPatch(typeof(ForcePullGrip), nameof(ForcePullGrip.OnFarHandHoverUpdate))]
|
||||
public class ForcePullPatch
|
||||
{
|
||||
|
||||
@@ -142,7 +142,6 @@ namespace BoneSync.Sync.Components
|
||||
|
||||
private SpawnFragment spawnFragment;
|
||||
|
||||
public bool IsStatic() => rigidbodies.Length == 0;
|
||||
private void CheckAutoSync()
|
||||
{
|
||||
if (!isValid) return;
|
||||
@@ -182,7 +181,7 @@ namespace BoneSync.Sync.Components
|
||||
if (poolee && poolee.pool) {
|
||||
return true;
|
||||
}
|
||||
if (IsStatic() && buttonToggles.Length != 0) return true;
|
||||
if (buttonToggles.Length > 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -198,6 +197,10 @@ namespace BoneSync.Sync.Components
|
||||
{
|
||||
return transform.GetPath();
|
||||
}
|
||||
if (rigidbodies?.Length == 0 && buttonToggles?.Length > 0)
|
||||
{
|
||||
return transform.GetPath();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -256,8 +259,8 @@ namespace BoneSync.Sync.Components
|
||||
|
||||
if (spawnFragment) return false; // if has spawn fragment, don't sync
|
||||
FindAndUpdateComponents();
|
||||
if (buttonToggles.Length > 0) return true;
|
||||
if (rigidbodies.Length > 0) return true;
|
||||
if (buttonToggles?.Length > 0) return true;
|
||||
if (rigidbodies?.Length > 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ namespace BoneSync.Sync.Components
|
||||
|
||||
public void EjectAllPlugs(bool force = false)
|
||||
{
|
||||
if (plugs == null) return;
|
||||
foreach (AlignPlug plug in plugs)
|
||||
{
|
||||
if (plug == null) continue;
|
||||
|
||||
@@ -47,8 +47,7 @@ namespace BoneSync.Sync.Components
|
||||
magazine.magazineData.cartridgeType = magazineData.cartridgeType;
|
||||
magazine.magazineData.weight = magazineData.weight;
|
||||
magazine.magazineData.platform = magazineData.platform;
|
||||
//magazine.CheckBulletArt();
|
||||
//magazine.ShowBulletArt();
|
||||
magazine.firstBullet?.SetActive(magazineData.AmmoSlots.Count > 0);
|
||||
}
|
||||
|
||||
public MagazineSyncData GetMagazineData()
|
||||
|
||||
Reference in New Issue
Block a user