mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 05:59:03 +03:00
# Description Ports Security buffs from [/Goob-Station#953](https://github.com/Goob-Station/Goob-Station/pull/953) ## Once Again, I am John Combat I don't have the energy today for the witty PR jokes. Apologies, people. # TODO * [x] Oil floats on water * [x] Cover yourself in oil * [x] Wait for it to rain * [x] :trollface: # Media # Changelog 🆑 Eagle * add: Flashbangs now stun and knockdown people. Wear over-ear headset or combat hardsuit helmet to reduce flashbang effective range. * add: All sec and command members received over-ear headsets. * add: Wearing security, ert, syndie or deathsquad gas mask blocks smoke inhalation even if internals are off. * tweak: Epinephrine now speeds up by 10%. * add: Jackboots, combat and mercenary boots now reduce all stun and knockdown times by 20%. * add: Combat hardsuit helmets now protect from flashes. * tweak: Tear gas is now stronger. * tweak: Stamcrit stun time is once again 6 seconds. * tweak: Security hardsuits now have heat resistance. --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: Aviu00 <93730715+Aviu00@users.noreply.github.com> Co-authored-by: VMSolidus <evilexecutive@gmail.com> (cherry picked from commit 9bae47bc6d3e44fba8b86e18c78e6b0f3fe00ed6)
67 lines
2.4 KiB
C#
67 lines
2.4 KiB
C#
using Content.Shared.Alert;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
namespace Content.Shared.Damage.Components;
|
|
|
|
/// <summary>
|
|
/// Add to an entity to paralyze it whenever it reaches critical amounts of Stamina DamageType.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), AutoGenerateComponentPause]
|
|
public sealed partial class StaminaComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Have we reached peak stamina damage and been paralyzed?
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
|
public bool Critical;
|
|
|
|
/// <summary>
|
|
/// How much stamina reduces per second.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
|
public float Decay = 5f; // Stun meta
|
|
|
|
/// <summary>
|
|
/// How much time after receiving damage until stamina starts decreasing.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
|
public float Cooldown = 3f;
|
|
|
|
/// <summary>
|
|
/// How much stamina damage this entity has taken.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
|
public float StaminaDamage;
|
|
|
|
/// <summary>
|
|
/// How much stamina damage is required to entire stam crit.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
|
public float CritThreshold = 100f;
|
|
|
|
/// <summary>
|
|
/// A dictionary of active stamina drains, with the key being the source of the drain,
|
|
/// DrainRate how much it changes per tick, and ModifiesSpeed if it should slow down the user.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public Dictionary<EntityUid, (float DrainRate, bool ModifiesSpeed)> ActiveDrains = new();
|
|
|
|
/// <summary>
|
|
/// How long will this mob be stunned for?
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField]
|
|
public TimeSpan StunTime = TimeSpan.FromSeconds(6);
|
|
|
|
/// <summary>
|
|
/// To avoid continuously updating our data we track the last time we updated so we can extrapolate our current stamina.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField]
|
|
[AutoPausedField]
|
|
public TimeSpan NextUpdate = TimeSpan.Zero;
|
|
|
|
[DataField]
|
|
public ProtoId<AlertPrototype> StaminaAlert = "Stamina";
|
|
}
|