From dd5f7256fcd390ee7a013fc7dfc67a97849d2052 Mon Sep 17 00:00:00 2001 From: Jack Bond-Preston Date: Sat, 4 Feb 2023 12:50:12 +0000 Subject: [PATCH] fix: Use new Locator property --- Hooks/GetItemVoidVaultHook.cs | 6 +++--- Hooks/ItemSpaceForCofveveHook.cs | 6 +++--- Items/MSVoidBag.cs | 4 ++-- build.txt | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Hooks/GetItemVoidVaultHook.cs b/Hooks/GetItemVoidVaultHook.cs index 372527e..dbb3c40 100644 --- a/Hooks/GetItemVoidVaultHook.cs +++ b/Hooks/GetItemVoidVaultHook.cs @@ -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() || 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()) goto original; TEStorageHeart heart = (TEStorageHeart)te; diff --git a/Hooks/ItemSpaceForCofveveHook.cs b/Hooks/ItemSpaceForCofveveHook.cs index 2f97029..f43fa00 100644 --- a/Hooks/ItemSpaceForCofveveHook.cs +++ b/Hooks/ItemSpaceForCofveveHook.cs @@ -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() || 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()) goto original; if (Utility.HeartHasSpaceFor(newItem, (TEStorageHeart)te)) return true; diff --git a/Items/MSVoidBag.cs b/Items/MSVoidBag.cs index c1d2e56..709ffa7 100644 --- a/Items/MSVoidBag.cs +++ b/Items/MSVoidBag.cs @@ -27,10 +27,10 @@ namespace MagicStorageVoidBag.Items { } public override void ModifyTooltips(List 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--; diff --git a/build.txt b/build.txt index ab48cb7..53e93aa 100644 --- a/build.txt +++ b/build.txt @@ -1,6 +1,6 @@ displayName = MagicStorage Void Bag author = jack -version = 1.5 +version = 1.6 modReferences = MagicStorage sortAfter = MagicStorage includeSource = true