@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
@@ -59,6 +59,7 @@
|
||||
max: 2
|
||||
- type: StaticPrice
|
||||
price: 50
|
||||
- type: DisarmMalus
|
||||
|
||||
#Security Shields
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
Blunt: 3
|
||||
- type: StaminaDamageOnCollide
|
||||
ignoreResistances: false
|
||||
damage: 35 # 3 hits to stun cuz revolver
|
||||
damage: 45 # 3 hits to stun cuz revolver
|
||||
|
||||
- type: entity
|
||||
id: BulletMagnumIncendiary
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
Blunt: 10
|
||||
- type: StaminaDamageOnCollide
|
||||
ignoreResistances: false
|
||||
damage: 60
|
||||
damage: 80
|
||||
|
||||
- type: entity
|
||||
id: PelletShotgun
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
path: /Audio/Weapons/Guns/Hits/snap.ogg
|
||||
- type: StaminaDamageOnCollide
|
||||
ignoreResistances: false
|
||||
damage: 22 # 5 hits to stun sounds reasonable
|
||||
damage: 33 # Wd EDIT
|
||||
|
||||
- type: entity
|
||||
id: BaseBulletIncendiary
|
||||
@@ -756,6 +756,7 @@
|
||||
- state: grenade
|
||||
- type: FlashOnTrigger
|
||||
range: 7
|
||||
forceStun: true # WD EDIT
|
||||
- type: SpawnOnTrigger
|
||||
proto: GrenadeFlashEffect
|
||||
- type: ActiveTimerTrigger
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
- type: GuideHelp
|
||||
guides:
|
||||
- Security
|
||||
- type: StunLock # Wd EDIT
|
||||
|
||||
- type: entity
|
||||
name: truncheon
|
||||
|
||||
Reference in New Issue
Block a user