Defibrillator (#15922)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Nemanja
2023-05-02 20:10:19 -04:00
committed by GitHub
parent 32b29fb05a
commit 0604c93d50
38 changed files with 796 additions and 56 deletions

View File

@@ -30,7 +30,6 @@ public sealed class HealingSystem : EntitySystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly StackSystem _stacks = default!;
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
[Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
@@ -49,7 +48,7 @@ public sealed class HealingSystem : EntitySystem
if (!TryComp(args.Used, out HealingComponent? healing))
return;
if (args.Handled || args.Cancelled || _mobStateSystem.IsDead(uid))
if (args.Handled || args.Cancelled)
return;
if (component.DamageContainerID is not null && !component.DamageContainerID.Equals(component.DamageContainerID))
@@ -138,7 +137,7 @@ public sealed class HealingSystem : EntitySystem
private bool TryHeal(EntityUid uid, EntityUid user, EntityUid target, HealingComponent component)
{
if (_mobStateSystem.IsDead(target) || !TryComp<DamageableComponent>(target, out var targetDamage))
if (!TryComp<DamageableComponent>(target, out var targetDamage))
return false;
if (component.DamageContainerID is not null &&