quantum-space-buddies/QSB/Tools/TranslatorTool/Messages/IsTranslatingMessage.cs
2022-07-01 10:48:30 +01:00

20 lines
509 B
C#

using QSB.Messaging;
using QSB.Player;
namespace QSB.Tools.TranslatorTool.Messages;
internal class IsTranslatingMessage : QSBMessage<bool>
{
public IsTranslatingMessage(bool translating) : base(translating) { }
public override void OnReceiveRemote()
{
var player = QSBPlayerManager.GetPlayer(From);
player.IsTranslating = Data;
((QSBNomaiTranslator)player.Translator).UpdateTranslating(Data);
}
public override void OnReceiveLocal()
=> QSBPlayerManager.LocalPlayer.IsTranslating = Data;
}