mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 18:32:45 +00:00
26 lines
544 B
C#
26 lines
544 B
C#
using QSB.Messaging;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.EyeOfTheUniverse.Tomb.Messages;
|
|
|
|
internal class UseTombMessage : QSBMessage<bool>
|
|
{
|
|
public UseTombMessage(bool use) : base(use) { }
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
var tomb = QSBWorldSync.GetUnityObject<EyeTombController>();
|
|
|
|
if (Data)
|
|
{
|
|
if (!tomb._hasMovedSignalDeeper)
|
|
{
|
|
tomb._hasMovedSignalDeeper = true;
|
|
tomb._buriedSignal.transform.position = tomb._signalDeepSocket.position;
|
|
}
|
|
}
|
|
|
|
tomb._interactReceiver.SetInteractionEnabled(!Data);
|
|
}
|
|
}
|