mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-30 03:32:47 +00:00
22 lines
631 B
C#
22 lines
631 B
C#
using QSB.EchoesOfTheEye.DreamRafts.WorldObjects;
|
|
using QSB.Messaging;
|
|
using QSB.Patches;
|
|
|
|
namespace QSB.EchoesOfTheEye.DreamRafts.Messages;
|
|
|
|
public class UpdateVisibilityMessage : QSBWorldObjectMessage<QSBDreamRaftProjection, (bool Visible, bool Immediate)>
|
|
{
|
|
public UpdateVisibilityMessage(bool visible, bool immediate) : base((visible, immediate)) { }
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
if (WorldObject.AttachedObject._visible == Data.Visible)
|
|
{
|
|
return;
|
|
}
|
|
|
|
WorldObject.AttachedObject._visible = Data.Visible;
|
|
QSBPatch.RemoteCall(() => WorldObject.AttachedObject.UpdateVisibility(Data.Immediate));
|
|
}
|
|
}
|