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

@@ -18,7 +18,9 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public class GasAnalyzerComponent : SharedGasAnalyzerComponent, IAfterInteract, IDropped, IUse
[ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(SharedGasAnalyzerComponent))]
public class GasAnalyzerComponent : SharedGasAnalyzerComponent, IAfterInteract, IDropped, IActivate
{
[Dependency] private readonly IEntityManager _entities = default!;
@@ -271,14 +273,14 @@ namespace Content.Server.Atmos.Components
}
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
void IActivate.Activate(ActivateEventArgs eventArgs)
{
if (_entities.TryGetComponent(eventArgs.User, out ActorComponent? actor))
{
ToggleInterface(actor.PlayerSession);
return true;
return;
}
return false;
return;
}
}
}