Merge branch 'master' into 2020-04-28-tool-component
# Conflicts: # Content.Server/GameObjects/Components/AnchorableComponent.cs # Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs # Content.Server/GameObjects/Components/Doors/AirlockComponent.cs # Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs # Content.Server/GameObjects/Components/Interactable/Tools/CrowbarComponent.cs # Content.Server/GameObjects/Components/Power/PowerTransferComponent.cs # Content.Server/GameObjects/Components/WiresComponent.cs
This commit is contained in:
@@ -28,7 +28,7 @@ using Robust.Shared.Utility;
|
||||
namespace Content.Server.GameObjects.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class WiresComponent : SharedWiresComponent, IAttackBy, IExamine
|
||||
public class WiresComponent : SharedWiresComponent, IInteractUsing, IExamine
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IRobustRandom _random;
|
||||
@@ -298,9 +298,9 @@ namespace Content.Server.GameObjects.Components
|
||||
_userInterface.SetState(new WiresBoundUserInterfaceState(clientList, _statuses.Values.ToList()));
|
||||
}
|
||||
|
||||
bool IAttackBy.AttackBy(AttackByEventArgs eventArgs)
|
||||
bool IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.AttackWith.TryGetComponent<ToolComponent>(out var tool))
|
||||
if (!eventArgs.Using.TryGetComponent<ToolComponent>(out var tool))
|
||||
return false;
|
||||
if (!tool.UseTool(eventArgs.User, Owner, ToolQuality.Screwing))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user