diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-02 01:32:07 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-02 01:32:07 -0400 |
commit | f9482906ae7ce4dfd41bb4236e094be5d4fa7689 (patch) | |
tree | d1f881d2e44d39090c55f9290113a957bc031cad /src/TrainerMod/ItemData/SearchableObject.cs | |
parent | 6364e162f22973201b9da69f76db512005a5501e (diff) | |
download | SMAPI-f9482906ae7ce4dfd41bb4236e094be5d4fa7689.tar.gz SMAPI-f9482906ae7ce4dfd41bb4236e094be5d4fa7689.tar.bz2 SMAPI-f9482906ae7ce4dfd41bb4236e094be5d4fa7689.zip |
split TrainerMod commands into separate classes (#302)
Diffstat (limited to 'src/TrainerMod/ItemData/SearchableObject.cs')
-rw-r--r-- | src/TrainerMod/ItemData/SearchableObject.cs | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/TrainerMod/ItemData/SearchableObject.cs b/src/TrainerMod/ItemData/SearchableObject.cs deleted file mode 100644 index 30362f54..00000000 --- a/src/TrainerMod/ItemData/SearchableObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -using StardewValley; - -namespace TrainerMod.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 |