26 lines
744 B
C#
26 lines
744 B
C#
|
|
using Content.Shared.Popups;
|
|
|
|
namespace Content.Shared._DV.Abilities;
|
|
public abstract class SharedCrawlUnderObjectsSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<CrawlUnderObjectsComponent, CrawlingUpdatedEvent>(OnCrawlingUpdated);
|
|
}
|
|
|
|
private void OnCrawlingUpdated(EntityUid uid,
|
|
CrawlUnderObjectsComponent component,
|
|
CrawlingUpdatedEvent args)
|
|
{
|
|
if (args.Enabled)
|
|
_popup.PopupEntity(Loc.GetString("crawl-under-objects-toggle-on"), uid);
|
|
else
|
|
_popup.PopupEntity(Loc.GetString("crawl-under-objects-toggle-off"), uid);
|
|
}
|
|
}
|