This commit is contained in:
Clyybber
2020-05-23 17:23:25 +02:00
committed by GitHub
parent 05b910d9db
commit 1ad9a10050
40 changed files with 200 additions and 199 deletions

View File

@@ -20,7 +20,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
/// containers, and can directly inject into a mobs bloodstream.
/// </summary>
[RegisterComponent]
public class InjectorComponent : SharedInjectorComponent, IAfterAttack, IUse
public class InjectorComponent : SharedInjectorComponent, IAfterInteract, IUse
{
#pragma warning disable 649
[Dependency] private readonly IServerNotifyManager _notifyManager;
@@ -109,17 +109,17 @@ namespace Content.Server.GameObjects.Components.Chemistry
/// Called when clicking on entities while holding in active hand
/// </summary>
/// <param name="eventArgs"></param>
void IAfterAttack.AfterAttack(AfterAttackEventArgs eventArgs)
void IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{
if (!InteractionChecks.InRangeUnobstructed(eventArgs)) return;
//Make sure we have the attacking entity
if (eventArgs.Attacked == null || !_internalContents.Injector)
if (eventArgs.Target == null || !_internalContents.Injector)
{
return;
}
var targetEntity = eventArgs.Attacked;
var targetEntity = eventArgs.Target;
//Handle injecting/drawing for solutions
if (targetEntity.TryGetComponent<SolutionComponent>(out var targetSolution) && targetSolution.Injectable)
{