From 486529f2503bbcd83d7caf80bd215f6b5bc3d732 Mon Sep 17 00:00:00 2001 From: JoshuaNavarro Date: Wed, 25 Sep 2019 15:15:08 -0700 Subject: [PATCH] Added in alloy furnace and iron pipe recipes to crafting tables. --- .../Framework/Crafting/CraftingRecipeBook.cs | 22 ++++++++++++++----- .../Objects/Items/Tools/PickaxeExtended.cs | 5 +---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/GeneralMods/Revitalize/Framework/Crafting/CraftingRecipeBook.cs b/GeneralMods/Revitalize/Framework/Crafting/CraftingRecipeBook.cs index ca5c95af..7c62dbab 100644 --- a/GeneralMods/Revitalize/Framework/Crafting/CraftingRecipeBook.cs +++ b/GeneralMods/Revitalize/Framework/Crafting/CraftingRecipeBook.cs @@ -154,7 +154,7 @@ namespace Revitalize.Framework.Crafting if (pair.Value.hasUnlocked) { menu.addInCraftingRecipe(new Framework.Menus.MenuComponents.CraftingRecipeButton(pair.Value.recipe, null, new Vector2(), new Rectangle(0, 0, 16, 16), 4f, true, Color.White), pair.Value.whichTab); - ModCore.log("Add in a crafting recipe to the menu!"); + //ModCore.log("Add in a crafting recipe to the menu!"); } else { @@ -181,7 +181,7 @@ namespace Revitalize.Framework.Crafting if (pair.Value.hasUnlocked) { menu.addInCraftingRecipe(new Framework.Menus.MenuComponents.CraftingRecipeButton(pair.Value.recipe, null, new Vector2(), new Rectangle(0, 0, 16, 16), 4f, true, Color.White), pair.Value.whichTab); - ModCore.log("Add in a crafting recipe to the menu!"); + //ModCore.log("Add in a crafting recipe to the menu!"); } else { @@ -208,7 +208,7 @@ namespace Revitalize.Framework.Crafting if (pair.Value.hasUnlocked) { menu.addInCraftingRecipe(new Framework.Menus.MenuComponents.CraftingRecipeButton(pair.Value.recipe, null, new Vector2(), new Rectangle(0, 0, 16, 16), 4f, true, Color.White), pair.Value.whichTab); - ModCore.log("Add in a crafting recipe to the menu!"); + //ModCore.log("Add in a crafting recipe to the menu!"); } else { @@ -271,7 +271,7 @@ namespace Revitalize.Framework.Crafting { if (recipe.Value.recipe.ingredients[i].item is MultiTiledObject) { - ModCore.log("Found a multi tiled object as an output!"); + //ModCore.log("Found a multi tiled object as an output!"); //ModCore.log("Found a multi tiled object!"); Type t = recipe.Value.recipe.ingredients[i].item.GetType(); string id = (recipe.Value.recipe.ingredients[i].item as MultiTiledObject).info.id; @@ -282,13 +282,13 @@ namespace Revitalize.Framework.Crafting { if (recipe.Value.recipe.outputs[i].item is MultiTiledObject) { - ModCore.log("Found a multi tiled object as an output!"); + //ModCore.log("Found a multi tiled object as an output!"); //ModCore.log("Found a multi tiled object!"); Type t = recipe.Value.recipe.outputs[i].item.GetType(); string id = (recipe.Value.recipe.outputs[i].item as MultiTiledObject).info.id; recipe.Value.recipe.outputs[i].item = ModCore.ObjectManager.getItemByIDAndType(id, t); - ModCore.log("Components are: "+(recipe.Value.recipe.outputs[i].item as MultiTiledObject).objects.Count); + //ModCore.log("Components are: "+(recipe.Value.recipe.outputs[i].item as MultiTiledObject).objects.Count); } } } @@ -338,6 +338,11 @@ namespace Revitalize.Framework.Crafting new CraftingRecipeComponent(new StardewValley.Object((int)Enums.SDVObject.CopperBar,1),1), }, new CraftingRecipeComponent(ModCore.ObjectManager.GetItem("CopperWire"),2),null,0),true)); + WorkbenchRecipes.addCraftingRecipe("Alloy Furnace", new UnlockableCraftingRecipe("Default", new Recipe(new List() + { + new CraftingRecipeComponent(new StardewValley.Object((int)Enums.SDVObject.Clay,20),10), + new CraftingRecipeComponent(ModCore.ObjectManager.resources.getResource("Sand"), 10) + }, new CraftingRecipeComponent(ModCore.ObjectManager.GetItem("AlloyFurnace"), 1), null, 0), true)); if (CraftingRecipesByGroup.ContainsKey(WorkbenchRecipes.craftingGroup)) { @@ -458,6 +463,11 @@ namespace Revitalize.Framework.Crafting new CraftingRecipeComponent(new StardewValley.Object((int)Enums.SDVObject.IronBar,5),5) }, new CraftingRecipeComponent(ModCore.ObjectManager.GetItem("TrashCan"), 1)),true)); + AnvilRecipes.addCraftingRecipe("Iron Pipe", new UnlockableCraftingRecipe("Default", new Recipe(new List() + { + new CraftingRecipeComponent(new StardewValley.Object((int)Enums.SDVObject.IronBar,2),2) + }, new CraftingRecipeComponent(ModCore.ObjectManager.GetItem("IronPipe"), 1)), true)); + if (CraftingRecipesByGroup.ContainsKey(AnvilRecipes.craftingGroup)) { foreach (KeyValuePair recipe in AnvilRecipes.craftingRecipes) diff --git a/GeneralMods/Revitalize/Framework/Objects/Items/Tools/PickaxeExtended.cs b/GeneralMods/Revitalize/Framework/Objects/Items/Tools/PickaxeExtended.cs index 41ad57bc..50caa67a 100644 --- a/GeneralMods/Revitalize/Framework/Objects/Items/Tools/PickaxeExtended.cs +++ b/GeneralMods/Revitalize/Framework/Objects/Items/Tools/PickaxeExtended.cs @@ -327,9 +327,6 @@ namespace Revitalize.Framework.Objects.Items.Tools } - public override bool canBeTrashed() - { - return true; - } + } }