Quick fixes for markings (#7963)
This commit is contained in:
@@ -47,7 +47,10 @@ namespace Content.Client.Markings
|
||||
|
||||
foreach (var marking in markingList)
|
||||
{
|
||||
markings.ActiveMarkings[_markingManager.Markings()[marking.MarkingId].BodyPart].Add(marking);
|
||||
if (_markingManager.Markings().TryGetValue(marking.MarkingId, out var markingProto))
|
||||
{
|
||||
markings.ActiveMarkings[markingProto.BodyPart].Add(marking);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +72,14 @@ namespace Content.Client.Markings
|
||||
continue;
|
||||
}
|
||||
|
||||
// if the given marking isn't correctly formed, we need to
|
||||
// instead just allocate a new marking based on the old one
|
||||
// with the correct sprite count
|
||||
if (marking.MarkingColors.Count != markingPrototype.Sprites.Count)
|
||||
{
|
||||
marking = new Marking(marking.MarkingId, markingPrototype.Sprites.Count);
|
||||
}
|
||||
|
||||
if (usedPoints.TryGetValue(markingPrototype.MarkingCategory, out MarkingPoints? points))
|
||||
{
|
||||
if (points.Points == 0)
|
||||
|
||||
Reference in New Issue
Block a user