Crystal Heart Vodka <3
This commit is contained in:
1 parent
b8494ae8c8
commit
1e8e609420
9 files changed
+104
No files matched your search
@@ -0,0 +1,86 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Vanity
|
||||
{
|
||||
public class CrystalHeartVodka : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Fabsol_Head", EquipType.Head, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Fabsol_Body", EquipType.Body, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Fabsol_Legs", EquipType.Legs, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Fabsol_Back", EquipType.Back, 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 = 22;
|
||||
Item.height = 30;
|
||||
Item.accessory = true;
|
||||
|
||||
// Same as Fabsol's Vodka, due to the obtainment method being shimmering Fabsol's Vodka.
|
||||
Item.value = Item.buyPrice(0, 2, 60, 0);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
|
||||
Item.vanity = true;
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
|
||||
public override void UpdateVanity(Player player)
|
||||
{
|
||||
player.GetModPlayer<CrystalHeartVodkaPlayer>().vanityEquipped = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (!hideVisual)
|
||||
player.GetModPlayer<CrystalHeartVodkaPlayer>().vanityEquipped = true;
|
||||
}
|
||||
}
|
||||
|
||||
public class CrystalHeartVodkaPlayer : ModPlayer
|
||||
{
|
||||
public bool vanityEquipped = false;
|
||||
|
||||
public override void ResetEffects()
|
||||
{
|
||||
vanityEquipped = false;
|
||||
}
|
||||
|
||||
public override void FrameEffects()
|
||||
{
|
||||
if (vanityEquipped)
|
||||
{
|
||||
Player.back = EquipLoader.GetEquipSlot(Mod, "CrystalHeartVodka", EquipType.Back);
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "CrystalHeartVodka", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "CrystalHeartVodka", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "CrystalHeartVodka", EquipType.Head);
|
||||
|
||||
//Player.HideAccessories();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories.Vanity;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -9,9 +10,11 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
public class FabsolsVodka : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Potions";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 5;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<CrystalHeartVodka>();
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -119,6 +119,16 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags
|
||||
}
|
||||
|
||||
itemLoot.AddIf(getsSakuraFeather, ModContent.ItemType<CocosFeather>());
|
||||
|
||||
// Fabsol dev item
|
||||
// Name specific: "Fabsol" or "Cirrus"
|
||||
static bool getsCrystalHeartVodka(DropAttemptInfo info)
|
||||
{
|
||||
string playerName = info.player.name;
|
||||
return playerName is "Fabsol" or "Cirrus";
|
||||
}
|
||||
|
||||
itemLoot.AddIf(getsCrystalHeartVodka, ModContent.ItemType<CrystalHeartVodka>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2029,6 +2029,11 @@ AbandonedWulfrumHelmet: {
|
||||
'''
|
||||
}
|
||||
|
||||
CrystalHeartVodka: {
|
||||
DisplayName: Crystal Heart Vodka
|
||||
Tooltip: "'Tastes like strawberry cream liqueur (and estrogen)'"
|
||||
}
|
||||
|
||||
CocosFeather: {
|
||||
DisplayName: Coco's Feather
|
||||
Tooltip: ""
|
||||
|
||||
Reference in new issue
Block a user