Files
wwdpublic/Content.Server/_White/Holosign/HolosignSystem.cs
Spatison 5c5d1092bd [Tweak] Holoprojector / Голопроектрор (#112)
* tweak

* local

* tweak

* tweak
2024-11-06 10:48:03 +07:00

22 lines
612 B
C#

using Content.Server.Holosign;
using Content.Shared.Destructible;
namespace Content.Server._White.Holosign;
public sealed class HolosignSystem : EntitySystem
{
public override void Initialize()
{
SubscribeLocalEvent<HolosignComponent, DestructionEventArgs>(OnDestruction);
}
private void OnDestruction(EntityUid uid, HolosignComponent component, DestructionEventArgs args)
{
if (!TryComp<HolosignProjectorComponent>(component.Projector, out var holosignProjector))
return;
holosignProjector.Signs.Remove(uid);
++holosignProjector.Uses;
}
}