diff --git a/Content/Items/Misc/Souls/SoulofLife.cs b/Content/Items/Misc/Souls/SoulofLife.cs index 0eb7875..6fb6d29 100644 --- a/Content/Items/Misc/Souls/SoulofLife.cs +++ b/Content/Items/Misc/Souls/SoulofLife.cs @@ -21,6 +21,7 @@ namespace Decimation.Content.Items.Misc.Souls item.height = refItem.height; item.width = 20; item.height = 20; + item.value = Item.buyPrice(silver: 2); this.item.maxStack = 999; diff --git a/Content/Items/Placeable/EnchantedAnvil.cs b/Content/Items/Placeable/EnchantedAnvil.cs index 46bc170..8ae412f 100644 --- a/Content/Items/Placeable/EnchantedAnvil.cs +++ b/Content/Items/Placeable/EnchantedAnvil.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using Decimation.Lib.Items; +using Decimation.Lib.Util.Builder; namespace Decimation.Content.Items.Placeable { @@ -13,22 +14,22 @@ namespace Decimation.Content.Items.Placeable protected override void InitPlaceable() { - item.width = 20; + item.width = 44; item.height = 20; item.maxStack = 1; + item.value = Item.buyPrice(gold: 1); } protected override ModRecipe GetRecipe() { - ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AdamantiteForge, true); - - recipe.AddIngredient(ItemID.MythrilAnvil, 1); - recipe.AddIngredient(ItemID.IronAnvil, 1); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.SoulofNight, 5); - recipe.AddIngredient(ItemID.SoulofMight, 5); - - return recipe; + return new RecipeBuilder(this) + .AnyIronBar(true) + .WithIngredient(ItemID.MythrilAnvil) + .WithIngredient(ItemID.IronAnvil) + .WithIngredient(ItemID.SoulofNight, 5) + .WithIngredient(ModContent.ItemType(), 5) + .WithStation(TileID.AdamantiteForge) + .Build(); } } } diff --git a/Content/Items/Placeable/EnchantedAnvil.png b/Content/Items/Placeable/EnchantedAnvil.png index 982e462..798d5e4 100644 Binary files a/Content/Items/Placeable/EnchantedAnvil.png and b/Content/Items/Placeable/EnchantedAnvil.png differ diff --git a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs index 0dacbf9..4ae90dc 100644 --- a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs +++ b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs @@ -1,6 +1,5 @@ using Decimation.Lib.Items; using Decimation.Lib.Util; -using Terraria.DataStructures; using Terraria.ModLoader; namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne @@ -9,7 +8,6 @@ namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne { protected override string ItemName => "Shrine Altar"; protected override int Tile => ModContent.TileType(); - protected override DrawAnimation Animation => new DrawAnimationVertical(5, 6); protected override void InitPlaceable() { diff --git a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png index c2397d5..0c2e7b8 100644 Binary files a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png and b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png differ diff --git a/Content/Tiles/EnchantedAnvil.cs b/Content/Tiles/EnchantedAnvil.cs index 380112c..484fce8 100644 --- a/Content/Tiles/EnchantedAnvil.cs +++ b/Content/Tiles/EnchantedAnvil.cs @@ -1,41 +1,30 @@ using Decimation.Content.Buffs.Buffs; +using Decimation.Lib.Tiles; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; namespace Decimation.Content.Tiles { - public class EnchantedAnvil : ModTile + public class EnchantedAnvil : DecimationMultiTile { + public override Color MapColor => new Color(108, 239, 64); + public override int TileItem => ModContent.ItemType(); + public override TileObjectData Style => TileObjectData.Style3x2; + public override string Name => "Enchanted Anvil"; + public override int DustType => DustID.Iron; + public override bool HasLight => true; + public override Point16 Origin => new Point16(1, 1); + public override bool Table => true; - public override void SetDefaults() + protected override void InitMultiTile() { - Main.tileSolidTop[Type] = true; - Main.tileFrameImportant[Type] = true; - Main.tileNoAttach[Type] = false; - TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); - TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 }; - TileObjectData.addTile(Type); - ModTranslation name = CreateMapEntryName(); - name.SetDefault("Enchanted Anvil"); - AddMapEntry(new Color(108, 239, 64), name); - dustType = DustID.Iron; - disableSmartCursor = true; adjTiles = new int[] { TileID.Anvils, TileID.MythrilAnvil }; } - public override void NumDust(int i, int j, bool fail, ref int num) - { - num = fail ? 1 : 3; - } - - public override void KillMultiTile(int i, int j, int frameX, int frameY) - { - Item.NewItem(i * 16, j * 16, 48, 32, ModContent.ItemType()); - } - public override void NearbyEffects(int i, int j, bool closer) { if (closer) diff --git a/Content/Tiles/EnchantedAnvil.png b/Content/Tiles/EnchantedAnvil.png index 12a7f72..95be290 100644 Binary files a/Content/Tiles/EnchantedAnvil.png and b/Content/Tiles/EnchantedAnvil.png differ diff --git a/Content/Tiles/TitanForge.cs b/Content/Tiles/TitanForge.cs index bb48a26..96bfc41 100644 --- a/Content/Tiles/TitanForge.cs +++ b/Content/Tiles/TitanForge.cs @@ -1,5 +1,6 @@ using Decimation.Lib.Tiles; using Microsoft.Xna.Framework; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; @@ -15,5 +16,6 @@ namespace Decimation.Content.Tiles public override int? AnimationFrameCount => 8; public override int? AnimationFrameHeight => 54; public override int TileItem => ModContent.ItemType(); + public override Point16 Origin => new Point16(1, 1); } } \ No newline at end of file diff --git a/Lib/Tiles/DecimationFramedTile.cs b/Lib/Tiles/DecimationFramedTile.cs index 6bac416..26fa995 100644 --- a/Lib/Tiles/DecimationFramedTile.cs +++ b/Lib/Tiles/DecimationFramedTile.cs @@ -12,6 +12,7 @@ namespace Decimation.Lib.Tiles protected sealed override void InitTile() { Main.tileMergeDirt[Type] = MergeDirt; + drop = TileItem; InitFramedTile(); } diff --git a/Lib/Tiles/DecimationMultiTile.cs b/Lib/Tiles/DecimationMultiTile.cs index d965112..a7eb097 100644 --- a/Lib/Tiles/DecimationMultiTile.cs +++ b/Lib/Tiles/DecimationMultiTile.cs @@ -1,3 +1,4 @@ +using System; using Terraria; using Terraria.DataStructures; using Terraria.Enums; @@ -51,15 +52,16 @@ namespace Decimation.Lib.Tiles // { // AnimationFrameHeight = (16 + TileObjectData.newTile.CoordinatePadding) * TileObjectData.newTile.Height; // } + + InitMultiTile(); _width = TileObjectData.newTile.Width * 16; _height = TileObjectData.newTile.Height * 16; } - - public override void KillMultiTile(int i, int j, int frameX, int frameY) { + Main.NewText(1); Item.NewItem(i * 16, j * 16, _width, _height, TileItem); } diff --git a/Lib/Tiles/DecimationTile.cs b/Lib/Tiles/DecimationTile.cs index d9f95d8..fd1c1a9 100644 --- a/Lib/Tiles/DecimationTile.cs +++ b/Lib/Tiles/DecimationTile.cs @@ -31,7 +31,6 @@ namespace Decimation.Lib.Tiles minPick = MinimumPickaxePower; mineResist = MineResistance; dustType = DustType; - drop = TileItem; disableSmartCursor = DisableSmartCursor; if (Name == null)