mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 00:27:59 +00:00
* 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>
26 lines
692 B
C#
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;
|
|
}
|
|
}
|