fix: Use new Locator property
This commit is contained in:
@ -21,12 +21,12 @@ namespace MagicStorageVoidBag.Hooks {
|
||||
|
||||
var bag = (MSVoidBag)i.ModItem;
|
||||
|
||||
if (bag.location.X < 0 || bag.location.Y < 0) goto original;
|
||||
if (bag.Location.X < 0 || bag.Location.Y < 0) goto original;
|
||||
|
||||
Tile tile = Main.tile[bag.location.X, bag.location.Y];
|
||||
Tile tile = Main.tile[bag.Location.X, bag.Location.Y];
|
||||
|
||||
if (!tile.HasTile || tile.TileType != ModContent.TileType<StorageHeart>() || tile.TileFrameX != 0 || tile.TileFrameY != 0) goto original;
|
||||
if (!TileEntity.ByPosition.TryGetValue(bag.location, out TileEntity te)) goto original;
|
||||
if (!TileEntity.ByPosition.TryGetValue(bag.Location, out TileEntity te)) goto original;
|
||||
if (te.type != ModContent.TileEntityType<TEStorageHeart>()) goto original;
|
||||
|
||||
TEStorageHeart heart = (TEStorageHeart)te;
|
||||
|
@ -24,12 +24,12 @@ namespace MagicStorageVoidBag.Hooks {
|
||||
|
||||
var bag = (MSVoidBag)i.ModItem;
|
||||
|
||||
if (bag.location.X < 0 || bag.location.Y < 0) goto original;
|
||||
if (bag.Location.X < 0 || bag.Location.Y < 0) goto original;
|
||||
|
||||
Tile tile = Main.tile[bag.location.X, bag.location.Y];
|
||||
Tile tile = Main.tile[bag.Location.X, bag.Location.Y];
|
||||
|
||||
if (!tile.HasTile || tile.TileType != ModContent.TileType<StorageHeart>() || tile.TileFrameX != 0 || tile.TileFrameY != 0) goto original;
|
||||
if (!TileEntity.ByPosition.TryGetValue(bag.location, out TileEntity te)) goto original;
|
||||
if (!TileEntity.ByPosition.TryGetValue(bag.Location, out TileEntity te)) goto original;
|
||||
if (te.type != ModContent.TileEntityType<TEStorageHeart>()) goto original;
|
||||
|
||||
if (Utility.HeartHasSpaceFor(newItem, (TEStorageHeart)te)) return true;
|
||||
|
Reference in New Issue
Block a user