mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
Fix AgeRequirement Showing Int32 Maximum (#1732)
I did separate locales because it'd be messy otherwise.
🆑
- fix: Loadouts will no longer show the integer limit.
(cherry picked from commit ef5d0e770f390c38dfd4ba173886598de1e96572)
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user