quantum-space-buddies/QSB/HUD/Messages/PlanetMessage.cs

27 lines
481 B
C#
Raw Normal View History

2023-02-10 12:01:31 +00:00
using QSB.Messaging;
using QSB.Player;
using QSB.Utility;
namespace QSB.HUD.Messages;
internal class PlanetMessage : QSBMessage<HUDIcon>
{
public PlanetMessage(HUDIcon icon) : base(icon) { }
public override void OnReceiveLocal() => OnReceiveRemote();
public override void OnReceiveRemote()
{
var from = QSBPlayerManager.GetPlayer(From);
if (from == default)
{
return;
}
DebugLog.DebugWrite($"{From} now on {Data}");
from.HUDBox?.UpdateIcon(Data);
}
}