FoodComponent solution un-hardcoding, rehydratable solution name fixes, monkey cubes edible again, slicable food preserves poisons (#4942)

This commit is contained in:
20kdc
2021-10-19 08:13:43 +01:00
committed by GitHub
parent eae8ab96d8
commit 6c6bde8743
8 changed files with 38 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ namespace Content.Server.Nutrition.EntitySystems
{
SoundSystem.Play(Filter.Pvs(creamPie.Owner), creamPie.Sound.GetSound(), creamPie.Owner, AudioHelpers.WithVariation(0.125f));
if (_solutionsSystem.TryGetSolution(creamPie.Owner, FoodComponent.SolutionName, out var solution))
if (creamPie.Owner.TryGetComponent<FoodComponent>(out var foodComp) && _solutionsSystem.TryGetSolution(creamPie.Owner, foodComp.SolutionName, out var solution))
{
solution.SpillAt(creamPie.Owner, "PuddleSmear", false);
}