* enum -> prototype * move sprites * more dirt sprites * some food data stucking fixing * pumpkin fix * pie move sprites * refactor components * pie refactor * remove outdated proto * new pie types * Update SliceableFoodSystem.cs * Refactor food cooking system and add fat flavor Added 'Fat' to the flavor profile. Refactored food cooking logic to use CreateFoodData and UpdateFoodDataVisuals instead of CookFood and ApplyFoodVisuals. Introduced RenameCooker property to CP14FoodCookerComponent to control entity renaming during cooking. Improved separation of food data creation and visual updates. * Update migration.yml * Refactor food visual and sliceable logic in cooking system Moved sliceable food logic from OnCookFinished to UpdateFoodDataVisuals for better encapsulation. Made UpdateFoodDataVisuals overridable and updated its usage in random food initialization. Added Rename field to CP14RandomFoodDataComponent and cleaned up unused BecomeSliceable field in CP14FoodCookerComponent. Updated pie_pan.yml to add SliceableFood and a new random food entity. * Update pie_pan.yml * fill levels
50 lines
1.4 KiB
C#
50 lines
1.4 KiB
C#
/*
|
|
* This file is sublicensed under MIT License
|
|
* https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT
|
|
*/
|
|
|
|
using Content.Shared._CP14.Cooking.Prototypes;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared._CP14.Cooking.Components;
|
|
|
|
/// <summary>
|
|
/// Food of the specified type can be transferred to this entity.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), Access(typeof(CP14SharedCookingSystem))]
|
|
public sealed partial class CP14FoodHolderComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// What food is currently stored here?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public CP14FoodData? FoodData;
|
|
|
|
[DataField]
|
|
public bool CanAcceptFood = false;
|
|
|
|
[DataField]
|
|
public bool CanGiveFood = false;
|
|
|
|
[DataField(required: true)]
|
|
public ProtoId<CP14FoodTypePrototype> FoodType;
|
|
|
|
[DataField]
|
|
public string? SolutionId;
|
|
|
|
[DataField]
|
|
public int MaxDisplacementFillLevels = 8;
|
|
|
|
[DataField]
|
|
public string? DisplacementRsiPath;
|
|
|
|
/// <summary>
|
|
/// target layer, where new layers will be added. This allows you to control the order of generative layers and static layers.
|
|
/// </summary>
|
|
[DataField]
|
|
public string TargetLayerMap = "cp14_foodLayers";
|
|
|
|
public HashSet<string> RevealedLayers = new();
|
|
}
|