20 lines
520 B
C#
20 lines
520 B
C#
|
|
using Content.Shared.Damage;
|
||
|
|
using Robust.Shared.GameObjects;
|
||
|
|
|
||
|
|
namespace Content.Server.Window
|
||
|
|
{
|
||
|
|
public class WindowSystem : EntitySystem
|
||
|
|
{
|
||
|
|
public override void Initialize()
|
||
|
|
{
|
||
|
|
base.Initialize();
|
||
|
|
SubscribeLocalEvent<WindowComponent, DamageChangedEvent>(UpdateVisuals);
|
||
|
|
}
|
||
|
|
|
||
|
|
public void UpdateVisuals(EntityUid _, WindowComponent component, DamageChangedEvent args)
|
||
|
|
{
|
||
|
|
component.UpdateVisuals(args.Damageable.TotalDamage);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|