Minor spill refactors (#5569)

This commit is contained in:
Ygg01
2021-12-05 04:18:30 +01:00
committed by GitHub
parent 5d63411113
commit d1ab9592aa
12 changed files with 248 additions and 253 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.Chemistry.EntitySystems;
using Content.Server.Fluids.Components;
using Content.Server.Fluids.EntitySystems;
using Content.Server.Nutrition.Components;
using Content.Server.Popups;
using Content.Shared.Audio;
@@ -20,6 +21,7 @@ namespace Content.Server.Nutrition.EntitySystems
public class CreamPieSystem : SharedCreamPieSystem
{
[Dependency] private readonly SolutionContainerSystem _solutionsSystem = default!;
[Dependency] private readonly SpillableSystem _spillableSystem = default!;
protected override void SplattedCreamPie(EntityUid uid, CreamPieComponent creamPie)
{
@@ -27,7 +29,7 @@ namespace Content.Server.Nutrition.EntitySystems
if (creamPie.Owner.TryGetComponent<FoodComponent>(out var foodComp) && _solutionsSystem.TryGetSolution(creamPie.Owner.Uid, foodComp.SolutionName, out var solution))
{
solution.SpillAt(creamPie.Owner, "PuddleSmear", false);
_spillableSystem.SpillAt(creamPie.OwnerUid, solution, "PuddleSmear", false);
}
}