Add SharedPopupSystem.PopupPredicted (#25811)
* Added SharedPopupSystem.PopupPredicted * Documentation improvement
This commit is contained in:
@@ -150,7 +150,7 @@ namespace Content.Client.Popups
|
||||
PopupEntity(message, uid, type);
|
||||
}
|
||||
|
||||
public override void PopupEntity(string? message, EntityUid uid, Filter filter, bool recordReplay, PopupType type=PopupType.Small)
|
||||
public override void PopupEntity(string? message, EntityUid uid, Filter filter, bool recordReplay, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (!filter.Recipients.Contains(_playerManager.LocalSession))
|
||||
return;
|
||||
@@ -170,6 +170,12 @@ namespace Content.Client.Popups
|
||||
PopupMessage(message, type, transform.Coordinates, uid, true);
|
||||
}
|
||||
|
||||
public override void PopupPredicted(string? message, EntityUid uid, EntityUid? recipient, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (recipient != null && _timing.IsFirstTimePredicted)
|
||||
PopupEntity(message, uid, recipient.Value, type);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Network Event Handlers
|
||||
|
||||
Reference in New Issue
Block a user