Changes for prototype load parallelization (#13066)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Pieter-Jan Briers
2022-12-20 23:25:34 +01:00
committed by GitHub
parent 584921b423
commit a323671984
50 changed files with 169 additions and 249 deletions

View File

@@ -470,7 +470,7 @@ namespace Content.Client.Preferences.UI
_antagPreferences = new List<AntagPreferenceSelector>();
foreach (var antag in prototypeManager.EnumeratePrototypes<AntagPrototype>().OrderBy(a => a.Name))
foreach (var antag in prototypeManager.EnumeratePrototypes<AntagPrototype>().OrderBy(a => Loc.GetString(a.Name)))
{
if (!antag.SetPreference)
{
@@ -492,7 +492,7 @@ namespace Content.Client.Preferences.UI
#region Traits
var traits = prototypeManager.EnumeratePrototypes<TraitPrototype>().OrderBy(t => t.Name).ToList();
var traits = prototypeManager.EnumeratePrototypes<TraitPrototype>().OrderBy(t => Loc.GetString(t.Name)).ToList();
_traitPreferences = new List<TraitPreferenceSelector>();
_tabContainer.SetTabTitle(3, Loc.GetString("humanoid-profile-editor-traits-tab"));
@@ -1238,12 +1238,12 @@ namespace Content.Client.Preferences.UI
{
Antag = antag;
_checkBox = new CheckBox {Text = $"{antag.Name}"};
_checkBox = new CheckBox {Text = Loc.GetString(antag.Name)};
_checkBox.OnToggled += OnCheckBoxToggled;
if (antag.Description != null)
{
_checkBox.ToolTip = antag.Description;
_checkBox.ToolTip = Loc.GetString(antag.Description);
_checkBox.TooltipDelay = 0.2f;
}
@@ -1280,12 +1280,12 @@ namespace Content.Client.Preferences.UI
{
Trait = trait;
_checkBox = new CheckBox {Text = $"{trait.Name}"};
_checkBox = new CheckBox {Text = Loc.GetString(trait.Name)};
_checkBox.OnToggled += OnCheckBoxToggled;
if (trait.Description != null)
if (trait.Description is { } desc)
{
_checkBox.ToolTip = trait.Description;
_checkBox.ToolTip = Loc.GetString(desc);
_checkBox.TooltipDelay = 0.2f;
}