]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
StaminaSystem to SharedStaminaSystem (#37199)
authorPrincess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Tue, 6 May 2025 16:39:05 +0000 (09:39 -0700)
committerGitHub <noreply@github.com>
Tue, 6 May 2025 16:39:05 +0000 (12:39 -0400)
* Init Commit

* Partial class

* Hands system slipped through

Content.Client/Damage/Systems/StaminaSystem.cs [new file with mode: 0644]
Content.Server/Damage/Systems/StaminaSystem.cs [new file with mode: 0644]
Content.Server/Hands/Systems/HandsSystem.cs
Content.Server/Weapons/Ranged/Systems/GunSystem.cs
Content.Shared/Damage/Components/StaminaDamageOnEmbedComponent.cs
Content.Shared/Damage/Components/StaminaModifierComponent.cs
Content.Shared/Damage/Systems/SharedStaminaSystem.Modifier.cs [moved from Content.Shared/Damage/Systems/StaminaSystem.Modifier.cs with 97% similarity]
Content.Shared/Damage/Systems/SharedStaminaSystem.Resistance.cs [moved from Content.Shared/Damage/Systems/StaminaSystem.Resistance.cs with 96% similarity]
Content.Shared/Damage/Systems/SharedStaminaSystem.cs [moved from Content.Shared/Damage/Systems/StaminaSystem.cs with 99% similarity]
Content.Shared/Ensnaring/SharedEnsnareableSystem.cs
Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs

diff --git a/Content.Client/Damage/Systems/StaminaSystem.cs b/Content.Client/Damage/Systems/StaminaSystem.cs
new file mode 100644 (file)
index 0000000..69eb461
--- /dev/null
@@ -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 (file)
index 0000000..71f40b3
--- /dev/null
@@ -0,0 +1,7 @@
+using Content.Shared.Damage.Systems;
+
+namespace Content.Server.Damage.Systems;
+
+public sealed partial class StaminaSystem : SharedStaminaSystem
+{
+}
index e45ee550e1f42a278813ffc3e485ae0443b56ac2..ad8bf72674588251467785f7e2b1cb83715b4130 100644 (file)
@@ -52,7 +52,7 @@ namespace Content.Server.Hands.Systems
         {
             base.Initialize();
 
-            SubscribeLocalEvent<HandsComponent, DisarmedEvent>(OnDisarmed, before: new[] {typeof(StunSystem), typeof(StaminaSystem)});
+            SubscribeLocalEvent<HandsComponent, DisarmedEvent>(OnDisarmed, before: new[] {typeof(StunSystem), typeof(SharedStaminaSystem)});
 
             SubscribeLocalEvent<HandsComponent, PullStartedMessage>(HandlePullStarted);
             SubscribeLocalEvent<HandsComponent, PullStoppedMessage>(HandlePullStopped);
index b8622817259657adcd5cc89f3089646faad20a5e..dd5edaac6b6eac02ab4019801e2f4c16e6b9ea8b 100644 (file)
@@ -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!;
index 4ad49062463af708d3b3ec1a24a4303266302f82..97d7359b18e78f91ea8a226c62299d3760e533cc 100644 (file)
@@ -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]
index f054c77f7be61562a7f47f9da73ee87e6ea70f3a..e492ea04ffe96657a5c551220c588ac470aef8c0 100644 (file)
@@ -6,7 +6,7 @@ namespace Content.Shared.Damage.Components;
 /// <summary>
 /// Multiplies the entity's <see cref="StaminaComponent.StaminaDamage"/> by the <see cref="Modifier"/>.
 /// </summary>
-[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(StaminaSystem))]
+[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedStaminaSystem))]
 public sealed partial class StaminaModifierComponent : Component
 {
     /// <summary>
similarity index 97%
rename from Content.Shared/Damage/Systems/StaminaSystem.Modifier.cs
rename to Content.Shared/Damage/Systems/SharedStaminaSystem.Modifier.cs
index aadf5a9deea3b94664f7d38181c8e809d0d3c0f2..c723d8cb949fc10f7a8419ac72746df5822b0d01 100644 (file)
@@ -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()
     {
similarity index 96%
rename from Content.Shared/Damage/Systems/StaminaSystem.Resistance.cs
rename to Content.Shared/Damage/Systems/SharedStaminaSystem.Resistance.cs
index 9ad09b8f2f80b7c7b8551ed33d85868be2c37c31..f071bc1e66463558c046c3188612319b817ce49c 100644 (file)
@@ -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()
     {
similarity index 99%
rename from Content.Shared/Damage/Systems/StaminaSystem.cs
rename to Content.Shared/Damage/Systems/SharedStaminaSystem.cs
index 365b66b10641ec4eb3daf770fa55812499692525..0da09d0f6d872f8d7daedee9429daba3f2fda408 100644 (file)
@@ -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!;
index d15e80a0e30a6f503bf63ee0c864b625a5df4e23..a8aca9dca01390bac97e143da83a485f1e1c8caa 100644 (file)
@@ -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()
     {
index 59d1510d5f9a03e421519e50f405145996d65c03..cf9120f5f331b7257ed3dae830ca33318c2c799e 100644 (file)
@@ -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);