]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix unlimited MaxTraitPoints for traits (#29600)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Sun, 30 Jun 2024 04:28:49 +0000 (14:28 +1000)
committerGitHub <noreply@github.com>
Sun, 30 Jun 2024 04:28:49 +0000 (14:28 +1000)
-1 is a silly API because now you have to handle it everywhere manually instead of using nullability.

Content.Shared/Traits/TraitCategoryPrototype.cs

index e5bb919bf07ec532d7b7023681005b35bc039a2a..00c7fd36af139ed5e896332c21e4929883c37def 100644 (file)
@@ -21,8 +21,8 @@ public sealed partial class TraitCategoryPrototype : IPrototype
     public LocId Name { get; private set; } = string.Empty;
 
     /// <summary>
-    ///     The maximum number of traits that can be taken in this category. If -1, you can take as many traits as you like.
+    ///     The maximum number of traits that can be taken in this category.
     /// </summary>
     [DataField]
-    public int MaxTraitPoints = -1;
+    public int? MaxTraitPoints;
 }