diff --git a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs index 2ba8bfb2f9..bf6dff7a04 100644 --- a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs +++ b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs @@ -26,7 +26,7 @@ public sealed partial class CharacterAgeRequirement : CharacterRequirement public int Min; [DataField] - public int Max = 2147483647; + public int Max = Int32.MaxValue; public override bool IsValid( JobPrototype job, @@ -41,8 +41,15 @@ public sealed partial class CharacterAgeRequirement : CharacterRequirement int depth = 0 ) { + var localeString = ""; + + if (Max == Int32.MaxValue || Min <= 0) + localeString = Max == Int32.MaxValue ? "character-age-requirement-minimum-only" : "character-age-requirement-maximum-only"; + else + localeString = "character-age-requirement-range"; + reason = Loc.GetString( - "character-age-requirement", + localeString, ("inverted", Inverted), ("min", Min), ("max", Max)); diff --git a/Resources/Locale/en-US/customization/character-requirements.ftl b/Resources/Locale/en-US/customization/character-requirements.ftl index 900e15ea66..ddddbc7440 100644 --- a/Resources/Locale/en-US/customization/character-requirements.ftl +++ b/Resources/Locale/en-US/customization/character-requirements.ftl @@ -43,11 +43,21 @@ character-logic-xor-requirement = You must{$inverted -> ## Profile -character-age-requirement = You must{$inverted -> +character-age-requirement-range = You must{$inverted -> [true]{" "}not *[other]{""} } be within [color=yellow]{$min}[/color] and [color=yellow]{$max}[/color] years old +character-age-requirement-minimum-only = You must{$inverted -> + [true]{" "}not + *[other]{""} +} be at least [color=yellow]{$min}[/color] years old + +character-age-requirement-maximum-only = You must{$inverted -> + [true]{""} + *[other]{" "}not +} be older than [color=yellow]{$max}[/color] years old + character-backpack-type-requirement = You must {$inverted -> [true] not use *[other] use