Remove IDropped (#7075)
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Content.Server.Atmos.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedGasAnalyzerComponent))]
|
||||
public sealed class GasAnalyzerComponent : SharedGasAnalyzerComponent, IAfterInteract, IDropped
|
||||
public sealed class GasAnalyzerComponent : SharedGasAnalyzerComponent, IAfterInteract
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entities = default!;
|
||||
|
||||
@@ -256,13 +256,5 @@ namespace Content.Server.Atmos.Components
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
||||
{
|
||||
if (_entities.TryGetComponent(eventArgs.User, out ActorComponent? actor))
|
||||
{
|
||||
CloseInterface(actor.PlayerSession);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Content.Server.Atmos.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
#pragma warning disable 618
|
||||
public sealed class GasTankComponent : Component, IExamine, IGasMixtureHolder, IDropped
|
||||
public sealed class GasTankComponent : Component, IExamine, IGasMixtureHolder
|
||||
#pragma warning restore 618
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
@@ -31,8 +31,6 @@ namespace Content.Server.Atmos.Components
|
||||
|
||||
private int _integrity = 3;
|
||||
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
|
||||
[ViewVariables] private BoundUserInterface? _userInterface;
|
||||
|
||||
[DataField("ruptureSound")] private SoundSpecifier _ruptureSound = new SoundPathSpecifier("Audio/Effects/spray.ogg");
|
||||
@@ -289,10 +287,5 @@ namespace Content.Server.Atmos.Components
|
||||
if (_integrity < 3)
|
||||
_integrity++;
|
||||
}
|
||||
|
||||
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
||||
{
|
||||
DisconnectFromInternals(eventArgs.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Toggleable;
|
||||
using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
@@ -21,6 +22,12 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
SubscribeLocalEvent<GasTankComponent, GetVerbsEvent<ActivationVerb>>(AddOpenUIVerb);
|
||||
SubscribeLocalEvent<GasTankComponent, GetActionsEvent>(OnGetActions);
|
||||
SubscribeLocalEvent<GasTankComponent, ToggleActionEvent>(OnActionToggle);
|
||||
SubscribeLocalEvent<GasTankComponent, DroppedEvent>(OnDropped);
|
||||
}
|
||||
|
||||
private void OnDropped(EntityUid uid, GasTankComponent component, DroppedEvent args)
|
||||
{
|
||||
component.DisconnectFromInternals(args.User);
|
||||
}
|
||||
|
||||
private void OnGetActions(EntityUid uid, GasTankComponent component, GetActionsEvent args)
|
||||
|
||||
Reference in New Issue
Block a user