private void OnDestinationPressed(EntityUid obj)
{
- SendMessage(new ShuttleConsoleDestinationMessage()
+ SendMessage(new ShuttleConsoleFTLRequestMessage()
{
Destination = obj,
});
using Content.Server.Station.Components;
using Content.Shared.Chat;
using Content.Shared.Salvage;
+using Content.Shared.Shuttles.Components;
using Robust.Shared.Audio;
using Robust.Shared.Map.Components;
using Robust.Shared.Player;
Announce(args.MapUid, Loc.GetString("salvage-expedition-announcement-dungeon", ("direction", component.DungeonLocation.GetDir())));
component.Stage = ExpeditionStage.Running;
+ // At least for now stop them FTLing back until the mission is over.
+ EnsureComp<PreventPilotComponent>(args.Entity);
}
private void OnFTLStarted(ref FTLStartedEvent ev)
return;
}
+ // Let them pilot again when they get back.
+ RemCompDeferred<PreventPilotComponent>(ev.Entity);
+
// Check if any shuttles remain.
var query = EntityQueryEnumerator<ShuttleComponent, TransformComponent>();
SubscribeLocalEvent<ShuttleConsoleComponent, PowerChangedEvent>(OnConsolePowerChange);
SubscribeLocalEvent<ShuttleConsoleComponent, AnchorStateChangedEvent>(OnConsoleAnchorChange);
SubscribeLocalEvent<ShuttleConsoleComponent, ActivatableUIOpenAttemptEvent>(OnConsoleUIOpenAttempt);
- SubscribeLocalEvent<ShuttleConsoleComponent, ShuttleConsoleDestinationMessage>(OnDestinationMessage);
+ SubscribeLocalEvent<ShuttleConsoleComponent, ShuttleConsoleFTLRequestMessage>(OnDestinationMessage);
SubscribeLocalEvent<ShuttleConsoleComponent, BoundUIClosedEvent>(OnConsoleUIClose);
SubscribeLocalEvent<DockEvent>(OnDock);
RefreshShuttleConsoles();
}
- private void OnDestinationMessage(EntityUid uid, ShuttleConsoleComponent component, ShuttleConsoleDestinationMessage args)
+ private void OnDestinationMessage(EntityUid uid, ShuttleConsoleComponent component, ShuttleConsoleFTLRequestMessage args)
{
if (!TryComp<FTLDestinationComponent>(args.Destination, out var dest))
{
/// Raised on the client when it wishes to travel somewhere.
/// </summary>
[Serializable, NetSerializable]
-public sealed class ShuttleConsoleDestinationMessage : BoundUserInterfaceMessage
+public sealed class ShuttleConsoleFTLRequestMessage : BoundUserInterfaceMessage
{
public EntityUid Destination;
}