Fix food eat message not having loc argument passed in.

This commit is contained in:
Vera Aguilera Puerto
2022-03-23 16:08:44 +01:00
parent 53d8449170
commit ba566ff216
2 changed files with 4 additions and 1 deletions

View File

@@ -43,6 +43,9 @@ namespace Content.Server.Nutrition.Components
[DataField("utensilRequired")]
public bool UtensilRequired = false;
/// <summary>
/// The localization identifier for the eat message. Needs a "food" entity argument passed to it.
/// </summary>
[DataField("eatMessage")]
public string EatMessage = "food-nom";

View File

@@ -298,7 +298,7 @@ namespace Content.Server.Nutrition.EntitySystems
_logSystem.Add(LogType.ForceFeed, $"{ToPrettyString(user.Value):user} threw {ToPrettyString(uid):food} {SolutionContainerSystem.ToPrettyString(foodSolution):solution} into the mouth of {ToPrettyString(target):target}");
var filter = user == null ? Filter.Entities(target) : Filter.Entities(target, user.Value);
_popupSystem.PopupEntity(Loc.GetString(food.EatMessage), target, filter);
_popupSystem.PopupEntity(Loc.GetString(food.EatMessage, ("food", food.Owner)), target, filter);
foodSolution.DoEntityReaction(uid, ReactionMethod.Ingestion);
_stomachSystem.TryTransferSolution(((IComponent) firstStomach.Value.Comp).Owner, foodSolution, firstStomach.Value.Comp);