2022-06-07 22:07:39 -07:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
using QSB.WorldSync;
|
|
|
|
|
|
|
|
|
|
namespace QSB.ModelShip.Messages;
|
|
|
|
|
|
2023-07-28 19:30:57 +01:00
|
|
|
|
public class RespawnModelShipMessage : QSBMessage<bool>
|
2022-06-07 22:07:39 -07:00
|
|
|
|
{
|
|
|
|
|
public RespawnModelShipMessage(bool playEffects) : base(playEffects) { }
|
|
|
|
|
|
2022-08-28 00:56:10 -04:00
|
|
|
|
public override void OnReceiveRemote()
|
|
|
|
|
{
|
|
|
|
|
var flightConsole = QSBWorldSync.GetUnityObject<RemoteFlightConsole>();
|
2022-08-28 22:21:20 -07:00
|
|
|
|
flightConsole.RespawnModelShip(Data);
|
|
|
|
|
if (Data)
|
|
|
|
|
{
|
|
|
|
|
flightConsole._modelShipBody.GetComponent<OWAudioSource>().PlayOneShot(AudioType.TH_RetrieveModelShip);
|
|
|
|
|
}
|
2022-08-28 00:56:10 -04:00
|
|
|
|
}
|
2022-06-07 22:07:39 -07:00
|
|
|
|
}
|