Пример #1
0
        public static void LoadHairDye(Player player, string hairDyeItemName)
        {
            if (hairDyeItemName == "")
            {
                return;
            }

            // no mystery hair dye at this stage
            ModContent.SplitName(hairDyeItemName, out string modName, out string itemName);
            var modItem = ModLoader.GetMod(modName)?.GetItem(itemName);

            if (modItem != null)
            {
                player.hairDye = (byte)GameShaders.Hair.GetShaderIdFromItemId(modItem.item.type);
            }
        }