diff --git a/Content.Client/_CP14/Cooking/CP14ClientCookingSystem.cs b/Content.Client/_CP14/Cooking/CP14ClientCookingSystem.cs index afa89b35d4..c005386837 100644 --- a/Content.Client/_CP14/Cooking/CP14ClientCookingSystem.cs +++ b/Content.Client/_CP14/Cooking/CP14ClientCookingSystem.cs @@ -23,18 +23,16 @@ public sealed class CP14ClientCookingSystem : CP14SharedCookingSystem { base.Initialize(); - SubscribeLocalEvent(OnAfterHandleState); - SubscribeLocalEvent(OnAppearanceChange); + SubscribeLocalEvent(OnAfterHandleState); + SubscribeLocalEvent(OnAppearanceChange); } - private void OnAppearanceChange(Entity ent, ref AppearanceChangeEvent args) + private void OnAppearanceChange(Entity ent, ref AppearanceChangeEvent args) { var solutionId = string.Empty; if (TryComp(ent, out var holder)) solutionId = holder.SolutionId; - else if (TryComp(ent, out var cooker)) - solutionId = cooker.SolutionId; UpdateVisuals( ent, @@ -46,14 +44,12 @@ public sealed class CP14ClientCookingSystem : CP14SharedCookingSystem ent.Comp.FoodData); } - private void OnAfterHandleState(Entity ent, ref AfterAutoHandleStateEvent args) + private void OnAfterHandleState(Entity ent, ref AfterAutoHandleStateEvent args) { var solutionId = string.Empty; if (TryComp(ent, out var holder)) solutionId = holder.SolutionId; - else if (TryComp(ent, out var cooker)) - solutionId = cooker.SolutionId; UpdateVisuals( ent, diff --git a/Content.IntegrationTests/Tests/_CP14/CP14Cooking.cs b/Content.IntegrationTests/Tests/_CP14/CP14Cooking.cs index b93c6c9150..47cef6ede2 100644 --- a/Content.IntegrationTests/Tests/_CP14/CP14Cooking.cs +++ b/Content.IntegrationTests/Tests/_CP14/CP14Cooking.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Linq; using Content.Shared._CP14.Cooking; +using Content.Shared._CP14.Cooking.Prototypes; using Content.Shared._CP14.Cooking.Requirements; using Content.Shared.Chemistry.Components; using Content.Shared.Tag; @@ -20,7 +21,6 @@ namespace Content.IntegrationTests.Tests._CP14; [TestFixture] public sealed class CP14Cooking { - [Test] public async Task TestAllCookingRecipeIsCookable() { diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs index f9217e5de2..66469916d8 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs @@ -673,11 +673,6 @@ public sealed partial class PuddleSystem : SharedPuddleSystem return false; } - //CP14 spill event for cooking subscription - var ev = new CP14BeforeSpillEvent(); - RaiseLocalEvent(uid, ev); - //CP14 end - return TrySpillAt(transformComponent.Coordinates, solution, out puddleUid, sound: sound); } diff --git a/Content.Server/Nutrition/Components/SliceableFoodComponent.cs b/Content.Server/Nutrition/Components/SliceableFoodComponent.cs index 7877e91d03..e262b50353 100644 --- a/Content.Server/Nutrition/Components/SliceableFoodComponent.cs +++ b/Content.Server/Nutrition/Components/SliceableFoodComponent.cs @@ -1,10 +1,11 @@ +using Content.Server._CP14.Cooking; using Content.Server.Nutrition.EntitySystems; using Robust.Shared.Audio; using Robust.Shared.Prototypes; namespace Content.Server.Nutrition.Components; -[RegisterComponent, Access(typeof(SliceableFoodSystem))] +[RegisterComponent, Access(typeof(SliceableFoodSystem), typeof(CP14CookingSystem))] public sealed partial class SliceableFoodComponent : Component { /// diff --git a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs index 3ce285b06c..cd6882f501 100644 --- a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs @@ -85,6 +85,10 @@ public sealed class SliceableFoodSystem : EntitySystem if (!TryComp(usedItem, out var utensil) || (utensil.Types & UtensilType.Knife) == 0) return false; + //CP14 transfer flavors + TryComp(uid, out var flavorProfile); + //CP14 end + var sliceVolume = solution.Volume / FixedPoint2.New(component.TotalCount); for (int i = 0; i < component.TotalCount; i++) { @@ -93,6 +97,17 @@ public sealed class SliceableFoodSystem : EntitySystem var lostSolution = _solutionContainer.SplitSolution(soln.Value, sliceVolume); + //CP14 - transfer flavors + if (flavorProfile is not null) + { + var sliceFlavors = EnsureComp(sliceUid); + foreach (var newFlavor in flavorProfile.Flavors) + { + sliceFlavors.Flavors.Add(newFlavor); + } + } + //CP14 end + // Fill new slice FillSlice(sliceUid, lostSolution); } diff --git a/Content.Server/_CP14/Cooking/CP14CookingSystem.cs b/Content.Server/_CP14/Cooking/CP14CookingSystem.cs index c160215e4f..0eeaacb51b 100644 --- a/Content.Server/_CP14/Cooking/CP14CookingSystem.cs +++ b/Content.Server/_CP14/Cooking/CP14CookingSystem.cs @@ -5,11 +5,12 @@ using System.Linq; using System.Numerics; +using Content.Server.Nutrition.Components; using Content.Server.Temperature.Systems; using Content.Shared._CP14.Cooking; using Content.Shared._CP14.Cooking.Components; using Content.Shared._CP14.Temperature; -using Content.Shared.Nutrition.Components; +using Content.Shared.Chemistry.EntitySystems; using Robust.Shared.Random; namespace Content.Server._CP14.Cooking; @@ -17,6 +18,7 @@ namespace Content.Server._CP14.Cooking; public sealed class CP14CookingSystem : CP14SharedCookingSystem { [Dependency] private readonly TemperatureSystem _temperature = default!; + [Dependency] private readonly IRobustRandom _random = default!; public override void Initialize() { @@ -24,25 +26,30 @@ public sealed class CP14CookingSystem : CP14SharedCookingSystem SubscribeLocalEvent(OnRandomFoodMapInit); - SubscribeLocalEvent(OnSpilled); - SubscribeLocalEvent(OnHolderSpilled); - SubscribeLocalEvent(OnCookerSpilled); + SubscribeLocalEvent(OnHolderChanged); } - private void OnCookerSpilled(Entity ent, ref CP14BeforeSpillEvent args) + protected override bool TryTransferFood(Entity target, Entity source) { - ent.Comp.HoldFood = false; - Dirty(ent); + if (base.TryTransferFood(target, source)) + { + //Sliceable + if (source.Comp.FoodData?.SliceProto is not null) + { + var sliceable = EnsureComp(target); + sliceable.Slice = source.Comp.FoodData.SliceProto; + sliceable.TotalCount = source.Comp.FoodData.SliceCount; + } + } + + return true; } - private void OnHolderSpilled(Entity ent, ref CP14BeforeSpillEvent args) + private void OnHolderChanged(Entity ent, ref SolutionContainerChangedEvent args) { - ent.Comp.HoldFood = false; - Dirty(ent); - } + if (args.Solution.Volume != 0) + return; - private void OnSpilled(Entity ent, ref CP14BeforeSpillEvent args) - { ent.Comp.FoodData = null; Dirty(ent); } @@ -55,26 +62,17 @@ public sealed class CP14CookingSystem : CP14SharedCookingSystem if (!_random.Prob(ent.Comp.Prob)) return; - //TODO: Fuck this dublication logic, and randomization visual - var randomFood = _random.Pick(OrderedRecipes.Where(r => r.FoodType == holder.FoodType).ToList()); - - //Name and Description - if (randomFood.FoodData.Name is not null) - _metaData.SetEntityName(ent, Loc.GetString(randomFood.FoodData.Name)); - if (randomFood.FoodData.Desc is not null) - _metaData.SetEntityDescription(ent, Loc.GetString(randomFood.FoodData.Desc)); - - var foodVisuals = EnsureComp(ent); - //Visuals - foodVisuals.FoodData = randomFood.FoodData; - - //Some randomize - foreach (var layer in foodVisuals.FoodData.Visuals) + var filteredRecipes = OrderedRecipes.Where(r => r.FoodType == holder.FoodType).ToList(); + if (filteredRecipes.Count == 0) { - if (_random.Prob(0.5f)) - layer.Scale = new Vector2(-1, 1); + Log.Error($"No recipes found for food type {holder.FoodType}"); + return; } + var randomFood = _random.Pick(filteredRecipes); + + UpdateFoodDataVisuals((ent, holder), randomFood.FoodData, ent.Comp.Rename); + Dirty(ent.Owner, holder); } @@ -89,6 +87,20 @@ public sealed class CP14CookingSystem : CP14SharedCookingSystem Spawn(ent.Comp.BurntAdditionalSpawn, Transform(ent).Coordinates); } + protected override void UpdateFoodDataVisuals(Entity ent, CP14FoodData data, bool rename = true) + { + base.UpdateFoodDataVisuals(ent, data, rename); + + if (ent.Comp.FoodData?.SliceProto is null) + return; + + if (!TryComp(ent, out var sliceable)) + return; + + sliceable.Slice = ent.Comp.FoodData.SliceProto; + sliceable.TotalCount = ent.Comp.FoodData.SliceCount; + } + protected override void OnCookFinished(Entity ent, ref CP14CookingDoAfter args) { if (args.Cancelled || args.Handled) @@ -125,10 +137,3 @@ public sealed class CP14CookingSystem : CP14SharedCookingSystem } } } - -/// -/// It is invoked on the entity from which all reagents are spilled. -/// -public sealed class CP14BeforeSpillEvent : EntityEventArgs -{ -} diff --git a/Content.Server/_CP14/Cooking/CP14RandomFoodDataComponent.cs b/Content.Server/_CP14/Cooking/CP14RandomFoodDataComponent.cs index 0ef9be84f1..71090b4e24 100644 --- a/Content.Server/_CP14/Cooking/CP14RandomFoodDataComponent.cs +++ b/Content.Server/_CP14/Cooking/CP14RandomFoodDataComponent.cs @@ -11,4 +11,7 @@ public sealed partial class CP14RandomFoodDataComponent : Component /// [DataField] public float Prob = 0.75f; + + [DataField] + public bool Rename = true; } diff --git a/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs b/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs index 2ce008da26..3094d34bed 100644 --- a/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs +++ b/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs @@ -1,3 +1,4 @@ +using Content.Shared._CP14.Cooking; using Content.Shared.Chemistry.Components; using Content.Shared.Database; using Content.Shared.DoAfter; diff --git a/Content.Shared/Nutrition/Components/FlavorProfileComponent.cs b/Content.Shared/Nutrition/Components/FlavorProfileComponent.cs index a3ca92ecf2..4de13b512a 100644 --- a/Content.Shared/Nutrition/Components/FlavorProfileComponent.cs +++ b/Content.Shared/Nutrition/Components/FlavorProfileComponent.cs @@ -20,5 +20,6 @@ public sealed partial class FlavorProfileComponent : Component "Nutriment", "Vitamin", "Protein", + "Fat", //CP14 }; } diff --git a/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.DoAfter.cs b/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.DoAfter.cs index 3c4886ca17..d44829f2f0 100644 --- a/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.DoAfter.cs +++ b/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.DoAfter.cs @@ -4,10 +4,10 @@ */ using Content.Shared._CP14.Cooking.Components; +using Content.Shared._CP14.Cooking.Prototypes; using Content.Shared.DoAfter; using Content.Shared.Temperature; using Robust.Shared.Prototypes; -using Robust.Shared.Random; using Robust.Shared.Serialization; using Robust.Shared.Timing; @@ -55,10 +55,14 @@ public abstract partial class CP14SharedCookingSystem if (args.Cancelled || args.Handled) return; + if (!TryComp(ent, out var holder)) + return; + if (!_proto.TryIndex(args.Recipe, out var indexedRecipe)) return; - CookFood(ent, indexedRecipe); + CreateFoodData(ent, indexedRecipe); + UpdateFoodDataVisuals((ent, holder), ent.Comp.RenameCooker); args.Handled = true; } @@ -117,7 +121,10 @@ public abstract partial class CP14SharedCookingSystem if (!_container.TryGetContainer(ent, ent.Comp.ContainerId, out var container)) return; - if (container.ContainedEntities.Count <= 0 && !ent.Comp.HoldFood) + if (!TryComp(ent, out var holder)) + return; + + if (container.ContainedEntities.Count <= 0 && holder.FoodData is null) { StopCooking(ent); return; @@ -128,7 +135,7 @@ public abstract partial class CP14SharedCookingSystem ent.Comp.LastHeatingTime = _timing.CurTime; DirtyField(ent.Owner,ent.Comp, nameof(CP14FoodCookerComponent.LastHeatingTime)); - if (!_doAfter.IsRunning(ent.Comp.DoAfterId) && !ent.Comp.HoldFood) + if (!_doAfter.IsRunning(ent.Comp.DoAfterId) && holder.FoodData is null) { var recipe = GetRecipe(ent); if (recipe is not null) diff --git a/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.Transfer.cs b/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.Transfer.cs index 5a044d382e..0504af6ae2 100644 --- a/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.Transfer.cs +++ b/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.Transfer.cs @@ -14,25 +14,25 @@ public abstract partial class CP14SharedCookingSystem private void InitTransfer() { SubscribeLocalEvent(OnAfterInteract); - SubscribeLocalEvent(OnInteractUsing); + SubscribeLocalEvent(OnInteractUsing); SubscribeLocalEvent(OnInsertAttempt); } - private void OnAfterInteract(Entity ent, ref AfterInteractEvent args) + private void OnInteractUsing(Entity target, ref InteractUsingEvent args) { - if (!TryComp(args.Target, out var cooker)) + if (!TryComp(args.Used, out var used)) return; - MoveFoodToHolder(ent, (args.Target.Value, cooker)); + TryTransferFood(target, (args.Used, used)); } - private void OnInteractUsing(Entity ent, ref AfterInteractEvent args) + private void OnAfterInteract(Entity ent, ref AfterInteractEvent args) { - if (!TryComp(args.Target, out var holder)) + if (!TryComp(args.Target, out var target)) return; - MoveFoodToHolder((args.Target.Value, holder), ent); + TryTransferFood(ent, (args.Target.Value, target)); } private void OnInsertAttempt(Entity ent, ref ContainerIsInsertingAttemptEvent args) @@ -40,7 +40,10 @@ public abstract partial class CP14SharedCookingSystem if (args.Cancelled) return; - if (ent.Comp.HoldFood) + if (!TryComp(ent, out var holder)) + return; + + if (holder.FoodData is not null) { _popup.PopupEntity(Loc.GetString("cp14-cooking-popup-not-empty", ("name", MetaData(ent).EntityName)), ent); args.Cancel(); diff --git a/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.cs b/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.cs index d4d298f7e9..365b291f63 100644 --- a/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.cs +++ b/Content.Shared/_CP14/Cooking/CP14SharedCookingSystem.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Numerics; using Content.Shared._CP14.Cooking.Components; +using Content.Shared._CP14.Cooking.Prototypes; using Content.Shared.Audio; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; @@ -16,7 +17,6 @@ using Content.Shared.Fluids; using Content.Shared.Nutrition.Components; using Content.Shared.Popups; using Content.Shared.Tag; -using Content.Shared.Throwing; using Robust.Shared.Containers; using Robust.Shared.Network; using Robust.Shared.Prototypes; @@ -26,17 +26,17 @@ namespace Content.Shared._CP14.Cooking; public abstract partial class CP14SharedCookingSystem : EntitySystem { - [Dependency] protected readonly IPrototypeManager _proto = default!; [Dependency] protected readonly SharedContainerSystem _container = default!; - [Dependency] protected readonly IRobustRandom _random = default!; - [Dependency] protected readonly MetaDataSystem _metaData = default!; + [Dependency] private readonly IRobustRandom _random = default!; [Dependency] protected readonly SharedSolutionContainerSystem _solution = default!; + [Dependency] private readonly MetaDataSystem _metaData = default!; + [Dependency] private readonly IPrototypeManager _proto = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly SharedPuddleSystem _puddle = default!; [Dependency] private readonly INetManager _net = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly SharedAmbientSoundSystem _ambientSound = default!; - [Dependency] protected readonly SharedAppearanceSystem _appearance = default!; + [Dependency] private readonly SharedAppearanceSystem _appearance = default!; /// /// When overcooking food, we will replace the reagents inside with this reagent. @@ -61,7 +61,7 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem CacheAndOrderRecipes(); SubscribeLocalEvent(OnPrototypesReloaded); - SubscribeLocalEvent(OnExaminedEvent); + SubscribeLocalEvent(OnExaminedEvent); } public override void Update(float frameTime) @@ -85,7 +85,7 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem CacheAndOrderRecipes(); } - private void OnExaminedEvent(Entity ent, ref ExaminedEvent args) + private void OnExaminedEvent(Entity ent, ref ExaminedEvent args) { if (ent.Comp.FoodData?.Name is null) return; @@ -107,31 +107,32 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem /// /// Transfer food data from cooker to holder /// - private void MoveFoodToHolder(Entity holder, Entity cooker) + protected virtual bool TryTransferFood(Entity target, + Entity source) { - if (holder.Comp.HoldFood || !cooker.Comp.HoldFood) - return; + if (!source.Comp.CanGiveFood || !target.Comp.CanAcceptFood) + return false; - if (holder.Comp.FoodType != cooker.Comp.FoodType) - return; + if (target.Comp.FoodType != source.Comp.FoodType) + return false; - if (!TryComp(holder, out var holderFoodComp)) - return; + if (source.Comp.FoodData is null) + return false; - if (!TryComp(cooker, out var cookerFoodVisuals) || cookerFoodVisuals.FoodData is null) - return; + if (!TryComp(target, out var holderFoodComp)) + return false; - if (!_solution.TryGetSolution(cooker.Owner, cooker.Comp.SolutionId, out var cookerSoln, out var cookerSolution)) - return; + if (!_solution.TryGetSolution(source.Owner, source.Comp.SolutionId, out var cookerSoln, out var cookerSolution)) + return false; //Solutions - if (_solution.TryGetSolution(holder.Owner, holderFoodComp.Solution, out var holderSoln, out var solution)) + if (_solution.TryGetSolution(target.Owner, holderFoodComp.Solution, out var holderSoln, out var solution)) { if (solution.Volume > 0) { - _popup.PopupEntity(Loc.GetString("cp14-cooking-popup-not-empty", ("name", MetaData(holder).EntityName)), - holder); - return; + _popup.PopupEntity(Loc.GetString("cp14-cooking-popup-not-empty", ("name", MetaData(target).EntityName)), + target); + return false; } _solution.TryTransferSolution(holderSoln.Value, cookerSolution, solution.MaxVolume); @@ -139,63 +140,77 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem //Trash //If we have a lot of trash, we put 1 random trash in each plate. If it's a last plate (out of solution in cooker), we put all the remaining trash in it. - if (cookerFoodVisuals.FoodData.Trash.Count > 0) + if (source.Comp.FoodData?.Trash.Count > 0) { if (cookerSolution.Volume <= 0) { - holderFoodComp.Trash.AddRange(cookerFoodVisuals.FoodData.Trash); + holderFoodComp.Trash.AddRange(source.Comp.FoodData.Trash); } else { if (_net.IsServer) { - var newTrash = _random.Pick(cookerFoodVisuals.FoodData.Trash); - cookerFoodVisuals.FoodData.Trash.Remove(newTrash); + var newTrash = _random.Pick(source.Comp.FoodData.Trash); + source.Comp.FoodData.Trash.Remove(newTrash); holderFoodComp.Trash.Add(newTrash); } } } + if (source.Comp.FoodData is not null) + UpdateFoodDataVisuals(target, source.Comp.FoodData); + + Dirty(target); + Dirty(source); + + _solution.UpdateChemicals(cookerSoln.Value); + + return true; + } + + private void UpdateFoodDataVisuals( + Entity ent, + bool rename = true) + { + var data = ent.Comp.FoodData; + + if (data is null) + return; + + UpdateFoodDataVisuals(ent, data, rename); + } + + protected virtual void UpdateFoodDataVisuals( + Entity ent, + CP14FoodData data, + bool rename = true) + { //Name and Description - if (cookerFoodVisuals.FoodData.Name is not null) - _metaData.SetEntityName(holder, Loc.GetString(cookerFoodVisuals.FoodData.Name)); - if (cookerFoodVisuals.FoodData.Desc is not null) - _metaData.SetEntityDescription(holder, Loc.GetString(cookerFoodVisuals.FoodData.Desc)); + if (rename) + { + if (data.Name is not null) + _metaData.SetEntityName(ent, Loc.GetString(data.Name)); + if (data.Desc is not null) + _metaData.SetEntityDescription(ent, Loc.GetString(data.Desc)); + } //Flavors - EnsureComp(holder, out var flavorComp); - foreach (var flavor in cookerFoodVisuals.FoodData.Flavors) + EnsureComp(ent, out var flavorComp); + foreach (var flavor in data.Flavors) { flavorComp.Flavors.Add(flavor); } //Visuals - var holderFoodVisuals = EnsureComp(holder); - holderFoodVisuals.FoodData = new CP14FoodData(cookerFoodVisuals.FoodData); - - //Visual random - foreach (var layer in holderFoodVisuals.FoodData.Visuals) + ent.Comp.FoodData = new CP14FoodData(data); + foreach (var layer in data.Visuals) { if (_random.Prob(0.5f)) layer.Scale = new Vector2(-1, 1); } - //Clear cooker data - if (cookerSolution.Volume <= 0) - { - cookerFoodVisuals.FoodData = null; - cooker.Comp.HoldFood = false; - } - - holder.Comp.HoldFood = true; - - Dirty(holder, holderFoodVisuals); - Dirty(cooker, cookerFoodVisuals); - - Dirty(holder); - Dirty(cooker); - - _solution.UpdateChemicals(cookerSoln.Value); + //Sliceable + // > on server overrided side } public CP14CookingRecipePrototype? GetRecipe(Entity ent) @@ -218,7 +233,9 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem return GetRecipe(ent.Comp.FoodType, solution, allTags); } - public CP14CookingRecipePrototype? GetRecipe(CP14FoodType foodType, Solution? solution, List> allTags) + public CP14CookingRecipePrototype? GetRecipe(ProtoId foodType, + Solution? solution, + List> allTags) { if (OrderedRecipes.Count == 0) { @@ -252,7 +269,7 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem return selectedRecipe; } - protected void CookFood(Entity ent, CP14CookingRecipePrototype recipe) + protected void CreateFoodData(Entity ent, CP14CookingRecipePrototype recipe) { if (!_solution.TryGetSolution(ent.Owner, ent.Comp.SolutionId, out var soln, out var solution)) return; @@ -260,18 +277,7 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem if (!_container.TryGetContainer(ent, ent.Comp.ContainerId, out var container)) return; - var newData = new CP14FoodData - { - Visuals = new List(recipe.FoodData.Visuals), - Trash = new List(recipe.FoodData.Trash), - Flavors = new HashSet(recipe.FoodData.Flavors), - Name = recipe.FoodData.Name, - Desc = recipe.FoodData.Desc, - CurrentRecipe = recipe - }; - - newData.Name = recipe.FoodData.Name; - newData.Desc = recipe.FoodData.Desc; + var newData = new CP14FoodData(recipe.FoodData); //Process entities foreach (var contained in container.ContainedEntities) @@ -307,36 +313,36 @@ public abstract partial class CP14SharedCookingSystem : EntitySystem if (solution.Volume <= 0) return; - var foodVisuals = EnsureComp(ent.Owner); - foodVisuals.FoodData = newData; - - ent.Comp.HoldFood = true; + if (TryComp(ent.Owner, out var holder)) + { + holder.FoodData = newData; + Dirty(ent.Owner, holder); + } Dirty(ent); - Dirty(ent, foodVisuals); } protected void BurntFood(Entity ent) { - if (!TryComp(ent, out var foodVisuals) || foodVisuals.FoodData is null) + if (!TryComp(ent, out var holder) || holder.FoodData is null) return; if (!_solution.TryGetSolution(ent.Owner, ent.Comp.SolutionId, out var soln, out var solution)) return; //Brown visual - foreach (var visuals in foodVisuals.FoodData.Visuals) + foreach (var visuals in holder.FoodData.Visuals) { visuals.Color = Color.FromHex("#212121"); } - foodVisuals.FoodData.Name = Loc.GetString("cp14-meal-recipe-burned-trash-name"); - foodVisuals.FoodData.Desc = Loc.GetString("cp14-meal-recipe-burned-trash-desc"); + holder.FoodData.Name = Loc.GetString("cp14-meal-recipe-burned-trash-name"); + holder.FoodData.Desc = Loc.GetString("cp14-meal-recipe-burned-trash-desc"); var replacedVolume = solution.Volume / 2; solution.SplitSolution(replacedVolume); solution.AddReagent(_burntFoodReagent, replacedVolume / 2); - DirtyField(ent.Owner, foodVisuals, nameof(CP14FoodVisualsComponent.FoodData)); + DirtyField(ent.Owner, holder, nameof(CP14FoodHolderComponent.FoodData)); } } diff --git a/Content.Shared/_CP14/Cooking/Components/CP14FoodCookerComponent.cs b/Content.Shared/_CP14/Cooking/Components/CP14FoodCookerComponent.cs index 10a598a67c..56e5efcd17 100644 --- a/Content.Shared/_CP14/Cooking/Components/CP14FoodCookerComponent.cs +++ b/Content.Shared/_CP14/Cooking/Components/CP14FoodCookerComponent.cs @@ -3,6 +3,7 @@ * https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT */ +using Content.Shared._CP14.Cooking.Prototypes; using Content.Shared.DoAfter; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; @@ -10,14 +11,14 @@ using Robust.Shared.Serialization; namespace Content.Shared._CP14.Cooking.Components; +/// +/// Prepares food from ingredients and places it in the FoodHolderComponent +/// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), Access(typeof(CP14SharedCookingSystem))] public sealed partial class CP14FoodCookerComponent : Component { - [DataField] - public bool HoldFood = false; - [DataField(required: true)] - public CP14FoodType FoodType; + public ProtoId FoodType; [DataField] public string ContainerId; @@ -50,6 +51,9 @@ public sealed partial class CP14FoodCookerComponent : Component [DataField] public float BurntAdditionalSpawnProb = 0.2f; + + [DataField] + public bool RenameCooker = false; } [Serializable] @@ -64,6 +68,8 @@ public sealed partial class CP14FoodData Visuals = new List(data.Visuals); Trash = new List(data.Trash); Flavors = new HashSet(data.Flavors); + SliceProto = data.SliceProto; + SliceCount = data.SliceCount; } [DataField] @@ -83,12 +89,12 @@ public sealed partial class CP14FoodData [DataField] public HashSet Flavors = new(); -} -public enum CP14FoodType -{ - Meal, - Soup, + [DataField] + public EntProtoId? SliceProto; + + [DataField] + public ushort SliceCount = 5; } [Serializable, NetSerializable] diff --git a/Content.Shared/_CP14/Cooking/Components/CP14FoodHolderComponent.cs b/Content.Shared/_CP14/Cooking/Components/CP14FoodHolderComponent.cs index 01429f28ce..59bd759976 100644 --- a/Content.Shared/_CP14/Cooking/Components/CP14FoodHolderComponent.cs +++ b/Content.Shared/_CP14/Cooking/Components/CP14FoodHolderComponent.cs @@ -3,20 +3,47 @@ * 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.Utility; +using Robust.Shared.Prototypes; namespace Content.Shared._CP14.Cooking.Components; -[RegisterComponent, NetworkedComponent, Access(typeof(CP14SharedCookingSystem))] +/// +/// Food of the specified type can be transferred to this entity. +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), Access(typeof(CP14SharedCookingSystem))] public sealed partial class CP14FoodHolderComponent : Component { + /// + /// What food is currently stored here? + /// + [DataField, AutoNetworkedField] + public CP14FoodData? FoodData; + [DataField] - public bool HoldFood = false; + public bool CanAcceptFood = false; + + [DataField] + public bool CanGiveFood = false; [DataField(required: true)] - public CP14FoodType FoodType; + public ProtoId FoodType; [DataField] public string? SolutionId; + + [DataField] + public int MaxDisplacementFillLevels = 8; + + [DataField] + public string? DisplacementRsiPath; + + /// + /// target layer, where new layers will be added. This allows you to control the order of generative layers and static layers. + /// + [DataField] + public string TargetLayerMap = "cp14_foodLayers"; + + public HashSet RevealedLayers = new(); } diff --git a/Content.Shared/_CP14/Cooking/Components/CP14FoodVisualsComponent.cs b/Content.Shared/_CP14/Cooking/Components/CP14FoodVisualsComponent.cs deleted file mode 100644 index 4a47f7e60d..0000000000 --- a/Content.Shared/_CP14/Cooking/Components/CP14FoodVisualsComponent.cs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is sublicensed under MIT License - * https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT - */ - -using Robust.Shared.GameStates; -using Robust.Shared.Utility; - -namespace Content.Shared._CP14.Cooking.Components; - -[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true, true), Access(typeof(CP14SharedCookingSystem))] -public sealed partial class CP14FoodVisualsComponent : Component -{ - /// - /// What food is currently stored here? - /// - [DataField, AutoNetworkedField] - public CP14FoodData? FoodData; - - [DataField] - public int MaxDisplacementFillLevels = 8; - - [DataField] - public string? DisplacementRsiPath = null; - - [DataField] - public string? SolutionId; - - /// - /// target layer, where new layers will be added. This allows you to control the order of generative layers and static layers. - /// - [DataField] - public string TargetLayerMap = "cp14_foodLayers"; - - public HashSet RevealedLayers = new(); -} diff --git a/Content.Shared/_CP14/Cooking/CP14CookingRecipePrototype.cs b/Content.Shared/_CP14/Cooking/Prototypes/CP14CookingRecipePrototype.cs similarity index 88% rename from Content.Shared/_CP14/Cooking/CP14CookingRecipePrototype.cs rename to Content.Shared/_CP14/Cooking/Prototypes/CP14CookingRecipePrototype.cs index 43881597a0..8ac0403e21 100644 --- a/Content.Shared/_CP14/Cooking/CP14CookingRecipePrototype.cs +++ b/Content.Shared/_CP14/Cooking/Prototypes/CP14CookingRecipePrototype.cs @@ -7,7 +7,7 @@ using Content.Shared._CP14.Cooking.Components; using Robust.Shared.Audio; using Robust.Shared.Prototypes; -namespace Content.Shared._CP14.Cooking; +namespace Content.Shared._CP14.Cooking.Prototypes; [Prototype("CP14CookingRecipe")] public sealed class CP14CookingRecipePrototype : IPrototype @@ -28,8 +28,8 @@ public sealed class CP14CookingRecipePrototype : IPrototype [DataField] public CP14FoodData FoodData = new(); - [DataField] - public CP14FoodType FoodType = CP14FoodType.Meal; + [DataField(required: true)] + public ProtoId FoodType; [DataField] public TimeSpan CookingTime = TimeSpan.FromSeconds(20f); diff --git a/Content.Shared/_CP14/Cooking/Prototypes/CP14FoodTypePrototype.cs b/Content.Shared/_CP14/Cooking/Prototypes/CP14FoodTypePrototype.cs new file mode 100644 index 0000000000..3e97dba785 --- /dev/null +++ b/Content.Shared/_CP14/Cooking/Prototypes/CP14FoodTypePrototype.cs @@ -0,0 +1,15 @@ +/* + * This file is sublicensed under MIT License + * https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT + */ + +using Robust.Shared.Prototypes; + +namespace Content.Shared._CP14.Cooking.Prototypes; + +[Prototype("CP14FoodType")] +public sealed class CP14FoodTypePrototype : IPrototype +{ + [IdDataField] + public string ID { get; private set; } = default!; +} diff --git a/Content.Shared/_CP14/Cooking/Requirements/TagBlocked.cs b/Content.Shared/_CP14/Cooking/Requirements/TagBlocked.cs index eb69c0c307..43641f8ee1 100644 --- a/Content.Shared/_CP14/Cooking/Requirements/TagBlocked.cs +++ b/Content.Shared/_CP14/Cooking/Requirements/TagBlocked.cs @@ -30,6 +30,6 @@ public sealed partial class TagBlocked : CP14CookingCraftRequirement public override float GetComplexity() { - return 1; + return Tags.Count * -1; } } diff --git a/Content.Shared/_CP14/Workbench/Requirements/FoodResource.cs b/Content.Shared/_CP14/Workbench/Requirements/FoodResource.cs index 0796ddb3a6..b3ba4132c9 100644 --- a/Content.Shared/_CP14/Workbench/Requirements/FoodResource.cs +++ b/Content.Shared/_CP14/Workbench/Requirements/FoodResource.cs @@ -6,8 +6,10 @@ using System.Linq; using Content.Shared._CP14.Cooking; using Content.Shared._CP14.Cooking.Components; +using Content.Shared._CP14.Cooking.Prototypes; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.FixedPoint; +using Content.Shared.Nutrition.Components; using Robust.Shared.Prototypes; using Robust.Shared.Utility; @@ -28,16 +30,16 @@ public sealed partial class FoodResource : CP14WorkbenchCraftRequirement var solutionSys = entManager.System(); foreach (var ent in placedEntities) { - if (!entManager.TryGetComponent(ent, out var foodVisuals)) + if (!entManager.TryGetComponent(ent, out var foodHolder)) continue; - if (entManager.HasComponent(ent)) + if (!entManager.HasComponent(ent)) continue; - if (foodVisuals.FoodData?.CurrentRecipe != Recipe) + if (foodHolder.FoodData?.CurrentRecipe != Recipe) continue; - if (!solutionSys.TryGetSolution(ent, foodVisuals.SolutionId, out _, out var solution)) + if (!solutionSys.TryGetSolution(ent, foodHolder.SolutionId, out _, out var solution)) continue; if (solution.Volume < Count) @@ -57,16 +59,16 @@ public sealed partial class FoodResource : CP14WorkbenchCraftRequirement foreach (var ent in placedEntities) { - if (!entManager.TryGetComponent(ent, out var foodVisuals)) + if (!entManager.TryGetComponent(ent, out var foodHolder)) continue; - if (entManager.HasComponent(ent)) + if (!entManager.HasComponent(ent)) continue; - if (foodVisuals.FoodData?.CurrentRecipe != Recipe) + if (foodHolder.FoodData?.CurrentRecipe != Recipe) continue; - if (!solutionSys.TryGetSolution(ent, foodVisuals.SolutionId, out _, out var solution)) + if (!solutionSys.TryGetSolution(ent, foodHolder.SolutionId, out _, out var solution)) continue; if (solution.Volume < Count) diff --git a/Resources/Locale/en-US/_CP14/cooking/pies.ftl b/Resources/Locale/en-US/_CP14/cooking/pies.ftl new file mode 100644 index 0000000000..5dec6c87e1 --- /dev/null +++ b/Resources/Locale/en-US/_CP14/cooking/pies.ftl @@ -0,0 +1,2 @@ +cp14-soup-recipe-pie-name = pie +cp14-soup-recipe-pie-desc = It's time to get a knife and cut the pie to see what's inside! \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/cooking/pies.ftl b/Resources/Locale/ru-RU/_CP14/cooking/pies.ftl new file mode 100644 index 0000000000..f0960527d6 --- /dev/null +++ b/Resources/Locale/ru-RU/_CP14/cooking/pies.ftl @@ -0,0 +1,2 @@ +cp14-soup-recipe-pie-name = пирог +cp14-soup-recipe-pie-desc = Самое время достать нож, и порезать пирог, чтобы узнать что у него внутри! \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/bowl.yml b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/bowl.yml index 3a4ef4b2eb..186d7c1afd 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/bowl.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/bowl.yml @@ -14,12 +14,11 @@ solutions: food: maxVol: 30 - - type: CP14FoodVisuals - displacementRsiPath: _CP14/Objects/Consumable/Food/Soups/displacement.rsi - solutionId: food - type: CP14FoodHolder foodType: Soup solutionId: food + displacementRsiPath: _CP14/Objects/Consumable/Food/Soups/displacement.rsi + canAcceptFood: true - type: Appearance - type: SolutionContainerVisuals - type: Food @@ -27,6 +26,8 @@ path: /Audio/Items/drink.ogg utensil: Spoon transferAmount: 2.5 + - type: Spillable + solution: food - type: entity id: CP14BowlWooden diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/pies_pieces.yml b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/pies_pieces.yml new file mode 100644 index 0000000000..aa67bf5631 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/pies_pieces.yml @@ -0,0 +1,64 @@ +- type: entity + parent: FoodInjectableBase + id: CP14FoodPiePieceBase + abstract: true + categories: [ ForkFiltered ] + components: + - type: Item + size: Tiny + - type: Temperature + - type: Sprite + sprite: _CP14/Objects/Consumable/Food/Pies/pieces.rsi + - type: SolutionContainerManager + solutions: + food: + maxVol: 10 + reagents: + - ReagentId: Nutriment + Quantity: 7 + - ReagentId: Protein + Quantity: 2 + +- type: entity + id: CP14FoodPiePieceTrash + parent: CP14FoodPiePieceBase + name: a piece of disgusting pie + description: On the outside, it looked appealing and delicious, but on the inside, it was simply awful. + components: + - type: Sprite + layers: + - state: blank + - state: trash + +- type: entity + id: CP14FoodPiePieceMeat + parent: CP14FoodPiePieceBase + name: a piece of meat pie + description: Pie with juicy meat. + components: + - type: Sprite + layers: + - state: blank + - state: meat + +- type: entity + id: CP14FoodPiePiecePumpkin + parent: CP14FoodPiePieceBase + name: a piece of pumpkin pie + description: Pumpkin pie. Sweet and delicate. + components: + - type: Sprite + layers: + - state: blank + - state: pumpkin + +- type: entity + id: CP14FoodPiePieceVeg + parent: CP14FoodPiePieceBase + name: a piece of vegetable pie + description: Vegetables and herbs inside + components: + - type: Sprite + layers: + - state: blank + - state: veg \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/plate.yml b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/plate.yml index 3df3a927f7..31e5a7c19c 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/plate.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/plate.yml @@ -15,16 +15,17 @@ solutions: food: maxVol: 20 - - type: CP14FoodVisuals - displacementRsiPath: _CP14/Objects/Consumable/Food/Meals/displacement.rsi - solutionId: food - type: CP14FoodHolder + displacementRsiPath: _CP14/Objects/Consumable/Food/Meals/displacement.rsi foodType: Meal solutionId: food + canAcceptFood: true - type: Appearance - type: SolutionContainerVisuals - type: Food transferAmount: 2.5 + - type: Spillable + solution: food - type: entity id: CP14PlateWooden diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/cutlery.yml b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/cutlery.yml index 62974842ca..974c573f99 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/cutlery.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/cutlery.yml @@ -1,23 +1,3 @@ -- type: entity - id: CP14PlatePie - parent: BaseItem - name: pie plate - description: A mould for making a delicious pie. - categories: [ ForkFiltered ] - components: - - type: Sprite - sprite: _CP14/Objects/Consumable/Food/pie.rsi - state: tin - - type: Item - shape: - - 0,0,1,0 - - type: Tag - tags: - - CP14PlatePie - - type: PhysicalComposition - materialComposition: - CP14Iron: 10 # 1 iron bar = 1 plate pie in craft - - type: entity parent: BaseItem id: CP14Fork diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/pie.yml b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/pie.yml deleted file mode 100644 index 3257449200..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/pie.yml +++ /dev/null @@ -1,358 +0,0 @@ -# base - -- type: entity - parent: FoodInjectableBase - id: CP14FoodPieBase - abstract: true - categories: [ ForkFiltered ] - components: - - type: Item - size: Normal - storedRotation: -90 - - type: Temperature - - type: FlavorProfile - flavors: - - sweet - - type: Sprite - sprite: _CP14/Objects/Consumable/Food/pie.rsi - - type: SolutionContainerManager - solutions: - food: - maxVol: 20 - reagents: - - ReagentId: Nutriment - Quantity: 12 - - ReagentId: Protein - Quantity: 5 - - type: Food - trash: - - CP14PlatePie - - type: Tag - tags: - - Pie - - type: StaticPrice - price: 6 # price for crafting and plate - - type: PhysicalComposition - materialComposition: - CP14Iron: 10 # 1 iron bar = 1 plate pie in craft - -- type: entity - parent: FoodInjectableBase - id: CP14FoodPieBaseRaw - abstract: true - categories: [ ForkFiltered ] - components: - - type: Item - size: Normal - storedRotation: -90 - - type: Temperature - - type: FlavorProfile - flavors: - - raw dough - - type: Sprite - sprite: _CP14/Objects/Consumable/Food/pie.rsi - - type: SolutionContainerManager - solutions: - food: - maxVol: 20 - reagents: - - ReagentId: Nutriment - Quantity: 12 - - ReagentId: UncookedAnimalProteins - Quantity: 5 - - type: Food - trash: - - CP14PlatePie - - type: PhysicalComposition - materialComposition: - CP14Iron: 10 # 1 iron bar = 1 plate pie in craft - -# pie - -- type: entity - name: raw apple pie - parent: CP14FoodPieBaseRaw - id: CP14FoodPieAppleRaw - description: Raw dough with apples seems like a cnr you shouldn't be eating right now. - components: - - type: FlavorProfile - flavors: - - raw dough - - apple - - type: SolutionContainerManager - solutions: - food: - maxVol: 20 - reagents: - - ReagentId: Nutriment - Quantity: 6 - - ReagentId: UncookedAnimalProteins - Quantity: 2 - - ReagentId: Vitamin - Quantity: 5 - - type: Sprite - layers: - - state: tin - - state: apple_raw - - type: Tag - tags: - - Fruit - - type: CP14TemperatureTransformation - entries: - - temperatureRange: 400, 500 - transformTo: CP14FoodPieApple - -- type: entity - name: apple pie - parent: CP14FoodPieBase - id: CP14FoodPieApple - description: Apple pie beckons with its smells. - components: - - type: FlavorProfile - flavors: - - sweet - - apple - - type: SolutionContainerManager - solutions: - food: - maxVol: 20 - reagents: - - ReagentId: Nutriment - Quantity: 15 - - ReagentId: Protein - Quantity: 4 - - ReagentId: Vitamin - Quantity: 14 - - type: Sprite - layers: - - state: tin - - state: apple - - type: Tag - tags: - - Fruit - - Pie - - type: CP14TemperatureTransformation - entries: - - temperatureRange: 400, 500 - transformTo: CP14FoodPieBurnt - -- type: entity - name: raw meat pie - parent: CP14FoodPieBaseRaw - id: CP14FoodPieMeatRaw - description: Raw dough with raw meat, not the best dish at the moment. - components: - - type: FlavorProfile - flavors: - - raw dough - - meaty - - type: SolutionContainerManager - solutions: - food: - maxVol: 34 - reagents: - - ReagentId: Nutriment - Quantity: 16 - - ReagentId: UncookedAnimalProteins - Quantity: 13 - - ReagentId: Vitamin - Quantity: 2 - - type: Sprite - layers: - - state: tin - - state: meat_raw - - type: Tag - tags: - - Meat - - type: CP14TemperatureTransformation - entries: - - temperatureRange: 400, 500 - transformTo: CP14FoodPieMeat - -- type: entity - name: meat pie - parent: CP14FoodPieBase - id: CP14FoodPieMeat - description: Oh that wonderful aroma of bread and meat, I could eat that right now. - components: - - type: FlavorProfile - flavors: - - meaty - - type: SolutionContainerManager - solutions: - food: - maxVol: 34 - reagents: - - ReagentId: Nutriment - Quantity: 16 - - ReagentId: Protein - Quantity: 13 - - ReagentId: Vitamin - Quantity: 2 - - type: Sprite - layers: - - state: tin - - state: meat - - type: Tag - tags: - - Meat - - Pie - - type: CP14TemperatureTransformation - entries: - - temperatureRange: 400, 500 - transformTo: CP14FoodPieBurnt - -- type: entity - name: raw fish pie - parent: CP14FoodPieBaseRaw - id: CP14FoodPieFishRaw - description: Raw dough with raw fish..... Where did they get the fish?! - components: - - type: FlavorProfile - flavors: - - raw dough - - fishy - - type: Sprite - layers: - - state: tin - - state: fisht_raw - - type: Tag - tags: - - Meat - - type: CP14TemperatureTransformation - entries: - - temperatureRange: 400, 500 - transformTo: CP14FoodPieFish - - type: StaticPrice - price: 20 - -- type: entity - name: fish pie - parent: CP14FoodPieBase - id: CP14FoodPieFish - description: Fish pie, a good alternative among meat dishes. - components: - - type: FlavorProfile - flavors: - - fishy - - type: SolutionContainerManager - solutions: - food: - maxVol: 30 - reagents: - - ReagentId: Nutriment - Quantity: 15 - - ReagentId: Protein - Quantity: 8 - - ReagentId: Vitamin - Quantity: 6 - - type: Sprite - layers: - - state: tin - - state: fish - - type: Tag - tags: - - Meat - - Pie - - type: CP14TemperatureTransformation - entries: - - temperatureRange: 400, 500 - transformTo: CP14FoodPieBurnt - -- type: entity - name: raw pumpkin pie - parent: CP14FoodPieBaseRaw - id: CP14FoodPiePumpkinRaw - description: Raw dough with pumpkin, can be a satisfyingly flavorful dish. - components: - - type: FlavorProfile - flavors: - - raw dough - - pumpkin - - type: Sprite - layers: - - state: tin - - state: pumpkin_raw - - type: SolutionContainerManager - solutions: - food: - maxVol: 20 - reagents: - - ReagentId: Nutriment - Quantity: 2 - - ReagentId: UncookedAnimalProteins - Quantity: 2 - - ReagentId: PumpkinFlesh - Quantity: 10 - - ReagentId: Vitamin - Quantity: 4 - - type: Tag - tags: - - Fruit - - type: CP14TemperatureTransformation - entries: - - temperatureRange: 400, 500 - transformTo: CP14FoodPiePumpkin - -- type: entity - name: pumpkin pie - parent: CP14FoodPieBase - id: CP14FoodPiePumpkin - description: Delicious pumpkin pie, with a toasted crust on the outside. - components: - - type: FlavorProfile - flavors: - - pumpkin - - type: Sprite - layers: - - state: tin - - state: pumpkin - - type: SolutionContainerManager - solutions: - food: - maxVol: 20 - reagents: - - ReagentId: Nutriment - Quantity: 4 - - ReagentId: Protein - Quantity: 2 - - ReagentId: PumpkinFlesh - Quantity: 10 - - ReagentId: Vitamin - Quantity: 4 - - type: Tag - tags: - - Fruit - - Pie - - type: CP14TemperatureTransformation - entries: - - temperatureRange: 400, 500 - transformTo: CP14FoodPieBurnt - -- type: entity - name: burnt pie - parent: CP14FoodPieBaseRaw - id: CP14FoodPieBurnt - description: The pie is burnt and is a burnt and inedible mass. It's best to clean that up with a knife. - components: - - type: FlavorProfile - flavors: - - terrible - - type: Sprite - layers: - - state: tin - - state: burnt_pie - - type: SolutionContainerManager - solutions: - food: - maxVol: 15 - reagents: - - ReagentId: Nutriment - Quantity: 2 - - ReagentId: CP14BurntFood - Quantity: 8 - - type: Butcherable - butcheringType: Knife - spawned: - - id: CP14PlatePie - amount: 1 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/base.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/base.yml index 25cc4ba275..7b54afced7 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/base.yml @@ -21,9 +21,6 @@ burn: True: { visible: true } False: { visible: false } - - type: Item - size: Ginormous - - type: MultiHandedItem - type: ContainerContainer containers: storagebase: !type:Container @@ -32,7 +29,6 @@ maxItemSize: Normal grid: - 0,0,3,3 - - 0,0,2,2 whitelist: components: - Food diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/cooking_pot.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/cooking_pot.yml index 0667af73e1..e3f5864fa1 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/cooking_pot.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/cooking_pot.yml @@ -5,7 +5,7 @@ description: Container for cooking Grand Soup. components: - type: Sprite - sprite: _CP14/Objects/Specific/Cooking/cooking_pot.rsi + sprite: _CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi layers: - state: base map: ["enum.StorageVisualLayers.Base"] @@ -23,13 +23,18 @@ solutions: cooker: maxVol: 150 - - type: CP14FoodVisuals + - type: CP14FoodHolder + foodType: Soup solutionId: cooker displacementRsiPath: _CP14/Objects/Consumable/Food/Soups/displacement_pot.rsi maxDisplacementFillLevels: 2 + canGiveFood: true - type: CP14FoodCooker foodType: Soup solutionId: cooker + - type: Item + size: Ginormous + - type: MultiHandedItem - type: RefillableSolution solution: cooker - type: Spillable diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/frying_pen.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/frying_pen.yml index 1313a2e80c..b885bb8446 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/frying_pen.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/frying_pen.yml @@ -5,7 +5,7 @@ description: "You can always watch three things: how fire burns, how water flows, and how delicious meat is cooked." components: - type: Sprite - sprite: _CP14/Objects/Specific/Cooking/frying_pan.rsi + sprite: _CP14/Objects/Consumable/Food/Meals/frying_pan.rsi layers: - state: base map: ["enum.StorageVisualLayers.Base"] @@ -35,10 +35,15 @@ solutions: cooker: maxVol: 100 - - type: CP14FoodVisuals + - type: CP14FoodHolder + foodType: Meal solutionId: cooker displacementRsiPath: _CP14/Objects/Consumable/Food/Meals/displacement_pan.rsi maxDisplacementFillLevels: 2 + canGiveFood: true + - type: Item + size: Ginormous + - type: MultiHandedItem - type: CP14FoodCooker foodType: Meal solutionId: cooker diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/pie_pan.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/pie_pan.yml new file mode 100644 index 0000000000..d90a78d7b2 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/pie_pan.yml @@ -0,0 +1,84 @@ +- type: entity + id: CP14PlatePie + parent: CP14CookerBase + name: pie plate + description: A mould for making a delicious pie. + categories: [ ForkFiltered ] + components: + - type: Sprite + sprite: _CP14/Objects/Consumable/Food/Pies/plate.rsi + layers: + - state: iron + - map: ["cp14_foodLayers"] + - map: ["enum.StorageFillLayers.Fill"] + - type: Item + size: Normal + shape: + - 0,0,1,1 + - type: PhysicalComposition + materialComposition: + CP14Iron: 10 # 1 iron bar = 1 plate pie in craft + - type: CP14FoodCooker + foodType: Pie + solutionId: cooker + - type: CP14FoodHolder + foodType: Pie + solutionId: cooker + - type: Storage + maxItemSize: Small + grid: + - 0,0,2,2 + cP14Ignorelist: + components: + - CP14FoodHolder + - FoodSequenceStartPoint + - Sharp + - CP14Sharpened + - type: Appearance + - type: StorageFillVisualizer + maxFillLevels: 3 + fillBaseName: raw + - type: SolutionContainerManager + solutions: + cooker: + maxVol: 50 + - type: AmbientSound + sound: + path: /Audio/_CP14/Ambience/pan_frying.ogg + - type: GenericVisualizer + visuals: + enum.CP14CookingVisuals.Cooking: + cook: + True: { visible: true } + False: { visible: false } + enum.CP14CookingVisuals.Burning: + burn: + True: { visible: true } + False: { visible: false } + - type: Food + solution: cooker + transferAmount: 2.5 + trash: + - CP14PlatePie + - type: Spillable + solution: cooker + - type: SolutionContainerVisuals + - type: SliceableFood + +- type: entity + id: CP14PlatePieRandom + suffix: Random food + parent: CP14PlatePie + components: + - type: CP14RandomFoodData + - type: SolutionContainerManager + solutions: + cooker: + maxVol: 50 + reagents: + - ReagentId: Nutriment + Quantity: 20 + - ReagentId: Protein + Quantity: 20 + - ReagentId: Fat + Quantity: 10 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Recipes/Cooking/food_types.yml b/Resources/Prototypes/_CP14/Recipes/Cooking/food_types.yml new file mode 100644 index 0000000000..6f1eafb84e --- /dev/null +++ b/Resources/Prototypes/_CP14/Recipes/Cooking/food_types.yml @@ -0,0 +1,8 @@ +- type: CP14FoodType + id: Meal + +- type: CP14FoodType + id: Soup + +- type: CP14FoodType + id: Pie \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Recipes/Cooking/pies.yml b/Resources/Prototypes/_CP14/Recipes/Cooking/pies.yml new file mode 100644 index 0000000000..7203ae85a0 --- /dev/null +++ b/Resources/Prototypes/_CP14/Recipes/Cooking/pies.yml @@ -0,0 +1,61 @@ +- type: CP14CookingRecipe + id: InediblePie + foodType: Pie + foodData: + name: cp14-soup-recipe-pie-name + desc: cp14-soup-recipe-pie-desc + visuals: + - sprite: _CP14/Objects/Consumable/Food/Pies/misc.rsi + state: veg + sliceProto: CP14FoodPiePieceTrash + requirements: + - !type:AlwaysMet + +# 1 Req + +- type: CP14CookingRecipe + id: PieVeg + foodType: Pie + foodData: + name: cp14-soup-recipe-pie-name + desc: cp14-soup-recipe-pie-desc + visuals: + - sprite: _CP14/Objects/Consumable/Food/Pies/misc.rsi + state: veg + sliceProto: CP14FoodPiePieceVeg + requirements: + - !type:TagRequired + tags: + - CP14Salad + - CP14Vegetable + +- type: CP14CookingRecipe + id: PieMeat + foodType: Pie + foodData: + name: cp14-soup-recipe-pie-name + desc: cp14-soup-recipe-pie-desc + visuals: + - sprite: _CP14/Objects/Consumable/Food/Pies/misc.rsi + state: meat + sliceProto: CP14FoodPiePieceMeat + requirements: + - !type:TagRequired + tags: + - CP14Meat + - CP14MeatSlice + +- type: CP14CookingRecipe + id: PiePumpkin + foodType: Pie + foodData: + name: cp14-soup-recipe-pie-name + desc: cp14-soup-recipe-pie-desc + visuals: + - sprite: _CP14/Objects/Consumable/Food/Pies/misc.rsi + state: meat + sliceProto: CP14FoodPiePiecePumpkin + requirements: + - !type:TagRequired + tags: + - CP14Pumpkin \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/CookingTable/pies.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/CookingTable/pies.yml deleted file mode 100644 index f7efc76aaa..0000000000 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/CookingTable/pies.yml +++ /dev/null @@ -1,59 +0,0 @@ -- type: CP14Recipe - id: CP14FoodPieAppleRaw - tag: CP14RecipeCooking - craftTime: 5 - requirements: - - !type:ProtoIdResource - protoId: CP14PlatePie - - !type:ProtoIdResource - protoId: CP14FoodDoughMediumFlat - - !type:ProtoIdResource - protoId: CP14FoodAppleSlice - count: 4 - result: CP14FoodPieAppleRaw - -- type: CP14Recipe - id: CP14FoodPieMeatRaw - tag: CP14RecipeCooking - craftTime: 5 - requirements: - - !type:ProtoIdResource - protoId: CP14PlatePie - - !type:ProtoIdResource - protoId: CP14FoodDoughMediumFlat - - !type:ProtoIdResource - protoId: CP14FoodMeatPigSlice - count: 3 - result: CP14FoodPieMeatRaw - -- type: CP14Recipe - id: CP14FoodPiePumpkinRaw - tag: CP14RecipeCooking - craftTime: 5 - requirements: - - !type:ProtoIdResource - protoId: CP14PlatePie - - !type:ProtoIdResource - protoId: CP14FoodDoughMediumFlat - - !type:ProtoIdResource - protoId: CP14FoodPumpkinSlice - count: 5 - result: CP14FoodPiePumpkinRaw - -# preobaly just a placeholder until we get actaul fish - -- type: CP14Recipe - id: CP14FoodPieFishRaw - tag: CP14RecipeCooking - craftTime: 5 - requirements: - - !type:ProtoIdResource - protoId: CP14PlatePie - - !type:ProtoIdResource - protoId: CP14FoodDoughMediumFlat - - !type:ProtoIdResource - protoId: CP14FoodMeatFlemTorso - - !type:ProtoIdResource - protoId: CP14FoodMeatFlemLeg - count: 2 - result: CP14FoodPieFishRaw diff --git a/Resources/Prototypes/_CP14/Tags/misc.yml b/Resources/Prototypes/_CP14/Tags/misc.yml index 9064e44b7c..55a4fcb8c6 100644 --- a/Resources/Prototypes/_CP14/Tags/misc.yml +++ b/Resources/Prototypes/_CP14/Tags/misc.yml @@ -73,9 +73,6 @@ - type: Tag id: CP14Arrow -- type: Tag - id: CP14PlatePie - - type: Tag id: CP14FarmFood diff --git a/Resources/Prototypes/_CP14/Trading/BuyPositions/dairy_products.yml b/Resources/Prototypes/_CP14/Trading/BuyPositions/dairy_products.yml index 20c68d092c..c42a792288 100644 --- a/Resources/Prototypes/_CP14/Trading/BuyPositions/dairy_products.yml +++ b/Resources/Prototypes/_CP14/Trading/BuyPositions/dairy_products.yml @@ -52,7 +52,7 @@ reputationLevel: 1 uiPosition: 2 icon: - sprite: _CP14/Objects/Specific/Cooking/frying_pan.rsi + sprite: _CP14/Objects/Consumable/Food/Meals/frying_pan.rsi state: base service: !type:CP14BuyItemsService product: CP14FryingPan @@ -64,7 +64,7 @@ reputationLevel: 1 uiPosition: 3 icon: - sprite: _CP14/Objects/Specific/Cooking/cooking_pot.rsi + sprite: _CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi state: base service: !type:CP14BuyItemsService product: CP14CookingPot diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/base.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/base.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/base.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/base.png diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/closed.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/closed.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/closed.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/closed.png diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/cooking.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/cooking.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/cooking.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/cooking.png diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/dirt.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/dirt.png new file mode 100644 index 0000000000..7028069845 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/dirt.png differ diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/inhand-left.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/inhand-left.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/inhand-left.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/inhand-left.png diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/inhand-right.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/inhand-right.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/inhand-right.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/inhand-right.png diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/meta.json b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/meta.json similarity index 93% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/meta.json rename to Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/meta.json index d2eadda949..db91042014 100644 --- a/Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/meta.json +++ b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/meta.json @@ -27,6 +27,9 @@ ] ] }, + { + "name": "dirt" + }, { "name": "inhand-left", "directions": 4 diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/opened.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/opened.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/frying_pan.rsi/opened.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Meals/frying_pan.rsi/opened.png diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/plates.rsi/dirt.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/plates.rsi/dirt.png new file mode 100644 index 0000000000..bf4d79c6a0 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/plates.rsi/dirt.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/plates.rsi/meta.json b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/plates.rsi/meta.json index fc6596ca10..920c9b3621 100644 --- a/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/plates.rsi/meta.json +++ b/Resources/Textures/_CP14/Objects/Consumable/Food/Meals/plates.rsi/meta.json @@ -7,6 +7,9 @@ "y": 32 }, "states": [ + { + "name": "dirt" + }, { "name": "wooden" }, diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/apple.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/misc.rsi/fruit.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/apple.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Pies/misc.rsi/fruit.png diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/meat.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/misc.rsi/meat.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/meat.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Pies/misc.rsi/meat.png diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/misc.rsi/meta.json b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/misc.rsi/meta.json new file mode 100644 index 0000000000..9afb93a0a0 --- /dev/null +++ b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/misc.rsi/meta.json @@ -0,0 +1,20 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-4.0", + "copyright": "Created by Artista", + "states": [ + { + "name": "fruit" + }, + { + "name": "veg" + }, + { + "name": "meat" + } + ] +} diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/fish.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/misc.rsi/veg.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/fish.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Pies/misc.rsi/veg.png diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/blank.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/blank.png new file mode 100644 index 0000000000..bc50b7af25 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/blank.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/meat.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/meat.png new file mode 100644 index 0000000000..f10f848884 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/meat.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/meta.json b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/meta.json new file mode 100644 index 0000000000..532c987784 --- /dev/null +++ b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/meta.json @@ -0,0 +1,26 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-4.0", + "copyright": "Created by TheShuEd", + "states": [ + { + "name": "blank" + }, + { + "name": "meat" + }, + { + "name": "pumpkin" + }, + { + "name": "trash" + }, + { + "name": "veg" + } + ] +} diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/pumpkin.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/pumpkin.png new file mode 100644 index 0000000000..e181d9fbbb Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/pumpkin.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/trash.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/trash.png new file mode 100644 index 0000000000..33fb560710 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/trash.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/veg.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/veg.png new file mode 100644 index 0000000000..2c788bff80 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/pieces.rsi/veg.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/iron.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/iron.png new file mode 100644 index 0000000000..d4ec311a12 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/iron.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/meta.json b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/meta.json new file mode 100644 index 0000000000..4cf022d074 --- /dev/null +++ b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/meta.json @@ -0,0 +1,23 @@ +{ + "version": 1, + "license": "All right reserved", + "copyright": "Created by Prazat", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "iron" + }, + { + "name": "raw-0" + }, + { + "name": "raw-1" + }, + { + "name": "raw-2" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/raw-0.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/raw-0.png new file mode 100644 index 0000000000..7244b37f5c Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/raw-0.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/raw-1.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/raw-1.png new file mode 100644 index 0000000000..df5ed56424 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/raw-1.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/raw-2.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/raw-2.png new file mode 100644 index 0000000000..20804fabf5 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Pies/plate.rsi/raw-2.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/bowls.rsi/dirt.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/bowls.rsi/dirt.png new file mode 100644 index 0000000000..ad87f48ca7 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/bowls.rsi/dirt.png differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/bowls.rsi/meta.json b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/bowls.rsi/meta.json index 1f1fd9f150..20f559a34a 100644 --- a/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/bowls.rsi/meta.json +++ b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/bowls.rsi/meta.json @@ -7,6 +7,9 @@ "y": 32 }, "states": [ + { + "name": "dirt" + }, { "name": "wooden" }, diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/base.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/base.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/base.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/base.png diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/closed.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/closed.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/closed.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/closed.png diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/cooking.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/cooking.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/cooking.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/cooking.png diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/dirt.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/dirt.png new file mode 100644 index 0000000000..68e560ed1c Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/dirt.png differ diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/inhand-left.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/inhand-left.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/inhand-left.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/inhand-left.png diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/inhand-right.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/inhand-right.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/inhand-right.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/inhand-right.png diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/meta.json b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/meta.json similarity index 93% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/meta.json rename to Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/meta.json index d2eadda949..db91042014 100644 --- a/Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/meta.json +++ b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/meta.json @@ -27,6 +27,9 @@ ] ] }, + { + "name": "dirt" + }, { "name": "inhand-left", "directions": 4 diff --git a/Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/opened.png b/Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/opened.png similarity index 100% rename from Resources/Textures/_CP14/Objects/Specific/Cooking/cooking_pot.rsi/opened.png rename to Resources/Textures/_CP14/Objects/Consumable/Food/Soups/cooking_pot.rsi/opened.png diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/apple_raw.png b/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/apple_raw.png deleted file mode 100644 index 20c11be77a..0000000000 Binary files a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/apple_raw.png and /dev/null differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/burnt_pie.png b/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/burnt_pie.png deleted file mode 100644 index fd3ee6a5d7..0000000000 Binary files a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/burnt_pie.png and /dev/null differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/fisht_raw.png b/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/fisht_raw.png deleted file mode 100644 index 4ab392ace8..0000000000 Binary files a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/fisht_raw.png and /dev/null differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/meat_raw.png b/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/meat_raw.png deleted file mode 100644 index 5a80f7129e..0000000000 Binary files a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/meat_raw.png and /dev/null differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/meta.json b/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/meta.json deleted file mode 100644 index da05f93bb6..0000000000 --- a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/meta.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-4.0", - "copyright": "Created by Artista, pumpkin by aeoli (discord), burnt_pie by nimfar11", - "states": [ - { - "name": "apple" - }, - { - "name": "apple_raw" - }, - { - "name": "fish" - }, - { - "name": "fisht_raw" - }, - { - "name": "meat" - }, - { - "name": "meat_raw" - }, - { - "name": "pumpkin" - }, - { - "name": "pumpkin_raw" - }, - { - "name": "burnt_pie" - }, - { - "name": "tin" - } - ] -} diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/pumpkin.png b/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/pumpkin.png deleted file mode 100644 index 5068ff2598..0000000000 Binary files a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/pumpkin.png and /dev/null differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/pumpkin_raw.png b/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/pumpkin_raw.png deleted file mode 100644 index 2157a98544..0000000000 Binary files a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/pumpkin_raw.png and /dev/null differ diff --git a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/tin.png b/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/tin.png deleted file mode 100644 index c926b65c9c..0000000000 Binary files a/Resources/Textures/_CP14/Objects/Consumable/Food/pie.rsi/tin.png and /dev/null differ diff --git a/Resources/migration.yml b/Resources/migration.yml index e4535b4f86..65d0e4ef34 100644 --- a/Resources/migration.yml +++ b/Resources/migration.yml @@ -371,7 +371,12 @@ CP14WoodenClosetGuardCommanderFilled: null #2025-13-07 CP14Plate: CP14PlateWooden - +CP14FoodPieApple: null +CP14FoodPieAppleRaw: null +CP14FoodPieFish: null +CP14FoodPieFishRaw: null +CP14FoodPieMeat: null +CP14FoodPieMeatRaw: null # <---> CrystallEdge migration zone end