diff --git a/Content.Shared/Nutrition/Components/EdibleComponent.cs b/Content.Shared/Nutrition/Components/EdibleComponent.cs index 4fcd9770eb..bff56984a1 100644 --- a/Content.Shared/Nutrition/Components/EdibleComponent.cs +++ b/Content.Shared/Nutrition/Components/EdibleComponent.cs @@ -2,6 +2,7 @@ using Content.Shared.FixedPoint; using Content.Shared.Nutrition.EntitySystems; using Content.Shared.Nutrition.Prototypes; +using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; @@ -78,6 +79,13 @@ public sealed partial class EdibleComponent : Component [DataField] public bool RequireDead = true; + /// + /// An optional override for the sound made when consuming this item. + /// Useful for if an edible type doesn't justify a new prototype, like with plushies. + /// + [DataField] + public SoundSpecifier? UseSound; + /// /// Verb, icon, and sound data for our edible. /// diff --git a/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs b/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs index 470747fa3f..284bb866f7 100644 --- a/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs +++ b/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs @@ -449,7 +449,7 @@ public sealed partial class IngestionSystem : EntitySystem var edible = _proto.Index(entity.Comp.Edible); - _audio.PlayPredicted(edible.UseSound, args.Target, args.User); + _audio.PlayPredicted(entity.Comp.UseSound ?? edible.UseSound, args.Target, args.User); var flavors = _flavorProfile.GetLocalizedFlavorsMessage(entity.Owner, args.Target, args.Split);