Skip to content

Commit

Permalink
fix sandbox violation
Browse files Browse the repository at this point in the history
why was the client the only one affected?
  • Loading branch information
DEATHB4DEFEAT committed Mar 26, 2024
1 parent ca53c09 commit 6141ae9
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Content.Shared/Preferences/HumanoidCharacterProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ private HumanoidCharacterProfile(
/// <summary>Copy constructor</summary>
private HumanoidCharacterProfile(HumanoidCharacterProfile other)
: this(other, new Dictionary<string, JobPriority>(other.JobPriorities),
[..other.AntagPreferences], [..other.TraitPreferences], [..other.LoadoutPreferences])
new List<string>(other.AntagPreferences), new List<string>(other.TraitPreferences),
new List<string>(other.LoadoutPreferences))
{
}

Expand All @@ -103,7 +104,8 @@ public HumanoidCharacterProfile(
IReadOnlyList<string> loadoutPreferences)
: this(name, flavortext, species, age, sex, gender, appearance, clothing, backpack, spawnPriority,
new Dictionary<string, JobPriority>(jobPriorities), preferenceUnavailable,
[..antagPreferences], [..traitPreferences], [..loadoutPreferences])
new List<string>(antagPreferences), new List<string>(traitPreferences),
new List<string>(loadoutPreferences))
{
}

Expand All @@ -128,9 +130,9 @@ public HumanoidCharacterProfile() : this(
{SharedGameTicker.FallbackOverflowJob, JobPriority.High}
},
PreferenceUnavailableMode.SpawnAsOverflow,
[],
[],
[])
new List<string>(),
new List<string>(),
new List<string>())
{
}

Expand All @@ -157,9 +159,9 @@ public static HumanoidCharacterProfile DefaultWithSpecies(string species = Share
{SharedGameTicker.FallbackOverflowJob, JobPriority.High}
},
PreferenceUnavailableMode.SpawnAsOverflow,
[],
[],
[]);
new List<string>(),
new List<string>(),
new List<string>());
}

// TODO: This should eventually not be a visual change only.
Expand Down Expand Up @@ -210,7 +212,7 @@ public static HumanoidCharacterProfile RandomWithSpecies(string species = Shared
new Dictionary<string, JobPriority>
{
{SharedGameTicker.FallbackOverflowJob, JobPriority.High},
}, PreferenceUnavailableMode.StayInLobby, [], [], []);
}, PreferenceUnavailableMode.StayInLobby, new List<string>(), new List<string>(), new List<string>());
}

public string Name { get; private set; }
Expand Down

0 comments on commit 6141ae9

Please sign in to comment.