Add SharedPopupSystem.PopupPredicted (#25811)

* Added SharedPopupSystem.PopupPredicted

* Documentation improvement
This commit is contained in:
Tayrtahn
2024-03-05 20:59:05 -05:00
committed by GitHub
parent 72b0889359
commit 0738829510
3 changed files with 36 additions and 5 deletions

View File

@@ -83,10 +83,17 @@ namespace Content.Shared.Popups
public abstract void PopupEntity(string? message, EntityUid uid, Filter filter, bool recordReplay, PopupType type = PopupType.Small);
/// <summary>
/// Variant of <see cref="PopupEnity(string, EntityUid, EntityUid, PopupType)"/> that only runs on the client, outside of prediction.
/// 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="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
/// will do nothing and the server will show the message to every player in PVS range.
/// </summary>
public abstract void PopupPredicted(string? message, EntityUid uid, EntityUid? recipient, PopupType type = PopupType.Small);
}
/// <summary>