diff --git a/Content.Server/_CP14/Cooking/CP14CookingSystem.cs b/Content.Server/_CP14/Cooking/CP14CookingSystem.cs index 0eeaacb51b..7b1ce26732 100644 --- a/Content.Server/_CP14/Cooking/CP14CookingSystem.cs +++ b/Content.Server/_CP14/Cooking/CP14CookingSystem.cs @@ -24,8 +24,6 @@ public sealed class CP14CookingSystem : CP14SharedCookingSystem { base.Initialize(); - SubscribeLocalEvent(OnRandomFoodMapInit); - SubscribeLocalEvent(OnHolderChanged); } @@ -54,28 +52,6 @@ public sealed class CP14CookingSystem : CP14SharedCookingSystem Dirty(ent); } - private void OnRandomFoodMapInit(Entity ent, ref MapInitEvent args) - { - if (!TryComp(ent, out var holder)) - return; - - if (!_random.Prob(ent.Comp.Prob)) - return; - - var filteredRecipes = OrderedRecipes.Where(r => r.FoodType == holder.FoodType).ToList(); - if (filteredRecipes.Count == 0) - { - 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); - } - protected override void OnCookBurned(Entity ent, ref CP14BurningDoAfter args) { if (args.Cancelled || args.Handled) diff --git a/Content.Server/_CP14/Cooking/CP14RandomFoodDataComponent.cs b/Content.Server/_CP14/Cooking/CP14RandomFoodDataComponent.cs deleted file mode 100644 index 71090b4e24..0000000000 --- a/Content.Server/_CP14/Cooking/CP14RandomFoodDataComponent.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Content.Server._CP14.Cooking; - -/// -/// Attempting to add a random dish to CP14FoodHolderComponent -/// -[RegisterComponent, Access(typeof(CP14CookingSystem))] -public sealed partial class CP14RandomFoodDataComponent : Component -{ - /// - /// Chance of food appearing - /// - [DataField] - public float Prob = 0.75f; - - [DataField] - public bool Rename = true; -} 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 186d7c1afd..acc84f7b79 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/bowl.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/bowl.yml @@ -91,20 +91,4 @@ CP14Copper: 20 - type: Food trash: - - CP14BowlCopper - -- type: entity - id: CP14BowlWoodenRandom - parent: CP14BowlWooden - suffix: Random food - components: - - type: CP14RandomFoodData - - type: SolutionContainerManager - solutions: - food: - maxVol: 30 - reagents: - - ReagentId: Nutriment - Quantity: 15 - - ReagentId: Protein - Quantity: 15 \ No newline at end of file + - CP14BowlCopper \ 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 31e5a7c19c..adeabdf5bc 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/plate.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/Meals/plate.yml @@ -73,20 +73,4 @@ CP14Gold: 10 - type: Food trash: - - CP14PlateGold - -- type: entity - id: CP14PlateWoodenRandom - parent: CP14PlateWooden - suffix: Random food - components: - - type: CP14RandomFoodData - - type: SolutionContainerManager - solutions: - food: - maxVol: 20 - reagents: - - ReagentId: Nutriment - Quantity: 10 - - ReagentId: Protein - Quantity: 10 \ No newline at end of file + - CP14PlateGold \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/pie_pan.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/pie_pan.yml index d90a78d7b2..71ac18a39b 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/pie_pan.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Cooking/pie_pan.yml @@ -63,22 +63,4 @@ - 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 + - type: SliceableFood \ No newline at end of file diff --git a/Resources/migration.yml b/Resources/migration.yml index ece11e5806..ae7640e95a 100644 --- a/Resources/migration.yml +++ b/Resources/migration.yml @@ -472,6 +472,10 @@ CP14WallmountOrdersBorder: null CP14FenceGateBigIronDemiplaneCrystal: CP14FenceGateBigIron CP14FenceGateBigIronGuildmaster: CP14FenceGateBigIron +CP14BowlWoodenRandom: CP14BowlWooden +CP14PlateWoodenRandom: CP14PlateWooden +CP14PlatePieRandom: CP14PlatePie + # <---> CrystallEdge migration zone end