fix: update for new Magic Storage version
Some checks failed
ci/woodpecker/tag/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/tag/woodpecker Pipeline failed
This commit is contained in:
parent
28ba14cb94
commit
8c66a50450
@ -33,7 +33,7 @@ namespace MagicStorageVoidBag.Hooks {
|
||||
|
||||
heart.TryDeposit(returnItem);
|
||||
heart.ResetCompactStage();
|
||||
StorageGUI.modSearchBox.OnChanged();
|
||||
StorageGUI.needRefresh = true;
|
||||
|
||||
if (returnItem.stack != newItem.stack) {
|
||||
if (newItem.IsACoin) {
|
||||
|
@ -1,32 +0,0 @@
|
||||
using MagicStorage.Components;
|
||||
using MagicStorage.Items;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
|
||||
|
||||
namespace MagicStorageVoidBag.Hooks {
|
||||
internal class StorageHeartRightClickHook {
|
||||
private static readonly log4net.ILog Logger = MagicStorageVoidBag.Instance.Logger;
|
||||
public static bool Hook(On.MagicStorage.Components.StorageHeart.orig_RightClick orig, MagicStorage.Components.StorageHeart heart, int i, int j) {
|
||||
// https://github.com/blushiemagic/MagicStorage/blob/1.4-stable/Components/StorageHeart.cs#L23
|
||||
Player player = Main.LocalPlayer;
|
||||
Item item = player.HeldItem;
|
||||
|
||||
if (!item.IsAir && item.ModItem is Locator locator) {
|
||||
if (Main.tile[i, j].TileFrameX % 36 == 18) i--;
|
||||
if (Main.tile[i, j].TileFrameY % 36 == 18) j--;
|
||||
|
||||
locator.location = new Point16(i, j);
|
||||
if (player.selectedItem == 58) {
|
||||
Main.mouseItem = item.Clone();
|
||||
}
|
||||
|
||||
Main.NewText(Language.GetTextValue("Mods.MagicStorage.LocatorSet", i, j));
|
||||
return true;
|
||||
}
|
||||
|
||||
return orig(heart, i, j);
|
||||
}
|
||||
}
|
||||
}
|
@ -15,7 +15,6 @@ namespace MagicStorageVoidBag {
|
||||
|
||||
On.Terraria.Player.GetItem_VoidVault += GetItemVoidVaultHook.Hook;
|
||||
On.Terraria.Player.ItemSpaceForCofveve += ItemSpaceForCofveveHook.Hook;
|
||||
On.MagicStorage.Components.StorageHeart.RightClick += StorageHeartRightClickHook.Hook;
|
||||
}
|
||||
|
||||
public override void Unload() {
|
||||
@ -23,7 +22,6 @@ namespace MagicStorageVoidBag {
|
||||
|
||||
On.Terraria.Player.GetItem_VoidVault -= GetItemVoidVaultHook.Hook;
|
||||
On.Terraria.Player.ItemSpaceForCofveve -= ItemSpaceForCofveveHook.Hook;
|
||||
On.MagicStorage.Components.StorageHeart.RightClick -= StorageHeartRightClickHook.Hook;
|
||||
|
||||
base.Unload();
|
||||
}
|
||||
|
@ -14,8 +14,5 @@
|
||||
<Reference Include="MagicStorage">
|
||||
<HintPath>..\MagicStorage\MagicStorage.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MagicStorageHooks">
|
||||
<HintPath>lib\MagicStorage_Hooks.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,8 +1,7 @@
|
||||
displayName = MagicStorage Void Bag
|
||||
author = jack
|
||||
version = 1.3
|
||||
version = 1.4
|
||||
modReferences = MagicStorage
|
||||
dllReferences = MagicStorage_Hooks
|
||||
sortAfter = MagicStorage
|
||||
includeSource = true
|
||||
homepage = https://github.com/jackbondpreston/MagicStorageVoidBag
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user