From e529bc619603cec44e58bbfc0bbf8a0b1a5df03c Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Wed, 23 Apr 2025 05:29:13 -0400 Subject: [PATCH] Improve LocalizedDataset test to check for low Count (#36848) * Improve LocalizedDataset test to check for low Count * Fix missing entries for FigurinesFootsoldier --- .../Tests/Localization/LocalizedDatasetPrototypeTest.cs | 4 ++++ Resources/Prototypes/Datasets/figurines.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Content.IntegrationTests/Tests/Localization/LocalizedDatasetPrototypeTest.cs b/Content.IntegrationTests/Tests/Localization/LocalizedDatasetPrototypeTest.cs index 8d272545ce..05f98c3d19 100644 --- a/Content.IntegrationTests/Tests/Localization/LocalizedDatasetPrototypeTest.cs +++ b/Content.IntegrationTests/Tests/Localization/LocalizedDatasetPrototypeTest.cs @@ -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?"); } }); diff --git a/Resources/Prototypes/Datasets/figurines.yml b/Resources/Prototypes/Datasets/figurines.yml index 98dfee489f..95e072d889 100644 --- a/Resources/Prototypes/Datasets/figurines.yml +++ b/Resources/Prototypes/Datasets/figurines.yml @@ -212,7 +212,7 @@ id: FigurinesFootsoldier values: prefix: figurines-footsoldier- - count: 2 + count: 5 - type: localizedDataset id: FigurinesWizard