Exemple #1
0
        //DO NOT F**K WITH THIS!! EDITING THIS COULD BREAK ITEMS BADLY!!!
        public override ModItem NewInstance(Item itemClone)
        {
            BaseAAItem newItem = (BaseAAItem)base.NewInstance(itemClone);

            newItem.glowmaskTexture   = glowmaskTexture;
            newItem.glowmaskDrawType  = glowmaskDrawType;
            newItem.glowmaskDrawColor = glowmaskDrawColor;
            newItem.customNameColor   = customNameColor;
            return(newItem);
        }
Exemple #2
0
        public override void ModifyTooltips(List <TooltipLine> list)
        {
            if (customNameColor != null)
            {
                foreach (TooltipLine line2 in list)
                {
                    if (line2.mod == "Terraria" && line2.Name == "ItemName")
                    {
                        line2.overrideColor = (Color)customNameColor;
                    }
                }
                return;
            }

            BaseAAItem AAitem = (BaseAAItem)item.modItem;

            if (AAitem.AARarity != 0)
            {
                Color Rare;
                switch (AAitem.AARarity)
                {
                default: Rare = Color.White; break;

                case 12: Rare = AAColor.Rarity12; break;     //Ashe and Haruka

                case 13: Rare = AAColor.Rarity13; break;     //Ancients

                case 14: Rare = AAColor.Rarity14; break;     //Super Ancients

                case 15: Rare = AAColor.Rarity15; break;     //Hyper Ancients
                }
                foreach (TooltipLine line2 in list)
                {
                    if (line2.mod == "Terraria" && line2.Name == "ItemName")
                    {
                        line2.overrideColor = Rare;
                    }
                }
            }
        }