diff --git a/Items/Tools/WulfrumTreasurePinger.cs b/Items/Tools/WulfrumTreasurePinger.cs index 19f81b903d..df191e059c 100644 --- a/Items/Tools/WulfrumTreasurePinger.cs +++ b/Items/Tools/WulfrumTreasurePinger.cs @@ -1,16 +1,15 @@ -using CalamityMod.Items.Materials; +using System; +using System.IO; +using CalamityMod.Items.Materials; +using CalamityMod.Particles; using CalamityMod.Systems; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.IO; -using System.IO; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using CalamityMod.Particles; namespace CalamityMod.Items.Tools { @@ -46,8 +45,7 @@ namespace CalamityMod.Items.Tools Item.noMelee = true; Item.rare = ItemRarityID.Blue; Item.value = Item.buyPrice(silver: 50); - usesLeft = 1; - breakTime = 90; + usesLeft = maxUses; timeBeforeBlast = breakTime; } @@ -282,10 +280,12 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { + //Intentionally craftable anywhere. CreateRecipe(). AddIngredient(6). Register(); } - } + + } diff --git a/Systems/TilePingerSystem.cs b/Systems/TilePingerSystem.cs index 6e1aa4a3e6..38673ccd69 100644 --- a/Systems/TilePingerSystem.cs +++ b/Systems/TilePingerSystem.cs @@ -65,8 +65,6 @@ namespace CalamityMod.Systems public void UpdateEffect() { } } - - public class TilePingerSystem : ModSystem { internal static Dictionary> pingedTiles; @@ -137,11 +135,16 @@ namespace CalamityMod.Systems } Main.spriteBatch.End(); } + + //This makes it flash every other frame on smooth lighting modes + pingedTiles.Clear(); + } public static void ClearTiles() { - pingedTiles.Clear(); + //Putting it here breaks it worse on smooth lighting modes. + //HJELP } } @@ -160,8 +163,6 @@ namespace CalamityMod.Systems } } - - public class WulfrumPingTileEffect : IPingedTileEffect, ILoadable { internal static Texture2D emptyFrame; @@ -234,11 +235,11 @@ namespace CalamityMod.Systems public void PerTileSetup(Point pos, ref Effect effect) { //Up, left, right, down. - effect.Parameters["cardinalConnections"].SetValue(new bool[] { Connected(pos, 0, - 1), Connected(pos,- 1, 0), Connected(pos, 1, 0), Connected(pos, 0, 1) }); + effect.Parameters["cardinalConnections"].SetValue(new bool[] { Connected(pos, 0, -1), Connected(pos, -1, 0), Connected(pos, 1, 0), Connected(pos, 0, 1) }); effect.Parameters["tilePosition"].SetValue(pos.ToVector2() * 16f); } - public static bool Connected(Point pos, int displaceX, int displaceY) => Main.IsTileSpelunkable(pos.X + displaceX, pos.Y + displaceY) && Main.tile[pos].TileType == Main.tile[pos.X + displaceX, pos.Y + displaceY].TileType ; + public static bool Connected(Point pos, int displaceX, int displaceY) => Main.IsTileSpelunkable(pos.X + displaceX, pos.Y + displaceY) && Main.tile[pos].TileType == Main.tile[pos.X + displaceX, pos.Y + displaceY].TileType; public bool ShouldRegisterTile(int x, int y) {