diff --git a/Buffs/MirrorBarrier.cs b/Buffs/MirrorBarrier.cs index f22a3b1..415f52b 100644 --- a/Buffs/MirrorBarrier.cs +++ b/Buffs/MirrorBarrier.cs @@ -20,7 +20,7 @@ public override void SetDefaults() public override void Update(Player player, ref int buffIndex) { - PlayerFX p = player.GetModPlayer(mod); + PlayerFX p = player.GetModPlayer(); p.reflectingProjectiles = true; } } diff --git a/Buffs/RapidRecovery.cs b/Buffs/RapidRecovery.cs index e89d17d..77046a4 100644 --- a/Buffs/RapidRecovery.cs +++ b/Buffs/RapidRecovery.cs @@ -47,7 +47,7 @@ public static void HealDamage(Player player, Mod mod, double damage) public static void HealDamage(Player player, Mod mod, int damage) { int time = (int)(damage * (120f / healthPer2Secs)); - int id = mod.BuffType(); + int id = ModContent.BuffType(); player.AddBuff(id, time, false); } } diff --git a/Buffs/SabreDance.cs b/Buffs/SabreDance.cs index 0b19318..c0e20d7 100644 --- a/Buffs/SabreDance.cs +++ b/Buffs/SabreDance.cs @@ -32,7 +32,7 @@ public override void Update(Player player, ref int buffIndex) public static void ApplySabreDance(Mod mod, Player player, int extraStrikes) { - player.AddBuff(mod.BuffType(), 2 + (extraStrikes * player.itemAnimationMax / 3)); + player.AddBuff(ModContent.BuffType(), 2 + (extraStrikes * player.itemAnimationMax / 3)); } } } diff --git a/Buffs/SpiritGuardian.cs b/Buffs/SpiritGuardian.cs index df886d2..b70ebc0 100644 --- a/Buffs/SpiritGuardian.cs +++ b/Buffs/SpiritGuardian.cs @@ -13,7 +13,7 @@ public override void SetDefaults() } public override void Update(Player player, ref int buffIndex) { - int guardianID = mod.ProjectileType(); + int guardianID = ModContent.ProjectileType(); player.GetModPlayer().starlightGuardian = player.ownedProjectileCounts[guardianID] > 0; } } diff --git a/Items/Accessories/AccretionEmblem.cs b/Items/Accessories/AccretionEmblem.cs index f60e1b0..e485eca 100644 --- a/Items/Accessories/AccretionEmblem.cs +++ b/Items/Accessories/AccretionEmblem.cs @@ -54,7 +54,7 @@ public override void UpdateAccessory(Player player, bool hideVisual) player.statManaMax2 += 20; if (hideVisual) return; HeliosphereEmblem.DustVisuals(player, DustID.PinkFlame, 2f); - player.GetModPlayer(mod).lunarMagicVisual = true; + player.GetModPlayer().lunarMagicVisual = true; } } } diff --git a/Items/Accessories/ChaosHook.cs b/Items/Accessories/ChaosHook.cs index 1b6d2ba..d50c7f3 100644 --- a/Items/Accessories/ChaosHook.cs +++ b/Items/Accessories/ChaosHook.cs @@ -35,13 +35,13 @@ public override void AddRecipes() { if (!ModConf.EnableAccessories) return; ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(mod.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); recipe.SetResult(this); recipe.AddRecipe(); //Conversion from recipe = new ModRecipe(mod); recipe.AddIngredient(this, 1); - recipe.SetResult(mod.ItemType()); + recipe.SetResult(ModContent.ItemType()); recipe.AddRecipe(); } } diff --git a/Items/Accessories/HyperSash.cs b/Items/Accessories/HyperSash.cs index 6f0e99d..f0a535b 100644 --- a/Items/Accessories/HyperSash.cs +++ b/Items/Accessories/HyperSash.cs @@ -41,7 +41,7 @@ public override void SetDefaults() public override void AddRecipes() { if (!ModConf.EnableFists) return; ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(mod.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); recipe.AddIngredient(ItemID.ChlorophyteBar, 2); recipe.AddTile(TileID.Loom); recipe.SetResult(this, 1); diff --git a/Items/Accessories/LunarEmblem.cs b/Items/Accessories/LunarEmblem.cs index 62834f1..bf8632d 100644 --- a/Items/Accessories/LunarEmblem.cs +++ b/Items/Accessories/LunarEmblem.cs @@ -41,11 +41,11 @@ public override void SetDefaults() public override void AddRecipes() { if (!ModConf.EnableEmblems) return; ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(mod.ItemType()); - recipe.AddIngredient(mod.ItemType()); - recipe.AddIngredient(mod.ItemType()); - recipe.AddIngredient(mod.ItemType()); - recipe.AddIngredient(mod.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this, 1); recipe.AddRecipe(); @@ -60,9 +60,9 @@ public override void UpdateAccessory(Player player, bool hideVisual) player.thrownVelocity += 0.3f; player.maxMinions += 1; if (hideVisual) return; - player.GetModPlayer(mod).lunarRangeVisual = true; - player.GetModPlayer(mod).lunarMagicVisual = true; - player.GetModPlayer(mod).lunarThrowVisual = true; + player.GetModPlayer().lunarRangeVisual = true; + player.GetModPlayer().lunarMagicVisual = true; + player.GetModPlayer().lunarThrowVisual = true; Vector2 hand = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f; if (player.direction != 1) { diff --git a/Items/Accessories/MirrorBadge.cs b/Items/Accessories/MirrorBadge.cs index 97ef573..1eaa14e 100644 --- a/Items/Accessories/MirrorBadge.cs +++ b/Items/Accessories/MirrorBadge.cs @@ -51,7 +51,7 @@ public override void UpdateAccessory(Player player, bool hideVisual) { player.buffImmune[BuffID.Stoned] = true; - PlayerFX pFX = player.GetModPlayer(mod); + PlayerFX pFX = player.GetModPlayer(); if (pFX.reflectingProjectileDelay <= 0) { player.AddBuff(WeaponOut.BuffIDMirrorBarrier, 2); diff --git a/Items/Accessories/Pavise.cs b/Items/Accessories/Pavise.cs index 81735a0..b973e91 100644 --- a/Items/Accessories/Pavise.cs +++ b/Items/Accessories/Pavise.cs @@ -42,7 +42,7 @@ public override void AddRecipes() { public override void UpdateAccessory(Player player, bool hideVisual) { - PlayerFX modPlayer = player.GetModPlayer(mod); + PlayerFX modPlayer = player.GetModPlayer(); modPlayer.FrontDefence += 10; modPlayer.frontNoKnockback = true; } diff --git a/Items/Accessories/PerihelionEmblem.cs b/Items/Accessories/PerihelionEmblem.cs index 960617f..1293100 100644 --- a/Items/Accessories/PerihelionEmblem.cs +++ b/Items/Accessories/PerihelionEmblem.cs @@ -68,7 +68,7 @@ public override void UpdateAccessory(Player player, bool hideVisual) player.thrownVelocity += 0.3f; if (hideVisual) return; HeliosphereEmblem.DustVisuals(player, 75, 1.5f); - player.GetModPlayer(mod).lunarThrowVisual = true; + player.GetModPlayer().lunarThrowVisual = true; } } } diff --git a/Items/Accessories/ScrapExosuit.cs b/Items/Accessories/ScrapExosuit.cs index 19c7e4d..a894724 100644 --- a/Items/Accessories/ScrapExosuit.cs +++ b/Items/Accessories/ScrapExosuit.cs @@ -43,9 +43,9 @@ public override void SetDefaults() public override void AddRecipes() { if (!ModConf.EnableFists) return; ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(mod.ItemType(), 1); - recipe.AddIngredient(mod.ItemType(), 1); - recipe.AddIngredient(mod.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); recipe.AddTile(TileID.TinkerersWorkbench); recipe.SetResult(this, 1); recipe.AddRecipe(); diff --git a/Items/Accessories/WoodenShield.cs b/Items/Accessories/WoodenShield.cs index fc8261a..649a6b0 100644 --- a/Items/Accessories/WoodenShield.cs +++ b/Items/Accessories/WoodenShield.cs @@ -45,7 +45,7 @@ public override void AddRecipes() { public override void UpdateAccessory(Player player, bool hideVisual) { - PlayerFX modPlayer = player.GetModPlayer(mod); + PlayerFX modPlayer = player.GetModPlayer(); modPlayer.DamageKnockbackThreshold += 10; } } diff --git a/Items/Accessories/WormholeEmblem.cs b/Items/Accessories/WormholeEmblem.cs index d7d7250..89c390a 100644 --- a/Items/Accessories/WormholeEmblem.cs +++ b/Items/Accessories/WormholeEmblem.cs @@ -55,7 +55,7 @@ public override void UpdateAccessory(Player player, bool hideVisual) player.ammoCost80 = true; if (hideVisual) return; HeliosphereEmblem.DustVisuals(player, DustID.Vortex); - player.GetModPlayer(mod).lunarRangeVisual = true; + player.GetModPlayer().lunarRangeVisual = true; } } } diff --git a/Items/Armour/ChampionLaurels.cs b/Items/Armour/ChampionLaurels.cs index 69a4b5d..9a825dc 100644 --- a/Items/Armour/ChampionLaurels.cs +++ b/Items/Armour/ChampionLaurels.cs @@ -76,20 +76,20 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair) private byte armourSet = 0; public override bool IsArmorSet(Item head, Item body, Item legs) { - armourSet = 0;if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + armourSet = 0;if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 1; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 2; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 3; return true; diff --git a/Items/Armour/FistBoxingHelmet.cs b/Items/Armour/FistBoxingHelmet.cs index 0b29609..daeda1f 100644 --- a/Items/Armour/FistBoxingHelmet.cs +++ b/Items/Armour/FistBoxingHelmet.cs @@ -77,20 +77,20 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair) public override bool IsArmorSet(Item head, Item body, Item legs) { armourSet = 0; - if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 1; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 2; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 3; return true; diff --git a/Items/Armour/FistBoxingHelmetPlus.cs b/Items/Armour/FistBoxingHelmetPlus.cs index 12ddd1f..a7f530c 100644 --- a/Items/Armour/FistBoxingHelmetPlus.cs +++ b/Items/Armour/FistBoxingHelmetPlus.cs @@ -91,38 +91,38 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair) public override bool IsArmorSet(Item head, Item body, Item legs) { armourSet = 0; - if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 1; hardMode = false; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 1; hardMode = true; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 2; hardMode = false; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 2; hardMode = true; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 3; hardMode = false; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 3; hardMode = true; return true; diff --git a/Items/Armour/FistMartialHead.cs b/Items/Armour/FistMartialHead.cs index d4a6bcc..f4ade89 100644 --- a/Items/Armour/FistMartialHead.cs +++ b/Items/Armour/FistMartialHead.cs @@ -81,20 +81,20 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair) public override bool IsArmorSet(Item head, Item body, Item legs) { armourSet = 0; - if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 1; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 2; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 3; return true; diff --git a/Items/Armour/FistMasterHead.cs b/Items/Armour/FistMasterHead.cs index 899652a..cac8b2f 100644 --- a/Items/Armour/FistMasterHead.cs +++ b/Items/Armour/FistMasterHead.cs @@ -79,20 +79,20 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair) public override bool IsArmorSet(Item head, Item body, Item legs) { armourSet = 0; - if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 1; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 2; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 3; return true; diff --git a/Items/Armour/FistVeteranHead.cs b/Items/Armour/FistVeteranHead.cs index 7e24339..989c5fd 100644 --- a/Items/Armour/FistVeteranHead.cs +++ b/Items/Armour/FistVeteranHead.cs @@ -91,38 +91,38 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair) public override bool IsArmorSet(Item head, Item body, Item legs) { armourSet = 0; - if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 1; hardMode = false; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 1; hardMode = true; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 2; hardMode = false; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 2; hardMode = true; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 3; hardMode = false; return true; } - else if (body.type == mod.ItemType() && - legs.type == mod.ItemType()) + else if (body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) { armourSet = 3; hardMode = true; return true; diff --git a/Items/Armour/LunarFistHead.cs b/Items/Armour/LunarFistHead.cs index 3cdd50c..7558e41 100644 --- a/Items/Armour/LunarFistHead.cs +++ b/Items/Armour/LunarFistHead.cs @@ -64,9 +64,9 @@ public override void UpdateEquip(Player player) public override bool IsArmorSet(Item head, Item body, Item legs) { - return head.type == mod.ItemType() - && body.type == mod.ItemType() - && legs.type == mod.ItemType(); + return head.type == ModContent.ItemType() + && body.type == ModContent.ItemType() + && legs.type == ModContent.ItemType(); } public override void UpdateArmorSet(Player player) @@ -77,8 +77,8 @@ public override void UpdateArmorSet(Player player) if (player.whoAmI == Main.myPlayer) { // Based on Stardust Guardian spawn - int buffID = mod.BuffType(); - int guardianID = mod.ProjectileType(); + int buffID = ModContent.BuffType(); + int guardianID = ModContent.ProjectileType(); if (player.FindBuffIndex(buffID) == -1) player.AddBuff(buffID, 1, true); if (player.ownedProjectileCounts[guardianID] < 1) // No guardian? spawn one Projectile.NewProjectile( diff --git a/Items/BuddyHorn.cs b/Items/BuddyHorn.cs index 136a6e2..b241ac2 100644 --- a/Items/BuddyHorn.cs +++ b/Items/BuddyHorn.cs @@ -66,8 +66,8 @@ public override bool UseItem(Player player) if (player.SpawnX > 0) spawnX = player.SpawnX; if (player.SpawnY > 0) spawnY = player.SpawnY; - int entrance = mod.ProjectileType(); - int exit = mod.ProjectileType(); + int entrance = ModContent.ProjectileType(); + int exit = ModContent.ProjectileType(); foreach (Projectile projectile in Main.projectile) { diff --git a/Items/DemonBloodCure.cs b/Items/DemonBloodCure.cs index 20bd09e..96e939e 100644 --- a/Items/DemonBloodCure.cs +++ b/Items/DemonBloodCure.cs @@ -44,7 +44,7 @@ public override void AddRecipes() if (!ModConf.EnableFists) return; ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.BottledWater); - recipe.AddIngredient(mod.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ItemID.PixieDust); recipe.AddIngredient(ItemID.Daybloom); recipe.AddIngredient(ItemID.Shiverthorn); diff --git a/Items/MeteorBreakshot.cs b/Items/MeteorBreakshot.cs index cd5034f..090ea14 100644 --- a/Items/MeteorBreakshot.cs +++ b/Items/MeteorBreakshot.cs @@ -32,7 +32,7 @@ public override void SetDefaults() item.ranged = true; item.ammo = AmmoID.Bullet; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 2.5f; item.damage = 9; item.knockBack = 3f; diff --git a/Items/MonsterMead.cs b/Items/MonsterMead.cs index 994b6f8..d1d291b 100644 --- a/Items/MonsterMead.cs +++ b/Items/MonsterMead.cs @@ -22,7 +22,7 @@ public override void SetStaticDefaults() public override void SetDefaults() { item.CloneDefaults(ItemID.Ale); - item.buffType = mod.BuffType(); + item.buffType = ModContent.BuffType(); item.buffTime = 3600 * 5; // 5 mins } public override void AddRecipes() diff --git a/Items/RustedBadge.cs b/Items/RustedBadge.cs index 68ff901..da1199a 100644 --- a/Items/RustedBadge.cs +++ b/Items/RustedBadge.cs @@ -29,13 +29,13 @@ public override void AddRecipes() { if (!ModConf.EnableAccessories) return; ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(mod.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); recipe.AddIngredient(ItemID.Obsidifish, 3); // Rough polish recipe.AddIngredient(ItemID.ArmoredCavefish, 2); // Fine polish recipe.AddIngredient(ItemID.Silk, 1); // Buffing recipe.AddTile(TileID.Sawmill); recipe.needWater = true; - recipe.SetResult(mod.ItemType(), 1); + recipe.SetResult(ModContent.ItemType(), 1); recipe.AddRecipe(); } } diff --git a/Items/ScatterShot.cs b/Items/ScatterShot.cs index b7a2249..e5bc131 100644 --- a/Items/ScatterShot.cs +++ b/Items/ScatterShot.cs @@ -33,7 +33,7 @@ public override void SetDefaults() item.ranged = true; item.ammo = AmmoID.Bullet; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 4; item.damage = 7; item.knockBack = 1; diff --git a/Items/SplinterShot.cs b/Items/SplinterShot.cs index 7d0fd53..926e70d 100644 --- a/Items/SplinterShot.cs +++ b/Items/SplinterShot.cs @@ -33,7 +33,7 @@ public override void SetDefaults() item.ranged = true; item.ammo = AmmoID.Bullet; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 2; item.damage = 4; item.knockBack = 1; diff --git a/Items/Weapons/Basic/ChannelerStaff.cs b/Items/Weapons/Basic/ChannelerStaff.cs index bbf3c88..4937b9a 100644 --- a/Items/Weapons/Basic/ChannelerStaff.cs +++ b/Items/Weapons/Basic/ChannelerStaff.cs @@ -54,7 +54,7 @@ public override void SetDefaults() item.knockBack = 0; item.mana = 8; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 2; item.useStyle = 5; //aim diff --git a/Items/Weapons/Basic/DemonBlaster.cs b/Items/Weapons/Basic/DemonBlaster.cs index 327af36..9cbacc3 100644 --- a/Items/Weapons/Basic/DemonBlaster.cs +++ b/Items/Weapons/Basic/DemonBlaster.cs @@ -42,7 +42,7 @@ public override void SetDefaults() item.autoReuse = true; item.noMelee = true; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30; item.useStyle = 5; diff --git a/Items/Weapons/Basic/ManaBlast.cs b/Items/Weapons/Basic/ManaBlast.cs index 98476e8..9eab83c 100644 --- a/Items/Weapons/Basic/ManaBlast.cs +++ b/Items/Weapons/Basic/ManaBlast.cs @@ -33,7 +33,7 @@ public override void SetDefaults() item.autoReuse = true; item.noMelee = true; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 7; item.useStyle = 5; diff --git a/Items/Weapons/Basic/StaffOfExplosion.cs b/Items/Weapons/Basic/StaffOfExplosion.cs index 7369f16..6af67c1 100644 --- a/Items/Weapons/Basic/StaffOfExplosion.cs +++ b/Items/Weapons/Basic/StaffOfExplosion.cs @@ -42,7 +42,7 @@ public override void SetDefaults() item.noMelee = true; Item.staff[item.type] = true; //rotate weapon, as it is a staff - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 1; item.useStyle = 5; diff --git a/Items/Weapons/Dual/ManaSword.cs b/Items/Weapons/Dual/ManaSword.cs index 25c8506..b424347 100644 --- a/Items/Weapons/Dual/ManaSword.cs +++ b/Items/Weapons/Dual/ManaSword.cs @@ -45,7 +45,7 @@ public override void SetDefaults() item.knockBack = 5f; item.mana = 10; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 11f; Item.staff[item.type] = true; //rotate weapon, as it is a staff @@ -66,7 +66,7 @@ public override void AddRecipes() { { recipe.AddIngredient(ItemID.TitaniumSword, 1); } - recipe.AddIngredient(mod.GetItem().item.type, 1); + recipe.AddIngredient(ModContent.GetInstance().item.type, 1); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); @@ -86,14 +86,14 @@ public override bool CanUseItem(Player player) item.UseSound = SoundID.Item68; item.noMelee = true; player.manaCost *= 4f; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); } else { item.useStyle = 1; item.UseSound = SoundID.Item28; item.noMelee = false; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); } return true; } diff --git a/Items/Weapons/Fists/FistsAdamant.cs b/Items/Weapons/Fists/FistsAdamant.cs index abed892..5e0de7b 100644 --- a/Items/Weapons/Fists/FistsAdamant.cs +++ b/Items/Weapons/Fists/FistsAdamant.cs @@ -33,7 +33,7 @@ public override void SetStaticDefaults() "Комбо: разрушительные удары"); altEffect = ModPlayerFists.RegisterDashEffectID(DashEffects); - projID = mod.ProjectileType(); + projID = ModContent.ProjectileType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/FistsBetsy.cs b/Items/Weapons/Fists/FistsBetsy.cs index 6142f95..bf6da4b 100644 --- a/Items/Weapons/Fists/FistsBetsy.cs +++ b/Items/Weapons/Fists/FistsBetsy.cs @@ -34,7 +34,7 @@ public override void SetStaticDefaults() "Комбо: урон передаётся ближайшим врагам"); altEffect = ModPlayerFists.RegisterDashEffectID(DashEffects); - projectileID = mod.ProjectileType(); + projectileID = ModContent.ProjectileType(); customGlowMask = WeaponOut.SetStaticDefaultsGlowMask(this); } public override void SetDefaults() @@ -151,7 +151,7 @@ public override void HoldItem(Player player) { if (Main.time % 30 == 0) { - player.AddBuff(mod.BuffType(), 60, false); + player.AddBuff(ModContent.BuffType(), 60, false); } } } diff --git a/Items/Weapons/Fists/FistsBone.cs b/Items/Weapons/Fists/FistsBone.cs index a6b04cc..292d00a 100644 --- a/Items/Weapons/Fists/FistsBone.cs +++ b/Items/Weapons/Fists/FistsBone.cs @@ -33,7 +33,7 @@ public override void SetStaticDefaults() "'Руку подать?'"); altEffect = ModPlayerFists.RegisterDashEffectID(DashEffects); - skeleBroID = mod.ProjectileType(); + skeleBroID = ModContent.ProjectileType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/FistsForbidden.cs b/Items/Weapons/Fists/FistsForbidden.cs index a5fabfa..e09a9ee 100644 --- a/Items/Weapons/Fists/FistsForbidden.cs +++ b/Items/Weapons/Fists/FistsForbidden.cs @@ -134,7 +134,7 @@ public override void OnHitNPC(Player player, NPC target, int damage, float knock ModPlayerFists mpf = player.GetModPlayer(); if (mpf.IsComboActiveItemOnHit) { - target.AddBuff(mod.BuffType(), 600, false); + target.AddBuff(ModContent.BuffType(), 600, false); } } public override void OnHitPvp(Player player, Player target, int damage, bool crit) @@ -142,7 +142,7 @@ public override void OnHitPvp(Player player, Player target, int damage, bool cri ModPlayerFists mpf = player.GetModPlayer(); if (mpf.IsComboActive) { - target.AddBuff(mod.BuffType(), 600, false); + target.AddBuff(ModContent.BuffType(), 600, false); } } diff --git a/Items/Weapons/Fists/FistsFrozen.cs b/Items/Weapons/Fists/FistsFrozen.cs index 81f3cda..d1518f6 100644 --- a/Items/Weapons/Fists/FistsFrozen.cs +++ b/Items/Weapons/Fists/FistsFrozen.cs @@ -33,7 +33,7 @@ public override void SetStaticDefaults() "Комбо: оставляет холодный след, усиливающий морозное пламя"); altEffect = ModPlayerFists.RegisterDashEffectID(DashEffects); - projectileID = mod.ProjectileType(); + projectileID = ModContent.ProjectileType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/FistsHokuto.cs b/Items/Weapons/Fists/FistsHokuto.cs index 5a523f9..1d1b188 100644 --- a/Items/Weapons/Fists/FistsHokuto.cs +++ b/Items/Weapons/Fists/FistsHokuto.cs @@ -38,7 +38,7 @@ public override void SetStaticDefaults() dashEffect = ModPlayerFists.RegisterDashEffectID(DashEffects); altEffect = ModPlayerFists.RegisterComboEffectID(ComboEffects); - buffID = mod.BuffType(); + buffID = ModContent.BuffType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/FistsLihzarhd.cs b/Items/Weapons/Fists/FistsLihzarhd.cs index 4a3ce08..1e4a5e5 100644 --- a/Items/Weapons/Fists/FistsLihzarhd.cs +++ b/Items/Weapons/Fists/FistsLihzarhd.cs @@ -33,7 +33,7 @@ public override void SetStaticDefaults() "Комбо: выпускет мощные волны при удачной атаке"); altEffect = ModPlayerFists.RegisterDashEffectID(DashEffects); - projectileID = mod.ProjectileType(); + projectileID = ModContent.ProjectileType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/FistsMartian.cs b/Items/Weapons/Fists/FistsMartian.cs index 736f877..c1ae73b 100644 --- a/Items/Weapons/Fists/FistsMartian.cs +++ b/Items/Weapons/Fists/FistsMartian.cs @@ -35,7 +35,7 @@ public override void SetStaticDefaults() "'Ракетный удар!'"); altEffect = ModPlayerFists.RegisterDashEffectID(DashEffects); - projectileID = mod.ProjectileType(); + projectileID = ModContent.ProjectileType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/FistsTitanium.cs b/Items/Weapons/Fists/FistsTitanium.cs index eae4e63..0fbab2d 100644 --- a/Items/Weapons/Fists/FistsTitanium.cs +++ b/Items/Weapons/Fists/FistsTitanium.cs @@ -33,7 +33,7 @@ public override void SetStaticDefaults() "Комбо: призывает теневых клонов"); altEffect = ModPlayerFists.RegisterDashEffectID(DashEffects); - shadowID = mod.ProjectileType(); + shadowID = ModContent.ProjectileType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/GlovesButterfly.cs b/Items/Weapons/Fists/GlovesButterfly.cs index 24d212a..87efb51 100644 --- a/Items/Weapons/Fists/GlovesButterfly.cs +++ b/Items/Weapons/Fists/GlovesButterfly.cs @@ -33,7 +33,7 @@ public override void SetStaticDefaults() "Комбо: улучшает управление в воздухе\n" + "'...Жаль, как пчела'"); - buffID = mod.BuffType(); + buffID = ModContent.BuffType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/GlovesCrystal.cs b/Items/Weapons/Fists/GlovesCrystal.cs index c223ab0..cb9a124 100644 --- a/Items/Weapons/Fists/GlovesCrystal.cs +++ b/Items/Weapons/Fists/GlovesCrystal.cs @@ -85,7 +85,7 @@ public override void OnHitNPC(Player player, NPC target, int damage, float knock if(player.CanHit(npc)) { Projectile.NewProjectile(npc.Center, new Vector2(-player.direction), - mod.ProjectileType(), (int)(damage * 0.33f), 0f, player.whoAmI); + ModContent.ProjectileType(), (int)(damage * 0.33f), 0f, player.whoAmI); } } } @@ -107,7 +107,7 @@ public override void OnHitNPC(Player player, NPC target, int damage, float knock if (nextTarget != null) { Projectile.NewProjectile(nextTarget.Center, new Vector2(-player.direction), - mod.ProjectileType(), damage, knockBack, player.whoAmI); + ModContent.ProjectileType(), damage, knockBack, player.whoAmI); } } } diff --git a/Items/Weapons/Fists/GlovesOrich.cs b/Items/Weapons/Fists/GlovesOrich.cs index 6c89031..5cbd6a9 100644 --- a/Items/Weapons/Fists/GlovesOrich.cs +++ b/Items/Weapons/Fists/GlovesOrich.cs @@ -125,7 +125,7 @@ public override void HoldItem(Player player) ModPlayerFists mpf = player.GetModPlayer(); if (mpf.IsComboActive) { - player.AddBuff(mod.BuffType(), 30); + player.AddBuff(ModContent.BuffType(), 30); } } diff --git a/Items/Weapons/Fists/GlovesPumpkin.cs b/Items/Weapons/Fists/GlovesPumpkin.cs index ae78d3f..271b73d 100644 --- a/Items/Weapons/Fists/GlovesPumpkin.cs +++ b/Items/Weapons/Fists/GlovesPumpkin.cs @@ -36,8 +36,8 @@ public override void SetStaticDefaults() "Контратака: подрывает помеченных врагов\n" + "Комбо: усиливает взрывы"); - buffID = mod.BuffType(); - projID = mod.ProjectileType(); + buffID = ModContent.BuffType(); + projID = ModContent.ProjectileType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/KnucklesDemon.cs b/Items/Weapons/Fists/KnucklesDemon.cs index c612329..193d058 100644 --- a/Items/Weapons/Fists/KnucklesDemon.cs +++ b/Items/Weapons/Fists/KnucklesDemon.cs @@ -35,7 +35,7 @@ public override void SetStaticDefaults() altEffect = ModPlayerFists.RegisterComboEffectID(ComboEffects); customDashEffect = ModPlayerFists.RegisterDashEffectID(DashEffects); - buffID = mod.BuffType(); + buffID = ModContent.BuffType(); } public override void SetDefaults() { @@ -68,13 +68,13 @@ public override void SetDefaults() for (int i = 0; i < 2; i++) { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(mod.ItemType(), 1); - recipe.AddIngredient(mod.ItemType(), 1); - recipe.AddIngredient(mod.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); if (i == 0) - { recipe.AddIngredient(mod.ItemType(), 1); } + { recipe.AddIngredient(ModContent.ItemType(), 1); } else - { recipe.AddIngredient(mod.ItemType(), 1); } + { recipe.AddIngredient(ModContent.ItemType(), 1); } recipe.AddTile(TileID.DemonAltar); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Fists/KnucklesDungeon.cs b/Items/Weapons/Fists/KnucklesDungeon.cs index aeaa108..6bc55e7 100644 --- a/Items/Weapons/Fists/KnucklesDungeon.cs +++ b/Items/Weapons/Fists/KnucklesDungeon.cs @@ -29,7 +29,7 @@ public override void SetStaticDefaults() "Комбо: +25% скорость атаки"); comboEffect = ModPlayerFists.RegisterComboEffectID(ComboEffects); - buffID = mod.BuffType(); + buffID = ModContent.BuffType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/KnucklesFrost.cs b/Items/Weapons/Fists/KnucklesFrost.cs index dd8ebd6..5246981 100644 --- a/Items/Weapons/Fists/KnucklesFrost.cs +++ b/Items/Weapons/Fists/KnucklesFrost.cs @@ -40,7 +40,7 @@ public override void SetDefaults() item.tileBoost = 9; // Combo Power item.useTime = item.useAnimation * 2; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.value = Item.sellPrice(0, 1, 0, 0); diff --git a/Items/Weapons/Fists/KnucklesIchor.cs b/Items/Weapons/Fists/KnucklesIchor.cs index 321d29d..cf990e2 100644 --- a/Items/Weapons/Fists/KnucklesIchor.cs +++ b/Items/Weapons/Fists/KnucklesIchor.cs @@ -53,7 +53,7 @@ public override void SetStaticDefaults() mod.AddTranslation(text); altEffect = ModPlayerFists.RegisterComboEffectID(ComboEffects); - buffID = mod.BuffType(); + buffID = ModContent.BuffType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/KnucklesLead.cs b/Items/Weapons/Fists/KnucklesLead.cs index 047158f..26af369 100644 --- a/Items/Weapons/Fists/KnucklesLead.cs +++ b/Items/Weapons/Fists/KnucklesLead.cs @@ -37,7 +37,7 @@ public override void SetDefaults() item.tileBoost = 6; // For fists, we read this as the combo power item.useTime = item.useAnimation * 2; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.value = Item.sellPrice(0, 0, 4, 50); diff --git a/Items/Weapons/Fists/KnucklesMeteor.cs b/Items/Weapons/Fists/KnucklesMeteor.cs index 5a3650e..7ba2fab 100644 --- a/Items/Weapons/Fists/KnucklesMeteor.cs +++ b/Items/Weapons/Fists/KnucklesMeteor.cs @@ -39,7 +39,7 @@ public override void SetDefaults() item.tileBoost = 5; // For fists, this is the combo power item.useTime = item.useAnimation * 2; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; item.value = Item.sellPrice(0, 0, 24, 0); @@ -129,7 +129,7 @@ public override void HoldItem(Player player) ModPlayerFists mpf = player.GetModPlayer(); if (mpf.IsComboActive) { - player.AddBuff(mod.BuffType(), 30); + player.AddBuff(ModContent.BuffType(), 30); } } diff --git a/Items/Weapons/Fists/KnucklesMithril.cs b/Items/Weapons/Fists/KnucklesMithril.cs index 0a7a2a1..aca018d 100644 --- a/Items/Weapons/Fists/KnucklesMithril.cs +++ b/Items/Weapons/Fists/KnucklesMithril.cs @@ -42,7 +42,7 @@ public override void SetDefaults() item.value = Item.sellPrice(0, 1, 3, 50); // half sword cost item.rare = 4; item.useTime = item.useAnimation * 2; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10 + item.rare / 2; item.UseSound = SoundID.Item19; diff --git a/Items/Weapons/Fists/KnucklesPlantera.cs b/Items/Weapons/Fists/KnucklesPlantera.cs index 49a9eef..4492b30 100644 --- a/Items/Weapons/Fists/KnucklesPlantera.cs +++ b/Items/Weapons/Fists/KnucklesPlantera.cs @@ -34,8 +34,8 @@ public override void SetStaticDefaults() "'Спрятан глубоко в лабиринте джунглей'"); altEffect = ModPlayerFists.RegisterComboEffectID(ComboEffects); - leafID = mod.ProjectileType(); - ballID = mod.ProjectileType(); + leafID = ModContent.ProjectileType(); + ballID = ModContent.ProjectileType(); } public override void SetDefaults() { diff --git a/Items/Weapons/Fists/KnucklesPlat.cs b/Items/Weapons/Fists/KnucklesPlat.cs index 01166f3..9ba9eb4 100644 --- a/Items/Weapons/Fists/KnucklesPlat.cs +++ b/Items/Weapons/Fists/KnucklesPlat.cs @@ -37,7 +37,7 @@ public override void SetDefaults() item.tileBoost = 5; // For fists, we read this as the combo power item.useTime = item.useAnimation * 2; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.value = Item.sellPrice(0, 0, 18, 0); // One bar diff --git a/Items/Weapons/Sabres/BeamSabres/BeamSabreItems.cs b/Items/Weapons/Sabres/BeamSabres/BeamSabreItems.cs index 50a6ad7..b25bb9f 100644 --- a/Items/Weapons/Sabres/BeamSabres/BeamSabreItems.cs +++ b/Items/Weapons/Sabres/BeamSabres/BeamSabreItems.cs @@ -21,7 +21,7 @@ public override Color SabreColour() { return new Color(0.7f, 0f, 1f); } public override int SabreSlashType() - { return mod.ProjectileType(); } + { return ModContent.ProjectileType(); } public override void AddRecipes() { @@ -54,7 +54,7 @@ public override Color SabreColour() { return new Color(1f, 1f, 0f); } public override int SabreSlashType() - { return mod.ProjectileType(); } + { return ModContent.ProjectileType(); } public override void AddRecipes() { @@ -87,7 +87,7 @@ public override Color SabreColour() { return new Color(0f, 0.1f, 1f); } public override int SabreSlashType() - { return mod.ProjectileType(); } + { return ModContent.ProjectileType(); } public override void AddRecipes() { @@ -120,7 +120,7 @@ public override Color SabreColour() { return new Color(0.5f, 1f, 0f); } public override int SabreSlashType() - { return mod.ProjectileType(); } + { return ModContent.ProjectileType(); } public override void AddRecipes() { @@ -153,7 +153,7 @@ public override Color SabreColour() { return new Color(1f, 0.1f, 0f); } public override int SabreSlashType() - { return mod.ProjectileType(); } + { return ModContent.ProjectileType(); } public override void AddRecipes() { @@ -186,7 +186,7 @@ public override Color SabreColour() { return new Color(1f, 1f, 1f); } public override int SabreSlashType() - { return mod.ProjectileType(); } + { return ModContent.ProjectileType(); } public override void AddRecipes() { diff --git a/Items/Weapons/Sabres/BorealWoodSabre.cs b/Items/Weapons/Sabres/BorealWoodSabre.cs index 7db716d..044ef58 100644 --- a/Items/Weapons/Sabres/BorealWoodSabre.cs +++ b/Items/Weapons/Sabres/BorealWoodSabre.cs @@ -49,7 +49,7 @@ public override void AddRecipes() public override void HoldItem(Player player) { - if (ModSabres.HoldItemManager(player, item, mod.ProjectileType(), + if (ModSabres.HoldItemManager(player, item, ModContent.ProjectileType(), default(Color), 0.9f, player.itemTime == 0 ? 0f : 1f)) { Buffs.SabreDance.ApplySabreDance(mod, player, 1); } } @@ -136,7 +136,7 @@ public override void AI() public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Player player = Main.player[projectile.owner]; - int weaponItemID = mod.ItemType(); + int weaponItemID = ModContent.ItemType(); Color lighting = Lighting.GetColor((int)(player.MountedCenter.X / 16), (int)(player.MountedCenter.Y / 16)); return ModSabres.PreDrawSlashAndWeapon(spriteBatch, projectile, weaponItemID, lighting, null,//SlashLogic == 0f ? specialSlash : null, diff --git a/Items/Weapons/Sabres/EnchantedSabre.cs b/Items/Weapons/Sabres/EnchantedSabre.cs index 899a611..782be72 100644 --- a/Items/Weapons/Sabres/EnchantedSabre.cs +++ b/Items/Weapons/Sabres/EnchantedSabre.cs @@ -34,7 +34,7 @@ public override void SetDefaults() item.useTime = 30 / 4; item.useAnimation = 18; - item.shoot = mod.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; item.rare = 2; @@ -60,7 +60,7 @@ public override void AddRecipes() public override void HoldItem(Player player) { - ModSabres.HoldItemManager(player, item, mod.ProjectileType(), + ModSabres.HoldItemManager(player, item, ModContent.ProjectileType(), Color.Yellow, 0.9f, player.itemTime == 0 ? 0f : 1f); } @@ -142,7 +142,7 @@ public override void AI() public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Player player = Main.player[projectile.owner]; - int weaponItemID = mod.ItemType(); + int weaponItemID = ModContent.ItemType(); Color lighting = Lighting.GetColor((int)(player.MountedCenter.X / 16), (int)(player.MountedCenter.Y / 16)); return ModSabres.PreDrawSlashAndWeapon(spriteBatch, projectile, weaponItemID, lighting, SlashLogic == 0f ? specialSlash : null, diff --git a/Items/Weapons/Sabres/Hayauchi.cs b/Items/Weapons/Sabres/Hayauchi.cs index 13664d3..043cdd2 100644 --- a/Items/Weapons/Sabres/Hayauchi.cs +++ b/Items/Weapons/Sabres/Hayauchi.cs @@ -92,7 +92,7 @@ public override void HoldItem(Player player) { bool specialCharge = hasHayauchiSpecialCharge(player); - ModSabres.HoldItemManager(player, item, mod.ProjectileType(), + ModSabres.HoldItemManager(player, item, ModContent.ProjectileType(), Color.Red, 0.9f, specialCharge ? 0f : 1f, customCharge, 12); // Blade sheen once fully charged @@ -282,7 +282,7 @@ public override void AI() public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Player player = Main.player[projectile.owner]; - int weaponItemID = mod.ItemType(); + int weaponItemID = ModContent.ItemType(); Color lighting = Lighting.GetColor((int)(player.MountedCenter.X / 16), (int)(player.MountedCenter.Y / 16)); return ModSabres.PreDrawSlashAndWeapon(spriteBatch, projectile, weaponItemID, lighting, SlashLogic == 0f ? specialSlash : null, diff --git a/Items/Weapons/Sabres/JungleWoodSabre.cs b/Items/Weapons/Sabres/JungleWoodSabre.cs index 0bbd742..5d3826b 100644 --- a/Items/Weapons/Sabres/JungleWoodSabre.cs +++ b/Items/Weapons/Sabres/JungleWoodSabre.cs @@ -49,7 +49,7 @@ public override void AddRecipes() public override void HoldItem(Player player) { - ModSabres.HoldItemManager(player, item, mod.ProjectileType(), + ModSabres.HoldItemManager(player, item, ModContent.ProjectileType(), default(Color), 0.9f, player.itemTime == 0 ? 0f : 1f); } @@ -80,7 +80,7 @@ public override void ModifyHitNPC(Player player, NPC target, ref int damage, ref { if (ModSabres.SabreIsChargedStriking(player, item)) { - target.AddBuff(mod.BuffType(), 60); + target.AddBuff(ModContent.BuffType(), 60); } } } @@ -156,7 +156,7 @@ public override void AI() public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Player player = Main.player[projectile.owner]; - int weaponItemID = mod.ItemType(); + int weaponItemID = ModContent.ItemType(); Color lighting = Lighting.GetColor((int)(player.MountedCenter.X / 16), (int)(player.MountedCenter.Y / 16)); return ModSabres.PreDrawSlashAndWeapon(spriteBatch, projectile, weaponItemID, lighting, null,//SlashLogic == 0f ? specialSlash : null, diff --git a/Items/Weapons/Sabres/Onsoku.cs b/Items/Weapons/Sabres/Onsoku.cs index c0f55a9..704160c 100644 --- a/Items/Weapons/Sabres/Onsoku.cs +++ b/Items/Weapons/Sabres/Onsoku.cs @@ -62,7 +62,7 @@ public override void AddRecipes() public override void HoldItem(Player player) { - ModSabres.HoldItemManager(player, item, mod.ProjectileType(), + ModSabres.HoldItemManager(player, item, ModContent.ProjectileType(), Color.HotPink, 0.9f, player.itemTime == 0 ? 0f : 1f); } @@ -91,7 +91,7 @@ public override void ModifyHitNPC(Player player, NPC target, ref int damage, ref { damage /= 2; knockBack = knockBack * 2f + 4f; - target.AddBuff(mod.BuffType(), 60); + target.AddBuff(ModContent.BuffType(), 60); } } } @@ -218,7 +218,7 @@ public override void AI() public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Player player = Main.player[projectile.owner]; - int weaponItemID = mod.ItemType(); + int weaponItemID = ModContent.ItemType(); Color lighting = Lighting.GetColor((int)(player.MountedCenter.X / 16), (int)(player.MountedCenter.Y / 16)); return ModSabres.PreDrawSlashAndWeapon(spriteBatch, projectile, weaponItemID, lighting, null,//SlashLogic == 0f ? specialSlash : null, diff --git a/Items/Weapons/Sabres/PalmWoodSabre.cs b/Items/Weapons/Sabres/PalmWoodSabre.cs index a5d8553..26a0934 100644 --- a/Items/Weapons/Sabres/PalmWoodSabre.cs +++ b/Items/Weapons/Sabres/PalmWoodSabre.cs @@ -49,7 +49,7 @@ public override void AddRecipes() public override void HoldItem(Player player) { - ModSabres.HoldItemManager(player, item, mod.ProjectileType(), + ModSabres.HoldItemManager(player, item, ModContent.ProjectileType(), default(Color), 0.9f, player.itemTime == 0 ? 0f : 1f); } @@ -81,7 +81,7 @@ public override void ModifyHitNPC(Player player, NPC target, ref int damage, ref if (ModSabres.SabreIsChargedStriking(player, item)) { knockBack *= 2f; - target.AddBuff(mod.BuffType(), 60); + target.AddBuff(ModContent.BuffType(), 60); } } } @@ -144,7 +144,7 @@ public override void AI() public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Player player = Main.player[projectile.owner]; - int weaponItemID = mod.ItemType(); + int weaponItemID = ModContent.ItemType(); Color lighting = Lighting.GetColor((int)(player.MountedCenter.X / 16), (int)(player.MountedCenter.Y / 16)); return ModSabres.PreDrawSlashAndWeapon(spriteBatch, projectile, weaponItemID, lighting, null,//SlashLogic == 0f ? specialSlash : null, diff --git a/Items/Weapons/Sabres/Raiden.cs b/Items/Weapons/Sabres/Raiden.cs index 410503c..dedeeb3 100644 --- a/Items/Weapons/Sabres/Raiden.cs +++ b/Items/Weapons/Sabres/Raiden.cs @@ -168,8 +168,8 @@ public override void AddRecipes() { if (!ModConf.EnableSabres) return; ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(mod.ItemType(), 1); - recipe.AddIngredient(mod.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); recipe.AddIngredient(ItemID.ChlorophyteBar, 8); recipe.AddTile(TileID.AdamantiteForge); recipe.SetResult(this); @@ -178,7 +178,7 @@ public override void AddRecipes() public override void HoldItem(Player player) { - ModSabres.HoldItemManager(player, item, mod.ProjectileType(), + ModSabres.HoldItemManager(player, item, ModContent.ProjectileType(), default(Color), 1f, player.itemTime == 0 ? 0f : 1f, customCharge, 8); if (player.itemTime == 0) @@ -484,7 +484,7 @@ private void setAnimationAndImmunities(Player player) public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Player player = Main.player[projectile.owner]; - int weaponItemID = mod.ItemType(); + int weaponItemID = ModContent.ItemType(); Color lighting = Lighting.GetColor((int)(player.MountedCenter.X / 16), (int)(player.MountedCenter.Y / 16)); return ModSabres.PreDrawSlashAndWeapon(spriteBatch, projectile, weaponItemID, lighting, null,//SlashLogic == 0f ? specialSlash : null, diff --git a/Items/Weapons/Sabres/WoodenSabre.cs b/Items/Weapons/Sabres/WoodenSabre.cs index 050dc1d..6b43451 100644 --- a/Items/Weapons/Sabres/WoodenSabre.cs +++ b/Items/Weapons/Sabres/WoodenSabre.cs @@ -49,7 +49,7 @@ public override void AddRecipes() public override void HoldItem(Player player) { - ModSabres.HoldItemManager(player, item, mod.ProjectileType(), + ModSabres.HoldItemManager(player, item, ModContent.ProjectileType(), default(Color), 0.9f, player.itemTime == 0 ? 0f : 1f); } @@ -141,7 +141,7 @@ public override void AI() public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Player player = Main.player[projectile.owner]; - int weaponItemID = mod.ItemType(); + int weaponItemID = ModContent.ItemType(); Color lighting = Lighting.GetColor((int)(player.MountedCenter.X / 16), (int)(player.MountedCenter.Y / 16)); return ModSabres.PreDrawSlashAndWeapon(spriteBatch, projectile, weaponItemID, lighting, null,//SlashLogic == 0f ? specialSlash : null, diff --git a/ModPlayerFists.cs b/ModPlayerFists.cs index 30703c0..c4664a1 100644 --- a/ModPlayerFists.cs +++ b/ModPlayerFists.cs @@ -281,8 +281,7 @@ public override void PreUpdate() if (player.velocity.Y == 0) { // But upgraded fists can - Item i = new Item(); i.SetDefaults(player.HeldItem.type); - if (i.rare >= 4) + if (WeaponOut.JumpAgainUppercutFists[player.HeldItem.type]) { jumpAgainUppercut = true; } else { jumpAgainUppercut = false; } @@ -1293,7 +1292,7 @@ private bool ParryPreHurt(PlayerDeathReason damageSource, ref int damageTaken) // Add 5 sec parry buff and short invincibility int immunityParryTime = 20 + player.itemAnimationMax; provideImmunity(player, immunityParryTime); - player.AddBuff(mod.BuffType(), parryBuffTime, false); + player.AddBuff(ModContent.BuffType(), parryBuffTime, false); // Set flat cooldown parryTime = -immunityParryTime - 6; @@ -1310,8 +1309,7 @@ private bool ParryPreHurt(PlayerDeathReason damageSource, ref int damageTaken) if (!npc.immortal && !npc.dontTakeDamage) { // Hardmode fists restore uppercut on parry - Item i = new Item(); i.SetDefaults(player.HeldItem.type); - if (i.rare >= 4) + if (WeaponOut.JumpAgainUppercutFists[player.HeldItem.type]) { jumpAgainUppercut = true; } // Damage is based on the NPC's attack, plus player melee multiplier @@ -1343,11 +1341,10 @@ private bool ParryPreHurt(PlayerDeathReason damageSource, ref int damageTaken) else { Main.PlaySound(SoundID.NPCHit3, player.position); - Main.PlaySound(42, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f); + Main.PlaySound(SoundID.Trackable, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f); // Hardmode fists restore uppercut on parry - Item i = new Item(); i.SetDefaults(player.HeldItem.type); - if (i.rare >= 4) + if (WeaponOut.JumpAgainUppercutFists[player.HeldItem.type]) { jumpAgainUppercut = true; } if (damageSource.SourceProjectileIndex >= 0) @@ -1447,7 +1444,7 @@ public bool AltFunctionParryDash(Player player, int parryWindow, int parryCooldo public int GetParryBuff() { - return player.FindBuffIndex(mod.BuffType()); + return player.FindBuffIndex(ModContent.BuffType()); } public bool ClearParryBuff() { diff --git a/NPCs/NpcFX.cs b/NPCs/NpcFX.cs index 3c7d0be..20629ae 100644 --- a/NPCs/NpcFX.cs +++ b/NPCs/NpcFX.cs @@ -19,7 +19,7 @@ public override void SetupShop(int type, Chest shop, ref int nextSlot) //add puzzling cutter if hardmode if (Main.hardMode) { - shop.item[nextSlot].SetDefaults(mod.ItemType()); + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; } } @@ -31,7 +31,7 @@ public override void SetupShop(int type, Chest shop, ref int nextSlot) //add scrap salvo after mech if (Main.hardMode && NPC.downedPlantBoss) { - shop.item[nextSlot].SetDefaults(mod.ItemType()); + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; } } @@ -43,12 +43,12 @@ public override void SetupShop(int type, Chest shop, ref int nextSlot) //add headbands after bossess if (NPC.downedBoss3) { - shop.item[nextSlot].SetDefaults(mod.ItemType()); + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; } if (NPC.downedGolemBoss) { - shop.item[nextSlot].SetDefaults(mod.ItemType()); + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; } } @@ -62,8 +62,8 @@ public override void SetupTravelShop(int[] shop, ref int nextSlot) int chance = 5; if (NPC.downedSlimeKing) chance--; if (NPC.downedBoss1) chance--; - int taekwonBody = mod.ItemType(); - int boxingBody = mod.ItemType(); + int taekwonBody = ModContent.ItemType(); + int boxingBody = ModContent.ItemType(); foreach (Player p in Main.player) { if (p.armor[1].type == taekwonBody || p.armor[1].type == boxingBody) @@ -73,8 +73,8 @@ public override void SetupTravelShop(int[] shop, ref int nextSlot) } if (Main.rand.Next(Math.Max(1,chance)) == 0) { - shop[nextSlot] = mod.ItemType(); nextSlot++; - shop[nextSlot] = mod.ItemType(); nextSlot++; + shop[nextSlot] = ModContent.ItemType(); nextSlot++; + shop[nextSlot] = ModContent.ItemType(); nextSlot++; } } } @@ -86,12 +86,12 @@ public override void NPCLoot(NPC npc) int itemType = -1; if (npc.type == NPCID.GraniteGolem && Main.rand.Next(10) == 0) { - Item.NewItem(npc.position, npc.Size, mod.ItemType(), 1, false, -1, false, false); + Item.NewItem(npc.position, npc.Size, ModContent.ItemType(), 1, false, -1, false, false); return; } if (npc.type == NPCID.BoneLee && Main.rand.Next(6) == 0) { - Item.NewItem(npc.position, npc.Size, mod.ItemType(), 1, false, -1, false, false); + Item.NewItem(npc.position, npc.Size, ModContent.ItemType(), 1, false, -1, false, false); return; } @@ -103,25 +103,25 @@ public override void NPCLoot(NPC npc) if (Main.expertMode) { if (npc.type == NPCID.KingSlime) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.EyeofCthulhu) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type >= NPCID.EaterofWorldsHead && npc.type <= NPCID.EaterofWorldsTail) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.BrainofCthulhu) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.QueenBee) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.SkeletronHead) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.WallofFlesh) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.Retinazer || npc.type == NPCID.Spazmatism) { @@ -130,24 +130,24 @@ public override void NPCLoot(NPC npc) // Last eye standing if (!NPC.AnyNPCs(partner)) { - itemType = mod.ItemType(); + itemType = ModContent.ItemType(); } } if (npc.type == NPCID.TheDestroyer) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.SkeletronPrime) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.Plantera) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.Golem) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.DukeFishron) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } } // Modified from DropItemInstanced, only drop for people using fists @@ -179,19 +179,19 @@ public override void NPCLoot(NPC npc) if (chance) { if (npc.type == NPCID.KingSlime) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.Plantera) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.MartianSaucerCore) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.DukeFishron) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } if (npc.type == NPCID.DD2Betsy) - { itemType = mod.ItemType(); } + { itemType = ModContent.ItemType(); } } } @@ -201,7 +201,7 @@ public override void NPCLoot(NPC npc) int chance = Main.rand.Next(waveChance); //Main.NewText("Pumpking Slain, " + chance + "/" + waveChance); if (chance == 0) { - itemType = mod.ItemType(); + itemType = ModContent.ItemType(); } } @@ -210,7 +210,7 @@ public override void NPCLoot(NPC npc) int chance = Main.rand.Next(waveChance); // Main.NewText("Pumpking Slain, " + chance + "/" + waveChance); if (chance == 0) { - itemType = mod.ItemType(); + itemType = ModContent.ItemType(); } } diff --git a/PlayerFX.cs b/PlayerFX.cs index a2618aa..4db8af6 100644 --- a/PlayerFX.cs +++ b/PlayerFX.cs @@ -350,7 +350,7 @@ public override void ResetEffects() else { momentum = 0; } - int buffID = mod.BuffType(); + int buffID = ModContent.BuffType(); if (momentum >= momentumMax && buildMomentum) { momentum = momentumMax; @@ -365,7 +365,7 @@ public override void ResetEffects() // ================ Second Wind ================ // secondWind = false; - if (player.FindBuffIndex(mod.BuffType()) < 0) + if (player.FindBuffIndex(ModContent.BuffType()) < 0) { secondWindLifeTax = 0; } secondWindLifeTax = Math.Max(0, secondWindLifeTax); @@ -399,13 +399,13 @@ public override void ResetEffects() { soapCooldown++; } else { - int bubbleID = mod.NPCType(); + int bubbleID = ModContent.NPCType(); if (NPC.CountNPCS(bubbleID) < maxSoapBubbles) { Point spawnPos = player.Center.ToPoint(); spawnPos.X += Main.rand.Next(-100, 101); spawnPos.Y += Main.rand.Next(-100, 101); - NPC.NewNPC(spawnPos.X, spawnPos.Y, mod.NPCType(), + NPC.NewNPC(spawnPos.X, spawnPos.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, player.whoAmI); soapCooldown = 0; @@ -427,7 +427,7 @@ public override void UpdateDead() yang = 0; yinMeleeBonus = 0f; - player.ClearBuff(mod.BuffType()); + player.ClearBuff(ModContent.BuffType()); secondWindLifeTax = 0; FakePositionTemp = default(Vector2); @@ -467,7 +467,7 @@ public override void PostUpdateBuffs() if (!starlightGuardian) { // Delete starlight guardian debuff if it hasn't been applied - int buffID = mod.BuffType(); + int buffID = ModContent.BuffType(); if (player.FindBuffIndex(buffID) != -1) { player.DelBuff(player.FindBuffIndex(buffID)); } @@ -482,10 +482,10 @@ private void applyBannerBuff() if (!bannerPlayer.active || bannerPlayer.dead) continue; int itemType = bannerPlayer.inventory[bannerPlayer.selectedItem].type; - if (itemType != mod.ItemType() && - itemType != mod.ItemType() && - itemType != mod.ItemType() && - itemType != mod.ItemType() + if (itemType != ModContent.ItemType() && + itemType != ModContent.ItemType() && + itemType != ModContent.ItemType() && + itemType != ModContent.ItemType() ) continue; //only use these banner items foreach (Player otherPlayer in Main.player) @@ -499,7 +499,7 @@ private void applyBannerBuff() otherPlayer.position.Y >= bannerPlayer.position.Y - Buffs.RallyBanner.buffRadius && otherPlayer.position.Y <= bannerPlayer.position.Y + Buffs.RallyBanner.buffRadius) { - otherPlayer.AddBuff(mod.BuffType(), 2); + otherPlayer.AddBuff(ModContent.BuffType(), 2); } } } @@ -960,7 +960,7 @@ private void FistPostUpdate() if (yomiFinishedAttack) { // Buff manages setting/resetting - player.AddBuff(mod.BuffType(), 60 * 3); + player.AddBuff(ModContent.BuffType(), 60 * 3); yomiFinishedAttack = false; } } @@ -1050,23 +1050,23 @@ private void FistPostUpdate() yinMeleeBonus = Math.Max(yinMeleeBonus, yinPower); } - player.AddBuff(mod.BuffType(), 2); + player.AddBuff(ModContent.BuffType(), 2); } yin = 0; yang = 0; - player.ClearBuff(mod.BuffType()); - player.ClearBuff(mod.BuffType()); - player.ClearBuff(mod.BuffType()); + player.ClearBuff(ModContent.BuffType()); + player.ClearBuff(ModContent.BuffType()); + player.ClearBuff(ModContent.BuffType()); #endregion } else { #region Apply YinYang Buff - int bYiYa = mod.BuffType(); - int bYang = mod.BuffType(); - int bYin = mod.BuffType(); + int bYiYa = ModContent.BuffType(); + int bYang = ModContent.BuffType(); + int bYin = ModContent.BuffType(); int time = mpf.comboTimerMax - mpf.comboTimer; if (isBalanced) @@ -1280,9 +1280,9 @@ private void FistOnHitNPC(NPC target, int damage) { int healBeeType = ProjectileID.BeeArrow; if (player.strongBees && Main.rand.Next(2) == 0) - { healBeeType = mod.ProjectileType(); } + { healBeeType = ModContent.ProjectileType(); } else - { healBeeType = mod.ProjectileType(); } + { healBeeType = ModContent.ProjectileType(); } int targetPlayer = player.whoAmI; if (Main.LocalPlayer.team != 0) @@ -1475,7 +1475,7 @@ private bool FistPreHurt(int damage, PlayerDeathReason damageSource) if (damageSource.SourceProjectileIndex >= 0) { momentum /= 2; - player.AddBuff(mod.BuffType(), 0, false); + player.AddBuff(ModContent.BuffType(), 0, false); // Can't reflect damage that's too powerful! if (Main.projectile[damageSource.SourceProjectileIndex].damage > player.statLifeMax2 / 8) { @@ -1497,7 +1497,7 @@ private bool FistPreHurt(int damage, PlayerDeathReason damageSource) player.ApplyDamageToNPC(Main.npc[damageSource.SourceNPCIndex], player.statLife / 4, 3f + Math.Abs(player.velocity.X) * 2f, player.direction, false); Main.PlaySound(SoundID.Item10, player.position); - player.AddBuff(mod.BuffType(), 0, false); + player.AddBuff(ModContent.BuffType(), 0, false); player.immuneTime += 60; return false; } @@ -1515,7 +1515,7 @@ private void FistPostHurt(double damage) #region Counter Damage Buff if (taekwonCounter) { - player.AddBuff(mod.BuffType(), 60 + Math.Abs(player.statLife - player.statLifeMax2) / 2); + player.AddBuff(ModContent.BuffType(), 60 + Math.Abs(player.statLife - player.statLifeMax2) / 2); } #endregion @@ -1569,7 +1569,7 @@ private bool FistPreKill(double damage, PlayerDeathReason damageSource) { if (secondWindLifeTax == 0) { - player.AddBuff(mod.BuffType(), 3600 * 3); // 3 min + player.AddBuff(ModContent.BuffType(), 3600 * 3); // 3 min } secondWindLifeTax += overkill; player.statLife = Math.Max(player.statLife, 1); @@ -1587,7 +1587,7 @@ private void MomentumDashTorwardsMouse() momentum = 0; momentumDashTime = 6; - player.AddBuff(mod.BuffType(), 90); + player.AddBuff(ModContent.BuffType(), 90); player.immune = true; player.immuneTime = Math.Max(10, player.immuneTime); if (player.longInvince) player.immuneTime += 10; @@ -1632,17 +1632,17 @@ private void sashRestoreLogic() sashLifeLost = lifeRestorable(player); if (sashLifeLost == 0) - { player.AddBuff(mod.BuffType(), 1); } + { player.AddBuff(ModContent.BuffType(), 1); } else if (sashLifeLost >= (int)(player.statLifeMax2 * sashMaxLifeRecoverMult)) { - if (player.FindBuffIndex(mod.BuffType()) < 0) + if (player.FindBuffIndex(ModContent.BuffType()) < 0) { Main.PlaySound(SoundID.Tink, player.position); } - player.AddBuff(mod.BuffType(), 2); + player.AddBuff(ModContent.BuffType(), 2); } else - { player.AddBuff(mod.BuffType(), 1); } + { player.AddBuff(ModContent.BuffType(), 1); } } else if (sashLifeLost > 0) { @@ -1666,7 +1666,7 @@ private void CriticalHeartHit(int damage) for (int i = 0; i < amount; i++) { - int itemAmI = Item.NewItem(player.Hitbox, mod.ItemType(), 1); + int itemAmI = Item.NewItem(player.Hitbox, ModContent.ItemType(), 1); Item item = Main.item[itemAmI]; item.velocity.X *= 1f + (0.05f * damage); item.velocity.Y -= Math.Abs(item.velocity.X) / 10; @@ -1685,12 +1685,12 @@ private void discordItemsCheck() bool canTeleHook = false; bool checkChaosState = false; // Misc equips take priority - if (player.miscEquips[4].type == mod.ItemType()) + if (player.miscEquips[4].type == ModContent.ItemType()) { canTeleHook = true; checkChaosState = false; } - else if (player.miscEquips[4].type == mod.ItemType()) + else if (player.miscEquips[4].type == ModContent.ItemType()) { canTeleHook = true; checkChaosState = true; @@ -1699,8 +1699,8 @@ private void discordItemsCheck() { foreach (Item item in player.armor) { - if (item.type == mod.ItemType() || - item.type == mod.ItemType()) + if (item.type == ModContent.ItemType() || + item.type == ModContent.ItemType()) { foreach (Item i in player.inventory) { @@ -1787,7 +1787,7 @@ public override void CatchFish(Item fishingRod, Item bait, int power, int liquid if (superrare) { if (superrare && Main.rand.Next(3) == 0) - { caughtType = mod.ItemType(); return; } + { caughtType = ModContent.ItemType(); return; } } if (worldLayer <= 1) //Surface or below @@ -1799,7 +1799,7 @@ public override void CatchFish(Item fishingRod, Item bait, int power, int liquid if (veryrare && Main.rand.Next(2) == 0) { return; } if (rare && Main.rand.Next(2) == 0) // Same chance as swordfish - { caughtType = mod.ItemType(); return; } + { caughtType = ModContent.ItemType(); return; } if (uncommon) { return; } if(common) diff --git a/ProjFX.cs b/ProjFX.cs index a2d42d2..ae06519 100644 --- a/ProjFX.cs +++ b/ProjFX.cs @@ -19,7 +19,7 @@ public override bool PreAI(Projectile projectile) { if (!player.active) continue; - PlayerFX pFX = player.GetModPlayer(mod); + PlayerFX pFX = player.GetModPlayer(); if (!pFX.CanReflectProjectiles) continue; Player pOwner = Main.player[projectile.owner]; @@ -165,7 +165,7 @@ private void LunarAccessoryVisuals(Projectile projectile) if (projectile.npcProj || projectile.hostile) return; if (projectile.position == projectile.oldPosition) return; - PlayerFX p = Main.player[projectile.owner].GetModPlayer(mod); + PlayerFX p = Main.player[projectile.owner].GetModPlayer(); if (p.lunarMagicVisual && projectile.magic) { Dust d = Main.dust[Dust.NewDust( diff --git a/Projectiles/BuddyPortalEntrance.cs b/Projectiles/BuddyPortalEntrance.cs index 48f6b0d..92a028b 100644 --- a/Projectiles/BuddyPortalEntrance.cs +++ b/Projectiles/BuddyPortalEntrance.cs @@ -53,7 +53,7 @@ public override void AI() { if (p.active && projectile.owner == p.owner) { - if (p.type == mod.ProjectileType()) + if (p.type == ModContent.ProjectileType()) { Vector2 newPosition = p.Center - new Vector2(Main.LocalPlayer.width, Main.LocalPlayer.height) / 2; Main.LocalPlayer.Teleport(newPosition, 3); @@ -115,7 +115,7 @@ public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) { Main.player[Main.myPlayer].noThrow = 2; Main.player[Main.myPlayer].showItemIcon = true; - Main.player[Main.myPlayer].showItemIcon2 = mod.ItemType(); + Main.player[Main.myPlayer].showItemIcon2 = ModContent.ItemType(); if (PlayerInput.UsingGamepad) { Main.player[Main.myPlayer].GamepadEnableGrappleCooldown(); diff --git a/Projectiles/Explosion.cs b/Projectiles/Explosion.cs index fc883eb..a695067 100644 --- a/Projectiles/Explosion.cs +++ b/Projectiles/Explosion.cs @@ -198,7 +198,7 @@ private void SpawnExplosionAndFade(bool weaken) if (projectile.owner == Main.myPlayer) { Projectile.NewProjectile(projectile.Center, projectile.velocity, - mod.ProjectileType(), + ModContent.ProjectileType(), CalculateDamage(weaken), projectile.knockBack, projectile.owner, diff --git a/Projectiles/MeteorBreakshot.cs b/Projectiles/MeteorBreakshot.cs index acf1d67..24a4763 100644 --- a/Projectiles/MeteorBreakshot.cs +++ b/Projectiles/MeteorBreakshot.cs @@ -106,7 +106,7 @@ private void generateScatter(Vector2 position, Vector2 velocity) Projectile.NewProjectile( position, velocity * 0.25f + Inaccuracy(3f), - mod.ProjectileType(), projectile.damage / 3, 0f, projectile.owner); + ModContent.ProjectileType(), projectile.damage / 3, 0f, projectile.owner); } } private Vector2 calculateDirectionFactor(Vector2 velocity, Vector2 oldVelocity) diff --git a/Projectiles/SpiritWindstream.cs b/Projectiles/SpiritWindstream.cs index 08168d0..de2acc2 100644 --- a/Projectiles/SpiritWindstream.cs +++ b/Projectiles/SpiritWindstream.cs @@ -18,7 +18,7 @@ public override void SetStaticDefaults() DisplayName.SetDefault("Chilly Slipstream"); DisplayName.AddTranslation(GameCulture.Chinese, "寒冰气流"); DisplayName.AddTranslation(GameCulture.Russian, "Холодный След"); - buffID = mod.BuffType(); + buffID = ModContent.BuffType(); } public override void SetDefaults() { diff --git a/Tiles/CampTent.cs b/Tiles/CampTent.cs index 7edc23f..4dab660 100644 --- a/Tiles/CampTent.cs +++ b/Tiles/CampTent.cs @@ -72,7 +72,7 @@ public override void KillMultiTile(int i, int j, int frameX, int frameY) public override bool HasSmartInteract() { return true; } - public override void RightClick(int i, int j) + public override bool NewRightClick(int i, int j) { //get middle bottom of tent Player player = Main.player[Main.myPlayer]; @@ -84,7 +84,7 @@ public override void RightClick(int i, int j) if (frameX > 90) spawnX += 5; // mirror facing offset for alternate //Dust.NewDust(new Vector2((float)(spawnX * 16), (float)(spawnY * 16)), 16, 16, 6, 0f, 0f, 0, default(Color), 4f); - PlayerFX modPlayer = player.GetModPlayer(mod); + PlayerFX modPlayer = player.GetModPlayer(); if (modPlayer.localTempSpawn != new Vector2(spawnX, spawnY)) { Main.NewText("Temporary spawn point set!", 255, 240, 20, false); @@ -102,7 +102,7 @@ public override void RightClick(int i, int j) } modPlayer.localTempSpawn = new Vector2(); } - + return true; } public override void MouseOver(int i, int j) diff --git a/WeaponOut.cs b/WeaponOut.cs index 8fb5d9d..badcce8 100644 --- a/WeaponOut.cs +++ b/WeaponOut.cs @@ -39,6 +39,8 @@ public class WeaponOut : Mod /// internal List> weaponOutCustomPreDrawMethods; internal List> weaponOutCustomHoldMethods; + + public static bool[] JumpAgainUppercutFists { get; internal set; } public static Texture2D dHeart; public static Texture2D pumpkinMark; @@ -147,6 +149,9 @@ public override void Unload() { mod = null; modOverhaul = null; + dHeart = null; + pumpkinMark = null; + JumpAgainUppercutFists = null; weaponOutCustomPreDrawMethods.Clear(); weaponOutCustomHoldMethods.Clear(); } @@ -162,30 +167,41 @@ public override void PostSetupContent() { if (ModConf.EnableAccessories) BuffIDMirrorBarrier = GetBuff("MirrorBarrier").Type; if (ModConf.EnableDualWeapons) BuffIDManaReduction = GetBuff("ManaReduction").Type; - DustIDManaDust = GetDust().Type; - DustIDSlashFX = GetDust().Type; + DustIDManaDust = ModContent.GetInstance().Type; + DustIDSlashFX = ModContent.GetInstance().Type; if (ModConf.EnableEmblems) Items.Accessories.HeliosphereEmblem.SetUpGlobalDPS(); Call("AddCustomPreDrawMethod", WOPreDrawData); - if (Main.netMode != 2) { + if (Main.netMode != NetmodeID.Server) { dHeart = mod.GetTexture("Gores/DemonHearts"); pumpkinMark = mod.GetTexture("Gores/PumpkinMark"); - } - else { + } else { Console.WriteLine("WeaponOut loaded: qol#01"); } } + public override void AddRecipes() { + if (ModConf.EnableFists) { + JumpAgainUppercutFists = new SetFactory(ItemLoader.ItemCount).CreateBoolSet(); + Item item = new Item(); + for (int i = ItemID.Count; i < ItemLoader.ItemCount; i++) { + item.SetDefaults(i); + if (item.rare >= ItemRarityID.LightRed) { + JumpAgainUppercutFists[i] = true; + } + } + } + } - /// - /// Registers a glowmask texture to the game's array, and returns that value. - /// The file should be located under Glow/ItemName_Glow. Make sure to register - /// the returned value under item.glowMask in SetDefaults. - /// - /// The mod item to register. - /// - public static short SetStaticDefaultsGlowMask(ModItem modItem) { + /// + /// Registers a glowmask texture to the game's array, and returns that value. + /// The file should be located under Glow/ItemName_Glow. Make sure to register + /// the returned value under item.glowMask in SetDefaults. + /// + /// The mod item to register. + /// + public static short SetStaticDefaultsGlowMask(ModItem modItem) { if (!Main.dedServ) { Texture2D[] glowMasks = new Texture2D[Main.glowMaskTexture.Length + 1]; for (int i = 0; i < Main.glowMaskTexture.Length; i++) { @@ -235,7 +251,7 @@ private void DrawPumpkinMark(SpriteBatch spriteBatch) { if (!ModConf.enableFists) return; if (Main.gameMenu) return; - int buffID = BuffType(); + int buffID = ModContent.BuffType(); Dictionary drawPositions = new Dictionary(); foreach (NPC i in Main.npc) { if (!i.active || i.life <= 0) continue; @@ -352,7 +368,7 @@ private void DrawInterfaceWeaponOutToggleEye(SpriteBatch spriteBatch) { // Janky quick inventory visibilty if (!Main.playerInventory || !ModConf.showWeaponOut || ModConf.forceShowWeaponOut) return; //Get vars - PlayerWOFX pfx = Main.LocalPlayer.GetModPlayer(this); + PlayerWOFX pfx = Main.LocalPlayer.GetModPlayer(); Texture2D eye = Main.inventoryTickOnTexture; string hoverText = GetTranslationTextValue("WOVisualShow"); // Visible Vector2 position = new Vector2(20, 10); @@ -519,7 +535,7 @@ private void HandlePacketParry(BinaryReader reader, int code, int sender) { //-/ Console.WriteLine("received parry from " + sender); } else { - ModPlayerFists pfx = Main.player[sender].GetModPlayer(this); + ModPlayerFists pfx = Main.player[sender].GetModPlayer(); pfx.AltFunctionParryMax(Main.player[sender], parryWindow, parryTimeMax); //-/ Main.NewText("received parry from " + sender); } @@ -546,7 +562,7 @@ private void HandlePacketCombo(BinaryReader reader, int code, int sender) { //-/ Console.WriteLine("echo combo " + comboEffect + " from " + sender); } else { - ModPlayerFists pfx = Main.player[sender].GetModPlayer(this); + ModPlayerFists pfx = Main.player[sender].GetModPlayer(); pfx.player.itemAnimation = 0; pfx.AltFunctionCombo(Main.player[sender], comboEffect, true); //-/ Main.NewText("received combo " + comboEffect + " from " + sender); @@ -572,7 +588,7 @@ private void HandlePacketWeaponVisual(BinaryReader reader, int code, int sender) me.Send(-1, sender); } else { - PlayerWOFX pfx = Main.player[sender].GetModPlayer(this); + PlayerWOFX pfx = Main.player[sender].GetModPlayer(); pfx.weaponVisual = weaponVis; } } @@ -583,7 +599,7 @@ public override void PostUpdateInput() if (Main.gameMenu || ControlToggleVisual == null || ModConf.ForceShowWeaponOut) return; if (ControlToggleVisual.JustPressed) { - PlayerWOFX pfx = Main.LocalPlayer.GetModPlayer(this); + PlayerWOFX pfx = Main.LocalPlayer.GetModPlayer(); ToggleWeaponVisual(pfx, !pfx.weaponVisual); } } @@ -632,7 +648,7 @@ public override object Call(params object[] args) { } private void CallShowWeapon(Player p, bool show) { - ToggleWeaponVisual(p.GetModPlayer(this), show); + ToggleWeaponVisual(p.GetModPlayer(), show); } private void SetFrenzyHeart(Player p, bool state) { diff --git a/WeaponOut.csproj b/WeaponOut.csproj index faf90bc..607e605 100644 --- a/WeaponOut.csproj +++ b/WeaponOut.csproj @@ -5,14 +5,12 @@ WeaponOut net45 x86 - latest + 7.3 - + - - C:\Program Files (x86)\Steam\steamapps\common\Terraria\tModLoader.exe - + \ No newline at end of file