Fold Produce's "produce" solution into the "food" solution to fix empty food (#4837)
One of these was going to have to be folded into the other for it to work. I am starting to really hate this refactor. Note that this might still leave smokable tampering broken if it was already broken, but it shouldn't break it if it wasn't. TESTED: Grown apples, carrots, something I forgot, bananas, *client crash due to slipping*
This commit is contained in:
@@ -798,7 +798,7 @@ namespace Content.Server.Botany.Components
|
||||
return DoHarvest(user);
|
||||
}
|
||||
|
||||
if (usingItem.HasComponent<ProduceComponent>())
|
||||
if (usingItem.TryGetComponent<ProduceComponent>(out var produce))
|
||||
{
|
||||
user.PopupMessageCursor(Loc.GetString("plant-holder-component-compost-message",
|
||||
("owner", Owner),
|
||||
@@ -808,7 +808,7 @@ namespace Content.Server.Botany.Components
|
||||
("usingItem", usingItem),
|
||||
("owner", Owner)));
|
||||
|
||||
if (solutionSystem.TryGetSolution(usingItem, ProduceComponent.SolutionName, out var solution2))
|
||||
if (solutionSystem.TryGetSolution(usingItem, produce.SolutionName, out var solution2))
|
||||
{
|
||||
// This deliberately discards overfill.
|
||||
solutionSystem.TryAddSolution(usingItem.Uid, solution2,
|
||||
|
||||
Reference in New Issue
Block a user