address reviews
This commit is contained in:
@@ -119,7 +119,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!OnHitEntities(hitEntities, eventArgs)) return true;
|
if(!OnHitEntities(hitEntities, eventArgs)) return false;
|
||||||
|
|
||||||
if (Arc != null)
|
if (Arc != null)
|
||||||
{
|
{
|
||||||
@@ -161,7 +161,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
audioSystem.PlayFromEntity(_missSound, eventArgs.User);
|
audioSystem.PlayFromEntity(_missSound, eventArgs.User);
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target.TryGetComponent(out IDamageableComponent damageComponent))
|
if (target.TryGetComponent(out IDamageableComponent damageComponent))
|
||||||
@@ -172,7 +172,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
var targets = new[] {target};
|
var targets = new[] {target};
|
||||||
|
|
||||||
if (!OnHitEntities(targets, eventArgs))
|
if (!OnHitEntities(targets, eventArgs))
|
||||||
return true;
|
return false;
|
||||||
|
|
||||||
if (ClickArc != null)
|
if (ClickArc != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,12 +26,16 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
|||||||
ClickLocation = clickLocation;
|
ClickLocation = clickLocation;
|
||||||
WideAttack = wideAttack;
|
WideAttack = wideAttack;
|
||||||
Target = target;
|
Target = target;
|
||||||
|
|
||||||
|
IEntity? targetEntity = null;
|
||||||
|
IoCManager.Resolve<IEntityManager>()?.TryGetEntity(Target, out targetEntity);
|
||||||
|
TargetEntity = targetEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEntity User { get; }
|
public IEntity User { get; }
|
||||||
public GridCoordinates ClickLocation { get; }
|
public GridCoordinates ClickLocation { get; }
|
||||||
public bool WideAttack { get; }
|
public bool WideAttack { get; }
|
||||||
public EntityUid Target { get; }
|
public EntityUid Target { get; }
|
||||||
public IEntity? TargetEntity => Target.IsValid() ? IoCManager.Resolve<IEntityManager>()?.GetEntity(Target) ?? null : null;
|
public IEntity? TargetEntity { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user