Reduce action blocker uses and add target entity to CanInteract (#6655)
This commit is contained in:
@@ -44,9 +44,6 @@ namespace Content.Server.Weapon.Melee.EnergySword
|
||||
{
|
||||
if (args.Handled) return;
|
||||
|
||||
if (!_blockerSystem.CanUse(args.User))
|
||||
return;
|
||||
|
||||
args.Handled = true;
|
||||
|
||||
if (comp.Activated)
|
||||
@@ -114,7 +111,7 @@ namespace Content.Server.Weapon.Melee.EnergySword
|
||||
{
|
||||
if (args.Handled) return;
|
||||
|
||||
if (comp.Hacked || !_blockerSystem.CanInteract(args.User))
|
||||
if (comp.Hacked)
|
||||
return;
|
||||
|
||||
if (!TryComp(args.Used, out ToolComponent? tool) || !tool.Qualities.ContainsAny("Pulsing")) return;
|
||||
|
||||
@@ -40,7 +40,7 @@ public sealed partial class GunSystem
|
||||
|
||||
if (!TryComp(user, out CombatModeComponent? combat) ||
|
||||
!combat.IsInCombatMode ||
|
||||
!_blocker.CanInteract(user)) return;
|
||||
!_blocker.CanInteract(user, gun.Owner)) return;
|
||||
|
||||
var fireAttempt = new GunFireAttemptEvent(user, gun);
|
||||
EntityManager.EventBus.RaiseLocalEvent(gun.Owner, fireAttempt);
|
||||
|
||||
Reference in New Issue
Block a user