2020-06-17 18:19:31 -07:00
|
|
|
|
using Robust.Shared.Interfaces.GameObjects;
|
2019-04-15 21:11:38 -06:00
|
|
|
|
using Robust.Shared.IoC;
|
|
|
|
|
|
using Robust.Shared.Map;
|
2018-11-21 21:11:30 +01:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Interfaces
|
|
|
|
|
|
{
|
2020-06-17 18:19:31 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Allows the ability to create floating text messages at locations in the world.
|
|
|
|
|
|
/// </summary>
|
2018-11-21 21:11:30 +01:00
|
|
|
|
public interface ISharedNotifyManager
|
|
|
|
|
|
{
|
2020-06-17 18:19:31 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Makes a string of text float up from an entity.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="source">The entity that the message is floating up from.</param>
|
|
|
|
|
|
/// <param name="viewer">The client attached entity that the message is being sent to.</param>
|
|
|
|
|
|
/// <param name="message">Text contents of the message.</param>
|
2018-11-21 21:11:30 +01:00
|
|
|
|
void PopupMessage(IEntity source, IEntity viewer, string message);
|
2020-06-17 18:19:31 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Makes a string of text float up from a location on a grid.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="coordinates">Location on a grid that the message floats up from.</param>
|
|
|
|
|
|
/// <param name="viewer">The client attached entity that the message is being sent to.</param>
|
|
|
|
|
|
/// <param name="message">Text contents of the message.</param>
|
2019-01-18 11:40:30 +01:00
|
|
|
|
void PopupMessage(GridCoordinates coordinates, IEntity viewer, string message);
|
2020-06-17 18:19:31 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Makes a string of text float up from a client's cursor.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="viewer">The client attached entity that the message is being sent to.</param>
|
|
|
|
|
|
/// <param name="message">Text contents of the message.</param>
|
2020-05-23 18:45:47 +02:00
|
|
|
|
void PopupMessageCursor(IEntity viewer, string message);
|
2018-11-21 21:11:30 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static class NotifyManagerExt
|
|
|
|
|
|
{
|
|
|
|
|
|
public static void PopupMessage(this IEntity source, IEntity viewer, string message)
|
|
|
|
|
|
{
|
|
|
|
|
|
IoCManager.Resolve<ISharedNotifyManager>().PopupMessage(source, viewer, message);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|