Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defib no longer revives dead people #2091

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Content.Server/Medical/DefibrillatorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ public void Zap(EntityUid uid, EntityUid target, EntityUid user, DefibrillatorCo
}
else
{
if (_mobState.IsDead(target, mob))
if (_mobState.IsCritical(target, mob)) //DeltaV - change to only work on critical
_damageable.TryChangeDamage(target, component.ZapHeal, true, origin: uid);

if (_mobThreshold.TryGetThresholdForState(target, MobState.Dead, out var threshold) &&
if (_mobThreshold.TryGetThresholdForState(target, MobState.Critical, out var threshold) &&
TryComp<DamageableComponent>(target, out var damageableComponent) &&
damageableComponent.TotalDamage < threshold)
{
_mobState.ChangeMobState(target, MobState.Critical, mob, uid);
dead = false;
dead = true;
}

if (_mind.TryGetMind(target, out _, out var mind) &&
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Mobs/Species/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
state: "creampie_human"
visible: false
- type: DamageVisuals
thresholds: [ 10, 20, 30, 50, 70, 100 ]
thresholds: [ 10, 20, 30, 50, 70, 120 ] #DeltaV, crit went up in base.yml
targetLayers:
- "enum.HumanoidVisualLayers.Chest"
- "enum.HumanoidVisualLayers.Head"
Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/Entities/Mobs/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
- type: MobThresholds
thresholds:
0: Alive
100: Critical
200: Dead
120: Critical #DeltaV, make it harder to die because no defib
300: Dead #DeltaV, make it harder to die because no defib
- type: MobStateActions
actions:
Critical:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- type: Defibrillator
zapHeal:
types:
Asphyxiation: -40
Asphyxiation: -100 #DeltaV, doesnt revive dead anymore but reduces massive amounts of aspyx.
- type: DoAfter
- type: UseDelay
- type: StaticPrice
Expand Down
Loading