@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared._CP14.Cooking;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Nutrition.EntitySystems;
|
||||
using Content.Shared.Nutrition.Prototypes;
|
||||
@@ -11,7 +12,7 @@ namespace Content.Shared.Nutrition.Components;
|
||||
/// This is used on an entity with a solution container to flag a specific solution as being able to have its
|
||||
/// reagents consumed directly.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(IngestionSystem))]
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(IngestionSystem), typeof(CP14SharedCookingSystem))]
|
||||
public sealed partial class EdibleComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Content.Shared._CP14.Cooking;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Nutrition.EntitySystems;
|
||||
@@ -7,7 +6,7 @@ using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Nutrition.Components;
|
||||
[Obsolete("Migration to Content.Shared.Nutrition.Components.EdibleComponent is required")]
|
||||
[RegisterComponent, Access(typeof(FoodSystem), typeof(FoodSequenceSystem), typeof(CP14SharedCookingSystem))]
|
||||
[RegisterComponent, Access(typeof(FoodSystem), typeof(FoodSequenceSystem))]
|
||||
public sealed partial class FoodComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
|
||||
@@ -119,7 +119,7 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem
|
||||
if (source.Comp.FoodData is null)
|
||||
return false;
|
||||
|
||||
if (!TryComp<FoodComponent>(target, out var holderFoodComp))
|
||||
if (!TryComp<EdibleComponent>(target, out var holderFoodComp))
|
||||
return false;
|
||||
|
||||
if (!_solution.TryGetSolution(source.Owner, source.Comp.SolutionId, out var cookerSoln, out var cookerSolution))
|
||||
@@ -287,7 +287,7 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem
|
||||
//Process entities
|
||||
foreach (var contained in container.ContainedEntities)
|
||||
{
|
||||
if (TryComp<FoodComponent>(contained, out var food))
|
||||
if (TryComp<EdibleComponent>(contained, out var food))
|
||||
{
|
||||
//Merge trash
|
||||
newData.Trash.AddRange(food.Trash);
|
||||
|
||||
Reference in New Issue
Block a user