Make use-in-hand default to activation interactions. (#5951)

This commit is contained in:
Leon Friedrich
2022-01-05 02:23:01 +13:00
committed by GitHub
parent c4512e3c1a
commit f13f743c51
18 changed files with 58 additions and 116 deletions

View File

@@ -31,7 +31,7 @@ namespace Content.Server.Atmos.Components
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
#pragma warning disable 618
public class GasTankComponent : Component, IExamine, IGasMixtureHolder, IUse, IDropped, IActivate
public class GasTankComponent : Component, IExamine, IGasMixtureHolder, IDropped, IActivate
#pragma warning restore 618
{
[Dependency] private readonly IEntityManager _entMan = default!;
@@ -155,13 +155,6 @@ namespace Content.Server.Atmos.Components
return air;
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{
if (!_entMan.TryGetComponent(eventArgs.User, out ActorComponent? actor)) return false;
OpenInterface(actor.PlayerSession);
return true;
}
void IActivate.Activate(ActivateEventArgs eventArgs)
{
if (!_entMan.TryGetComponent(eventArgs.User, out ActorComponent? actor)) return;