Fixed tiles dropped a lot of items.

Updated enchanted anvil.
This commit is contained in:
FyloZ 2020-07-09 17:08:49 -04:00
parent e2f2c82ada
commit 782e6a6582
11 changed files with 31 additions and 38 deletions

View File

@ -21,6 +21,7 @@ namespace Decimation.Content.Items.Misc.Souls
item.height = refItem.height; item.height = refItem.height;
item.width = 20; item.width = 20;
item.height = 20; item.height = 20;
item.value = Item.buyPrice(silver: 2);
this.item.maxStack = 999; this.item.maxStack = 999;

View File

@ -3,6 +3,7 @@ using Terraria;
using Terraria.ID; using Terraria.ID;
using Terraria.ModLoader; using Terraria.ModLoader;
using Decimation.Lib.Items; using Decimation.Lib.Items;
using Decimation.Lib.Util.Builder;
namespace Decimation.Content.Items.Placeable namespace Decimation.Content.Items.Placeable
{ {
@ -13,22 +14,22 @@ namespace Decimation.Content.Items.Placeable
protected override void InitPlaceable() protected override void InitPlaceable()
{ {
item.width = 20; item.width = 44;
item.height = 20; item.height = 20;
item.maxStack = 1; item.maxStack = 1;
item.value = Item.buyPrice(gold: 1);
} }
protected override ModRecipe GetRecipe() protected override ModRecipe GetRecipe()
{ {
ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AdamantiteForge, true); return new RecipeBuilder(this)
.AnyIronBar(true)
recipe.AddIngredient(ItemID.MythrilAnvil, 1); .WithIngredient(ItemID.MythrilAnvil)
recipe.AddIngredient(ItemID.IronAnvil, 1); .WithIngredient(ItemID.IronAnvil)
recipe.AddIngredient(ModContent.ItemType<SoulofLife>(), 5); .WithIngredient(ItemID.SoulofNight, 5)
recipe.AddIngredient(ItemID.SoulofNight, 5); .WithIngredient(ModContent.ItemType<SoulofLife>(), 5)
recipe.AddIngredient(ItemID.SoulofMight, 5); .WithStation(TileID.AdamantiteForge)
.Build();
return recipe;
} }
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 402 B

View File

@ -1,6 +1,5 @@
using Decimation.Lib.Items; using Decimation.Lib.Items;
using Decimation.Lib.Util; using Decimation.Lib.Util;
using Terraria.DataStructures;
using Terraria.ModLoader; using Terraria.ModLoader;
namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne
@ -9,7 +8,6 @@ namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne
{ {
protected override string ItemName => "Shrine Altar"; protected override string ItemName => "Shrine Altar";
protected override int Tile => ModContent.TileType<Tiles.ShrineoftheMoltenOne.ShrineAltar>(); protected override int Tile => ModContent.TileType<Tiles.ShrineoftheMoltenOne.ShrineAltar>();
protected override DrawAnimation Animation => new DrawAnimationVertical(5, 6);
protected override void InitPlaceable() protected override void InitPlaceable()
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 984 B

View File

@ -1,41 +1,30 @@
using Decimation.Content.Buffs.Buffs; using Decimation.Content.Buffs.Buffs;
using Decimation.Lib.Tiles;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Terraria; using Terraria;
using Terraria.DataStructures;
using Terraria.ID; using Terraria.ID;
using Terraria.ModLoader; using Terraria.ModLoader;
using Terraria.ObjectData; using Terraria.ObjectData;
namespace Decimation.Content.Tiles 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<Items.Placeable.EnchantedAnvil>();
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 }; 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<Items.Placeable.EnchantedAnvil>());
}
public override void NearbyEffects(int i, int j, bool closer) public override void NearbyEffects(int i, int j, bool closer)
{ {
if (closer) if (closer)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 B

After

Width:  |  Height:  |  Size: 564 B

View File

@ -1,5 +1,6 @@
using Decimation.Lib.Tiles; using Decimation.Lib.Tiles;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Terraria.DataStructures;
using Terraria.ID; using Terraria.ID;
using Terraria.ModLoader; using Terraria.ModLoader;
using Terraria.ObjectData; using Terraria.ObjectData;
@ -15,5 +16,6 @@ namespace Decimation.Content.Tiles
public override int? AnimationFrameCount => 8; public override int? AnimationFrameCount => 8;
public override int? AnimationFrameHeight => 54; public override int? AnimationFrameHeight => 54;
public override int TileItem => ModContent.ItemType<Items.Placeable.TitanForge>(); public override int TileItem => ModContent.ItemType<Items.Placeable.TitanForge>();
public override Point16 Origin => new Point16(1, 1);
} }
} }

View File

@ -12,6 +12,7 @@ namespace Decimation.Lib.Tiles
protected sealed override void InitTile() protected sealed override void InitTile()
{ {
Main.tileMergeDirt[Type] = MergeDirt; Main.tileMergeDirt[Type] = MergeDirt;
drop = TileItem;
InitFramedTile(); InitFramedTile();
} }

View File

@ -1,3 +1,4 @@
using System;
using Terraria; using Terraria;
using Terraria.DataStructures; using Terraria.DataStructures;
using Terraria.Enums; using Terraria.Enums;
@ -52,14 +53,15 @@ namespace Decimation.Lib.Tiles
// AnimationFrameHeight = (16 + TileObjectData.newTile.CoordinatePadding) * TileObjectData.newTile.Height; // AnimationFrameHeight = (16 + TileObjectData.newTile.CoordinatePadding) * TileObjectData.newTile.Height;
// } // }
InitMultiTile();
_width = TileObjectData.newTile.Width * 16; _width = TileObjectData.newTile.Width * 16;
_height = TileObjectData.newTile.Height * 16; _height = TileObjectData.newTile.Height * 16;
} }
public override void KillMultiTile(int i, int j, int frameX, int frameY) public override void KillMultiTile(int i, int j, int frameX, int frameY)
{ {
Main.NewText(1);
Item.NewItem(i * 16, j * 16, _width, _height, TileItem); Item.NewItem(i * 16, j * 16, _width, _height, TileItem);
} }

View File

@ -31,7 +31,6 @@ namespace Decimation.Lib.Tiles
minPick = MinimumPickaxePower; minPick = MinimumPickaxePower;
mineResist = MineResistance; mineResist = MineResistance;
dustType = DustType; dustType = DustType;
drop = TileItem;
disableSmartCursor = DisableSmartCursor; disableSmartCursor = DisableSmartCursor;
if (Name == null) if (Name == null)