mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-30 03:32:47 +00:00
Merge branch 'dev' into nh-stuff
This commit is contained in:
commit
66976ff28f
@ -10,7 +10,8 @@ public class VisionTorchProjectMessage : QSBWorldObjectMessage<QSBVisionTorchIte
|
||||
public override void OnReceiveRemote()
|
||||
{
|
||||
WorldObject.AttachedObject._isProjecting = Data;
|
||||
WorldObject.IsProjectingRemotely = Data;
|
||||
WorldObject.AttachedObject._mindProjectorTrigger.SetProjectorActive(Data);
|
||||
// prevent the torch from actually doing things remotely
|
||||
WorldObject.AttachedObject.mindProjectorTrigger._triggerVolume.SetTriggerActivation(false);
|
||||
}
|
||||
}
|
||||
|
@ -42,22 +42,4 @@ public class VisionTorchPatches : QSBPatch
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(MindProjectorTrigger), nameof(MindProjectorTrigger.OnTriggerVolumeEntry))]
|
||||
private static bool OnTriggerVolumeEntry(MindProjectorTrigger __instance)
|
||||
{
|
||||
if (!QSBWorldSync.AllObjectsReady)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var visionTorchItem = __instance.GetComponentInParent<VisionTorchItem>();
|
||||
if (visionTorchItem && visionTorchItem.GetWorldObject<QSBVisionTorchItem>().IsProjectingRemotely)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,6 @@ namespace QSB.EchoesOfTheEye.VisionTorch.WorldObjects;
|
||||
|
||||
public class QSBVisionTorchItem : QSBItem<VisionTorchItem>
|
||||
{
|
||||
public bool IsProjectingRemotely;
|
||||
|
||||
public override void SendInitialState(uint to)
|
||||
{
|
||||
this.SendMessage(new VisionTorchProjectMessage(AttachedObject._isProjecting) { To = to });
|
||||
|
Loading…
x
Reference in New Issue
Block a user