Accent trait limit (#28046)
This commit is contained in:
@@ -9,6 +9,8 @@ namespace Content.Client.Lobby.UI.Roles;
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class TraitPreferenceSelector : Control
|
||||
{
|
||||
public int Cost;
|
||||
|
||||
public bool Preference
|
||||
{
|
||||
get => Checkbox.Pressed;
|
||||
@@ -20,7 +22,12 @@ public sealed partial class TraitPreferenceSelector : Control
|
||||
public TraitPreferenceSelector(TraitPrototype trait)
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
Checkbox.Text = Loc.GetString(trait.Name);
|
||||
|
||||
var text = trait.Cost != 0 ? $"[{trait.Cost}] " : "";
|
||||
text += Loc.GetString(trait.Name);
|
||||
|
||||
Cost = trait.Cost;
|
||||
Checkbox.Text = text;
|
||||
Checkbox.OnToggled += OnCheckBoxToggled;
|
||||
|
||||
if (trait.Description is { } desc)
|
||||
|
||||
Reference in New Issue
Block a user