using Content.Shared.Mining.Components;
using Content.Shared._NF.Mining.Components;
namespace Content.Shared.Mining;
public sealed partial class MiningScannerSystem : EntitySystem
{
///
public void NFInitialize()
{
SubscribeLocalEvent(OnStartup);
}
private void OnStartup(Entity ent, ref ComponentStartup args)
{
if (!HasComp(ent))
{
SetupInnateMiningViewerComponent(ent);
}
}
private void SetupInnateMiningViewerComponent(Entity ent)
{
var comp = EnsureComp(ent);
comp.ViewRange = ent.Comp.ViewRange;
comp.PingDelay = ent.Comp.PingDelay;
comp.PingSound = ent.Comp.PingSound;
comp.QueueRemoval = false;
comp.NextPingTime = _timing.CurTime + ent.Comp.PingDelay;
Dirty(ent.Owner, comp);
}
}