Various system spring cleaning (#36206)

* Various systems warnings cleanup

* Last changes before submitting PR

* Add guard for transform component, fix failing test

* Small corrections

* Audio params to specifiers datafields

* Using audio params on components and configs
This commit is contained in:
J
2025-04-16 11:08:22 +00:00
committed by GitHub
parent 2a80540b70
commit b1c08582d5
27 changed files with 101 additions and 46 deletions

View File

@@ -5,7 +5,6 @@ using Content.Server.Medical.Components;
using Content.Server.Popups;
using Content.Server.Stack;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Audio;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.DoAfter;
@@ -21,6 +20,7 @@ using Content.Shared.Popups;
using Content.Shared.Stacks;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Random;
using Robust.Shared.Audio;
namespace Content.Server.Medical;
@@ -31,7 +31,6 @@ public sealed class HealingSystem : EntitySystem
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly StackSystem _stacks = default!;
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
[Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!;
@@ -115,7 +114,7 @@ public sealed class HealingSystem : EntitySystem
$"{EntityManager.ToPrettyString(args.User):user} healed themselves for {total:damage} damage");
}
_audio.PlayPvs(healing.HealingEndSound, entity.Owner, AudioHelpers.WithVariation(0.125f, _random).WithVolume(1f));
_audio.PlayPvs(healing.HealingEndSound, entity.Owner);
// Logic to determine the whether or not to repeat the healing action
args.Repeat = (HasDamage(entity, healing) && !dontRepeat);
@@ -198,8 +197,7 @@ public sealed class HealingSystem : EntitySystem
return false;
}
_audio.PlayPvs(component.HealingBeginSound, uid,
AudioHelpers.WithVariation(0.125f, _random).WithVolume(1f));
_audio.PlayPvs(component.HealingBeginSound, uid);
var isNotSelf = user != target;