From 9c165cb5a079c3d7860c60c9e0b0d81421ef07f6 Mon Sep 17 00:00:00 2001 From: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Date: Tue, 6 May 2025 09:39:05 -0700 Subject: [PATCH] StaminaSystem to SharedStaminaSystem (#37199) * Init Commit * Partial class * Hands system slipped through --- Content.Client/Damage/Systems/StaminaSystem.cs | 7 +++++++ Content.Server/Damage/Systems/StaminaSystem.cs | 7 +++++++ Content.Server/Hands/Systems/HandsSystem.cs | 2 +- Content.Server/Weapons/Ranged/Systems/GunSystem.cs | 2 +- .../Damage/Components/StaminaDamageOnEmbedComponent.cs | 2 +- .../Damage/Components/StaminaModifierComponent.cs | 2 +- ...aSystem.Modifier.cs => SharedStaminaSystem.Modifier.cs} | 2 +- ...tem.Resistance.cs => SharedStaminaSystem.Resistance.cs} | 2 +- .../Systems/{StaminaSystem.cs => SharedStaminaSystem.cs} | 2 +- Content.Shared/Ensnaring/SharedEnsnareableSystem.cs | 2 +- Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs | 2 +- 11 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 Content.Client/Damage/Systems/StaminaSystem.cs create mode 100644 Content.Server/Damage/Systems/StaminaSystem.cs rename Content.Shared/Damage/Systems/{StaminaSystem.Modifier.cs => SharedStaminaSystem.Modifier.cs} (97%) rename Content.Shared/Damage/Systems/{StaminaSystem.Resistance.cs => SharedStaminaSystem.Resistance.cs} (96%) rename Content.Shared/Damage/Systems/{StaminaSystem.cs => SharedStaminaSystem.cs} (99%) diff --git a/Content.Client/Damage/Systems/StaminaSystem.cs b/Content.Client/Damage/Systems/StaminaSystem.cs new file mode 100644 index 0000000000..69eb461a7d --- /dev/null +++ b/Content.Client/Damage/Systems/StaminaSystem.cs @@ -0,0 +1,7 @@ +using Content.Shared.Damage.Systems; + +namespace Content.Client.Damage.Systems; + +public sealed partial class StaminaSystem : SharedStaminaSystem +{ +} diff --git a/Content.Server/Damage/Systems/StaminaSystem.cs b/Content.Server/Damage/Systems/StaminaSystem.cs new file mode 100644 index 0000000000..71f40b310d --- /dev/null +++ b/Content.Server/Damage/Systems/StaminaSystem.cs @@ -0,0 +1,7 @@ +using Content.Shared.Damage.Systems; + +namespace Content.Server.Damage.Systems; + +public sealed partial class StaminaSystem : SharedStaminaSystem +{ +} diff --git a/Content.Server/Hands/Systems/HandsSystem.cs b/Content.Server/Hands/Systems/HandsSystem.cs index e45ee550e1..ad8bf72674 100644 --- a/Content.Server/Hands/Systems/HandsSystem.cs +++ b/Content.Server/Hands/Systems/HandsSystem.cs @@ -52,7 +52,7 @@ namespace Content.Server.Hands.Systems { base.Initialize(); - SubscribeLocalEvent(OnDisarmed, before: new[] {typeof(StunSystem), typeof(StaminaSystem)}); + SubscribeLocalEvent(OnDisarmed, before: new[] {typeof(StunSystem), typeof(SharedStaminaSystem)}); SubscribeLocalEvent(HandlePullStarted); SubscribeLocalEvent(HandlePullStopped); diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs index b862281725..dd5edaac6b 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs @@ -33,7 +33,7 @@ public sealed partial class GunSystem : SharedGunSystem [Dependency] private readonly DamageExamineSystem _damageExamine = default!; [Dependency] private readonly PricingSystem _pricing = default!; [Dependency] private readonly SharedColorFlashEffectSystem _color = default!; - [Dependency] private readonly StaminaSystem _stamina = default!; + [Dependency] private readonly SharedStaminaSystem _stamina = default!; [Dependency] private readonly SharedContainerSystem _container = default!; [Dependency] private readonly PowerCellSystem _powerCell = default!; [Dependency] private readonly SharedMapSystem _map = default!; diff --git a/Content.Shared/Damage/Components/StaminaDamageOnEmbedComponent.cs b/Content.Shared/Damage/Components/StaminaDamageOnEmbedComponent.cs index 4ad4906246..97d7359b18 100644 --- a/Content.Shared/Damage/Components/StaminaDamageOnEmbedComponent.cs +++ b/Content.Shared/Damage/Components/StaminaDamageOnEmbedComponent.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Damage.Components; [RegisterComponent] [NetworkedComponent] [AutoGenerateComponentState] -[Access(typeof(StaminaSystem))] +[Access(typeof(SharedStaminaSystem))] public sealed partial class StaminaDamageOnEmbedComponent : Component { [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] diff --git a/Content.Shared/Damage/Components/StaminaModifierComponent.cs b/Content.Shared/Damage/Components/StaminaModifierComponent.cs index f054c77f7b..e492ea04ff 100644 --- a/Content.Shared/Damage/Components/StaminaModifierComponent.cs +++ b/Content.Shared/Damage/Components/StaminaModifierComponent.cs @@ -6,7 +6,7 @@ namespace Content.Shared.Damage.Components; /// /// Multiplies the entity's by the . /// -[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(StaminaSystem))] +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedStaminaSystem))] public sealed partial class StaminaModifierComponent : Component { /// diff --git a/Content.Shared/Damage/Systems/StaminaSystem.Modifier.cs b/Content.Shared/Damage/Systems/SharedStaminaSystem.Modifier.cs similarity index 97% rename from Content.Shared/Damage/Systems/StaminaSystem.Modifier.cs rename to Content.Shared/Damage/Systems/SharedStaminaSystem.Modifier.cs index aadf5a9dee..c723d8cb94 100644 --- a/Content.Shared/Damage/Systems/StaminaSystem.Modifier.cs +++ b/Content.Shared/Damage/Systems/SharedStaminaSystem.Modifier.cs @@ -2,7 +2,7 @@ using Content.Shared.Damage.Components; namespace Content.Shared.Damage.Systems; -public sealed partial class StaminaSystem +public partial class SharedStaminaSystem { private void InitializeModifier() { diff --git a/Content.Shared/Damage/Systems/StaminaSystem.Resistance.cs b/Content.Shared/Damage/Systems/SharedStaminaSystem.Resistance.cs similarity index 96% rename from Content.Shared/Damage/Systems/StaminaSystem.Resistance.cs rename to Content.Shared/Damage/Systems/SharedStaminaSystem.Resistance.cs index 9ad09b8f2f..f071bc1e66 100644 --- a/Content.Shared/Damage/Systems/StaminaSystem.Resistance.cs +++ b/Content.Shared/Damage/Systems/SharedStaminaSystem.Resistance.cs @@ -5,7 +5,7 @@ using Content.Shared.Inventory; namespace Content.Shared.Damage.Systems; -public sealed partial class StaminaSystem +public partial class SharedStaminaSystem { private void InitializeResistance() { diff --git a/Content.Shared/Damage/Systems/StaminaSystem.cs b/Content.Shared/Damage/Systems/SharedStaminaSystem.cs similarity index 99% rename from Content.Shared/Damage/Systems/StaminaSystem.cs rename to Content.Shared/Damage/Systems/SharedStaminaSystem.cs index 365b66b106..0da09d0f6d 100644 --- a/Content.Shared/Damage/Systems/StaminaSystem.cs +++ b/Content.Shared/Damage/Systems/SharedStaminaSystem.cs @@ -24,7 +24,7 @@ using Robust.Shared.Timing; namespace Content.Shared.Damage.Systems; -public sealed partial class StaminaSystem : EntitySystem +public abstract partial class SharedStaminaSystem : EntitySystem { [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly INetManager _net = default!; diff --git a/Content.Shared/Ensnaring/SharedEnsnareableSystem.cs b/Content.Shared/Ensnaring/SharedEnsnareableSystem.cs index d15e80a0e3..a8aca9dca0 100644 --- a/Content.Shared/Ensnaring/SharedEnsnareableSystem.cs +++ b/Content.Shared/Ensnaring/SharedEnsnareableSystem.cs @@ -32,7 +32,7 @@ public abstract class SharedEnsnareableSystem : EntitySystem [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly SharedHandsSystem _hands = default!; [Dependency] protected readonly SharedPopupSystem Popup = default!; - [Dependency] private readonly StaminaSystem _stamina = default!; + [Dependency] private readonly SharedStaminaSystem _stamina = default!; public override void Initialize() { diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index 59d1510d5f..cf9120f5f3 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -60,7 +60,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem [Dependency] private readonly SharedPhysicsSystem _physics = default!; [Dependency] protected readonly SharedPopupSystem PopupSystem = default!; [Dependency] protected readonly SharedTransformSystem TransformSystem = default!; - [Dependency] private readonly StaminaSystem _stamina = default!; + [Dependency] private readonly SharedStaminaSystem _stamina = default!; private const int AttackMask = (int) (CollisionGroup.MobMask | CollisionGroup.Opaque); -- 2.51.2