summaryrefslogtreecommitdiff
path: root/src/TrainerMod/Framework/ItemData
diff options
context:
space:
mode:
Diffstat (limited to 'src/TrainerMod/Framework/ItemData')
-rw-r--r--src/TrainerMod/Framework/ItemData/ISearchItem.cs21
-rw-r--r--src/TrainerMod/Framework/ItemData/SearchableObject.cs48
-rw-r--r--src/TrainerMod/Framework/ItemData/SearchableRing.cs48
-rw-r--r--src/TrainerMod/Framework/ItemData/SearchableWeapon.cs48
4 files changed, 0 insertions, 165 deletions
diff --git a/src/TrainerMod/Framework/ItemData/ISearchItem.cs b/src/TrainerMod/Framework/ItemData/ISearchItem.cs
deleted file mode 100644
index db30da77..00000000
--- a/src/TrainerMod/Framework/ItemData/ISearchItem.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-namespace TrainerMod.Framework.ItemData
-{
- /// <summary>An item that can be searched and added to the player's inventory through the console.</summary>
- internal interface ISearchItem
- {
- /*********
- ** Accessors
- *********/
- /// <summary>Whether the item is valid.</summary>
- bool IsValid { get; }
-
- /// <summary>The item ID.</summary>
- int ID { get; }
-
- /// <summary>The item name.</summary>
- string Name { get; }
-
- /// <summary>The item type.</summary>
- ItemType Type { get; }
- }
-} \ No newline at end of file
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
diff --git a/src/TrainerMod/Framework/ItemData/SearchableRing.cs b/src/TrainerMod/Framework/ItemData/SearchableRing.cs
deleted file mode 100644
index 20b6aef2..00000000
--- a/src/TrainerMod/Framework/ItemData/SearchableRing.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using StardewValley.Objects;
-
-namespace TrainerMod.Framework.ItemData
-{
- /// <summary>A ring that can be searched and added to the player's inventory through the console.</summary>
- internal class SearchableRing : ISearchItem
- {
- /*********
- ** Properties
- *********/
- /// <summary>The underlying item.</summary>
- private readonly Ring Ring;
-
-
- /*********
- ** Accessors
- *********/
- /// <summary>Whether the item is valid.</summary>
- public bool IsValid => this.Ring != null;
-
- /// <summary>The item ID.</summary>
- public int ID => this.Ring.parentSheetIndex;
-
- /// <summary>The item name.</summary>
- public string Name => this.Ring.Name;
-
- /// <summary>The item type.</summary>
- public ItemType Type => ItemType.Ring;
-
-
- /*********
- ** Accessors
- *********/
- /// <summary>Construct an instance.</summary>
- /// <param name="id">The ring ID.</param>
- public SearchableRing(int id)
- {
- try
- {
- this.Ring = new Ring(id);
- }
- catch
- {
- // invalid
- }
- }
- }
-} \ No newline at end of file
diff --git a/src/TrainerMod/Framework/ItemData/SearchableWeapon.cs b/src/TrainerMod/Framework/ItemData/SearchableWeapon.cs
deleted file mode 100644
index 70d659ee..00000000
--- a/src/TrainerMod/Framework/ItemData/SearchableWeapon.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using StardewValley.Tools;
-
-namespace TrainerMod.Framework.ItemData
-{
- /// <summary>A weapon that can be searched and added to the player's inventory through the console.</summary>
- internal class SearchableWeapon : ISearchItem
- {
- /*********
- ** Properties
- *********/
- /// <summary>The underlying item.</summary>
- private readonly MeleeWeapon Weapon;
-
-
- /*********
- ** Accessors
- *********/
- /// <summary>Whether the item is valid.</summary>
- public bool IsValid => this.Weapon != null;
-
- /// <summary>The item ID.</summary>
- public int ID => this.Weapon.initialParentTileIndex;
-
- /// <summary>The item name.</summary>
- public string Name => this.Weapon.Name;
-
- /// <summary>The item type.</summary>
- public ItemType Type => ItemType.Weapon;
-
-
- /*********
- ** Accessors
- *********/
- /// <summary>Construct an instance.</summary>
- /// <param name="id">The weapon ID.</param>
- public SearchableWeapon(int id)
- {
- try
- {
- this.Weapon = new MeleeWeapon(id);
- }
- catch
- {
- // invalid
- }
- }
- }
-} \ No newline at end of file