Add popup message extension for players in range except for the source (#1962)

This commit is contained in:
DrSmugleaf
2020-08-30 11:28:46 +02:00
committed by GitHub
parent 827eab17d0
commit 9ec3ddf368
6 changed files with 100 additions and 79 deletions

View File

@@ -35,9 +35,26 @@ namespace Content.Shared.Interfaces
public static class NotifyManagerExt
{
/// <summary>
/// Pops up a message at the location of <see cref="source"/> for
/// <see cref="viewer"/> alone to see.
/// </summary>
/// <param name="source">The entity above which the message will appear.</param>
/// <param name="viewer">The entity that will see the message.</param>
/// <param name="message">The message to show.</param>
public static void PopupMessage(this IEntity source, IEntity viewer, string message)
{
IoCManager.Resolve<ISharedNotifyManager>().PopupMessage(source, viewer, message);
}
/// <summary>
/// Pops up a message at the given entity's location for it alone to see.
/// </summary>
/// <param name="viewer">The entity that will see the message.</param>
/// <param name="message">The message to be seen.</param>
public static void PopupMessage(this IEntity viewer, string message)
{
viewer.PopupMessage(viewer, message);
}
}
}