@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using Content.Shared._White.StaminaProtection;
|
||||
using Content.Shared._White.StunLock;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.CombatMode;
|
||||
@@ -15,6 +16,7 @@ using Content.Shared.Rounding;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using Content.Shared.StatusEffect;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
@@ -35,6 +37,7 @@ public sealed partial class StaminaSystem : EntitySystem
|
||||
[Dependency] private readonly SharedColorFlashEffectSystem _color = default!;
|
||||
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!; // WD EDIT
|
||||
|
||||
/// <summary>
|
||||
/// How much of a buffer is there between the stun duration and when stuns can be re-applied.
|
||||
@@ -209,7 +212,7 @@ public sealed partial class StaminaSystem : EntitySystem
|
||||
damage = modifyEv.Damage;
|
||||
}
|
||||
|
||||
TakeStaminaDamage(target, damage, source: uid, sound: component.Sound);
|
||||
TakeStaminaDamage(target, damage, with: uid, sound: component.Sound);
|
||||
// WD EDIT END
|
||||
}
|
||||
|
||||
@@ -256,7 +259,11 @@ public sealed partial class StaminaSystem : EntitySystem
|
||||
|
||||
// Have we already reached the point of max stamina damage?
|
||||
if (component.Critical)
|
||||
{
|
||||
if (TryComp<StunLockComponent>(with, out _)) // WD EDIT
|
||||
_stunSystem.TryParalyze(uid, component.StunTime, true);
|
||||
return;
|
||||
}
|
||||
|
||||
var oldDamage = component.StaminaDamage;
|
||||
component.StaminaDamage = MathF.Max(0f, component.StaminaDamage + value);
|
||||
@@ -349,7 +356,7 @@ public sealed partial class StaminaSystem : EntitySystem
|
||||
continue;
|
||||
|
||||
// We were in crit so come out of it and continue.
|
||||
if (comp.Critical)
|
||||
if (!_statusEffectsSystem.HasStatusEffect(uid, "Stun") && comp.Critical) // WD EIT
|
||||
{
|
||||
ExitStamCrit(uid, comp);
|
||||
continue;
|
||||
|
||||
@@ -202,6 +202,9 @@ public abstract class SharedStunSystem : EntitySystem
|
||||
if (!Resolve(uid, ref status, false))
|
||||
return false;
|
||||
|
||||
if (_statusEffect.HasStatusEffect(uid, "Stun"))
|
||||
time = TimeSpan.FromSeconds(6);
|
||||
|
||||
return TryKnockdown(uid, time, refresh, status) && TryStun(uid, time, refresh, status);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public sealed class StaminaProtectionSystem : EntitySystem
|
||||
args.Args.Damage = MathF.Max(0f, args.Args.Damage - flat);
|
||||
|
||||
if (modifiers.Coefficients.TryGetValue("Blunt", out var coefficient))
|
||||
args.Args.Damage *= coefficient;
|
||||
args.Args.Damage *= coefficient / 1.5f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
7
Content.Shared/_White/StunLock/StunLockComponent.cs
Normal file
7
Content.Shared/_White/StunLock/StunLockComponent.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Content.Shared._White.StunLock;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class StunLockComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user