diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-08-14 12:21:40 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-08-14 12:21:40 -0400 |
commit | 4f28ea33bd7cc65485402c5e85259083e86b49e1 (patch) | |
tree | 86c4d8f9272de9a715cfcbf4008f0c09f5a59a21 /src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs | |
parent | 60b41195778af33fd609eab66d9ae3f1d1165e8f (diff) | |
parent | 4dd4efc96fac6a7ab66c14edead10e4fa988040d (diff) | |
download | SMAPI-4f28ea33bd7cc65485402c5e85259083e86b49e1.tar.gz SMAPI-4f28ea33bd7cc65485402c5e85259083e86b49e1.tar.bz2 SMAPI-4f28ea33bd7cc65485402c5e85259083e86b49e1.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs')
-rw-r--r-- | src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs index e678d057..7a3d8694 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs @@ -37,14 +37,15 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework yield return new SearchableItem(ItemType.Tool, this.CustomIDOffset, new MilkPail()); // these don't have any sort of ID, so we'll just assign some arbitrary ones yield return new SearchableItem(ItemType.Tool, this.CustomIDOffset + 1, new Shears()); yield return new SearchableItem(ItemType.Tool, this.CustomIDOffset + 2, new Pan()); + yield return new SearchableItem(ItemType.Tool, this.CustomIDOffset + 3, new Wand()); // wallpapers for (int id = 0; id < 112; id++) - yield return new SearchableItem(ItemType.Wallpaper, id, new Wallpaper(id)); + yield return new SearchableItem(ItemType.Wallpaper, id, new Wallpaper(id) { Category = SObject.furnitureCategory }); // flooring for (int id = 0; id < 40; id++) - yield return new SearchableItem(ItemType.Flooring, id, new Wallpaper(id, isFloor: true)); + yield return new SearchableItem(ItemType.Flooring, id, new Wallpaper(id, isFloor: true) { Category = SObject.furnitureCategory }); // equipment foreach (int id in Game1.content.Load<Dictionary<int, string>>("Data\\Boots").Keys) @@ -75,10 +76,6 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework yield return new SearchableItem(ItemType.Furniture, id, new Furniture(id, Vector2.Zero)); } - // fish - foreach (int id in Game1.content.Load<Dictionary<int, string>>("Data\\Fish").Keys) - yield return new SearchableItem(ItemType.Fish, id, new SObject(id, 999)); - // craftables foreach (int id in Game1.bigCraftablesInformation.Keys) yield return new SearchableItem(ItemType.BigCraftable, id, new SObject(Vector2.Zero, id)); @@ -103,16 +100,16 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework yield return new SearchableItem(ItemType.Object, id, item); // fruit products - if (item.category == SObject.FruitsCategory) + if (item.Category == SObject.FruitsCategory) { // wine SObject wine = new SObject(348, 1) { Name = $"{item.Name} Wine", - Price = item.price * 3 + Price = item.Price * 3 }; wine.preserve.Value = SObject.PreserveType.Wine; - wine.preservedParentSheetIndex.Value = item.parentSheetIndex; + wine.preservedParentSheetIndex.Value = item.ParentSheetIndex; yield return new SearchableItem(ItemType.Object, this.CustomIDOffset * 2 + id, wine); // jelly @@ -122,21 +119,21 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework Price = 50 + item.Price * 2 }; jelly.preserve.Value = SObject.PreserveType.Jelly; - jelly.preservedParentSheetIndex.Value = item.parentSheetIndex; + jelly.preservedParentSheetIndex.Value = item.ParentSheetIndex; yield return new SearchableItem(ItemType.Object, this.CustomIDOffset * 3 + id, jelly); } // vegetable products - else if (item.category == SObject.VegetableCategory) + else if (item.Category == SObject.VegetableCategory) { // juice SObject juice = new SObject(350, 1) { Name = $"{item.Name} Juice", - Price = (int)(item.price * 2.25d) + Price = (int)(item.Price * 2.25d) }; juice.preserve.Value = SObject.PreserveType.Juice; - juice.preservedParentSheetIndex.Value = item.parentSheetIndex; + juice.preservedParentSheetIndex.Value = item.ParentSheetIndex; yield return new SearchableItem(ItemType.Object, this.CustomIDOffset * 4 + id, juice); // pickled @@ -146,16 +143,16 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework Price = 50 + item.Price * 2 }; pickled.preserve.Value = SObject.PreserveType.Pickle; - pickled.preservedParentSheetIndex.Value = item.parentSheetIndex; + pickled.preservedParentSheetIndex.Value = item.ParentSheetIndex; yield return new SearchableItem(ItemType.Object, this.CustomIDOffset * 5 + id, pickled); } // flower honey - else if (item.category == SObject.flowersCategory) + else if (item.Category == SObject.flowersCategory) { // get honey type SObject.HoneyType? type = null; - switch (item.parentSheetIndex) + switch (item.ParentSheetIndex) { case 376: type = SObject.HoneyType.Poppy; |