Fixed unable to select None for character spawn priority (#24897)

Allows None to be selected
This commit is contained in:
Krunklehorn
2024-02-03 03:06:44 -05:00
committed by GitHub
parent 3484e69dff
commit 778a704b58

View File

@@ -115,7 +115,7 @@ namespace Content.Shared.Preferences
new HumanoidCharacterAppearance(), new HumanoidCharacterAppearance(),
ClothingPreference.Jumpsuit, ClothingPreference.Jumpsuit,
BackpackPreference.Backpack, BackpackPreference.Backpack,
SpawnPriorityPreference.Arrivals, SpawnPriorityPreference.None,
new Dictionary<string, JobPriority> new Dictionary<string, JobPriority>
{ {
{SharedGameTicker.FallbackOverflowJob, JobPriority.High} {SharedGameTicker.FallbackOverflowJob, JobPriority.High}
@@ -143,7 +143,7 @@ namespace Content.Shared.Preferences
HumanoidCharacterAppearance.DefaultWithSpecies(species), HumanoidCharacterAppearance.DefaultWithSpecies(species),
ClothingPreference.Jumpsuit, ClothingPreference.Jumpsuit,
BackpackPreference.Backpack, BackpackPreference.Backpack,
SpawnPriorityPreference.Arrivals, SpawnPriorityPreference.None,
new Dictionary<string, JobPriority> new Dictionary<string, JobPriority>
{ {
{SharedGameTicker.FallbackOverflowJob, JobPriority.High} {SharedGameTicker.FallbackOverflowJob, JobPriority.High}
@@ -185,7 +185,7 @@ namespace Content.Shared.Preferences
var name = GetName(species, gender); var name = GetName(species, gender);
return new HumanoidCharacterProfile(name, "", species, age, sex, gender, HumanoidCharacterAppearance.Random(species, sex), ClothingPreference.Jumpsuit, BackpackPreference.Backpack, SpawnPriorityPreference.Arrivals, return new HumanoidCharacterProfile(name, "", species, age, sex, gender, HumanoidCharacterAppearance.Random(species, sex), ClothingPreference.Jumpsuit, BackpackPreference.Backpack, SpawnPriorityPreference.None,
new Dictionary<string, JobPriority> new Dictionary<string, JobPriority>
{ {
{SharedGameTicker.FallbackOverflowJob, JobPriority.High}, {SharedGameTicker.FallbackOverflowJob, JobPriority.High},
@@ -470,9 +470,10 @@ namespace Content.Shared.Preferences
var spawnPriority = SpawnPriority switch var spawnPriority = SpawnPriority switch
{ {
SpawnPriorityPreference.None => SpawnPriorityPreference.None,
SpawnPriorityPreference.Arrivals => SpawnPriorityPreference.Arrivals, SpawnPriorityPreference.Arrivals => SpawnPriorityPreference.Arrivals,
SpawnPriorityPreference.Cryosleep => SpawnPriorityPreference.Cryosleep, SpawnPriorityPreference.Cryosleep => SpawnPriorityPreference.Cryosleep,
_ => SpawnPriorityPreference.Arrivals // Invalid enum values. _ => SpawnPriorityPreference.None // Invalid enum values.
}; };
var priorities = new Dictionary<string, JobPriority>(JobPriorities var priorities = new Dictionary<string, JobPriority>(JobPriorities