using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Client.Player;
-using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface;
using Robust.Shared.Configuration;
using Robust.Shared.Map;
PopupEntity(message, uid, type);
}
+ public override void PopupClient(string? message, EntityUid? recipient, PopupType type = PopupType.Small)
+ {
+ if (recipient == null)
+ return;
+
+ if (_timing.IsFirstTimePredicted)
+ PopupCursor(message, recipient.Value, type);
+ }
+
public override void PopupClient(string? message, EntityUid uid, EntityUid? recipient, PopupType type = PopupType.Small)
{
if (recipient == null)
PopupEntity(message, uid, recipient.Value, type);
}
+ public override void PopupClient(string? message, EntityCoordinates coordinates, EntityUid? recipient, PopupType type = PopupType.Small)
+ {
+ if (recipient == null)
+ return;
+
+ if (_timing.IsFirstTimePredicted)
+ PopupCoordinates(message, coordinates, recipient.Value, type);
+ }
+
public override void PopupEntity(string? message, EntityUid uid, PopupType type = PopupType.Small)
{
if (TryComp(uid, out TransformComponent? transform))
RaiseNetworkEvent(new PopupEntityEvent(message, type, GetNetEntity(uid)), actor.PlayerSession);
}
+ public override void PopupClient(string? message, EntityUid? recipient, PopupType type = PopupType.Small)
+ {
+ }
+
public override void PopupClient(string? message, EntityUid uid, EntityUid? recipient, PopupType type = PopupType.Small)
{
// do nothing duh its for client only
}
+ public override void PopupClient(string? message, EntityCoordinates coordinates, EntityUid? recipient, PopupType type = PopupType.Small)
+ {
+ }
+
public override void PopupEntity(string? message, EntityUid uid, ICommonSession recipient, PopupType type = PopupType.Small)
{
if (message == null)
/// </summary>
public abstract void PopupEntity(string? message, EntityUid uid, Filter filter, bool recordReplay, PopupType type = PopupType.Small);
+ /// <summary>
+ /// Variant of <see cref="PopupCursor(string, EntityUid, PopupType)"/> that only runs on the client, outside of prediction.
+ /// Useful for shared code that is always ran by both sides to avoid duplicate popups.
+ /// </summary>
+ public abstract void PopupClient(string? message, EntityUid? recipient, PopupType type = PopupType.Small);
+
/// <summary>
/// Variant of <see cref="PopupEntity(string, EntityUid, EntityUid, PopupType)"/> that only runs on the client, outside of prediction.
/// Useful for shared code that is always ran by both sides to avoid duplicate popups.
/// </summary>
public abstract void PopupClient(string? message, EntityUid uid, EntityUid? recipient, PopupType type = PopupType.Small);
+ /// <summary>
+ /// Variant of <see cref="PopupCoordinates(string, EntityCoordinates, PopupType)"/> that only runs on the client, outside of prediction.
+ /// Useful for shared code that is always ran by both sides to avoid duplicate popups.
+ /// </summary>
+ public abstract void PopupClient(string? message, EntityCoordinates coordinates, EntityUid? recipient, PopupType type = PopupType.Small);
+
/// <summary>
/// Variant of <see cref="PopupEntity(string, EntityUid, EntityUid, PopupType)"/> for use with prediction. The local client will show
/// the popup to the recipient, and the server will show it to every other player in PVS range. If recipient is null, the local client