mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-29 03:28:26 +00:00
30 lines
810 B
C#
30 lines
810 B
C#
using OWML.Common;
|
|
using QSB.ClientServerStateSync;
|
|
using QSB.ClientServerStateSync.Messages;
|
|
using QSB.Messaging;
|
|
using QSB.Utility;
|
|
|
|
namespace QSB.DeathSync.Messages;
|
|
|
|
public class StartLoopMessage : QSBMessage
|
|
{
|
|
public override void OnReceiveLocal() => OnReceiveRemote();
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
DebugLog.DebugWrite($" ~~~ LOOP START ~~~");
|
|
if (QSBSceneManager.CurrentScene == OWScene.SolarSystem)
|
|
{
|
|
new ClientStateMessage(ClientState.AliveInSolarSystem).Send();
|
|
}
|
|
else if (QSBSceneManager.CurrentScene == OWScene.EyeOfTheUniverse)
|
|
{
|
|
new ClientStateMessage(ClientState.AliveInEye).Send();
|
|
}
|
|
else
|
|
{
|
|
DebugLog.ToConsole($"Error - Got StartLoop event when not in universe!", MessageType.Error);
|
|
new ClientStateMessage(ClientState.NotLoaded).Send();
|
|
}
|
|
}
|
|
} |