diff --git a/Content.Server/Body/Systems/BodySystem.cs b/Content.Server/Body/Systems/BodySystem.cs index 9014d3fe23..3189b02963 100644 --- a/Content.Server/Body/Systems/BodySystem.cs +++ b/Content.Server/Body/Systems/BodySystem.cs @@ -23,6 +23,7 @@ namespace Content.Server.Body.Systems; public sealed class BodySystem : SharedBodySystem { + [Dependency] private readonly BloodstreamSystem _bloodstream = default!; // Shitmed Change [Dependency] private readonly GhostSystem _ghostSystem = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!; @@ -195,5 +196,13 @@ public sealed class BodySystem : SharedBodySystem Dirty(target, bodyAppearance); } + protected override void PartRemoveDamage(Entity bodyEnt, Entity partEnt) + { + var bleeding = partEnt.Comp.SeverBleeding; + if (partEnt.Comp.IsVital) + bleeding *= 2f; + _bloodstream.TryModifyBleedAmount(bodyEnt, bleeding); + } + // Shitmed Change End } diff --git a/Content.Shared/Body/Part/BodyPartComponent.cs b/Content.Shared/Body/Part/BodyPartComponent.cs index ef5e7f0899..b9862c28c9 100644 --- a/Content.Shared/Body/Part/BodyPartComponent.cs +++ b/Content.Shared/Body/Part/BodyPartComponent.cs @@ -32,11 +32,11 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent public BodyPartSlot? ParentSlot; /// - /// Shitmed Change: Amount of damage to deal when the part gets removed. - /// Only works if IsVital is true. + /// Shitmed Change: Bleeding stacks to give when this body part is severed. + /// Doubled for . parts. /// - [DataField, AutoNetworkedField] - public FixedPoint2 VitalDamage = 100; + [DataField] + public float SeverBleeding = 4f; [DataField, AlwaysPushInheritance] public string ToolName { get; set; } = "A body part"; diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs index fabad1ecd3..d0f5b2cd7e 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs @@ -383,19 +383,9 @@ public partial class SharedBodySystem } } - private void PartRemoveDamage(Entity bodyEnt, Entity partEnt) + // Shitmed Change: made virtual, bleeding damage is done on server + protected virtual void PartRemoveDamage(Entity bodyEnt, Entity partEnt) { - if (!Resolve(bodyEnt, ref bodyEnt.Comp, logMissing: false)) - return; - - if (!_timing.ApplyingState - && partEnt.Comp.IsVital - && !GetBodyChildrenOfType(bodyEnt, partEnt.Comp.PartType, bodyEnt.Comp).Any() - ) - { - var damage = new DamageSpecifier(Prototypes.Index("Bloodloss"), partEnt.Comp.VitalDamage); // Shitmed Change - Damageable.TryChangeDamage(bodyEnt, damage, partMultiplier: 0f); // Shitmed Change - } } ///