mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-07 13:05:41 +00:00
20 lines
509 B
C#
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;
|
|
}
|