fix: Use new Locator property
This commit is contained in:
parent
5b1a55973b
commit
dd5f7256fc
@ -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;
|
||||
|
@ -27,10 +27,10 @@ namespace MagicStorageVoidBag.Items {
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> lines) {
|
||||
bool isSet = location.X >= 0 && location.Y >= 0;
|
||||
bool isSet = Location.X >= 0 && Location.Y >= 0;
|
||||
for (int k = 0; k < lines.Count; k++)
|
||||
if (isSet && lines[k].Mod == "Terraria" && lines[k].Name == "Tooltip1") {
|
||||
lines[k].Text = Language.GetTextValue("Mods.MagicStorage.SetTo", location.X, location.Y);
|
||||
lines[k].Text = Language.GetTextValue("Mods.MagicStorage.SetTo", Location.X, Location.Y);
|
||||
} else if (!isSet && lines[k].Mod == "Terraria" && lines[k].Name == "Tooltip2") {
|
||||
lines.RemoveAt(k);
|
||||
k--;
|
||||
|
Loading…
Reference in New Issue
Block a user