Merge remote-tracking branch 'upstream/stable' into ed-311-03-2025-upstream-2
# Conflicts: # Content.Client/Administration/AdminNameOverlay.cs # Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml # Content.Client/Guidebook/Controls/GuideReagentReaction.xaml # Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs # Content.Client/SubFloor/SubFloorHideSystem.cs # Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs # Content.Server/Antag/AntagSelectionSystem.cs # Content.Server/Cloning/CloningSystem.cs # Content.Server/GameTicking/Rules/Components/ParadoxCloneRuleComponent.cs # Content.Server/GameTicking/Rules/ParadoxCloneRuleSystem.cs # Content.Server/Roles/ParadoxCloneRoleComponent.cs # Content.Shared.Database/LogType.cs # Content.Shared/CCVar/CCVars.Interface.cs # Content.Shared/Cloning/CloningEvents.cs # Content.Shared/Cloning/CloningSettingsPrototype.cs # Content.Shared/Humanoid/NamingSystem.cs # Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs # Content.Shared/Light/Components/SunShadowCycleComponent.cs # Content.Shared/Storage/StorageComponent.cs # Resources/Changelog/Admin.yml # Resources/Changelog/Changelog.yml # Resources/Credits/GitHub.txt # Resources/Locale/en-US/paradox-clone/role.ftl # Resources/Maps/bagel.yml # Resources/Maps/loop.yml # Resources/Prototypes/Chemistry/mixing_types.yml # Resources/Prototypes/Datasets/Names/last.yml # Resources/Prototypes/Entities/Effects/puddle.yml # Resources/Prototypes/Entities/Mobs/Player/clone.yml # Resources/Prototypes/Entities/Mobs/Species/base.yml # Resources/Prototypes/Entities/Objects/Deliveries/deliveries_tables.yml # Resources/Prototypes/Entities/Objects/Devices/pda.yml # Resources/Prototypes/Entities/Objects/Tools/handheld_mass_scanner.yml # Resources/Prototypes/GameRules/events.yml # Resources/Prototypes/Maps/Pools/default.yml # Resources/Prototypes/Objectives/paradoxClone.yml # Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml # Resources/Textures/Clothing/Eyes/Glasses/jensen.rsi/equipped-EYES-arachnid.png
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Linq;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.CombatMode;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Damage.Events;
|
||||
@@ -17,6 +18,7 @@ using Content.Shared.Weapons.Melee.Events;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
@@ -34,12 +36,15 @@ 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 IConfigurationManager _config = default!;
|
||||
|
||||
/// <summary>
|
||||
/// How much of a buffer is there between the stun duration and when stuns can be re-applied.
|
||||
/// </summary>
|
||||
private static readonly TimeSpan StamCritBufferTime = TimeSpan.FromSeconds(3f);
|
||||
|
||||
public float UniversalStaminaDamageModifier { get; private set; } = 1f;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -58,6 +63,8 @@ public sealed partial class StaminaSystem : EntitySystem
|
||||
SubscribeLocalEvent<StaminaDamageOnCollideComponent, ThrowDoHitEvent>(OnThrowHit);
|
||||
|
||||
SubscribeLocalEvent<StaminaDamageOnHitComponent, MeleeHitEvent>(OnMeleeHit);
|
||||
|
||||
Subs.CVar(_config, CCVars.PlaytestStaminaDamageModifier, value => UniversalStaminaDamageModifier = value, true);
|
||||
}
|
||||
|
||||
private void OnStamHandleState(EntityUid uid, StaminaComponent component, ref AfterAutoHandleStateEvent args)
|
||||
@@ -243,6 +250,8 @@ public sealed partial class StaminaSystem : EntitySystem
|
||||
if (ev.Cancelled)
|
||||
return;
|
||||
|
||||
value = UniversalStaminaDamageModifier * value;
|
||||
|
||||
// Have we already reached the point of max stamina damage?
|
||||
if (component.Critical)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user