diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 02a458344b..8ab1c32fea 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -616,7 +616,9 @@ namespace CalamityMod.CalPlayer public bool eclipseMirror = false; public bool eclipseMirrorCooldown = false; public bool featherCrown = false; + public bool featherCrownDraw = false; public bool moonCrown = false; + public bool moonCrownDraw = false; public int featherCrownCooldown = 0; public int moonCrownCooldown = 0; public int nanoFlareCooldown = 0; @@ -1822,7 +1824,9 @@ namespace CalamityMod.CalPlayer eclipseMirror = false; eclipseMirrorCooldown = false; featherCrown = false; + featherCrownDraw = false; moonCrown = false; + moonCrownDraw = false; dragonScales = false; gloveOfPrecision = false; gloveOfRecklessness = false; @@ -3652,6 +3656,14 @@ namespace CalamityMod.CalPlayer { abyssDivingGear = true; } + else if (item.type == ModContent.ItemType()) + { + featherCrownDraw = true; + } + else if (item.type == ModContent.ItemType()) + { + moonCrownDraw = true; + } } } @@ -7180,6 +7192,16 @@ namespace CalamityMod.CalPlayer player.head = mod.GetEquipSlot("AbyssDivingGearHead", EquipType.Head); player.face = -1; } + if (featherCrownDraw && (player.head == -1 || player.head == ArmorIDs.Head.FamiliarWig)) + { + player.head = mod.GetEquipSlot("FeatherCrownHead", EquipType.Head); + player.face = -1; + } + if (moonCrownDraw && (player.head == -1 || player.head == ArmorIDs.Head.FamiliarWig)) + { + player.head = mod.GetEquipSlot("MoonstoneCrownHead", EquipType.Head); + player.face = -1; + } } #endregion diff --git a/CalamityMod.cs b/CalamityMod.cs index d6f8dbc891..e9974856c3 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -253,6 +253,8 @@ namespace CalamityMod AddEquipTexture(new OmegaBlueTransformationHead(), null, EquipType.Head, "OmegaBlueTransformationHead", "CalamityMod/Items/Armor/OmegaBlueHelmet_HeadMadness"); AddEquipTexture(new AbyssDivingGearHair(), null, EquipType.Head, "AbyssDivingGearHead", "CalamityMod/Items/Accessories/AbyssalDivingGear_Face"); + AddEquipTexture(new FeatherCrownHair(), null, EquipType.Head, "FeatherCrownHead", "CalamityMod/Items/Accessories/FeatherCrown_Face"); + AddEquipTexture(new MoonstoneCrownHair(), null, EquipType.Head, "MoonstoneCrownHead", "CalamityMod/Items/Accessories/MoonstoneCrown_Face"); AstralCactusTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactus"); AstralCactusGlowTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactusGlow"); diff --git a/Items/Accessories/FeatherCrown.cs b/Items/Accessories/FeatherCrown.cs index e5ef3c7058..d6272e0293 100644 --- a/Items/Accessories/FeatherCrown.cs +++ b/Items/Accessories/FeatherCrown.cs @@ -29,8 +29,15 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.throwingVelocity += 0.15f; modPlayer.featherCrown = true; + if (!hideVisual) + modPlayer.featherCrownDraw = true; //this bool is just used for drawing } + public override void UpdateVanity(Player player, EquipType type) + { + player.Calamity().featherCrownDraw = true; //this bool is just used for drawing + } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); @@ -49,4 +56,13 @@ namespace CalamityMod.Items.Accessories recipe.AddRecipe(); } } + + public class FeatherCrownHair : EquipTexture + { + public override void DrawHair(ref bool drawHair, ref bool drawAltHair) + { + drawHair = false; + drawAltHair = false; + } + } } diff --git a/Items/Accessories/FeatherCrown_Face.png b/Items/Accessories/FeatherCrown_Face.png new file mode 100644 index 0000000000..f2418635d0 Binary files /dev/null and b/Items/Accessories/FeatherCrown_Face.png differ diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index eb509e1d5b..8e7d6fb042 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -33,8 +33,15 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.throwingVelocity += 0.15f; modPlayer.moonCrown = true; + if (!hideVisual) + modPlayer.moonCrownDraw = true; //this bool is just used for drawing } + public override void UpdateVanity(Player player, EquipType type) + { + player.Calamity().moonCrownDraw = true; //this bool is just used for drawing + } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); @@ -46,4 +53,13 @@ namespace CalamityMod.Items.Accessories recipe.AddRecipe(); } } + + public class MoonstoneCrownHair : EquipTexture + { + public override void DrawHair(ref bool drawHair, ref bool drawAltHair) + { + drawHair = false; + drawAltHair = false; + } + } } diff --git a/Items/Accessories/MoonstoneCrown_Face.png b/Items/Accessories/MoonstoneCrown_Face.png new file mode 100644 index 0000000000..9fff9cdd4a Binary files /dev/null and b/Items/Accessories/MoonstoneCrown_Face.png differ