diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs | 50 |
1 files changed, 8 insertions, 42 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs index 1dfb3129..4d9091b0 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs @@ -178,50 +178,16 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework // flower honey else if (item.Category == SObject.flowersCategory) { - // get honey type - SObject.HoneyType? type = null; - switch (item.ParentSheetIndex) - { - case 376: - type = SObject.HoneyType.Poppy; - break; - case 591: - type = SObject.HoneyType.Tulip; - break; - case 593: - type = SObject.HoneyType.SummerSpangle; - break; - case 595: - type = SObject.HoneyType.FairyRose; - break; - case 597: - type = SObject.HoneyType.BlueJazz; - break; - case 421: // sunflower standing in for all other flowers - type = SObject.HoneyType.Wild; - break; - } - - // yield honey - if (type != null) + yield return this.TryCreate(ItemType.Object, this.CustomIDOffset * 5 + id, () => { - yield return this.TryCreate(ItemType.Object, this.CustomIDOffset * 5 + id, () => + SObject honey = new SObject(Vector2.Zero, 340, $"{item.Name} Honey", false, true, false, false) { - SObject honey = new SObject(Vector2.Zero, 340, item.Name + " Honey", false, true, false, false) - { - Name = "Wild Honey" - }; - honey.honeyType.Value = type; - - if (type != SObject.HoneyType.Wild) - { - honey.Name = $"{item.Name} Honey"; - honey.Price += item.Price * 2; - } - - return honey; - }); - } + Name = $"{item.Name} Honey", + preservedParentSheetIndex = { item.ParentSheetIndex } + }; + honey.Price += item.Price * 2; + return honey; + }); } } } |