EquipTextures and more
This commit is contained in:
1 parent
62a59927a7
commit
06a8efbb57
27 files changed
+218
-342
No files matched your search
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
+14
-13
@@ -6546,10 +6546,10 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide)
|
||||
{
|
||||
Player.legs = Mod.GetEquipSlot("ProviLegs", EquipType.Legs);
|
||||
Player.body = Mod.GetEquipSlot("ProviBody", EquipType.Body);
|
||||
Player.head = Mod.GetEquipSlot("ProviHead", EquipType.Head);
|
||||
Player.wings = Mod.GetEquipSlot("ProviWings", EquipType.Wings);
|
||||
Player.legs = Mod.GetEquipSlot("ProfanedSoulCrystal", EquipType.Legs);
|
||||
Player.body = Mod.GetEquipSlot("ProfanedSoulCrystal", EquipType.Body);
|
||||
Player.head = Mod.GetEquipSlot("ProfanedSoulCrystal", EquipType.Head);
|
||||
Player.wings = Mod.GetEquipSlot("ProfanedSoulCrystal", EquipType.Wings);
|
||||
Player.face = -1;
|
||||
|
||||
bool enrage = !profanedCrystalForce && profanedCrystalBuffs && Player.statLife <= (int)(Player.statLifeMax2 * 0.5);
|
||||
@@ -6574,23 +6574,24 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else if ((snowmanPower || snowmanForce) && !snowmanHide)
|
||||
{
|
||||
Player.legs = Mod.GetEquipSlot("PopoLeg", EquipType.Legs);
|
||||
Player.body = Mod.GetEquipSlot("PopoBody", EquipType.Body);
|
||||
Player.head = snowmanNoseless ? Mod.GetEquipSlot("PopoNoselessHead", EquipType.Head) : Mod.GetEquipSlot("PopoHead", EquipType.Head);
|
||||
Player.legs = Mod.GetEquipSlot("Popo", EquipType.Legs);
|
||||
Player.body = Mod.GetEquipSlot("Popo", EquipType.Body);
|
||||
//PopoNoseless won't work.
|
||||
Player.head = snowmanNoseless ? Mod.GetEquipSlot("PopoNoseless", EquipType.Head) : Mod.GetEquipSlot("Popo", EquipType.Head);
|
||||
Player.face = -1;
|
||||
}
|
||||
else if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide)
|
||||
{
|
||||
Player.legs = Mod.GetEquipSlot("AbyssalDivingSuitLeg", EquipType.Legs);
|
||||
Player.body = Mod.GetEquipSlot("AbyssalDivingSuitBody", EquipType.Body);
|
||||
Player.head = Mod.GetEquipSlot("AbyssalDivingSuitHead", EquipType.Head);
|
||||
Player.legs = Mod.GetEquipSlot("AbyssalDivingSuit", EquipType.Legs);
|
||||
Player.body = Mod.GetEquipSlot("AbyssalDivingSuit", EquipType.Body);
|
||||
Player.head = Mod.GetEquipSlot("AbyssalDivingSuit", EquipType.Head);
|
||||
Player.face = -1;
|
||||
}
|
||||
else if ((sirenBoobsPower || sirenBoobsForce) && !sirenBoobsHide)
|
||||
{
|
||||
Player.legs = Mod.GetEquipSlot("SirenLeg", EquipType.Legs);
|
||||
Player.body = Mod.GetEquipSlot("SirenBody", EquipType.Body);
|
||||
Player.head = Mod.GetEquipSlot("SirenHead", EquipType.Head);
|
||||
Player.legs = Mod.GetEquipSlot("SirensHeart", EquipType.Legs);
|
||||
Player.body = Mod.GetEquipSlot("SirensHeart", EquipType.Body);
|
||||
Player.head = Mod.GetEquipSlot("SirensHeart", EquipType.Head);
|
||||
Player.face = -1;
|
||||
}
|
||||
else if (meldTransformationPower || meldTransformationForce)
|
||||
|
||||
@@ -14,5 +14,5 @@ public interface IExtendedHat
|
||||
/// <summary>
|
||||
///Return true to make the extension get drawn automatically from the texture and offsets provided. Return false if you want to draw it yourself
|
||||
/// </summary>
|
||||
bool PreDrawExtension(PlayerDrawSet drawInfo);
|
||||
bool PreDrawExtension(PlayerDrawSet drawInfo) => true;
|
||||
}
|
||||
@@ -206,40 +206,6 @@ namespace CalamityMod
|
||||
|
||||
private void LoadClient()
|
||||
{
|
||||
AddEquipTexture(new AbyssalDivingSuitHead(), null, EquipType.Head, "AbyssalDivingSuitHead", "CalamityMod/Items/Accessories/AbyssalDivingSuit_Head");
|
||||
AddEquipTexture(new AbyssalDivingSuitBody(), null, EquipType.Body, "AbyssalDivingSuitBody", "CalamityMod/Items/Accessories/AbyssalDivingSuit_Body", "CalamityMod/Items/Accessories/AbyssalDivingSuit_Arms");
|
||||
AddEquipTexture(new AbyssalDivingSuitLegs(), null, EquipType.Legs, "AbyssalDivingSuitLeg", "CalamityMod/Items/Accessories/AbyssalDivingSuit_Legs");
|
||||
|
||||
AddEquipTexture(new SirenHead(), null, EquipType.Head, "SirenHead", "CalamityMod/Items/Accessories/SirenTrans_Head");
|
||||
AddEquipTexture(new SirenBody(), null, EquipType.Body, "SirenBody", "CalamityMod/Items/Accessories/SirenTrans_Body", "CalamityMod/Items/Accessories/SirenTrans_Arms");
|
||||
AddEquipTexture(new SirenLegs(), null, EquipType.Legs, "SirenLeg", "CalamityMod/Items/Accessories/SirenTrans_Legs");
|
||||
|
||||
AddEquipTexture(new AndromedaHead(), null, EquipType.Head, "NoHead", "CalamityMod/ExtraTextures/AndromedaWithout_Head");
|
||||
|
||||
AddEquipTexture(new PopoHead(), null, EquipType.Head, "PopoHead", "CalamityMod/Items/Accessories/Vanity/Popo_Head");
|
||||
AddEquipTexture(new PopoNoselessHead(), null, EquipType.Head, "PopoNoselessHead", "CalamityMod/Items/Accessories/Vanity/PopoNoseless_Head");
|
||||
AddEquipTexture(new PopoBody(), null, EquipType.Body, "PopoBody", "CalamityMod/Items/Accessories/Vanity/Popo_Body", "CalamityMod/Items/Accessories/Vanity/Popo_Arms");
|
||||
AddEquipTexture(new PopoLegs(), null, EquipType.Legs, "PopoLeg", "CalamityMod/Items/Accessories/Vanity/Popo_Legs");
|
||||
|
||||
AddEquipTexture(new ProfanedCrystalHead(), null, EquipType.Head, "ProviHead", "CalamityMod/Items/Accessories/ProfanedSoulTransHead");
|
||||
AddEquipTexture(new ProfanedCrystalBody(), null, EquipType.Body, "ProviBody", "CalamityMod/Items/Accessories/ProfanedSoulTransBody", "CalamityMod/Items/Accessories/ProfanedSoulTransArms");
|
||||
AddEquipTexture(new ProfanedCrystalLegs(), null, EquipType.Legs, "ProviLegs", "CalamityMod/Items/Accessories/ProfanedSoulTransLegs");
|
||||
AddEquipTexture(new ProfanedCrystalWings(), null, EquipType.Wings, "ProviWings", "CalamityMod/Items/Accessories/Wings/ProfanedSoulTransWings");
|
||||
|
||||
AddEquipTexture(new SnowRuffianWings(), null, EquipType.Wings, "SnowRuffWings", "CalamityMod/Items/Armor/SnowRuffianWings");
|
||||
|
||||
AddEquipTexture(new MeldTransformationHead(), null, EquipType.Head, "MeldTransformationHead", "CalamityMod/Items/Armor/MeldTransformation_Head");
|
||||
AddEquipTexture(new MeldTransformationBody(), null, EquipType.Body, "MeldTransformationBody", "CalamityMod/Items/Armor/MeldTransformation_Body", "CalamityMod/Items/Armor/MeldTransformation_Arms");
|
||||
AddEquipTexture(new MeldTransformationLegs(), null, EquipType.Legs, "MeldTransformationLegs", "CalamityMod/Items/Armor/MeldTransformation_Legs");
|
||||
|
||||
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");
|
||||
|
||||
AddEquipTexture(null, EquipType.Legs, "CirrusDress_Legs", "CalamityMod/Items/Armor/CirrusDress_Legs");
|
||||
|
||||
AstralCactusTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Tiles/AstralCactus", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralCactusGlowTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Tiles/AstralCactusGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSky = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/AstralSky", AssetRequestMode.ImmediateLoad).Value;
|
||||
|
||||
@@ -9,6 +9,14 @@ namespace CalamityMod.Items.Accessories
|
||||
//[AutoloadEquip(EquipType.Face)]
|
||||
public class AbyssalDivingGear : ModItem
|
||||
{
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Mod.AddEquipTexture(this, EquipType.Head, "CalamityMod/Items/Accessories/AbyssalDivingGear_Face");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Abyssal Diving Gear");
|
||||
@@ -18,6 +26,10 @@ namespace CalamityMod.Items.Accessories
|
||||
"Provides light underwater and extra mobility on ice\n" +
|
||||
"Provides a moderate amount of light in the abyss\n" +
|
||||
"Greatly reduces breath loss in the abyss");
|
||||
|
||||
int equipSlot = Mod.GetEquipSlot(Name, EquipType.Head);
|
||||
ArmorIDs.Head.Sets.DrawFullHair[equipSlot] = false;
|
||||
ArmorIDs.Head.Sets.DrawHatHair[equipSlot] = false;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -46,7 +58,7 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateVanity(Player player, EquipType type)
|
||||
public override void UpdateVisibleVanity(Player player, EquipType type)
|
||||
{
|
||||
player.Calamity().abyssDivingGear = true; //this bool is just used for drawing
|
||||
}
|
||||
@@ -62,13 +74,4 @@ namespace CalamityMod.Items.Accessories
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
public class AbyssDivingGearHair : EquipTexture
|
||||
{
|
||||
public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
|
||||
{
|
||||
drawHair = false;
|
||||
drawAltHair = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,18 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class AbyssalDivingSuit : ModItem
|
||||
{
|
||||
public override void Load()
|
||||
{
|
||||
// All code below runs only if we're not loading on a server
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
// Add equip textures
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Head, $"{Texture}_{EquipType.Head}");
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Body, $"{Texture}_{EquipType.Body}");
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Legs, $"{Texture}_{EquipType.Legs}");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Abyssal Diving Suit");
|
||||
@@ -35,6 +47,14 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.accessory = true;
|
||||
Item.value = CalamityGlobalItem.Rarity11BuyPrice;
|
||||
Item.rare = ItemRarityID.Purple;
|
||||
|
||||
int equipSlotHead = Mod.GetEquipSlot(Name, EquipType.Head);
|
||||
int equipSlotBody = Mod.GetEquipSlot(Name, EquipType.Body);
|
||||
int equipSlotLegs = Mod.GetEquipSlot(Name, EquipType.Legs);
|
||||
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
|
||||
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
|
||||
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
|
||||
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
@@ -62,28 +82,4 @@ namespace CalamityMod.Items.Accessories
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
public class AbyssalDivingSuitHead : EquipTexture
|
||||
{
|
||||
public override bool DrawHead()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class AbyssalDivingSuitBody : EquipTexture
|
||||
{
|
||||
public override bool DrawBody()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class AbyssalDivingSuitLegs : EquipTexture
|
||||
{
|
||||
public override bool DrawLegs()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,11 +8,24 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class FeatherCrown : ModItem
|
||||
{
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Mod.AddEquipTexture(this, EquipType.Head, "CalamityMod/Items/Accessories/FeatherCrown_Face");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Feather Crown");
|
||||
Tooltip.SetDefault("15% increased rogue projectile velocity\n" +
|
||||
"Stealth strikes cause feathers to fall from the sky on enemy hits");
|
||||
|
||||
|
||||
int equipSlot = Mod.GetEquipSlot(Name, EquipType.Head);
|
||||
ArmorIDs.Head.Sets.DrawFullHair[equipSlot] = false;
|
||||
ArmorIDs.Head.Sets.DrawHatHair[equipSlot] = false;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -33,7 +46,7 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.featherCrownDraw = true; //this bool is just used for drawing
|
||||
}
|
||||
|
||||
public override void UpdateVanity(Player player, EquipType type)
|
||||
public override void UpdateVisibleVanity(Player player, EquipType type)
|
||||
{
|
||||
player.Calamity().featherCrownDraw = true; //this bool is just used for drawing
|
||||
}
|
||||
@@ -55,13 +68,4 @@ namespace CalamityMod.Items.Accessories
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
public class FeatherCrownHair : EquipTexture
|
||||
{
|
||||
public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
|
||||
{
|
||||
drawHair = false;
|
||||
drawAltHair = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,12 +11,24 @@ namespace CalamityMod.Items.Accessories
|
||||
// Base damage of lunar flares on stealth strikes. Increased by rogue damage stats, but not stealth damage.
|
||||
internal const int BaseDamage = 85;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Mod.AddEquipTexture(this, EquipType.Head, "CalamityMod/Items/Accessories/MoonstoneCrown_Face");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Moonstone Crown");
|
||||
Tooltip.SetDefault("15% increased rogue projectile velocity\n" +
|
||||
"Stealth strikes summon lunar flares on enemy hits\n" +
|
||||
"Rogue projectiles very occasionally summon moon sigils behind them");
|
||||
|
||||
int equipSlot = Mod.GetEquipSlot(Name, EquipType.Head);
|
||||
ArmorIDs.Head.Sets.DrawFullHair[equipSlot] = false;
|
||||
ArmorIDs.Head.Sets.DrawHatHair[equipSlot] = false;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -37,7 +49,7 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.moonCrownDraw = true; //this bool is just used for drawing
|
||||
}
|
||||
|
||||
public override void UpdateVanity(Player player, EquipType type)
|
||||
public override void UpdateVisibleVanity(Player player, EquipType type)
|
||||
{
|
||||
player.Calamity().moonCrownDraw = true; //this bool is just used for drawing
|
||||
}
|
||||
@@ -52,13 +64,4 @@ namespace CalamityMod.Items.Accessories
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
public class MoonstoneCrownHair : EquipTexture
|
||||
{
|
||||
public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
|
||||
{
|
||||
drawHair = false;
|
||||
drawAltHair = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,11 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("Transforms you into an emissary of the profaned goddess\n" +
|
||||
"This tooltip gets modified");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 4));
|
||||
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Head, "CalamityMod/Items/Accessories/ProfanedSoulTransHead");
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Body, "CalamityMod/Items/Accessories/ProfanedSoulTransBody");
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Legs, "CalamityMod/Items/Accessories/ProfanedSoulTransLegs");
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Wings, "CalamityMod/Items/Accessories/Wings/ProfanedSoulTransWings");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -46,7 +51,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
|
||||
public override bool CanEquipAccessory(Player player, int slot)
|
||||
public override bool CanEquipAccessory(Player player, int slot, bool modded)
|
||||
{
|
||||
return !player.Calamity().pArtifact;
|
||||
}
|
||||
@@ -275,32 +280,4 @@ namespace CalamityMod.Items.Accessories
|
||||
return biomePower && (type == (shadowSpec | geode | essence)) ? numRequired / 2 : numRequired; //cuts the above mats consumed by half if in the biomes instead of arbitrary biome locking
|
||||
}
|
||||
}
|
||||
|
||||
public class ProfanedCrystalHead : EquipTexture
|
||||
{
|
||||
public override bool DrawHead()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ProfanedCrystalBody : EquipTexture
|
||||
{
|
||||
public override bool DrawBody()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ProfanedCrystalLegs : EquipTexture
|
||||
{
|
||||
public override bool DrawLegs()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ProfanedCrystalWings : EquipTexture
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -190,17 +190,14 @@ namespace CalamityMod.Items.Accessories
|
||||
tooltips.Add(new TooltipLine(Mod, "Tooltip8", sb.ToString()));
|
||||
}
|
||||
|
||||
public override TagCompound Save()
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
TagCompound tag = new TagCompound
|
||||
{
|
||||
{ "level", level },
|
||||
{ "totalDamage", totalRageDamage }
|
||||
};
|
||||
tag.Add("level", level);
|
||||
tag.Add("totalDamage", totalRageDamage);
|
||||
return tag;
|
||||
}
|
||||
|
||||
public override void Load(TagCompound tag)
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
level = tag.GetInt("level");
|
||||
// Shattered Community's level cap was reduced from 60 to 25, so cap out ones that were made higher previously.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
@@ -7,6 +7,18 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class SirensHeart : ModItem
|
||||
{
|
||||
public override void Load()
|
||||
{
|
||||
// All code below runs only if we're not loading on a server
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
// Add equip textures
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Head, "CalamityMod/Items/Accessories/SirenTrans_Head");
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Body, "CalamityMod/Items/Accessories/SirenTrans_Body");
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Legs, "CalamityMod/Items/Accessories/SirenTrans_Legs");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Aquatic Heart");
|
||||
@@ -18,6 +30,14 @@ namespace CalamityMod.Items.Accessories
|
||||
"After 30 seconds the ice shield will regenerate\n" +
|
||||
"Wow, you can swim now!\n" +
|
||||
"Most of these effects are only active after Skeletron has been defeated");
|
||||
|
||||
int equipSlotHead = Mod.GetEquipSlot(Name, EquipType.Head);
|
||||
int equipSlotBody = Mod.GetEquipSlot(Name, EquipType.Body);
|
||||
int equipSlotLegs = Mod.GetEquipSlot(Name, EquipType.Legs);
|
||||
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
|
||||
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
|
||||
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
|
||||
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -37,28 +57,4 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.sirenBoobsHide = true;
|
||||
}
|
||||
}
|
||||
|
||||
public class SirenHead : EquipTexture
|
||||
{
|
||||
public override bool DrawHead()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class SirenBody : EquipTexture
|
||||
{
|
||||
public override bool DrawBody()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class SirenLegs : EquipTexture
|
||||
{
|
||||
public override bool DrawLegs()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -7,6 +7,17 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
{
|
||||
public class Popo : ModItem
|
||||
{
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Head, "CalamityMod/Items/Accessories/Vanity/Popo_Head");
|
||||
//Mod.AddEquipTexture(new EquipTexture(), "PopoNoseless", EquipType.Head, "CalamityMod/Items/Accessories/Vanity/PopoNoseless_Head");
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Body, "CalamityMod/Items/Accessories/Vanity/Popo_Body");
|
||||
Mod.AddEquipTexture(new EquipTexture(), this, EquipType.Legs, "CalamityMod/Items/Accessories/Vanity/Popo_Legs");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Magic Scarf and Hat");
|
||||
@@ -34,36 +45,4 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class PopoHead : EquipTexture
|
||||
{
|
||||
public override bool DrawHead()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class PopoNoselessHead : EquipTexture
|
||||
{
|
||||
public override bool DrawHead()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class PopoBody : EquipTexture
|
||||
{
|
||||
public override bool DrawBody()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class PopoLegs : EquipTexture
|
||||
{
|
||||
public override bool DrawLegs()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor
|
||||
@@ -12,12 +13,23 @@ namespace CalamityMod.Items.Armor
|
||||
* 3 - Open her shop to find the dress
|
||||
*/
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Mod.AddEquipTexture(this, EquipType.Legs, "CalamityMod/Items/Armor/CirrusDress_Legs");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Cirrus' Dress");
|
||||
Tooltip.SetDefault("Here, this should help you drink as much alcohol as you want!\n" +
|
||||
"5% increased magic damage and critical strike chance\n" +
|
||||
"You feel thick...");
|
||||
|
||||
int equipSlot = Mod.GetEquipSlot(Name, EquipType.Body);
|
||||
ArmorIDs.Body.Sets.HidesHands[equipSlot] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -40,13 +52,7 @@ namespace CalamityMod.Items.Armor
|
||||
public override void SetMatch(bool male, ref int equipSlot, ref bool robes)
|
||||
{
|
||||
robes = true;
|
||||
// The equipSlot is added in CalamityMod.cs --> Load hook
|
||||
equipSlot = Mod.GetEquipSlot("CirrusDress_Legs", EquipType.Legs);
|
||||
}
|
||||
|
||||
public override void DrawHands(ref bool drawHands, ref bool drawArms)
|
||||
{
|
||||
drawHands = true;
|
||||
equipSlot = Mod.GetEquipSlot(Name, EquipType.Legs);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.CalPlayer.CalamityPlayer;
|
||||
using System.Linq;
|
||||
using Terraria.DataStructures;
|
||||
|
||||
namespace CalamityMod.Items.Armor
|
||||
{
|
||||
@@ -86,7 +87,6 @@ namespace CalamityMod.Items.Armor
|
||||
}
|
||||
|
||||
public string ExtensionTexture => "CalamityMod/Items/Armor/DemonshadeHelm_Extension";
|
||||
public Vector2 ExtensionSpriteOffset(PlayerDrawInfo drawInfo) => new Vector2(-10f, -14f);
|
||||
public bool PreDrawExtension(PlayerDrawInfo drawInfo) => true;
|
||||
public Vector2 ExtensionSpriteOffset(PlayerDrawSet drawInfo) => new Vector2(-10f, -14f);
|
||||
}
|
||||
}
|
||||
@@ -13,11 +13,22 @@ namespace CalamityMod.Items.Armor
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class OmegaBlueHelmet : ModItem
|
||||
{
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
//Mod.AddEquipTexture(new OmegaBlueTransformationHead(), "OmegaBlueTransformationHead", EquipType.Head, "CalamityMod/Items/Armor/OmegaBlueHelmet_HeadMadness");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Omega Blue Helmet");
|
||||
Tooltip.SetDefault(@"You can move freely through liquids
|
||||
12% increased damage and 8% increased critical strike chance");
|
||||
|
||||
//int equipSlotHead = Mod.GetEquipSlot("OmegaBlueTransformationHead", EquipType.Head);
|
||||
//ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -89,12 +100,4 @@ namespace CalamityMod.Items.Armor
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
public class OmegaBlueTransformationHead : EquipTexture
|
||||
{
|
||||
public override bool DrawHead()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,14 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
private bool shouldBoost = false;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Mod.AddEquipTexture(new SnowRuffianWings(), this, EquipType.Wings, "CalamityMod/Items/Armor/SnowRuffianWings");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Snow Ruffian Mask");
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using static CalamityMod.CalPlayer.CalamityPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.DataStructures;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Vanity
|
||||
{
|
||||
@@ -11,6 +12,8 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Apollo Mask");
|
||||
int equipSlotHead = Mod.GetEquipSlot(Name, EquipType.Head);
|
||||
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -21,10 +24,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.vanity = true;
|
||||
}
|
||||
|
||||
public override bool DrawHead() => false;
|
||||
|
||||
public string ExtensionTexture => "CalamityMod/Items/Armor/Vanity/ApolloMask_Extra";
|
||||
public Vector2 ExtensionSpriteOffset(PlayerDrawInfo drawInfo) => new Vector2(drawInfo.drawPlayer.direction == 1f ? -16f : -10f, -10);
|
||||
public bool PreDrawExtension(PlayerDrawInfo drawInfo) => true;
|
||||
public Vector2 ExtensionSpriteOffset(PlayerDrawSet drawInfo) => new Vector2(drawInfo.drawPlayer.direction == 1f ? -16f : -10f, -10);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using static CalamityMod.CalPlayer.CalamityPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.DataStructures;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Vanity
|
||||
{
|
||||
@@ -11,6 +12,8 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Artemis Mask");
|
||||
int equipSlotHead = Mod.GetEquipSlot(Name, EquipType.Head);
|
||||
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -21,10 +24,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.vanity = true;
|
||||
}
|
||||
|
||||
public override bool DrawHead() => false;
|
||||
|
||||
public string ExtensionTexture => "CalamityMod/Items/Armor/Vanity/ArtemisMask_Extra";
|
||||
public Vector2 ExtensionSpriteOffset(PlayerDrawInfo drawInfo) => new Vector2( drawInfo.drawPlayer.direction == 1f ? -16f : -10f, -10);
|
||||
public bool PreDrawExtension(PlayerDrawInfo drawInfo) => true;
|
||||
public Vector2 ExtensionSpriteOffset(PlayerDrawSet drawInfo) => new Vector2( drawInfo.drawPlayer.direction == 1f ? -16f : -10f, -10);
|
||||
}
|
||||
}
|
||||
+20
-24
@@ -9,12 +9,32 @@ namespace CalamityMod.Items.Armor
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class XerocMask : ModItem
|
||||
{
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
//Mod.AddEquipTexture("MeldTransformation", EquipType.Head, "CalamityMod/Items/Armor/MeldTransformation_Head");
|
||||
//Mod.AddEquipTexture(MeldTransformation, EquipType.Body, "CalamityMod/Items/Armor/MeldTransformation_Body");
|
||||
//Mod.AddEquipTexture(MeldTransformation, EquipType.Legs, "CalamityMod/Items/Armor/MeldTransformation_Legs");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Empyrean Mask");
|
||||
Tooltip.SetDefault("Wrath of the cosmos\n" +
|
||||
"11% increased rogue damage and critical strike chance, 5% increased movement speed\n" +
|
||||
"Temporary immunity to lava");
|
||||
|
||||
//int equipSlotHead = Mod.GetEquipSlot("MeldTransformation", EquipType.Head);
|
||||
//int equipSlotBody = Mod.GetEquipSlot("MeldTransformation", EquipType.Body);
|
||||
//int equipSlotLegs = Mod.GetEquipSlot("MeldTransformation", EquipType.Legs);
|
||||
|
||||
//ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
|
||||
//ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
|
||||
//ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
|
||||
//ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -78,28 +98,4 @@ namespace CalamityMod.Items.Armor
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
public class MeldTransformationHead : EquipTexture
|
||||
{
|
||||
public override bool DrawHead()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class MeldTransformationBody : EquipTexture
|
||||
{
|
||||
public override bool DrawBody()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class MeldTransformationLegs : EquipTexture
|
||||
{
|
||||
public override bool DrawLegs()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
-36
@@ -35,7 +35,6 @@ namespace CalamityMod.Items
|
||||
public partial class CalamityGlobalItem : GlobalItem
|
||||
{
|
||||
public override bool InstancePerEntity => true;
|
||||
public override bool CloneNewInstances => true;
|
||||
|
||||
public bool rogue = false;
|
||||
public float StealthGenBonus;
|
||||
@@ -459,23 +458,20 @@ namespace CalamityMod.Items
|
||||
return rogue || canFirePointBlankShots || trueMelee || timesUsed != 0 || customRarity != 0 || Charge != 0 || reforgeTier != 0 || AppliedEnchantment.HasValue || DischargeEnchantExhaustion != 0;
|
||||
}
|
||||
|
||||
public override TagCompound Save(Item item)
|
||||
public override void SaveData(Item item, TagCompound tag)
|
||||
{
|
||||
return new TagCompound
|
||||
{
|
||||
["rogue"] = rogue,
|
||||
["timesUsed"] = timesUsed,
|
||||
["rarity"] = (int)customRarity,
|
||||
["charge"] = Charge,
|
||||
["reforgeTier"] = reforgeTier,
|
||||
["enchantmentID"] = AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0,
|
||||
["DischargeEnchantExhaustion"] = DischargeEnchantExhaustion,
|
||||
["canFirePointBlankShots"] = canFirePointBlankShots,
|
||||
["trueMelee"] = trueMelee
|
||||
};
|
||||
tag.Add("rogue" = rogue);
|
||||
tag.Add("timesUsed" = timesUsed);
|
||||
tag.Add("rarity") = (int)customRarity;
|
||||
tag.Add("charge") = Charge;
|
||||
tag.Add("reforgeTier") = reforgeTier;
|
||||
tag.Add("enchantmentID") = AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0;
|
||||
tag.Add("DischargeEnchantExhaustion") = DischargeEnchantExhaustion;
|
||||
tag.Add("canFirePointBlankShots") = canFirePointBlankShots;
|
||||
tag.Add("trueMelee") = trueMelee;
|
||||
}
|
||||
|
||||
public override void Load(Item item, TagCompound tag)
|
||||
public override void LoadData(Item item, TagCompound tag)
|
||||
{
|
||||
rogue = tag.GetBool("rogue");
|
||||
canFirePointBlankShots = tag.GetBool("canFirePointBlankShots");
|
||||
@@ -500,27 +496,6 @@ namespace CalamityMod.Items
|
||||
}
|
||||
}
|
||||
|
||||
public override void LoadLegacy(Item item, BinaryReader reader)
|
||||
{
|
||||
int loadVersion = reader.ReadInt32();
|
||||
customRarity = (CalamityRarity)reader.ReadInt32();
|
||||
timesUsed = reader.ReadInt32();
|
||||
Charge = reader.ReadSingle();
|
||||
reforgeTier = reader.ReadInt32();
|
||||
|
||||
if (loadVersion == 0)
|
||||
{
|
||||
BitsByte flags = reader.ReadByte();
|
||||
rogue = flags[0];
|
||||
canFirePointBlankShots = flags[1];
|
||||
trueMelee = flags[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
ModContent.GetInstance<CalamityMod>().Logger.Error("Unknown loadVersion: " + loadVersion);
|
||||
}
|
||||
}
|
||||
|
||||
public override void NetSend(Item item, BinaryWriter writer)
|
||||
{
|
||||
BitsByte flags = new BitsByte();
|
||||
|
||||
@@ -16,7 +16,6 @@ namespace CalamityMod.Items
|
||||
public class CalamityGlobalItemLoot : GlobalItem
|
||||
{
|
||||
public override bool InstancePerEntity => false;
|
||||
public override bool CloneNewInstances => false;
|
||||
|
||||
// NOTE: this function applies to all right-click-to-open items, even modded ones (despite the name).
|
||||
// This means it applies to boss bags, crates, lockboxes, herb bags, goodie bags, and presents.
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public static float chargeDamageMultiplier = 1.75f; //Extra damage from charge
|
||||
public static float beamDamageMultiplier = 0.8f; //Damage multiplier for the charged shots (remember it applies ontop of the charge damage multiplied
|
||||
|
||||
public override bool CloneNewInstances => true;
|
||||
|
||||
const string ParryTooltip = "Using RMB will extend the Ark out in front of you. Hitting an enemy with it will parry them, granting you a small window of invulnerability\n" +
|
||||
"You can also parry projectiles and temporarily make them deal 100 less damage\n" +
|
||||
@@ -111,19 +110,10 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
var clone = base.Clone(item);
|
||||
|
||||
(clone as ArkoftheAncients).Charge = (item.modItem as ArkoftheAncients).Charge;
|
||||
(clone as ArkoftheAncients).Charge = (item.ModItem as ArkoftheAncients).Charge;
|
||||
|
||||
return clone;
|
||||
}
|
||||
public override ModItem Clone()
|
||||
{
|
||||
var clone = base.Clone();
|
||||
|
||||
(clone as ArkoftheAncients).Charge = Charge;
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public float Combo = 0f;
|
||||
public float Charge = 0f;
|
||||
public override bool CloneNewInstances => true;
|
||||
|
||||
public static float NeedleDamageMultiplier = 0.7f; //Damage on the non-homing needle projectile
|
||||
public static float MaxThrowReach = 650;
|
||||
@@ -189,15 +188,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
var clone = base.Clone(item);
|
||||
|
||||
(clone as ArkoftheCosmos).Charge = (item.modItem as ArkoftheCosmos).Charge;
|
||||
|
||||
return clone;
|
||||
}
|
||||
public override ModItem Clone()
|
||||
{
|
||||
var clone = base.Clone();
|
||||
|
||||
(clone as ArkoftheCosmos).Charge = Charge;
|
||||
(clone as ArkoftheCosmos).Charge = (item.ModItem as ArkoftheCosmos).Charge;
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public float Combo = 0f;
|
||||
public float Charge = 0f;
|
||||
public override bool CloneNewInstances => true;
|
||||
|
||||
public const float ComboLenght = 4f; //How many regular swings before the long throw happens
|
||||
public static float snapDamageMultiplier = 1.2f; //Extra damage from making the scissors snap
|
||||
@@ -186,19 +185,10 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
var clone = base.Clone(item);
|
||||
|
||||
(clone as ArkoftheElements).Charge = (item.modItem as ArkoftheElements).Charge;
|
||||
(clone as ArkoftheElements).Charge = (item.ModItem as ArkoftheElements).Charge;
|
||||
|
||||
return clone;
|
||||
}
|
||||
public override ModItem Clone()
|
||||
{
|
||||
var clone = base.Clone();
|
||||
|
||||
(clone as ArkoftheElements).Charge = Charge;
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(Charge);
|
||||
|
||||
@@ -173,41 +173,28 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
}
|
||||
|
||||
#region Saving and syncing attunements
|
||||
public override bool CloneNewInstances => true;
|
||||
|
||||
public override ModItem Clone(Item item)
|
||||
{
|
||||
var clone = base.Clone(item);
|
||||
if (Main.mouseItem.type == ItemType<TrueBiomeBlade>())
|
||||
item.modItem.HoldItem(Main.player[Main.myPlayer]);
|
||||
(clone as TrueBiomeBlade).mainAttunement = (item.modItem as TrueBiomeBlade).mainAttunement;
|
||||
(clone as TrueBiomeBlade).secondaryAttunement = (item.modItem as TrueBiomeBlade).secondaryAttunement;
|
||||
item.ModItem.HoldItem(Main.player[Main.myPlayer]);
|
||||
(clone as TrueBiomeBlade).mainAttunement = (item.ModItem as TrueBiomeBlade).mainAttunement;
|
||||
(clone as TrueBiomeBlade).secondaryAttunement = (item.ModItem as TrueBiomeBlade).secondaryAttunement;
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
public override ModItem Clone() //ditto
|
||||
{
|
||||
var clone = base.Clone();
|
||||
(clone as TrueBiomeBlade).mainAttunement = mainAttunement;
|
||||
(clone as TrueBiomeBlade).secondaryAttunement = secondaryAttunement;
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
public override TagCompound Save()
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
int attunement1 = mainAttunement == null ? -1 : (int)mainAttunement.id;
|
||||
int attunement2 = secondaryAttunement == null ? -1 : (int)secondaryAttunement.id;
|
||||
TagCompound tag = new TagCompound
|
||||
{
|
||||
{ "mainAttunement", attunement1 },
|
||||
{ "secondaryAttunement", attunement2 }
|
||||
};
|
||||
return tag;
|
||||
|
||||
tag.Add("mainAttunement", attunement1);
|
||||
tag.Add("secondaryAttunement", attunement2);
|
||||
}
|
||||
|
||||
public override void Load(TagCompound tag)
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
int attunement1 = tag.GetInt("mainAttunement");
|
||||
int attunement2 = tag.GetInt("secondaryAttunement");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
@@ -15,6 +15,15 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
public class PrototypeAndromechaRing : ModItem
|
||||
{
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
//What does this one do even?
|
||||
//Mod.AddEquipTexture(this, EquipType.Head, "CalamityMod/ExtraTextures/AndromedaWithout_Head");
|
||||
}
|
||||
}
|
||||
|
||||
public const int CrippleTime = 360; // 6 seconds
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user