summaryrefslogtreecommitdiff
path: root/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-10-27 03:18:48 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-10-27 03:18:48 -0400
commit59dd604cf2905adf5fce7e9bb7b97886891aae81 (patch)
tree36694b97bc60edb24a30284679a448b880d5eb6c /src/SMAPI.Mods.ConsoleCommands/Framework/ItemData
parentb945fcf5553f2df63db1fad8a73c65cd7fa7daa3 (diff)
downloadSMAPI-59dd604cf2905adf5fce7e9bb7b97886891aae81.tar.gz
SMAPI-59dd604cf2905adf5fce7e9bb7b97886891aae81.tar.bz2
SMAPI-59dd604cf2905adf5fce7e9bb7b97886891aae81.zip
rename TrainerMod to Console Commands to clarify purpose
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands/Framework/ItemData')
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/ItemType.cs39
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs41
2 files changed, 80 insertions, 0 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/ItemType.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/ItemType.cs
new file mode 100644
index 00000000..797d4650
--- /dev/null
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/ItemType.cs
@@ -0,0 +1,39 @@
+namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData
+{
+ /// <summary>An item type that can be searched and added to the player through the console.</summary>
+ internal enum ItemType
+ {
+ /// <summary>A big craftable object in <see cref="StardewValley.Game1.bigCraftablesInformation"/></summary>
+ BigCraftable,
+
+ /// <summary>A <see cref="Boots"/> item.</summary>
+ Boots,
+
+ /// <summary>A fish item.</summary>
+ Fish,
+
+ /// <summary>A <see cref="Wallpaper"/> flooring item.</summary>
+ Flooring,
+
+ /// <summary>A <see cref="Furniture"/> item.</summary>
+ Furniture,
+
+ /// <summary>A <see cref="Hat"/> item.</summary>
+ Hat,
+
+ /// <summary>Any object in <see cref="StardewValley.Game1.objectInformation"/> (except rings).</summary>
+ Object,
+
+ /// <summary>A <see cref="Ring"/> item.</summary>
+ Ring,
+
+ /// <summary>A <see cref="Tool"/> tool.</summary>
+ Tool,
+
+ /// <summary>A <see cref="Wallpaper"/> wall item.</summary>
+ Wallpaper,
+
+ /// <summary>A <see cref="StardewValley.Tools.MeleeWeapon"/> or <see cref="StardewValley.Tools.Slingshot"/> item.</summary>
+ Weapon
+ }
+}
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs
new file mode 100644
index 00000000..3eede413
--- /dev/null
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs
@@ -0,0 +1,41 @@
+using StardewValley;
+
+namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData
+{
+ /// <summary>A game item with metadata.</summary>
+ internal class SearchableItem
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The item type.</summary>
+ public ItemType Type { get; }
+
+ /// <summary>The item instance.</summary>
+ public Item Item { get; }
+
+ /// <summary>The item's unique ID for its type.</summary>
+ public int ID { get; }
+
+ /// <summary>The item's default name.</summary>
+ public string Name => this.Item.Name;
+
+ /// <summary>The item's display name for the current language.</summary>
+ public string DisplayName => this.Item.DisplayName;
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="type">The item type.</param>
+ /// <param name="id">The unique ID (if different from the item's parent sheet index).</param>
+ /// <param name="item">The item instance.</param>
+ public SearchableItem(ItemType type, int id, Item item)
+ {
+ this.Type = type;
+ this.ID = id;
+ this.Item = item;
+ }
+ }
+}