protected FcCraftable(string classId, string friendlyName, string description, FcCraftingTab parentTab) : base(classId, friendlyName, description) { this.ParentTab = parentTab; OnStartedPatching += () => { this.ParentTab.LoadAssets(this.AssetBundlesService); this.AssetBundle = this.AssetBundlesService.GetAssetBundleByName(this.AssetBundleName); }; OnFinishedPatching += () => { if (!this.FabricatorService.HasCraftingTab(this.ParentTab.Id)) { string tabId = this.ParentTab.Id; string displayText = this.ParentTab.DisplayName; Sprite icon = this.ParentTab.Icon; this.FabricatorService.AddTabNode(tabId, displayText, icon); } this.FabricatorService.AddCraftNode(this, this.ParentTab.Id); }; }
protected FCSVehicleUpgradeModule(string classId, string friendlyName, string description, FcCraftingTab parentTab) : base(classId, friendlyName, description) { this.ParentTab = parentTab; OnStartedPatching += () => { this.ParentTab.LoadAssets(this.AssetBundlesService); this.AssetBundle = this.AssetBundlesService.GetAssetBundleByName(this.AssetBundleName); }; OnFinishedPatching += () => { if (!this.FabricatorService.HasCraftingTab(this.ParentTab.Id)) { string tabId = this.ParentTab.Id; string displayText = this.ParentTab.DisplayName; Atlas.Sprite icon = this.ParentTab.Icon; this.FabricatorService.AddTabNode(tabId, displayText, icon); } CraftDataHandler.SetQuickSlotType(this.TechType, QuickSlotType.Passive); this.FabricatorService.AddCraftNode(this, this.ParentTab.Id); }; }