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

@@ -1,9 +1,6 @@
using Content.Server.Alert;
using Content.Server.Atmos.Components;
using Content.Shared.Actions;
using Content.Shared.Actions.Behaviors.Item;
using Content.Shared.Actions.Components;
using Content.Shared.Alert;
using Content.Shared.Clothing;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
@@ -20,14 +17,12 @@ namespace Content.Server.Clothing.Components
{
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
public sealed class MagbootsComponent : SharedMagbootsComponent, IUse, IActivate
public sealed class MagbootsComponent : SharedMagbootsComponent, IActivate
{
[ComponentDependency] private SharedItemComponent? _item = null;
[ComponentDependency] private ItemActionsComponent? _itemActions = null;
[ComponentDependency] private SpriteComponent? _sprite = null;
[Dependency] private readonly IEntityManager _entMan = default!;
private bool _on;
[ViewVariables]
@@ -58,12 +53,6 @@ namespace Content.Server.Clothing.Components
On = !On;
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{
Toggle(eventArgs.User);
return true;
}
void IActivate.Activate(ActivateEventArgs eventArgs)
{
Toggle(eventArgs.User);