public Vibroblade(string classId = "Vibroblade", string friendlyName = "Vibroblade", string description = "Hardened survival blade with high-frequency oscillator inflicts horrific damage with even glancing blows") : base(classId, friendlyName, description) { OnFinishedPatching += () => { #if SUBNAUTICA_STABLE var diamondBlade = new TechData() { craftAmount = 1, Ingredients = new List <Ingredient>() { new Ingredient(TechType.Knife, 1), new Ingredient(TechType.Diamond, 1) } }; CraftDataHandler.SetTechData(TechType.DiamondBlade, diamondBlade); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Workbench, TechType.DiamondBlade, new string[] { DWConstants.KnifeMenuPath }); #endif Main.AddModTechType(this.TechType); PlayerPatch.AddSubstitution(this.TechType, TechType.Knife); }; }
internal static void AddSubstitution(TechType custom, TechType vanilla) { EquipmentPatch.AddSubstitution(custom, vanilla); PlayerPatch.AddSubstitution(custom, vanilla); }