space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.57k stars 3.19k forks source link

Magic mirror on slime person hair doesn't transfer the alpha value #29867

Open Plykiya opened 2 months ago

Plykiya commented 2 months ago

Description

20240519195547_1 20240519193839_1

I tried doing what HumanoidProfileEditor does and

        if (_markings.MustMatchSkin(humanoid.Species, HumanoidVisualLayers.Hair, out var _, _prototype))
            _humanoid.SetMarkingColor(component.Target.Value, category, args.Slot, [humanoid.SkinColor], humanoid);
        else
            _humanoid.SetMarkingColor(component.Target.Value, category, args.Slot, args.Colors, humanoid);

Even though it does properly set the RGB value to match the skin color, it doesn't actually set the alpha to match...

Reproduction

Screenshots

Additional context

Plykiya commented 2 months ago

and it's even more problematic considering how simple the code is to set the color... it's not like it's ignoring any particular value

        public void SetColor(int colorIndex, Color color) =>
            _markingColors[colorIndex] = color;

        public void SetColor(Color color)
        {
            for (int i = 0; i < _markingColors.Count; i++)
            {
                _markingColors[i] = color;
            }
        }