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

@@ -41,7 +41,8 @@ namespace Content.Server.Storage.Components
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(IStorageComponent))]
public class ServerStorageComponent : SharedStorageComponent, IInteractUsing, IUse, IActivate, IStorageComponent, IDestroyAct, IExAct, IAfterInteract
[ComponentReference(typeof(SharedStorageComponent))]
public class ServerStorageComponent : SharedStorageComponent, IInteractUsing, IActivate, IStorageComponent, IDestroyAct, IExAct, IAfterInteract
{
[Dependency] private readonly IEntityManager _entityManager = default!;
@@ -539,18 +540,10 @@ namespace Content.Server.Storage.Components
/// </summary>
/// <param name="eventArgs"></param>
/// <returns></returns>
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
void IActivate.Activate(ActivateEventArgs eventArgs)
{
EnsureInitialCalculated();
OpenStorageUI(eventArgs.User);
return false;
}
void IActivate.Activate(ActivateEventArgs eventArgs)
{
#pragma warning disable 618
((IUse) this).UseEntity(new UseEntityEventArgs(eventArgs.User));
#pragma warning restore 618
}
/// <summary>