2022-04-14 06:30:59 +00:00
|
|
|
|
using QSB.EchoesOfTheEye.DreamLantern.WorldObjects;
|
2022-03-24 20:35:49 +00:00
|
|
|
|
using QSB.Messaging;
|
2022-10-05 02:52:29 +00:00
|
|
|
|
using System.Collections.Generic;
|
2022-03-24 20:35:49 +00:00
|
|
|
|
|
|
|
|
|
namespace QSB.EchoesOfTheEye.DreamLantern.Messages;
|
|
|
|
|
|
2022-10-05 02:52:29 +00:00
|
|
|
|
internal class SetLitMessage : QSBWorldObjectMessage<QSBDreamLanternController, bool>
|
2022-03-24 20:35:49 +00:00
|
|
|
|
{
|
2022-04-14 06:30:59 +00:00
|
|
|
|
public SetLitMessage(bool lit) : base(lit) { }
|
2022-03-24 20:35:49 +00:00
|
|
|
|
|
|
|
|
|
public override void OnReceiveRemote()
|
2022-10-05 02:52:29 +00:00
|
|
|
|
{
|
|
|
|
|
WorldObject.AttachedObject.SetLit(Data);
|
|
|
|
|
WorldObject.DreamLanternItem._oneShotSource.PlayOneShot(Data ? AudioType.Artifact_Light : AudioType.Artifact_Extinguish, 1f);
|
|
|
|
|
}
|
2022-03-24 20:35:49 +00:00
|
|
|
|
}
|