Allow server to send cursor-located popup messages.

This commit is contained in:
Pieter-Jan Briers
2020-05-23 18:45:47 +02:00
parent 7346774616
commit 36b5326a37
4 changed files with 46 additions and 4 deletions

View File

@@ -42,6 +42,19 @@ namespace Content.Server
_netManager.ServerSendMessage(netMessage, actor.playerSession.ConnectedClient);
}
public override void PopupMessageCursor(IEntity viewer, string message)
{
if (!viewer.TryGetComponent(out IActorComponent actor))
{
return;
}
var netMessage = _netManager.CreateNetMessage<MsgDoNotify>();
netMessage.Message = message;
netMessage.AtCursor = true;
_netManager.ServerSendMessage(netMessage, actor.playerSession.ConnectedClient);
}
public class PopupMsgCommand : IClientCommand
{
public string Command => "srvpopupmsg";