add SearchableItem copy constructor
This is for convenience in mods which copy this code; SMAPI itself doesn't use it.
This commit is contained in:
parent
295c34d5cd
commit
2831b1e75a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue