Added Coco's Feather

This commit is contained in:
CongratsIsTrash committed 2023-10-02 01:00:38 -04:00
1 parent 23b66cd68a
commit 6501e7e2f1
8 files changed
+87 -1

No files matched your search

+8
View File
@@ -1095,6 +1095,7 @@ namespace CalamityMod.CalPlayer
public bool omegaBlueTransformationForce;
public bool omegaBlueTransformationPower;
public bool redBow;
public bool cocosFeather;
#endregion
#region Calamitas Enchant Effects
@@ -2098,6 +2099,7 @@ namespace CalamityMod.CalPlayer
omegaBlueTransformation = omegaBlueTransformationForce = omegaBlueTransformationPower = false;
redBow = false;
cocosFeather = false;
rageModeActive = false;
adrenalineModeActive = false;
@@ -4074,6 +4076,12 @@ namespace CalamityMod.CalPlayer
Player.body = EquipLoader.GetEquipSlot(Mod, "RedBow", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "RedBow", EquipType.Head);
}
if (cocosFeather)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "CocosFeather", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "CocosFeather", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "CocosFeather", EquipType.Head);
}
if (snowRuffianSet)
{
Player.wings = EquipLoader.GetEquipSlot(Mod, "SnowRuffianMask", EquipType.Wings);
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

+64
View File
@@ -0,0 +1,64 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Items.Accessories.Vanity
{
public class CocosFeather : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (Main.netMode != NetmodeID.Server)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Birds_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Birds_Torso", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Heart_Legs", EquipType.Legs, this);
}
}
public override void SetStaticDefaults()
{
if (Main.netMode == NetmodeID.Server)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override void SetDefaults()
{
Item.width = 42;
Item.height = 38;
Item.accessory = true;
Item.value = CalamityGlobalItem.Rarity1BuyPrice;
Item.rare = ItemRarityID.Green;
Item.vanity = true;
Item.Calamity().devItem = true;
}
public override void UpdateVanity(Player player)
{
player.Calamity().cocosFeather = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (!hideVisual)
{
player.Calamity().cocosFeather = true;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

+10 -1
View File
@@ -109,7 +109,16 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags
}
itemLoot.AddIf(getsOracleHeadphones, ModContent.ItemType<OracleHeadphones>());
// Bird dev item
// Name specific: "bird"
static bool getsSakuraFeather(DropAttemptInfo info)
{
string playerName = info.player.name;
return playerName == "bird";
}
itemLoot.AddIf(getsSakuraFeather, ModContent.ItemType<CocosFeather>());
}
}
}
@@ -2004,6 +2004,11 @@ AbandonedWulfrumHelmet: {
'''
}
CocosFeather: {
DisplayName: Coco's Feather
Tooltip: ""
}
HapuFruit: {
DisplayName: Ha-pu Fruit
Tooltip: "'A fruit that calms your nerves (may have unintended side effects)'"