diff --git a/Content.Client/Popups/PopupSystem.cs b/Content.Client/Popups/PopupSystem.cs
index b0a3d9b21e..725568344d 100644
--- a/Content.Client/Popups/PopupSystem.cs
+++ b/Content.Client/Popups/PopupSystem.cs
@@ -173,6 +173,16 @@ namespace Content.Client.Popups
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);
diff --git a/Content.Server/Popups/PopupSystem.cs b/Content.Server/Popups/PopupSystem.cs
index 9338d81b92..aec4dbbfb3 100644
--- a/Content.Server/Popups/PopupSystem.cs
+++ b/Content.Server/Popups/PopupSystem.cs
@@ -35,6 +35,16 @@ namespace Content.Server.Popups
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)
diff --git a/Content.Shared/Popups/SharedPopupSystem.cs b/Content.Shared/Popups/SharedPopupSystem.cs
index 66f901c59f..b57ed6659e 100644
--- a/Content.Shared/Popups/SharedPopupSystem.cs
+++ b/Content.Shared/Popups/SharedPopupSystem.cs
@@ -32,6 +32,18 @@ namespace Content.Shared.Popups
/// Used to customize how this popup should appear visually.
public abstract void PopupCursor(string? message, EntityUid recipient, PopupType type = PopupType.Small);
+ ///
+ /// Variant of for use with prediction.
+ /// The local client will show the popup to the recipient. Does nothing on the server.
+ ///
+ public abstract void PopupPredictedCursor(string? message, ICommonSession recipient, PopupType type = PopupType.Small);
+
+ ///
+ /// Variant of for use with prediction.
+ /// The local client will show the popup to the recipient. Does nothing on the server.
+ ///
+ public abstract void PopupPredictedCursor(string? message, EntityUid recipient, PopupType type = PopupType.Small);
+
///
/// Shows a popup at a world location to every entity in PVS range.
///
@@ -60,7 +72,7 @@ namespace Content.Shared.Popups
///
/// Variant of 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.
///
public abstract void PopupPredictedCoordinates(string? message, EntityCoordinates coordinates, EntityUid? recipient, PopupType type = PopupType.Small);
diff --git a/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs b/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs
index 20c8f1195a..00355dedff 100644
--- a/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs
+++ b/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs
@@ -17,7 +17,7 @@ public abstract partial class SharedVendingMachineSystem
{
if (!TryComp(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)),
@@ -37,7 +37,7 @@ public abstract partial class SharedVendingMachineSystem
{
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;