Replace IClickAlert with events (#30728)
* Replace IAlertClick with events * whoop * eek!
This commit is contained in:
@@ -71,6 +71,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
|
||||
SubscribeLocalEvent<UndockEvent>(OnUndock);
|
||||
|
||||
SubscribeLocalEvent<PilotComponent, ComponentGetState>(OnGetState);
|
||||
SubscribeLocalEvent<PilotComponent, StopPilotingAlertEvent>(OnStopPilotingAlert);
|
||||
|
||||
SubscribeLocalEvent<FTLDestinationComponent, ComponentStartup>(OnFtlDestStartup);
|
||||
SubscribeLocalEvent<FTLDestinationComponent, ComponentShutdown>(OnFtlDestShutdown);
|
||||
@@ -196,6 +197,14 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
|
||||
args.State = new PilotComponentState(GetNetEntity(component.Console));
|
||||
}
|
||||
|
||||
private void OnStopPilotingAlert(Entity<PilotComponent> ent, ref StopPilotingAlertEvent args)
|
||||
{
|
||||
if (ent.Comp.Console != null)
|
||||
{
|
||||
RemovePilot(ent, ent);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the position and angle of all dockingcomponents.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user