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