Merge pull request #1417 from CalamityTeam/urn-of-avarice-fixes
Urn of Avarice fixes
This commit is contained in:
2 files changed
+15
-11
No files matched your search
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CalamityMod.Tiles;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Tiles;
|
||||
|
||||
namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
@@ -12,7 +9,11 @@ namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType<GreedPotTile>());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<GreedPotTile>());
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.value = Item.buyPrice(gold: 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Particles;
|
||||
@@ -75,10 +72,16 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
Tile tile = Main.tile[x, y];
|
||||
|
||||
if (!tile.HasTile || tile.TileType != ModContent.TileType<GreedPotTile>())
|
||||
return false;
|
||||
|
||||
int style = 0, alt = 0;
|
||||
TileObjectData.GetTileInfo(tile, ref style, ref alt);
|
||||
TileObjectData data = TileObjectData.GetTileData(tile.TileType, style, alt);
|
||||
|
||||
if (data == null)
|
||||
return false;
|
||||
|
||||
int sheetSquare = 16 + data.CoordinatePadding;
|
||||
int FrameX = tile.TileFrameX / sheetSquare % data.Width;
|
||||
int FrameY = tile.TileFrameY / sheetSquare % data.Height;
|
||||
|
||||
Reference in new issue
Block a user