diff --git a/Content.Client/Ghost/GhostSystem.cs b/Content.Client/Ghost/GhostSystem.cs index c42e7cd0e0c..14ca21688eb 100644 --- a/Content.Client/Ghost/GhostSystem.cs +++ b/Content.Client/Ghost/GhostSystem.cs @@ -1,11 +1,16 @@ +using Content.Client._NF.Respawn; using Content.Client.Movement.Systems; +using Content.Client.UserInterface.Systems.Ghost.Widgets; using Content.Shared.Actions; using Content.Shared.Ghost; +using Content.Shared.Mind; using Robust.Client.Console; using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Player; +using Robust.Client.UserInterface; using Robust.Shared.Player; +using Robust.Shared.Timing; namespace Content.Client.Ghost { @@ -15,6 +20,19 @@ public sealed class GhostSystem : SharedGhostSystem [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly SharedActionsSystem _actions = default!; [Dependency] private readonly ContentEyeSystem _contentEye = default!; + [Dependency] private readonly IUserInterfaceManager _uiManager = default!; + [Dependency] private readonly IGameTiming _gameTiming = default!; + [Dependency] private readonly RespawnSystem _respawn = default!; + + public override void Update(float frameTime) + { + foreach (var ghost in EntityManager.EntityQuery(true)) + { + var ui = _uiManager.GetActiveUIWidgetOrNull(); + if (ui != null && Player != null) + ui.UpdateRespawn(_respawn.RespawnResetTime); + } + } public int AvailableGhostRoleCount { get; private set; } @@ -182,4 +200,4 @@ public void ToggleGhostVisibility() GhostVisibility = !GhostVisibility; } } -} +} \ No newline at end of file diff --git a/Content.Client/UserInterface/Systems/Ghost/Controls/GhostRespawnRulesWindow.xaml b/Content.Client/UserInterface/Systems/Ghost/Controls/GhostRespawnRulesWindow.xaml new file mode 100644 index 00000000000..2cdb0c05f92 --- /dev/null +++ b/Content.Client/UserInterface/Systems/Ghost/Controls/GhostRespawnRulesWindow.xaml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + +