rcd refactor (#15172)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-05-01 13:46:59 +00:00
committed by GitHub
parent 10e3635a7b
commit ddc2785110
14 changed files with 495 additions and 355 deletions

View File

@@ -10,6 +10,7 @@ using Robust.Shared.Map;
using Robust.Shared.Player;
using Robust.Shared.Players;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
namespace Content.Client.Popups
@@ -22,6 +23,7 @@ namespace Content.Client.Popups
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IResourceCache _resource = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
public IReadOnlyList<WorldPopupLabel> WorldLabels => _aliveWorldLabels;
@@ -123,6 +125,12 @@ namespace Content.Client.Popups
PopupEntity(message, uid, type);
}
public override void PopupClient(string message, EntityUid uid, EntityUid recipient, PopupType type = PopupType.Small)
{
if (_timing.IsFirstTimePredicted)
PopupEntity(message, uid, recipient);
}
public override void PopupEntity(string message, EntityUid uid, PopupType type = PopupType.Small)
{
if (!EntityManager.EntityExists(uid))