Remove EnsureJobRequirementsValid

Its code that frequently breaks, and while I could fix it, I don't think its needed currently.
This commit is contained in:
null 2024-05-15 13:11:54 +02:00
parent 03f9f668e9
commit 7f6449b5e9
No known key found for this signature in database
GPG Key ID: 212F05528FD678BE
1 changed files with 0 additions and 23 deletions

View File

@ -594,7 +594,6 @@ namespace Content.Client.Preferences.UI
category.AddChild(selector);
_jobPriorities.Add(selector);
EnsureJobRequirementsValid(); // DeltaV
selector.LoadoutUpdated += args =>
{
@ -633,27 +632,6 @@ namespace Content.Client.Preferences.UI
}
}
/// <summary>
/// DeltaV - Make sure that no invalid job priorities get through.
/// </summary>
private void EnsureJobRequirementsValid()
{
var changed = false;
foreach (var selector in _jobPriorities)
{
if (_requirements.IsAllowed(selector.Proto, out var _) || selector.Priority == JobPriority.Never)
continue;
selector.Priority = JobPriority.Never;
Profile = Profile?.WithJobPriority(selector.Proto.ID, JobPriority.Never);
changed = true;
}
if (!changed)
return;
Save();
}
private void OnFlavorTextChange(string content)
{
if (Profile is null)
@ -774,7 +752,6 @@ namespace Content.Client.Preferences.UI
UpdateAntagRequirements();
UpdateControls();
ShowClothes.Pressed = true;
EnsureJobRequirementsValid(); // DeltaV
}
private void SetAge(int newAge)