Clean up stale preferences data on load at the server.
This fixes further bugs with "nonexistant job selected in character preferences" like the client blowing up in the lobby.
This commit is contained in:
@@ -106,7 +106,7 @@ namespace Content.Shared.Preferences
|
||||
return new(Name, Age, Sex, appearance, _jobPriorities, PreferenceUnavailable, _antagPreferences);
|
||||
}
|
||||
|
||||
public HumanoidCharacterProfile WithJobPriorities(IReadOnlyDictionary<string, JobPriority> jobPriorities)
|
||||
public HumanoidCharacterProfile WithJobPriorities(IEnumerable<KeyValuePair<string, JobPriority>> jobPriorities)
|
||||
{
|
||||
return new(
|
||||
Name,
|
||||
@@ -138,7 +138,7 @@ namespace Content.Shared.Preferences
|
||||
return new(Name, Age, Sex, Appearance, _jobPriorities, mode, _antagPreferences);
|
||||
}
|
||||
|
||||
public HumanoidCharacterProfile WithAntagPreferences(IReadOnlyList<string> antagPreferences)
|
||||
public HumanoidCharacterProfile WithAntagPreferences(IEnumerable<string> antagPreferences)
|
||||
{
|
||||
return new(
|
||||
Name,
|
||||
|
||||
Reference in New Issue
Block a user