PopupCursor(message, type);
}
+ public override void PopupPredictedCursor(string? message, ICommonSession recipient, PopupType type = PopupType.Small)
+ {
+ PopupCursor(message, recipient, type);
+ }
+
+ public override void PopupPredictedCursor(string? message, EntityUid recipient, PopupType type = PopupType.Small)
+ {
+ PopupCursor(message, recipient, type);
+ }
+
public override void PopupCoordinates(string? message, EntityCoordinates coordinates, Filter filter, bool replayRecord, PopupType type = PopupType.Small)
{
PopupCoordinates(message, coordinates, type);
RaiseNetworkEvent(new PopupCursorEvent(message, type), actor.PlayerSession);
}
+ public override void PopupPredictedCursor(string? message, ICommonSession recipient, PopupType type = PopupType.Small)
+ {
+ // Do nothing, since the client already predicted the popup.
+ }
+
+ public override void PopupPredictedCursor(string? message, EntityUid recipient, PopupType type = PopupType.Small)
+ {
+ // Do nothing, since the client already predicted the popup.
+ }
+
public override void PopupCoordinates(string? message, EntityCoordinates coordinates, Filter filter, bool replayRecord, PopupType type = PopupType.Small)
{
if (message == null)
/// <param name="type">Used to customize how this popup should appear visually.</param>
public abstract void PopupCursor(string? message, EntityUid recipient, PopupType type = PopupType.Small);
+ /// <summary>
+ /// Variant of <see cref="PopupCursor(string?, ICommonSession, PopupType)"/> for use with prediction.
+ /// The local client will show the popup to the recipient. Does nothing on the server.
+ /// </summary>
+ public abstract void PopupPredictedCursor(string? message, ICommonSession recipient, PopupType type = PopupType.Small);
+
+ /// <summary>
+ /// Variant of <see cref="PopupCursor(string?, EntityUid, PopupType)"/> for use with prediction.
+ /// The local client will show the popup to the recipient. Does nothing on the server.
+ /// </summary>
+ public abstract void PopupPredictedCursor(string? message, EntityUid recipient, PopupType type = PopupType.Small);
+
/// <summary>
/// Shows a popup at a world location to every entity in PVS range.
/// </summary>
/// <summary>
/// Variant of <see cref="PopupCoordinates(string, EntityCoordinates, PopupType)"/> for use with prediction. The local client will
- /// the popup to the recipient, and the server will show it to every other player in PVS range. If recipient is null, the local
+ /// 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 will do nothing and the server will show the message to every player in PVS range.
/// </summary>
public abstract void PopupPredictedCoordinates(string? message, EntityCoordinates coordinates, EntityUid? recipient, PopupType type = PopupType.Small);
{
if (!TryComp<WiresPanelComponent>(target, out var panel) || !panel.Open)
{
- Popup.PopupCursor(Loc.GetString("vending-machine-restock-needs-panel-open",
+ Popup.PopupPredictedCursor(Loc.GetString("vending-machine-restock-needs-panel-open",
("this", uid),
("user", user),
("target", target)),
{
if (!component.CanRestock.Contains(machineComponent.PackPrototypeId))
{
- Popup.PopupCursor(Loc.GetString("vending-machine-restock-invalid-inventory", ("this", uid), ("user", user),
+ Popup.PopupPredictedCursor(Loc.GetString("vending-machine-restock-invalid-inventory", ("this", uid), ("user", user),
("target", target)), user);
return false;