Basic bleeding mechanics (#6710)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Threading;
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Server.DoAfter;
|
||||
using Content.Server.Medical.Components;
|
||||
using Content.Server.Stack;
|
||||
@@ -17,6 +18,7 @@ public sealed class HealingSystem : EntitySystem
|
||||
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
|
||||
[Dependency] private readonly AdminLogSystem _logs = default!;
|
||||
[Dependency] private readonly DamageableSystem _damageable = default!;
|
||||
[Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!;
|
||||
[Dependency] private readonly DoAfterSystem _doAfter = default!;
|
||||
[Dependency] private readonly StackSystem _stacks = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
|
||||
@@ -37,6 +39,12 @@ public sealed class HealingSystem : EntitySystem
|
||||
if (component.DamageContainerID is not null &&
|
||||
!component.DamageContainerID.Equals(component.DamageContainerID)) return;
|
||||
|
||||
if (args.Component.BloodlossModifier != 0)
|
||||
{
|
||||
// Heal some bloodloss damage.
|
||||
_bloodstreamSystem.TryModifyBleedAmount(uid, args.Component.BloodlossModifier);
|
||||
}
|
||||
|
||||
var healed = _damageable.TryChangeDamage(uid, args.Component.Damage, true);
|
||||
|
||||
// Reverify that we can heal the damage.
|
||||
|
||||
Reference in New Issue
Block a user