]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Stop microwaving! (#40132)
authorRed <96445749+TheShuEd@users.noreply.github.com>
Fri, 12 Sep 2025 10:17:29 +0000 (13:17 +0300)
committerGitHub <noreply@github.com>
Fri, 12 Sep 2025 10:17:29 +0000 (12:17 +0200)
* Create KillMicrowaveTest.cs

* Update KillMicrowaveTest.cs

* Update Content.IntegrationTests/Tests/Microwave/KillMicrowaveTest.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Update Content.IntegrationTests/Tests/Microwave/KillMicrowaveTest.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Update Content.IntegrationTests/Tests/Microwave/KillMicrowaveTest.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* documentation

* Apply suggestions from code review

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Content.IntegrationTests/Tests/WizdenContentFreeze/WizdenContentFreeze.cs [new file with mode: 0644]

diff --git a/Content.IntegrationTests/Tests/WizdenContentFreeze/WizdenContentFreeze.cs b/Content.IntegrationTests/Tests/WizdenContentFreeze/WizdenContentFreeze.cs
new file mode 100644 (file)
index 0000000..891525a
--- /dev/null
@@ -0,0 +1,41 @@
+using Content.Shared.Kitchen;
+
+namespace Content.IntegrationTests.Tests.WizdenContentFreeze;
+
+/// <summary>
+/// These tests are limited to adding a specific type of content, essentially freezing it. If you are a fork developer, you may want to disable these tests.
+/// </summary>
+public sealed class WizdenContentFreeze
+{
+    /// <summary>
+    /// This freeze prohibits the addition of new microwave recipes.
+    /// The maintainers decided that the mechanics of cooking food in the microwave should be removed,
+    /// and all recipes should be ported to other cooking methods.
+    /// All added recipes essentially increase the technical debt of future cooking refactoring.
+    ///
+    /// https://github.com/space-wizards/space-station-14/issues/8524
+    /// </summary>
+    [Test]
+    public async Task MicrowaveRecipesFreezeTest()
+    {
+        await using var pair = await PoolManager.GetServerClient();
+        var server = pair.Server;
+
+        var protoMan = server.ProtoMan;
+
+        var recipesCount = protoMan.Count<FoodRecipePrototype>();
+        var recipesLimit = 218;
+
+        if (recipesCount > recipesLimit)
+        {
+            Assert.Fail($"PLEASE STOP ADDING NEW MICROWAVE RECIPES. MICROWAVE RECIPES ARE FROZEN AND NEED TO BE REPLACED WITH PROPER COOKING MECHANICS! See https://github.com/space-wizards/space-station-14/issues/8524. Keep it under {recipesLimit}. Current count: {recipesCount}");
+        }
+
+        if (recipesCount < recipesLimit)
+        {
+            Assert.Fail($"Oh, you deleted the microwave recipes? YOU ARE SO COOL! Please lower the number of recipes in MicrowaveRecipesFreezeTest from {recipesLimit} to {recipesCount} so that future contributors cannot add new recipes back.");
+        }
+
+        await pair.CleanReturnAsync();
+    }
+}