summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs
index 3675a963..72d01eb7 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs
@@ -43,6 +43,16 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData
this.Item = createItem(this);
}
+ /// <summary>Construct an instance.</summary>
+ /// <param name="item">The item metadata to copy.</param>
+ public SearchableItem(SearchableItem item)
+ {
+ this.Type = item.Type;
+ this.ID = item.ID;
+ this.CreateItem = item.CreateItem;
+ this.Item = item.Item;
+ }
+
/// <summary>Get whether the item name contains a case-insensitive substring.</summary>
/// <param name="substring">The substring to find.</param>
public bool NameContains(string substring)