Add PopupPredictedCursor and fix doubled popups on vending machines (#36655)
* Add PopupCursorPredicted method * Fix doubled popups on vending machine restock failures * Rename to match existing pattern
This commit is contained in:
@@ -32,6 +32,18 @@ namespace Content.Shared.Popups
|
||||
/// <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>
|
||||
@@ -60,7 +72,7 @@ namespace Content.Shared.Popups
|
||||
|
||||
/// <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);
|
||||
|
||||
Reference in New Issue
Block a user