Flavors on DoAfter, instead of after (#11251)

This commit is contained in:
Flipp Syder
2022-09-13 19:36:19 -07:00
committed by GitHub
parent cf8454413b
commit b5b5e18a87
3 changed files with 14 additions and 6 deletions

View File

@@ -94,6 +94,8 @@ namespace Content.Server.Nutrition.EntitySystems
if (!_solutionContainerSystem.TryGetSolution(food.Owner, food.SolutionName, out var foodSolution))
return false;
var flavors = _flavorProfileSystem.GetLocalizedFlavorsMessage(food.Owner, user, foodSolution);
if (food.UsesRemaining <= 0)
{
_popupSystem.PopupEntity(Loc.GetString("food-system-try-use-food-is-empty",
@@ -134,7 +136,7 @@ namespace Content.Server.Nutrition.EntitySystems
BreakOnTargetMove = moveBreak,
MovementThreshold = 0.01f,
DistanceThreshold = 1.0f,
TargetFinishedEvent = new FeedEvent(user, food, foodSolution, utensils),
TargetFinishedEvent = new FeedEvent(user, food, foodSolution, flavors, utensils),
BroadcastCancelledEvent = new ForceFeedCancelledEvent(food),
NeedHand = true,
});
@@ -180,7 +182,7 @@ namespace Content.Server.Nutrition.EntitySystems
split.DoEntityReaction(uid, ReactionMethod.Ingestion);
_stomachSystem.TryTransferSolution(firstStomach.Value.Comp.Owner, split, firstStomach.Value.Comp);
var flavors = _flavorProfileSystem.GetLocalizedFlavorsMessage(args.Food.Owner, args.User, split);
var flavors = args.FlavorMessage;
if (forceFeed)
{