diff --git a/Content.Server/Execution/ExecutionSystem.cs b/Content.Server/Execution/ExecutionSystem.cs index 326aa1d6a4..75cc681704 100644 --- a/Content.Server/Execution/ExecutionSystem.cs +++ b/Content.Server/Execution/ExecutionSystem.cs @@ -43,7 +43,7 @@ public sealed class ExecutionSystem : EntitySystem private const float MeleeExecutionTimeModifier = 5.0f; private const float GunExecutionTime = 6.0f; - private const float DamageModifier = 9.0f; + private const float DamageModifier = 20.0f; // WD EDIT /// public override void Initialize() @@ -133,6 +133,9 @@ private bool CanExecuteWithAny(EntityUid weapon, EntityUid victim, EntityUid att if (!_actionBlockerSystem.CanAttack(attacker, victim)) return false; + // WD EDIT START + /* + // The victim must be incapacitated to be executed if (victim != attacker && _actionBlockerSystem.CanInteract(victim, null)) return false; @@ -140,6 +143,9 @@ private bool CanExecuteWithAny(EntityUid weapon, EntityUid victim, EntityUid att if (victim == attacker) return false; // DeltaV - Fucking seriously? + */ + //WD EDIT END + // All checks passed return true; } @@ -201,6 +207,22 @@ private void TryStartGunExecutionDoafter(EntityUid weapon, EntityUid victim, Ent if (!CanExecuteWithGun(weapon, victim, attacker)) return; + // WD EDIT START + + // Raise an event to see if any system can cancel the shot + var attemptEv = new AttemptShootEvent(attacker, null); + RaiseLocalEvent(weapon, ref attemptEv); + + if (attemptEv.Cancelled) + { + if (attemptEv.Message != null) + { + _popupSystem.PopupEntity(attemptEv.Message, weapon, attacker); + return; + } + } + // WD EDIT END + if (attacker == victim) { ShowExecutionPopup("suicide-popup-gun-initial-internal", Filter.Entities(attacker), PopupType.Medium, attacker, victim, weapon); @@ -292,19 +314,6 @@ private void OnDoafterGun(EntityUid uid, GunComponent component, DoAfterEvent ar if (prevention.Cancelled) return; - // Not sure what this is for but gunsystem uses it so ehhh - var attemptEv = new AttemptShootEvent(attacker, null); - RaiseLocalEvent(weapon, ref attemptEv); - - if (attemptEv.Cancelled) - { - if (attemptEv.Message != null) - { - _popupSystem.PopupClient(attemptEv.Message, weapon, attacker); - return; - } - } - // Take some ammunition for the shot (one bullet) var fromCoordinates = Transform(attacker).Coordinates; var ev = new TakeAmmoEvent(1, new List<(EntityUid? Entity, IShootable Shootable)>(), fromCoordinates, attacker);