diff --git a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs index 463b488ea5..062b1d7918 100644 --- a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs @@ -44,6 +44,8 @@ namespace Content.Server.Nutrition.EntitySystems [Dependency] private readonly MobStateSystem _mobStateSystem = default!; [Dependency] private readonly SpillableSystem _spillableSystem = default!; [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; + [Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!; + [Dependency] private readonly SharedAudioSystem _audio = default!; public override void Initialize() { @@ -124,7 +126,7 @@ namespace Content.Server.Nutrition.EntitySystems if (EntityManager.TryGetComponent(uid, out var appearance)) { - appearance.SetData(DrinkCanStateVisual.Opened, opened); + _appearanceSystem.SetData(uid, DrinkCanStateVisual.Opened, opened, appearance); } } @@ -143,7 +145,7 @@ namespace Content.Server.Nutrition.EntitySystems if (!component.Opened) { //Do the opening stuff like playing the sounds. - SoundSystem.Play(component.OpenSounds.GetSound(), Filter.Pvs(args.User), args.User, AudioParams.Default); + _audio.PlayPvs(_audio.GetSound(component.OpenSounds), args.User); SetOpen(uid, true, component); return; @@ -165,7 +167,7 @@ namespace Content.Server.Nutrition.EntitySystems var solution = _solutionContainerSystem.Drain(uid, interactions, interactions.DrainAvailable); _spillableSystem.SpillAt(uid, solution, "PuddleSmear"); - SoundSystem.Play(component.BurstSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-4)); + _audio.PlayPvs(_audio.GetSound(component.BurstSound), uid, AudioParams.Default.WithVolume(-4)); } } @@ -206,8 +208,8 @@ namespace Content.Server.Nutrition.EntitySystems } var drainAvailable = _solutionContainerSystem.DrainAvailable((component).Owner); - appearance.SetData(FoodVisuals.Visual, drainAvailable.Float()); - appearance.SetData(DrinkCanStateVisual.Opened, component.Opened); + _appearanceSystem.SetData(component.Owner, FoodVisuals.Visual, drainAvailable.Float(), appearance); + _appearanceSystem.SetData(component.Owner, DrinkCanStateVisual.Opened, component.Opened, appearance); } private void OnTransferAttempt(EntityUid uid, DrinkComponent component, SolutionTransferAttemptEvent args) @@ -374,7 +376,7 @@ namespace Content.Server.Nutrition.EntitySystems _adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(args.User):target} drank {ToPrettyString(args.Drink.Owner):drink}"); } - SoundSystem.Play(args.Drink.UseSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-2f)); + _audio.PlayPvs(_audio.GetSound(args.Drink.UseSound), uid, AudioParams.Default.WithVolume(-2f)); drained.DoEntityReaction(uid, ReactionMethod.Ingestion); _stomachSystem.TryTransferSolution(firstStomach.Value.Comp.Owner, drained, firstStomach.Value.Comp);