public static void Patch() { Items.Result result = Items.AddDummy ( name: "DeconstructFireExtinguisherDummy", languageName: "Deconstruct Fire Extinguisher", languageTooltip: "Turn a Fire Extinguisher into 2 Titanium", spriteItem: TechType.Titanium, fabricatorNodePath: "Resources/AdvancedMaterials/DeconstructFireExtinguisherDummy", ingredientItems: new IngredientHelper(TechType.FireExtinguisher, 1), resultingItems: new List <TechType>() { TechType.Titanium, TechType.Titanium }, prefabPath: "WorldEntities/Natural/Titanium" ); }
public static void QPatch() { Items.AddDummy ( name: "RRRDUMMY", languageName: "Replenish Reactor Rod", languageTooltip: "Combine a depleted reactor rod with 3 uranium to replenish it!", spriteItem: TechType.DepletedReactorRod, fabricatorNodePath: "Resources/AdvancedMaterials/RRRDUMMY", ingredientItems: new List <IngredientHelper>() { new IngredientHelper(TechType.DepletedReactorRod, 1), new IngredientHelper(TechType.UraniniteCrystal, 3) }, resultingItems: TechType.ReactorRod, prefabPath: "WorldEntities/Natural/ReactorRod" ); TechDataHelper data = new TechDataHelper() { _techType = RRRItem, _craftAmount = 1, _ingredients = new List <IngredientHelper>() { new IngredientHelper(TechType.DepletedReactorRod, 1), new IngredientHelper(TechType.UraniniteCrystal, 3) }, }; CraftDataPatcher.customTechData.Add(RRRItem, data); CraftTreePatcher.customNodes.Add(new CustomCraftNode(RRRItem, CraftTree.Type.Fabricator, "Resources/AdvancedMaterials/RRRItem")); Dictionary <TechType, float> charge = Values.GetValue <BaseNuclearReactor>("charge") as Dictionary <TechType, float>; charge.Add(RRRItem, 15000f); Values.SetValue <BaseNuclearReactor>("charge", charge); HarmonyInstance.Create("alexejheroytb.subnauticamods.replenishreactorrods").PatchAll(); }