Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CraftingGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static class CraftingGUI
private static readonly Dictionary<int, int> itemCounts = new Dictionary<int, int>();
private static List<Recipe> recipes = new List<Recipe>();
private static List<bool> recipeAvailable = new List<bool>();
private static Recipe selectedRecipe;
public static Recipe selectedRecipe;
private static int numRows;
private static int displayRows;
private static bool slotFocus;
Expand Down
7 changes: 7 additions & 0 deletions MagicStorageConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public class MagicStorageConfig : ModConfig
[DefaultValue(false)]
public bool clearSearchText;

[Label("Clear selected recipe")]
[Tooltip("Enable to clear the last selected recipe when opening the Crafting Interface")]
[DefaultValue(true)]
public bool clearSelectedRecipe;

[Label("Show estimated item dps")]
[Tooltip("Enable to show the estimated dps of the item as a tooltip")]
[DefaultValue(true)]
Expand All @@ -52,6 +57,8 @@ public class MagicStorageConfig : ModConfig

[JsonIgnore] public static bool ClearSearchText => Instance.clearSearchText;

[JsonIgnore] public static bool ClearSelectedRecipe => Instance.clearSelectedRecipe;

[JsonIgnore] public static bool ShowItemDps => Instance.showItemDps;

public override ConfigScope Mode => ConfigScope.ClientSide;
Expand Down
5 changes: 5 additions & 0 deletions StoragePlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ public void OpenStorage(Point16 point, bool remote = false)
CraftingGUI.searchBar?.Reset();
}

if (MagicStorageConfig.ClearSelectedRecipe)
{
CraftingGUI.selectedRecipe = null;
}

StorageGUI.RefreshItems();
}

Expand Down