diff options
Diffstat (limited to 'src/TrainerMod/Framework/ItemData/SearchableObject.cs')
-rw-r--r-- | src/TrainerMod/Framework/ItemData/SearchableObject.cs | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/TrainerMod/Framework/ItemData/SearchableObject.cs b/src/TrainerMod/Framework/ItemData/SearchableObject.cs deleted file mode 100644 index 7e44a315..00000000 --- a/src/TrainerMod/Framework/ItemData/SearchableObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -using StardewValley; - -namespace TrainerMod.Framework.ItemData -{ - /// <summary>An object that can be searched and added to the player's inventory through the console.</summary> - internal class SearchableObject : ISearchItem - { - /********* - ** Properties - *********/ - /// <summary>The underlying item.</summary> - private readonly Item Item; - - - /********* - ** Accessors - *********/ - /// <summary>Whether the item is valid.</summary> - public bool IsValid => this.Item != null && this.Item.Name != "Broken Item"; - - /// <summary>The item ID.</summary> - public int ID => this.Item.parentSheetIndex; - - /// <summary>The item name.</summary> - public string Name => this.Item.Name; - - /// <summary>The item type.</summary> - public ItemType Type => ItemType.Object; - - - /********* - ** Accessors - *********/ - /// <summary>Construct an instance.</summary> - /// <param name="id">The item ID.</param> - public SearchableObject(int id) - { - try - { - this.Item = new Object(id, 1); - } - catch - { - // invalid - } - } - } -}
\ No newline at end of file |