diff --git a/Content.Server/Nutrition/EntitySystems/FlavorProfileSystem.cs b/Content.Server/Nutrition/EntitySystems/FlavorProfileSystem.cs index 3c5a9c3c14..c1e71c0f3e 100644 --- a/Content.Server/Nutrition/EntitySystems/FlavorProfileSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FlavorProfileSystem.cs @@ -25,13 +25,12 @@ public sealed class FlavorProfileSystem : EntitySystem public string GetLocalizedFlavorsMessage(EntityUid uid, EntityUid user, Solution solution, FlavorProfileComponent? flavorProfile = null) { - var flavors = new HashSet(); if (!Resolve(uid, ref flavorProfile, false)) { return Loc.GetString(BackupFlavorMessage); } - flavors.UnionWith(flavorProfile.Flavors); + var flavors = new HashSet(flavorProfile.Flavors); flavors.UnionWith(GetFlavorsFromReagents(solution, FlavorLimit - flavors.Count, flavorProfile.IgnoreReagents)); var ev = new FlavorProfileModificationEvent(user, flavors); @@ -96,7 +95,14 @@ public sealed class FlavorProfileSystem : EntitySystem break; } - var flavor = _prototypeManager.Index(reagent.ReagentId).Flavor; + var proto = _prototypeManager.Index(reagent.ReagentId); + // don't care if the quantity is negligible + if (reagent.Quantity < proto.FlavorMinimum) + { + continue; + } + + var flavor = proto.Flavor; flavors.Add(flavor); } diff --git a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs index 51bd6c4fe6..3c15174362 100644 --- a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs @@ -63,6 +63,12 @@ namespace Content.Shared.Chemistry.Reagent [DataField("flavor")] public string Flavor { get; } = default!; + /// + /// There must be at least this much quantity in a solution to be tasted. + /// + [DataField("flavorMinimum")] + public FixedPoint2 FlavorMinimum = FixedPoint2.New(0.1f); + [DataField("color")] public Color SubstanceColor { get; } = Color.White; diff --git a/Resources/Prototypes/Reagents/Consumable/Food/ingredients.yml b/Resources/Prototypes/Reagents/Consumable/Food/ingredients.yml index d2983799f9..1e6b210a0c 100644 --- a/Resources/Prototypes/Reagents/Consumable/Food/ingredients.yml +++ b/Resources/Prototypes/Reagents/Consumable/Food/ingredients.yml @@ -139,6 +139,7 @@ desc: reagent-desc-oil-olive physicalDesc: reagent-physical-desc-oily flavor: oily + flavorMinimum: 0.05 color: olive recognizable: true metabolisms: @@ -155,6 +156,7 @@ desc: reagent-desc-oil physicalDesc: reagent-physical-desc-oily flavor: oily + flavorMinimum: 0.05 recognizable: true color: "#b67823" boilingPoint: 300.0 @@ -169,6 +171,7 @@ desc: reagent-desc-capsaicin-oil physicalDesc: reagent-physical-desc-oily flavor: spicy + flavorMinimum: 0.05 color: "#FF0000" recognizable: true meltingPoint: 146 diff --git a/Resources/Prototypes/Reagents/narcotics.yml b/Resources/Prototypes/Reagents/narcotics.yml index 74890df082..fca709180f 100644 --- a/Resources/Prototypes/Reagents/narcotics.yml +++ b/Resources/Prototypes/Reagents/narcotics.yml @@ -283,6 +283,7 @@ desc: reagent-desc-thc-oil physicalDesc: reagent-physical-desc-skunky flavor: bitter + flavorMinimum: 0.05 color: "#DAA520" metabolisms: Narcotic: diff --git a/Resources/Prototypes/Reagents/pyrotechnic.yml b/Resources/Prototypes/Reagents/pyrotechnic.yml index 475a85bda4..ee7692718b 100644 --- a/Resources/Prototypes/Reagents/pyrotechnic.yml +++ b/Resources/Prototypes/Reagents/pyrotechnic.yml @@ -144,6 +144,7 @@ physicalDesc: reagent-physical-desc-oily slippery: true flavor: bitter + flavorMinimum: 0.01 color: "#a76b1c" recognizable: true boilingPoint: -84.7 # Acetylene. Close enough.