Revert "Update submodule to 172.0.0 (#21222)" (#21225)

This commit is contained in:
metalgearsloth
2023-10-24 21:55:20 +11:00
committed by GitHub
parent 517aea8bc3
commit a2bbda43cc
249 changed files with 1049 additions and 967 deletions

View File

@@ -3,8 +3,8 @@ using Content.Shared.Damage;
using Content.Shared.GameTicking;
using Content.Shared.Mobs.Components;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
namespace Content.Client.HealthOverlay
{
@@ -13,9 +13,9 @@ namespace Content.Client.HealthOverlay
{
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly IEntityManager _entities = default!;
[Dependency] private readonly IPlayerManager _player = default!;
private readonly Dictionary<EntityUid, HealthOverlayGui> _guis = new();
private EntityUid? _attachedEntity;
private bool _enabled;
public bool Enabled
@@ -42,6 +42,7 @@ namespace Content.Client.HealthOverlay
base.Initialize();
SubscribeNetworkEvent<RoundRestartCleanupEvent>(Reset);
SubscribeLocalEvent<PlayerAttachSysMessage>(HandlePlayerAttached);
}
public void Reset(RoundRestartCleanupEvent ev)
@@ -52,6 +53,12 @@ namespace Content.Client.HealthOverlay
}
_guis.Clear();
_attachedEntity = default;
}
private void HandlePlayerAttached(PlayerAttachSysMessage message)
{
_attachedEntity = message.AttachedEntity;
}
public override void FrameUpdate(float frameTime)
@@ -63,7 +70,7 @@ namespace Content.Client.HealthOverlay
return;
}
if (_player.LocalEntity is not {} ent || Deleted(ent))
if (_attachedEntity is not {} ent || Deleted(ent))
{
return;
}