Makes humanoid appearance component networked. (#13009)

Fixes https://github.com/space-wizards/space-station-14/issues/12248
This commit is contained in:
Leon Friedrich
2023-01-24 13:38:19 +13:00
committed by GitHub
parent 7ce8f7634a
commit 48bcd30ef9
50 changed files with 878 additions and 1074 deletions

View File

@@ -34,7 +34,7 @@ public sealed partial class MarkingPicker : Control
private List<MarkingCategories> _markingCategories = Enum.GetValues<MarkingCategories>().ToList();
private string _currentSpecies = SharedHumanoidSystem.DefaultSpecies;
private string _currentSpecies = SharedHumanoidAppearanceSystem.DefaultSpecies;
public Color CurrentSkinColor = Color.White;
private readonly HashSet<MarkingCategories> _ignoreCategories = new();
@@ -361,12 +361,13 @@ public sealed partial class MarkingPicker : Control
colorContainer.AddChild(new Label { Text = $"{stateNames[i]} color:" });
colorContainer.AddChild(colorSelector);
var listing = _currentMarkings[_selectedMarkingCategory];
var listing = _currentMarkings.Markings[_selectedMarkingCategory];
var color = listing[listing.Count - 1 - item.ItemIndex].MarkingColors[i];
var currentColor = new Color(
listing[listing.Count - 1 - item.ItemIndex].MarkingColors[i].RByte,
listing[listing.Count - 1 - item.ItemIndex].MarkingColors[i].GByte,
listing[listing.Count - 1 - item.ItemIndex].MarkingColors[i].BByte
color.RByte,
color.GByte,
color.BByte
);
colorSelector.Color = currentColor;
_currentMarkingColors.Add(currentColor);
@@ -394,7 +395,7 @@ public sealed partial class MarkingPicker : Control
_selectedMarking.IconModulate = _currentMarkingColors[colorIndex];
var marking = new Marking(_currentMarkings[_selectedMarkingCategory][markingIndex]);
var marking = new Marking(_currentMarkings.Markings[_selectedMarkingCategory][markingIndex]);
marking.SetColor(colorIndex, _currentMarkingColors[colorIndex]);
_currentMarkings.Replace(_selectedMarkingCategory, markingIndex, marking);