]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Improve LocalizedDataset test to check for low Count (#36848)
authorTayrtahn <tayrtahn@gmail.com>
Wed, 23 Apr 2025 09:29:13 +0000 (05:29 -0400)
committerGitHub <noreply@github.com>
Wed, 23 Apr 2025 09:29:13 +0000 (11:29 +0200)
* Improve LocalizedDataset test to check for low Count

* Fix missing entries for FigurinesFootsoldier

Content.IntegrationTests/Tests/Localization/LocalizedDatasetPrototypeTest.cs
Resources/Prototypes/Datasets/figurines.yml

index 8d272545cee00141ccfd7e30262e8d8543412feb..05f98c3d198da06fc9089d8ec2d9f28e281f4e1e 100644 (file)
@@ -30,6 +30,10 @@ public sealed class LocalizedDatasetPrototypeTest
                     // Make sure the localization manager has a string for the LocId
                     Assert.That(localizationMan.HasString(locId), $"LocalizedDataset {proto.ID} with prefix \"{proto.Values.Prefix}\" specifies {proto.Values.Count} entries, but no localized string was found matching {locId}!");
                 }
+
+                // Check that count isn't set too low
+                var nextId = proto.Values.Prefix + (proto.Values.Count + 1);
+                Assert.That(localizationMan.HasString(nextId), Is.False, $"LocalizedDataset {proto.ID} with prefix \"{proto.Values.Prefix}\" specifies {proto.Values.Count} entries, but a localized string exists with ID {nextId}! Does count need to be raised?");
             }
         });
 
index 98dfee489fcab0be7c2f43456de06aa90d7e5bd8..95e072d8893e31c34636a0fab7c1ca7709ec28b0 100644 (file)
   id: FigurinesFootsoldier
   values:
     prefix: figurines-footsoldier-
-    count: 2
+    count: 5
 
 - type: localizedDataset
   id: FigurinesWizard