Skip to content

Commit 6141ae9

Browse files
committed
fix sandbox violation
why was the client the only one affected?
1 parent ca53c09 commit 6141ae9

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Content.Shared/Preferences/HumanoidCharacterProfile.cs

+11-9
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ private HumanoidCharacterProfile(
8181
/// <summary>Copy constructor</summary>
8282
private HumanoidCharacterProfile(HumanoidCharacterProfile other)
8383
: this(other, new Dictionary<string, JobPriority>(other.JobPriorities),
84-
[..other.AntagPreferences], [..other.TraitPreferences], [..other.LoadoutPreferences])
84+
new List<string>(other.AntagPreferences), new List<string>(other.TraitPreferences),
85+
new List<string>(other.LoadoutPreferences))
8586
{
8687
}
8788

@@ -103,7 +104,8 @@ public HumanoidCharacterProfile(
103104
IReadOnlyList<string> loadoutPreferences)
104105
: this(name, flavortext, species, age, sex, gender, appearance, clothing, backpack, spawnPriority,
105106
new Dictionary<string, JobPriority>(jobPriorities), preferenceUnavailable,
106-
[..antagPreferences], [..traitPreferences], [..loadoutPreferences])
107+
new List<string>(antagPreferences), new List<string>(traitPreferences),
108+
new List<string>(loadoutPreferences))
107109
{
108110
}
109111

@@ -128,9 +130,9 @@ public HumanoidCharacterProfile() : this(
128130
{SharedGameTicker.FallbackOverflowJob, JobPriority.High}
129131
},
130132
PreferenceUnavailableMode.SpawnAsOverflow,
131-
[],
132-
[],
133-
[])
133+
new List<string>(),
134+
new List<string>(),
135+
new List<string>())
134136
{
135137
}
136138

@@ -157,9 +159,9 @@ public static HumanoidCharacterProfile DefaultWithSpecies(string species = Share
157159
{SharedGameTicker.FallbackOverflowJob, JobPriority.High}
158160
},
159161
PreferenceUnavailableMode.SpawnAsOverflow,
160-
[],
161-
[],
162-
[]);
162+
new List<string>(),
163+
new List<string>(),
164+
new List<string>());
163165
}
164166

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

216218
public string Name { get; private set; }

0 commit comments

Comments
 (0)