Files
Delta-v/Content.Server/_DV/Shipyard/MapDeleterShuttleSystem.cs
T
deltanedasanddeltanedas ec94579ebc the great namespace refactor (#2574)
* refactor DeltaV/deltav resources to _DV

* change DeltaV namespaces to _DV

* add space before all DeltaV comments

* update xamls

* fix and move arena parallax to _DV

* more fix

* refactor even more stuff

* fix the grid fills

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2025-01-01 07:50:34 +00:00

26 lines
692 B
C#

using Content.Server.Shuttles.Events;
namespace Content.Server.Shipyard;
public sealed class MapDeleterShuttleSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MapDeleterShuttleComponent, FTLStartedEvent>(OnFTLStarted);
}
private void OnFTLStarted(Entity<MapDeleterShuttleComponent> ent, ref FTLStartedEvent args)
{
if (ent.Comp.Enabled)
Del(args.FromMapUid);
RemComp<MapDeleterShuttleComponent>(ent); // prevent the shuttle becoming a WMD
}
public void Enable(EntityUid shuttle)
{
EnsureComp<MapDeleterShuttleComponent>(shuttle).Enabled = true;
}
}