- add: Update blood dagger. (#281)

This commit is contained in:
Aviu00
2024-04-12 23:08:17 +09:00
committed by GitHub
parent 6abfa020a2
commit 7632c7c99d
5 changed files with 107 additions and 28 deletions

View File

@@ -6,6 +6,7 @@ using Content.Server.Forensics;
using Content.Server.HealthExaminable;
using Content.Server.Popups;
using Content.Server._White.EndOfRoundStats.BloodLost;
using Content.Server._White.Other.CritSystem;
using Content.Shared.Alert;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
@@ -16,6 +17,7 @@ using Content.Shared.Drunk;
using Content.Shared.FixedPoint;
using Content.Shared.IdentityManagement;
using Content.Shared.Mobs.Systems;
using Content.Shared.Movement.Systems;
using Content.Shared.Popups;
using Content.Shared.Rejuvenate;
using Content.Shared.Speech.EntitySystems;
@@ -39,6 +41,7 @@ public sealed class BloodstreamSystem : EntitySystem
[Dependency] private readonly SharedStutteringSystem _stutteringSystem = default!;
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
[Dependency] private readonly ForensicsSystem _forensicsSystem = default!;
[Dependency] private readonly MovementSpeedModifierSystem _speed = default!; // WD
public override void Initialize()
{
@@ -385,6 +388,14 @@ public sealed class BloodstreamSystem : EntitySystem
component.BleedAmount += amount;
component.BleedAmount = Math.Clamp(component.BleedAmount, 0, component.MaxBleedAmount);
if (HasComp<BloodLustComponent>(uid)) // WD
{
if (component.BleedAmount == 0f)
RemComp<BloodLustComponent>(uid);
_speed.RefreshMovementSpeedModifiers(uid);
}
if (component.BleedAmount == 0)
_alertsSystem.ClearAlert(uid, AlertType.Bleed);
else