From 96fcb28ffb3c845617a5bb351aca108832cd45cd Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 19:19:13 -0400 Subject: [PATCH] Added Cement Shoes --- CalPlayer/CalamityPlayer.cs | 7 ++++-- Items/Tools/CementShoes.cs | 47 ++++++++++++++++++++++++++++++++++++ Items/Tools/CementShoes.png | Bin 0 -> 314 bytes 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 Items/Tools/CementShoes.cs create mode 100644 Items/Tools/CementShoes.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 7921596c37..d2d94c24f6 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -123,6 +123,7 @@ namespace CalamityMod.CalPlayer public bool brimlashBusterBoost = false; public float animusBoost = 1f; public int potionTimer = 0; + public bool cementShoes = false; #endregion public int CurrentlyViewedFactoryX = -1; @@ -1470,6 +1471,8 @@ namespace CalamityMod.CalPlayer dsSetBonus = false; wearingRogueArmor = false; + cementShoes = false; + kingSlimeLore = false; desertScourgeLore = false; crabulonLore = false; @@ -3679,7 +3682,7 @@ namespace CalamityMod.CalPlayer if (weakPetrification) WeakPetrification(); - if (player.mount.Active || player.mount.Cart || (CalamityConfig.Instance.BossRushDashCurse && CalamityWorld.bossRushActive)) + if (player.mount.Active || player.mount.Cart || cementShoes || (CalamityConfig.Instance.BossRushDashCurse && CalamityWorld.bossRushActive)) DashExploitFix(true); if (silvaCountdown > 0 && hasSilvaEffect && silvaSet) @@ -3705,7 +3708,7 @@ namespace CalamityMod.CalPlayer if (weakPetrification) WeakPetrification(); - if (player.mount.Active || player.mount.Cart || (CalamityConfig.Instance.BossRushDashCurse && CalamityWorld.bossRushActive)) + if (player.mount.Active || player.mount.Cart || cementShoes || (CalamityConfig.Instance.BossRushDashCurse && CalamityWorld.bossRushActive)) DashExploitFix(true); if (silvaCountdown > 0 && hasSilvaEffect && silvaSet) diff --git a/Items/Tools/CementShoes.cs b/Items/Tools/CementShoes.cs new file mode 100644 index 0000000000..137473f4af --- /dev/null +++ b/Items/Tools/CementShoes.cs @@ -0,0 +1,47 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Tools +{ + public class CementShoes : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Cement Shoes"); + Tooltip.SetDefault("So heavy...\n" + + "Favorite this item to disable all dashing."); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 20; + item.rare = 1; + item.consumable = false; + } + + public override bool CanUseItem(Player player) + { + return false; + } + + public override void UpdateInventory(Player player) + { + CalamityPlayer modPlayer = player.Calamity(); + if (item.favorited) + modPlayer.cementShoes = true; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddRecipeGroup("SiltGroup", 20); + recipe.AddIngredient(ItemID.Stone, 20); + recipe.AddTile(TileID.Furnaces); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Tools/CementShoes.png b/Items/Tools/CementShoes.png new file mode 100644 index 0000000000000000000000000000000000000000..677772c60e9a5e98f1f48731931d47a4168bfc49 GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^3P3E!!3-p;uDp>3QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`r2~9IT!FN_oRXQLMRahymWHmqm4lC~Z&_9eP<+qHMZ19%XGxG>@P8;^ z2==cK0tps)L>4nJ@ErzW#^d=bQhdNYhJ~#sn6s5@HodxwG80^m91fde9B8IuCrS3imv34xm4_Y zXzh{s#tF+Dn)JHY_ZYDGy6%~G-B6fmf7B#}mNf^iP0A2>