mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 21:48:58 +03:00
22 lines
612 B
C#
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;
|
|
}
|
|
}
|