internal static ModCraftTreeRoot CreateCustomCraftTreeAndType(string name, out CraftTree.Type craftTreeType) { EnumTypeCache cache = cacheManager.GetCacheForTypeName(name); if (cache == null) { cache = new EnumTypeCache() { Name = name, Index = cacheManager.GetNextFreeIndex() }; } if (cacheManager.IsIndexValid(cache.Index)) { cache.Index = cacheManager.GetNextFreeIndex(); } craftTreeType = (CraftTree.Type)cache.Index; cacheManager.Add(craftTreeType, cache); cacheManager.SaveCache(); Logger.Log($"Successfully added CraftTree Type: '{name}' to Index: '{cache.Index}'", LogLevel.Debug); var customTreeRoot = new ModCraftTreeRoot(craftTreeType, name); CraftTreePatcher.CustomTrees[craftTreeType] = customTreeRoot; return(customTreeRoot); }
private void CreateCustomTree(out CraftTree.Type craftType) { ModCraftTreeRoot rootNode = CraftTreeHandler.CreateCustomCraftTreeAndType(NameID, out craftType); rootNode.AddCraftingNode(CyclopsModule.NuclearChargerID); rootNode.AddCraftingNode(CyclopsModule.RefillNuclearModuleID); rootNode.AddCraftingNode(TechType.ReactorRod); }
private static void CreateCustomTree(out CraftTree.Type craftType) { ModCraftTreeRoot rootNode = CraftTreeHandler.CreateCustomCraftTreeAndType(CustomFabAndTreeID, out craftType); var cyclopsTab = rootNode.AddTabNode("RestorationModules", "Restouration Modules", SpriteManager.Get(SpriteManager.Group.Category, "Fabricator_Personal")); cyclopsTab.AddCraftingNode(AddHealthModule.FlatHealthModule, TechType.DiamondBlade, TechType.Terraformer ); }
private CraftTree.Type CreateCustomTree() { ModCraftTreeRoot rootNode = CraftTreeHandler.CreateCustomCraftTreeAndType(NameID, out CraftTree.Type craftType); rootNode.AddCraftingNode(TechType.ReactorRod); rootNode.AddCraftingNode(nuclearModule.TechType); rootNode.AddModdedCraftingNode("RReactorRodDUMMY"); // Refill nuclear reactor rod rootNode.AddModdedCraftingNode("CyNukeUpgrade1"); // Cyclops Nuclear Reactor Enhancer Mk1 rootNode.AddModdedCraftingNode("CyNukeUpgrade2"); // Cyclops Nuclear Reactor Enhancer Mk2 return(craftType); }
/// <summary> /// Override this method if you want full control over how your custom craft tree is built up.<para/> /// To use this method's default behavior, you must use the following methods to build up your crafting tree.<para/> /// - <see cref="AddCraftNode(TechType, string)"/><para/> /// - <see cref="AddCraftNode(string, string)"/><para/> /// - <see cref="AddCraftNode(Craftable, string)"/><para/> /// </summary> /// <param name="craftTreeType"></param> internal virtual void CreateCustomCraftTree(out CraftTree.Type craftTreeType) { ModCraftTreeRoot root = CraftTreeHandler.CreateCustomCraftTreeAndType(this.ClassID, out craftTreeType); this.Root = root; CraftTreeLinkingNodes.Add(RootNode, root); // Since we shouldn't rely on attached events to be executed in any particular order, // this list of actions will ensure that the craft tree is built up in the order in which nodes were received. foreach (Action action in OrderedCraftTreeActions) { action.Invoke(); } }
public static void LoadFabricator() { ModCraftTreeRoot Root = CraftTreeHandler.CreateCustomCraftTreeAndType("compressor", out CraftTree.Type Compressor); if (DefabricatorPresent()) { CompressTab = Root; DecompressTab = null; } else { CompressTab = Root.AddTabNode("CompressedTitaniumCompress", "Compress", TI_1000000_Sprite); DecompressTab = Root.AddTabNode("CompressedTitaniumDecompress", "Decompress", TI_1_Sprite); } new Fabricator().Patch(Compressor); }
internal static ModCraftTreeRoot CreateCustomCraftTreeAndType(string name, out CraftTree.Type craftTreeType) { EnumTypeCache cache = cacheManager.RequestCacheForTypeName(name) ?? new EnumTypeCache() { Name = name, Index = cacheManager.GetNextAvailableIndex() }; craftTreeType = (CraftTree.Type)cache.Index; cacheManager.Add(craftTreeType, cache.Index, cache.Name); Logger.Log($"Successfully added CraftTree Type: '{name}' to Index: '{cache.Index}'", LogLevel.Debug); var customTreeRoot = new ModCraftTreeRoot(craftTreeType, name); CraftTreePatcher.CustomTrees[craftTreeType] = customTreeRoot; return(customTreeRoot); }
public static void Patch() { bundle = AssetBundle.LoadFromFile(Path.Combine(Environment.CurrentDirectory, "QMods/Precursor Fabricator/fabricatorassets")); string assetFolder = Path.Combine(Environment.CurrentDirectory, "QMods/Precursor Fabricator/Assets"); TechType fabricator = TechTypeHandler.AddTechType("AlienFab", "Precursor Fabricator", "A device capable of fabricating materials of alien origin"); PrefabHandler.RegisterPrefab(new FabricatorPrefab("AlienFab", "WorldEntities/AlienFabricator", fabricator)); SpriteHandler.RegisterSprite(fabricator, Path.Combine(assetFolder, "PrecursorFabricator.png")); TechType ingot = TechTypeHandler.AddTechType("PrecursorIngot", "Precursor Alloy Ingot", "A super-dense, electronically active bar of alien metal"); PrefabHandler.RegisterPrefab(new IngotPrefab("PrecursorIngot", "WorldEntities/PrecursorIngot", ingot)); SpriteHandler.RegisterSprite(ingot, Path.Combine(assetFolder, "PrecursorIngot.png")); CraftDataHandler.AddBuildable(fabricator); CraftDataHandler.AddToGroup(TechGroup.InteriorPieces, TechCategory.InteriorPiece, fabricator); CraftDataHandler.SetCraftingTime(fabricator, 2f); TechData data = new TechData(new Ingredient(TechType.PlasteelIngot, 2), new Ingredient(TechType.PrecursorIonCrystal, 2), new Ingredient(TechType.Kyanite, 1)); CraftDataHandler.SetTechData(fabricator, data); TechData ingotData = new TechData(new Ingredient(TechType.PlasteelIngot, 6), new Ingredient(TechType.PrecursorIonCrystal, 1)); ingotData.craftAmount = 1; CraftDataHandler.SetTechData(ingot, ingotData); root = CraftTreeHandler.CreateCustomCraftTreeAndType("PrecursorFabricator", out fabType); root.AddCraftingNode(ingot); if (TechTypeHandler.TryGetModdedTechType("IonFragment", out TechType depletedCube)) { root.AddCraftingNode(depletedCube); } }
private ModCraftTreeRoot CreateCustomTree(out CraftTree.Type craftType, List <IDecorationItem> decorationItems) //, ModCraftTreeRoot rootNode) { ModCraftTreeRoot rootNode = CraftTreeHandler.CreateCustomCraftTreeAndType(DecorationsFabID, out craftType); #region LAB ELEMENTS var labEquipmentTab = rootNode.AddTabNode("LabElements", LanguageHelper.GetFriendlyWord("LabElements"), SpriteManager.Get(TechType.LabEquipment1)); // Lab equipments var analyzersTab = labEquipmentTab.AddTabNode("NonFunctionalAnalyzers", LanguageHelper.GetFriendlyWord("NonFunctionalAnalyzers"), SpriteManager.Get(TechType.LabEquipment3)); analyzersTab.AddCraftingNode(TechType.LabEquipment1, TechType.LabEquipment2, TechType.LabEquipment3); // Open glass containers var openedGlassConteinersTab = labEquipmentTab.AddTabNode("OpenedGlassContainers", LanguageHelper.GetFriendlyWord("OpenedGlassContainers"), AssetsHelper.Assets.LoadAsset <Sprite>("labcontaineropen2")); if (DecorationItemsHelper.getTechType(decorationItems, "LabContainerOpen3") != TechType.None) { openedGlassConteinersTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "LabContainerOpen3")); } if (DecorationItemsHelper.getTechType(decorationItems, "LabContainerOpen2") != TechType.None) { openedGlassConteinersTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "LabContainerOpen2")); } if (DecorationItemsHelper.getTechType(decorationItems, "LabContainerOpen1") != TechType.None) { openedGlassConteinersTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "LabContainerOpen1")); } // Glass containers var glassContainersTab = labEquipmentTab.AddTabNode("GlassContainers", LanguageHelper.GetFriendlyWord("GlassContainers"), SpriteManager.Get(TechType.LabContainer2)); glassContainersTab.AddCraftingNode(TechType.LabContainer, TechType.LabContainer2, TechType.LabContainer3); if (DecorationItemsHelper.getTechType(decorationItems, "LabContainer4") != TechType.None) { glassContainersTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "LabContainer4")); } // Furnitures var labFurnituresTab = labEquipmentTab.AddTabNode("LabFurnitures", LanguageHelper.GetFriendlyWord("LabFurnitures"), AssetsHelper.Assets.LoadAsset <Sprite>("robotarmicon")); if (!ConfigSwitcher.SpecimenAnalyzer_asBuildable && DecorationItemsHelper.getTechType(decorationItems, "DecorationsSpecimenAnalyzer") != TechType.None) { labFurnituresTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "DecorationsSpecimenAnalyzer")); } if (!ConfigSwitcher.LabCart_asBuildable && DecorationItemsHelper.getTechType(decorationItems, "LabCart") != TechType.None) { labFurnituresTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "LabCart")); } if (DecorationItemsHelper.getTechType(decorationItems, "LabShelf") != TechType.None) { labFurnituresTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "LabShelf")); } if (DecorationItemsHelper.getTechType(decorationItems, "DecorationLabTube") != TechType.None) { labFurnituresTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "DecorationLabTube")); } if (DecorationItemsHelper.getTechType(decorationItems, "LabRobotArm") != TechType.None) { labFurnituresTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "LabRobotArm")); } #endregion #region ELECTRONICS var electronicsTab = rootNode.AddTabNode("Electronics", LanguageHelper.GetFriendlyWord("Electronics"), AssetsHelper.Assets.LoadAsset <Sprite>("computer3")); // Wall monitors var wallMonitorsTab = electronicsTab.AddTabNode("WallMonitors", LanguageHelper.GetFriendlyWord("WallMonitors"), AssetsHelper.Assets.LoadAsset <Sprite>("computer3")); if (DecorationItemsHelper.getTechType(decorationItems, "WallMonitor1") != TechType.None) { wallMonitorsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WallMonitor1")); } if (DecorationItemsHelper.getTechType(decorationItems, "WallMonitor2") != TechType.None) { wallMonitorsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WallMonitor2")); } if (DecorationItemsHelper.getTechType(decorationItems, "WallMonitor3") != TechType.None) { wallMonitorsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WallMonitor3")); } // Circuit boxes var circuitBoxesTab = electronicsTab.AddTabNode("CircuitBoxes", LanguageHelper.GetFriendlyWord("CircuitBoxes"), AssetsHelper.Assets.LoadAsset <Sprite>("circuitbox3")); if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox1") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox1")); } if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox1b") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox1b")); } if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox2") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox2")); } if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox2b") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox2b")); } if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox2c") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox2c")); } if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox2d") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox2d")); } if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox3") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox3")); } if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox3b") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox3b")); } if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox3c") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox3c")); } if (DecorationItemsHelper.getTechType(decorationItems, "CircuitBox3d") != TechType.None) { circuitBoxesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CircuitBox3d")); } //var circuitBoxTab1 = electronicsTab.AddTabNode("CircuitBoxTab1", LanguageHelper.GetFriendlyWord("CircuitBoxTab1"), AssetsHelper.Assets.LoadAsset<Sprite>("circuitbox2")); //var circuitBoxTab2 = electronicsTab.AddTabNode("CircuitBoxTab2", LanguageHelper.GetFriendlyWord("CircuitBoxTab2"), AssetsHelper.Assets.LoadAsset<Sprite>("circuitbox3")); // Seamoth fragments var seamothFragmentsTab = electronicsTab.AddTabNode("SeamothFragments", LanguageHelper.GetFriendlyWord("SeamothFragments"), AssetsHelper.Assets.LoadAsset <Sprite>("seamothfragment2icon")); if (DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment1") != TechType.None) { seamothFragmentsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment1")); } if (DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment2") != TechType.None) { seamothFragmentsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment2")); } if (DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment3") != TechType.None) { seamothFragmentsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment3")); } if (DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment4") != TechType.None) { seamothFragmentsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment4")); } if (DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment5") != TechType.None) { seamothFragmentsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SeamothFragment5")); } #endregion #region DRINKS & FOOD var barKitchenTab = rootNode.AddTabNode("DrinksAndFood", LanguageHelper.GetFriendlyWord("DrinksAndFood"), AssetsHelper.Assets.LoadAsset <Sprite>("barbottle05icon")); if (DecorationItemsHelper.getTechType(decorationItems, "BarCup1") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarCup1")); } if (DecorationItemsHelper.getTechType(decorationItems, "BarCup2") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarCup2")); } if (DecorationItemsHelper.getTechType(decorationItems, "BarNapkins") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarNapkins")); } if (DecorationItemsHelper.getTechType(decorationItems, "BarBottle1") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarBottle1")); } if (DecorationItemsHelper.getTechType(decorationItems, "BarBottle2") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarBottle2")); } if (DecorationItemsHelper.getTechType(decorationItems, "BarBottle3") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarBottle3")); } if (DecorationItemsHelper.getTechType(decorationItems, "BarBottle4") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarBottle4")); } if (DecorationItemsHelper.getTechType(decorationItems, "BarBottle5") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarBottle5")); } if (DecorationItemsHelper.getTechType(decorationItems, "BarFood1") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarFood1")); } if (DecorationItemsHelper.getTechType(decorationItems, "BarFood2") != TechType.None) { barKitchenTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "BarFood2")); } if (ConfigSwitcher.EnableNutrientBlock && TechType.NutrientBlock != TechType.None) { barKitchenTab.AddCraftingNode(TechType.NutrientBlock); } #endregion #region PRECURSOR var precursorTab = rootNode.AddTabNode("Precursor", LanguageHelper.GetFriendlyWord("Precursor"), AssetsHelper.Assets.LoadAsset <Sprite>("relic_10_b")); if (ConfigSwitcher.EnablePrecursorTab) { // Warpers var warperTab = precursorTab.AddTabNode("PrecursorWarperParts", LanguageHelper.GetFriendlyWord("PrecursorWarperParts"), AssetsHelper.Assets.LoadAsset <Sprite>("warper_icon")); if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart2") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart2")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart3") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart3")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart4") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart4")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart12") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart12")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart5") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart5")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart6") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart6")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart7") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart7")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart8") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart8")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart9") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart9")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart10") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart10")); } if (DecorationItemsHelper.getTechType(decorationItems, "WarperPart11") != TechType.None) { warperTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "WarperPart11")); } // Weapons var weaponsTab = precursorTab.AddTabNode("PrecursorWeapons", LanguageHelper.GetFriendlyWord("Weapons"), AssetsHelper.Assets.LoadAsset <Sprite>("relic_02_b")); if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact6") != TechType.None) { weaponsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact6")); } if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact7") != TechType.None) { weaponsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact7")); } if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact8") != TechType.None) { weaponsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact8")); } // Artefacts var artefactsTab = precursorTab.AddTabNode("PrecursorRelics", LanguageHelper.GetFriendlyWord("Relics"), AssetsHelper.Assets.LoadAsset <Sprite>("relic_04_b")); if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact1") != TechType.None) { artefactsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact1")); } if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact2") != TechType.None) { artefactsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact2")); } if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact3") != TechType.None) { artefactsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact3")); } if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact4") != TechType.None) { artefactsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact4")); } if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact5") != TechType.None) { artefactsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact5")); } if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact9") != TechType.None) { artefactsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact9")); } if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact10") != TechType.None) { artefactsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact10")); } if (DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact11") != TechType.None) { artefactsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "AlienArtefact11")); } // Keys var keysTab = precursorTab.AddTabNode("PrecursorKeys", LanguageHelper.GetFriendlyWord("PrecursorKeys"), SpriteManager.Get(TechType.PrecursorKey_Red)); if (ConfigSwitcher.PrecursorKeysAll) { keysTab.AddCraftingNode(new TechType[] { TechType.PrecursorKey_Purple, TechType.PrecursorKey_Orange, TechType.PrecursorKey_Blue }); } keysTab.AddCraftingNode(new TechType[] { TechType.PrecursorKey_White, TechType.PrecursorKey_Red }); } #endregion #region CREATURE EGGS ModCraftTreeTab eggsTab = rootNode.AddTabNode("EggsTab", LanguageHelper.GetFriendlyWord("EggsTab"), AssetsHelper.Assets.LoadAsset <Sprite>("seaemperoreggicon")); // Damaging creatures var dmgCreatureEggsTab = eggsTab.AddTabNode("DmgCreatureEggsTab", LanguageHelper.GetFriendlyWord("DmgCreatureEggsTab"), AssetsHelper.Assets.LoadAsset <Sprite>("seadragoneggicon")); if (DecorationItemsHelper.getTechType(decorationItems, "EggSeaDragon") != TechType.None) { dmgCreatureEggsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "EggSeaDragon")); } if (DecorationItemsHelper.getTechType(decorationItems, "EggsGhostLeviathan") != TechType.None) { dmgCreatureEggsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "EggsGhostLeviathan")); } if (ConfigSwitcher.EnableRegularEggs) { dmgCreatureEggsTab.AddCraftingNode(TechType.BonesharkEgg, TechType.CrabsnakeEgg, TechType.CrabsquidEgg, TechType.CrashEgg, TechType.GasopodEgg, TechType.LavaLizardEgg, TechType.SandsharkEgg, TechType.ShockerEgg, TechType.StalkerEgg, TechType.MesmerEgg ); } // Non-damaging creatures var nonDmgCreatureEggsTab = eggsTab.AddTabNode("NonDmgCreatureEggsTab", LanguageHelper.GetFriendlyWord("NonDmgCreatureEggsTab"), AssetsHelper.Assets.LoadAsset <Sprite>("seaemperoreggicon")); if (DecorationItemsHelper.getTechType(decorationItems, "EggSeaEmperor") != TechType.None) { nonDmgCreatureEggsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "EggSeaEmperor")); } if (ConfigSwitcher.EnableRegularEggs) { nonDmgCreatureEggsTab.AddCraftingNode(TechType.JellyrayEgg, TechType.RabbitrayEgg, TechType.CutefishEgg, TechType.SpadefishEgg, TechType.JumperEgg, TechType.ReefbackEgg ); } #endregion #region LEVIATHAN DOLLS & SKELETONS ModCraftTreeTab leviathansTab = rootNode.AddTabNode("LeviathansTab", LanguageHelper.GetFriendlyWord("LeviathansTab"), AssetsHelper.Assets.LoadAsset <Sprite>("reaperleviathanicon")); // Leviathan dolls ModCraftTreeTab faunaTab = leviathansTab.AddTabNode("LeviathanDolls", LanguageHelper.GetFriendlyWord("LeviathanDolls"), AssetsHelper.Assets.LoadAsset <Sprite>("reaperleviathanicon")); if (DecorationItemsHelper.getTechType(decorationItems, "ReefBackDoll") != TechType.None) { faunaTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "ReefBackDoll")); } if (DecorationItemsHelper.getTechType(decorationItems, "SeaTreaderDoll") != TechType.None) { faunaTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SeaTreaderDoll")); } if (DecorationItemsHelper.getTechType(decorationItems, "ReaperLeviathanDoll") != TechType.None) { faunaTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "ReaperLeviathanDoll")); } if (DecorationItemsHelper.getTechType(decorationItems, "GhostLeviathanDoll") != TechType.None) { faunaTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "GhostLeviathanDoll")); } if (DecorationItemsHelper.getTechType(decorationItems, "SeaDragonDoll") != TechType.None) { faunaTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SeaDragonDoll")); } if (DecorationItemsHelper.getTechType(decorationItems, "SeaEmperorDoll") != TechType.None) { faunaTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SeaEmperorDoll")); } // Leviathan skeletons ModCraftTreeTab skeletonsTab = leviathansTab.AddTabNode("SkeletonsParts", LanguageHelper.GetFriendlyWord("GenericSkeletonName"), AssetsHelper.Assets.LoadAsset <Sprite>("reaperskullicon")); if (DecorationItemsHelper.getTechType(decorationItems, "GenericSkeleton1") != TechType.None) { skeletonsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "GenericSkeleton1")); } if (DecorationItemsHelper.getTechType(decorationItems, "GenericSkeleton2") != TechType.None) { skeletonsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "GenericSkeleton2")); } if (DecorationItemsHelper.getTechType(decorationItems, "GenericSkeleton3") != TechType.None) { skeletonsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "GenericSkeleton3")); } if (DecorationItemsHelper.getTechType(decorationItems, "ReaperSkullDoll") != TechType.None) { skeletonsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "ReaperSkullDoll")); } if (DecorationItemsHelper.getTechType(decorationItems, "ReaperSkeletonDoll") != TechType.None) { skeletonsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "ReaperSkeletonDoll")); } if (DecorationItemsHelper.getTechType(decorationItems, "SeaDragonSkeleton") != TechType.None) { skeletonsTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SeaDragonSkeleton")); } #endregion #region OFFICE SUPPLIES var officeSuppliesTab = rootNode.AddTabNode("OfficeSupplies", LanguageHelper.GetFriendlyWord("OfficeSupplies"), AssetsHelper.Assets.LoadAsset <Sprite>("clipboardicon")); if (!ConfigSwitcher.EmptyDesk_asBuildable && DecorationItemsHelper.getTechType(decorationItems, "DecorationsEmptyDesk") != TechType.None) { officeSuppliesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "DecorationsEmptyDesk")); } if (DecorationItemsHelper.getTechType(decorationItems, "Folder1") != TechType.None) { officeSuppliesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "Folder1")); } if (DecorationItemsHelper.getTechType(decorationItems, "Folder3") != TechType.None) { officeSuppliesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "Folder3")); } if (DecorationItemsHelper.getTechType(decorationItems, "Clipboard") != TechType.None) { officeSuppliesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "Clipboard")); } if (DecorationItemsHelper.getTechType(decorationItems, "PaperTrash") != TechType.None) { officeSuppliesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "PaperTrash")); } if (DecorationItemsHelper.getTechType(decorationItems, "Pen") != TechType.None) { officeSuppliesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "Pen")); } if (DecorationItemsHelper.getTechType(decorationItems, "PenHolder") != TechType.None) { officeSuppliesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "PenHolder")); } if (DecorationItemsHelper.getTechType(decorationItems, "DecorativePDA") != TechType.None) { officeSuppliesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "DecorativePDA")); } #endregion #region POSTERS / ACCESSORIES / TOYS var patTab = rootNode.AddTabNode("ToysAndAccessories", LanguageHelper.GetFriendlyWord("ToysAndAccessories"), SpriteManager.Get(TechType.StarshipSouvenir)); // Toys var toysTab = patTab.AddTabNode("Toys", LanguageHelper.GetFriendlyWord("Toys"), SpriteManager.Get(TechType.ArcadeGorgetoy)); toysTab.AddCraftingNode(TechType.StarshipSouvenir, TechType.ArcadeGorgetoy, TechType.ToyCar); if (!ConfigSwitcher.Forklift_asBuidable && DecorationItemsHelper.getTechType(decorationItems, "ForkLiftDoll") != TechType.None) { toysTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "ForkLiftDoll")); } if (DecorationItemsHelper.getTechType(decorationItems, "CuddleFishDoll") != TechType.None) { toysTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "CuddleFishDoll")); } if (!ConfigSwitcher.MarkiDoll1_asBuildable && DecorationItemsHelper.getTechType(decorationItems, "MarkiDoll1") != TechType.None) { toysTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "MarkiDoll1")); } if (!ConfigSwitcher.MarkiDoll2_asBuildable && DecorationItemsHelper.getTechType(decorationItems, "MarkiDoll2") != TechType.None) { toysTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "MarkiDoll2")); } if (!ConfigSwitcher.JackSepticEye_asBuildable && DecorationItemsHelper.getTechType(decorationItems, "JackSepticEyeDoll") != TechType.None) { toysTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "JackSepticEyeDoll")); } if (!ConfigSwitcher.EatMyDiction_asBuidable && DecorationItemsHelper.getTechType(decorationItems, "MarlaCat") != TechType.None) { toysTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "MarlaCat")); } // Posters var postersTab = patTab.AddTabNode("Posters", LanguageHelper.GetFriendlyWord("Posters"), SpriteManager.Get(TechType.PosterKitty)); postersTab.AddCraftingNode(TechType.PosterAurora, TechType.PosterExoSuit1, TechType.PosterExoSuit2, TechType.PosterKitty, TechType.Poster); // Accessories var accessoriesTab = patTab.AddTabNode("Accessories", LanguageHelper.GetFriendlyWord("Accessories"), SpriteManager.Get(TechType.LuggageBag)); accessoriesTab.AddCraftingNode(TechType.LuggageBag); if (ConfigSwitcher.EnableSofas) { if (!ConfigSwitcher.SofaStr1_asBuidable && DecorationItemsHelper.getTechType(decorationItems, "SofaStr1") != TechType.None) { accessoriesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SofaStr1")); } if (!ConfigSwitcher.SofaStr2_asBuidable && DecorationItemsHelper.getTechType(decorationItems, "SofaStr2") != TechType.None) { accessoriesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SofaStr2")); } if (!ConfigSwitcher.SofaStr3_asBuidable && DecorationItemsHelper.getTechType(decorationItems, "SofaStr3") != TechType.None) { accessoriesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SofaStr3")); } if (!ConfigSwitcher.SofaCorner2_asBuidable && DecorationItemsHelper.getTechType(decorationItems, "SofaCorner2") != TechType.None) { accessoriesTab.AddCraftingNode(DecorationItemsHelper.getTechType(decorationItems, "SofaCorner2")); } } accessoriesTab.AddCraftingNode(TechType.Cap1, TechType.Cap2); #endregion return(rootNode); }
private void CreateCustomTree(out CraftTree.Type craftType) { if (!ModdedItems.IsInitialized) { ModdedItems.Initialize(); } ModCraftTreeRoot rootNode = CraftTreeHandler.CreateCustomCraftTreeAndType(NameID, out craftType); ModCraftTreeTab cyclopsTab = rootNode.AddTabNode("CyclopsModules", "Cyclops Modules", SpriteManager.Get(SpriteManager.Group.Category, "Workbench_CyclopsMenu")); ModCraftTreeTab cyclopsAbilityTab = cyclopsTab.AddTabNode("CyclopsAbilityModules", "Ability Modules", SpriteManager.Get(TechType.CyclopsShieldModule)); cyclopsAbilityTab.AddCraftingNode(TechType.CyclopsShieldModule, TechType.CyclopsSonarModule, TechType.CyclopsSeamothRepairModule, TechType.CyclopsFireSuppressionModule, TechType.CyclopsDecoyModule); ModdedItems.AddModdedModules(cyclopsAbilityTab); cyclopsAbilityTab.AddModdedCraftingNode("CyclopsSpeedModule"); ModCraftTreeTab cyclopsDepthTab = cyclopsTab.AddTabNode("CyclopsDepthModules", "Depth Modules", SpriteManager.Get(TechType.CyclopsHullModule1)); cyclopsDepthTab.AddCraftingNode(TechType.CyclopsHullModule1, TechType.CyclopsHullModule2, TechType.CyclopsHullModule3); ModCraftTreeTab cyclopsPowerTab = cyclopsTab.AddTabNode("CyclopsPowerModules", "Power Modules", SpriteManager.Get(TechType.PowerUpgradeModule)); cyclopsPowerTab.AddCraftingNode(TechType.PowerUpgradeModule); ModdedItems.AddModdedModules(cyclopsPowerTab); ModCraftTreeTab cyclopsRechargTab = cyclopsTab.AddTabNode("CyclopsRechargeTab", "Recharge Modules", SpriteManager.Get(TechType.SeamothSolarCharge)); cyclopsRechargTab.AddCraftingNode(TechType.CyclopsThermalReactorModule); ModdedItems.AddModdedModules(cyclopsRechargTab); ModCraftTreeTab exosuitTab = rootNode.AddTabNode("ExosuitModules", "Prawn Suit Modules", SpriteManager.Get(SpriteManager.Group.Category, "SeamothUpgrades_ExosuitModules")); ModCraftTreeTab exosuitDepthTab = exosuitTab.AddTabNode("ExosuitDepthModules", "Depth Modules", SpriteManager.Get(TechType.ExoHullModule1)); exosuitDepthTab.AddCraftingNode(TechType.ExoHullModule1, TechType.ExoHullModule2); exosuitTab.AddCraftingNode(TechType.ExosuitThermalReactorModule, TechType.ExosuitJetUpgradeModule, TechType.ExosuitPropulsionArmModule, TechType.ExosuitGrapplingArmModule, TechType.ExosuitDrillArmModule, TechType.ExosuitTorpedoArmModule); ModdedItems.AddModdedModules(exosuitTab); ModCraftTreeTab seamothTab = rootNode.AddTabNode("SeamothModules", "Seamoth Modules", SpriteManager.Get(SpriteManager.Group.Category, "SeamothUpgrades_SeamothModules")); ModCraftTreeTab seamothDepthTab = seamothTab.AddTabNode("SeamothDepthModules", "Depth Modules", SpriteManager.Get(TechType.VehicleHullModule1)); seamothDepthTab.AddCraftingNode(TechType.VehicleHullModule1, TechType.VehicleHullModule2, TechType.VehicleHullModule3); ModdedItems.AddModdedModules(seamothDepthTab); ModCraftTreeTab seamothAbilityTab = seamothTab.AddTabNode("SeamothAbilityModules", "Ability Modules", SpriteManager.Get(TechType.SeamothElectricalDefense)); seamothAbilityTab.AddCraftingNode(TechType.SeamothElectricalDefense, TechType.SeamothSonarModule, TechType.SeamothTorpedoModule); seamothTab.AddCraftingNode(TechType.SeamothSolarCharge); ModdedItems.AddModdedModules(seamothAbilityTab); ModdedItems.AddModdedModules(seamothTab); ModCraftTreeTab commonTab = rootNode.AddTabNode("CommonModules", "Common Modules", SpriteManager.Get(SpriteManager.Group.Category, "SeamothUpgrades_CommonModules")); commonTab.AddCraftingNode(TechType.VehicleArmorPlating, TechType.VehiclePowerUpgradeModule, TechType.VehicleStorageModule); ModdedItems.AddModdedModules(commonTab); ModCraftTreeTab torpedoesTab = rootNode.AddTabNode("TorpedoesModules", "Torpedoes", SpriteManager.Get(SpriteManager.Group.Category, "SeamothUpgrades_Torpedoes")); torpedoesTab.AddCraftingNode(TechType.WhirlpoolTorpedo, TechType.GasTorpedo); ModdedItems.AddModdedModules(torpedoesTab); }
private ModCraftTreeRoot CreateCustomTree(out CraftTree.Type craftType, List <IDecorationItem> decorationItems) { ModCraftTreeRoot rootNode = CraftTreeHandler.CreateCustomCraftTreeAndType(FloraFabID, out craftType); ModCraftTreeTab plantAirTab; ModCraftTreeTab treeAirTab; ModCraftTreeTab tropicalPlantTab; if (ConfigSwitcher.UseFlatScreenResolution) { // Additional tab ModCraftTreeTab airSeedsTab = rootNode.AddTabNode("AirSeedsTab", LanguageHelper.GetFriendlyWord("AirSeedsTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_NonHarvastableAir")); // Plant Air plantAirTab = airSeedsTab.AddTabNode("PlantAirTab", LanguageHelper.GetFriendlyWord("PlantAirTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Plants")); // Tree Air treeAirTab = airSeedsTab.AddTabNode("TreeAirTab", LanguageHelper.GetFriendlyWord("TreeAirTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Trees")); // Tropical tropicalPlantTab = airSeedsTab.AddTabNode("TropicalPlantTab", LanguageHelper.GetFriendlyWord("TropicalPlantTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_TropicalPlants")); } else { // Plant Air plantAirTab = rootNode.AddTabNode("PlantAirTab", LanguageHelper.GetFriendlyWord("PlantAirTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Plants")); // Tree Air treeAirTab = rootNode.AddTabNode("TreeAirTab", LanguageHelper.GetFriendlyWord("TreeAirTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Trees")); // Tropical tropicalPlantTab = rootNode.AddTabNode("TropicalPlantTab", LanguageHelper.GetFriendlyWord("TropicalPlantTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_TropicalPlants")); } // Plant Air plantAirTab.AddCraftingNode(PrefabsHelper.GetTechType(decorationItems, "LandPlant1"), PrefabsHelper.GetTechType(decorationItems, "LandPlant2"), PrefabsHelper.GetTechType(decorationItems, "LandPlant3"), PrefabsHelper.GetTechType(decorationItems, "LandPlant4"), PrefabsHelper.GetTechType(decorationItems, "LandPlant5")); // Tree Air treeAirTab.AddCraftingNode(PrefabsHelper.GetTechType(decorationItems, "LandTree1"), PrefabsHelper.GetTechType(decorationItems, "JungleTree1"), PrefabsHelper.GetTechType(decorationItems, "JungleTree2"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant3a"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant3b"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant6a"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant6b")); // Tropical tropicalPlantTab.AddCraftingNode(PrefabsHelper.GetTechType(decorationItems, "TropicalPlant1a"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant1b"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant2a"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant2b"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant7a"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant7b"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant10a"), PrefabsHelper.GetTechType(decorationItems, "TropicalPlant10b"), PrefabsHelper.GetTechType(decorationItems, "Fern2"), PrefabsHelper.GetTechType(decorationItems, "Fern4")); // Existing air seeds from the game if (ConfigSwitcher.EnableRegularAirSeeds) { var regularAirSeedsTab = rootNode.AddTabNode("RegularAirSeedsTab", LanguageHelper.GetFriendlyWord("RegularAirSeedsTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_HarvastableAir")); var edibleRegularAirTab = regularAirSeedsTab.AddTabNode("EdibleRegularAirTab", LanguageHelper.GetFriendlyWord("EdibleRegularAirTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Edibles")); edibleRegularAirTab.AddCraftingNode(TechType.BulboTreePiece, TechType.PurpleVegetable, TechType.HangingFruit, TechType.MelonSeed, PrefabsHelper.GetTechType(decorationItems, "MarbleMelonTiny")); var decorativeBigAirTab = regularAirSeedsTab.AddTabNode("DecorativeBigAirTab", LanguageHelper.GetFriendlyWord("DecorativeBigAirTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_BigDeco")); decorativeBigAirTab.AddCraftingNode(TechType.FernPalmSeed, TechType.OrangePetalsPlantSeed, TechType.PurpleVasePlantSeed, TechType.OrangeMushroomSpore); var decorativeSmallAirTab = regularAirSeedsTab.AddTabNode("DecorativeSmallAirTab", LanguageHelper.GetFriendlyWord("DecorativeSmallAirTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_SmallDeco")); decorativeSmallAirTab.AddCraftingNode(TechType.PinkMushroomSpore, TechType.PurpleRattleSpore, TechType.PinkFlowerSeed); } // Existing water seeds from the game if (ConfigSwitcher.EnableRegularWaterSeeds) { var regularWaterSeedsTab = rootNode.AddTabNode("RegularWaterSeedsTab", LanguageHelper.GetFriendlyWord("RegularWaterSeedsTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_HarvastableAqua")); var decorativeBushesWaterTab = regularWaterSeedsTab.AddTabNode("DecorativeBushesWaterTab", LanguageHelper.GetFriendlyWord("DecorativeBushesWaterTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Bush")); decorativeBushesWaterTab.AddCraftingNode(TechType.PurpleBranchesSeed, TechType.RedRollPlantSeed, TechType.RedBushSeed, TechType.PurpleStalkSeed, TechType.SpottedLeavesPlantSeed); var regularSmallWaterTab = regularWaterSeedsTab.AddTabNode("RegularSmallWaterTab", LanguageHelper.GetFriendlyWord("RegularSmallWaterTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_AquaSmall")); regularSmallWaterTab.AddCraftingNode(TechType.SmallFanSeed, TechType.PurpleFanSeed, TechType.PurpleTentacleSeed); var decorativeBigWaterTab = regularWaterSeedsTab.AddTabNode("DecorativeBigWaterTab", LanguageHelper.GetFriendlyWord("DecorativeBigWaterTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Big")); decorativeBigWaterTab.AddCraftingNode(TechType.SeaCrownSeed, TechType.GabeSFeatherSeed, TechType.RedGreenTentacleSeed, TechType.ShellGrassSeed, TechType.BluePalmSeed, TechType.EyesPlantSeed, TechType.MembrainTreeSeed, TechType.RedConePlantSeed, TechType.RedBasketPlantSeed, TechType.SnakeMushroomSpore, TechType.SpikePlantSeed); var functionalBigWaterTab = regularWaterSeedsTab.AddTabNode("FunctionalBigWaterTab", LanguageHelper.GetFriendlyWord("FunctionalBigWaterTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Functional")); functionalBigWaterTab.AddCraftingNode(TechType.AcidMushroomSpore, TechType.WhiteMushroomSpore, TechType.JellyPlantSeed, TechType.CreepvinePiece, TechType.CreepvineSeedCluster, TechType.BloodOil, TechType.PurpleBrainCoralPiece, TechType.KooshChunk); } ModCraftTreeTab plantWaterTab; ModCraftTreeTab treeWaterTab; if (ConfigSwitcher.UseFlatScreenResolution) { // Additional tab ModCraftTreeTab waterSeedsTab = rootNode.AddTabNode("WaterSeedsTab", LanguageHelper.GetFriendlyWord("WaterSeedsTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_NonHarvastableAqua")); // Plant Water plantWaterTab = waterSeedsTab.AddTabNode("PlantWaterTab", LanguageHelper.GetFriendlyWord("PlantWaterTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_AquaticPlants")); // Tree Water treeWaterTab = waterSeedsTab.AddTabNode("TreeWaterTab", LanguageHelper.GetFriendlyWord("TreeWaterTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_AquaticTrees")); } else { // Plant Water plantWaterTab = rootNode.AddTabNode("PlantWaterTab", LanguageHelper.GetFriendlyWord("PlantWaterTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_AquaticPlants")); // Tree Water treeWaterTab = rootNode.AddTabNode("TreeWaterTab", LanguageHelper.GetFriendlyWord("TreeWaterTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_AquaticTrees")); } // Plant Water plantWaterTab.AddCraftingNode(PrefabsHelper.GetTechType(decorationItems, "GreenReeds1"), PrefabsHelper.GetTechType(decorationItems, "GreenReeds6"), PrefabsHelper.GetTechType(decorationItems, "LostRiverPlant2"), PrefabsHelper.GetTechType(decorationItems, "LostRiverPlant4"), PrefabsHelper.GetTechType(decorationItems, "PlantMiddle11")); var redGrassesTab = plantWaterTab.AddTabNode("RedGrassesTab", LanguageHelper.GetFriendlyWord("RedGrassesTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Grass")); redGrassesTab.AddCraftingNode(PrefabsHelper.GetTechType(decorationItems, "BloodGrassRed"), PrefabsHelper.GetTechType(decorationItems, "BloodGrassDense"), PrefabsHelper.GetTechType(decorationItems, "RedGrass1"), PrefabsHelper.GetTechType(decorationItems, "RedGrass2"), PrefabsHelper.GetTechType(decorationItems, "RedGrass2Tall"), PrefabsHelper.GetTechType(decorationItems, "RedGrass3"), PrefabsHelper.GetTechType(decorationItems, "RedGrass3Tall")); // Tree Water treeWaterTab.AddCraftingNode(PrefabsHelper.GetTechType(decorationItems, "MushroomTree2"), PrefabsHelper.GetTechType(decorationItems, "MushroomTree1"), PrefabsHelper.GetTechType(decorationItems, "CrabClawKelp2"), PrefabsHelper.GetTechType(decorationItems, "CrabClawKelp1"), PrefabsHelper.GetTechType(decorationItems, "CrabClawKelp3"), PrefabsHelper.GetTechType(decorationItems, "PyroCoral1"), PrefabsHelper.GetTechType(decorationItems, "PyroCoral2"), PrefabsHelper.GetTechType(decorationItems, "PyroCoral3"), PrefabsHelper.GetTechType(decorationItems, "FloatingStone1")); // Amphibious plants var amphibiousPlantsTab = rootNode.AddTabNode("AmphibiousPlantsTab", LanguageHelper.GetFriendlyWord("AmphibiousPlantsTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_AmphibiousPlants")); amphibiousPlantsTab.AddCraftingNode(PrefabsHelper.GetTechType(decorationItems, "SmallDeco3"), PrefabsHelper.GetTechType(decorationItems, "CoveTree1"), PrefabsHelper.GetTechType(decorationItems, "CoveTree2"), PrefabsHelper.GetTechType(decorationItems, "SmallDeco11"), PrefabsHelper.GetTechType(decorationItems, "SmallDeco13"), PrefabsHelper.GetTechType(decorationItems, "SmallDeco14"), PrefabsHelper.GetTechType(decorationItems, "SmallDeco15Red"), PrefabsHelper.GetTechType(decorationItems, "SmallDeco17Purple")); // Coral Water var coralWaterTab = rootNode.AddTabNode("CoralWaterTab", LanguageHelper.GetFriendlyWord("CoralWaterTab"), AssetsHelper.Assets.LoadAsset <Sprite>("D_Corals")); coralWaterTab.AddCraftingNode(PrefabsHelper.GetTechType(decorationItems, "BrownCoralTubes1"), PrefabsHelper.GetTechType(decorationItems, "BrownCoralTubes2"), PrefabsHelper.GetTechType(decorationItems, "BrownCoralTubes3"), PrefabsHelper.GetTechType(decorationItems, "BlueCoralTubes1"), PrefabsHelper.GetTechType(decorationItems, "SmallDeco10")); return(rootNode); }
private void CreateCustomTree(out CraftTree.Type craftType) { ModCraftTreeRoot rootNode = CraftTreeHandler.CreateCustomCraftTreeAndType(NameID, out craftType); var cyclopsTab = rootNode.AddTabNode("CyclopsModules", "Cyclops Modules", SpriteManager.Get(SpriteManager.Group.Category, "Workbench_CyclopsMenu")); var cyclopsAbilityTab = cyclopsTab.AddTabNode("CyclopsAbilityModules", "Ability Modules", SpriteManager.Get(TechType.CyclopsShieldModule)); cyclopsAbilityTab.AddCraftingNode(TechType.CyclopsShieldModule, TechType.CyclopsSonarModule, TechType.CyclopsSeamothRepairModule, TechType.CyclopsFireSuppressionModule, TechType.CyclopsDecoyModule); cyclopsAbilityTab.AddModdedCraftingNode("CyclopsSpeedModule"); var cyclopsDepthTab = cyclopsTab.AddTabNode("CyclopsDepthModules", "Depth Modules", SpriteManager.Get(TechType.CyclopsHullModule1)); cyclopsDepthTab.AddCraftingNode(TechType.CyclopsHullModule1, TechType.CyclopsHullModule2, TechType.CyclopsHullModule3); var cyclopsPowerTab = cyclopsTab.AddTabNode("CyclopsPowerModules", "Power Modules", SpriteManager.Get(TechType.PowerUpgradeModule)); cyclopsPowerTab.AddCraftingNode(TechType.PowerUpgradeModule); // Compatible with the MoreCyclopsUpgrades mod whether you have it or not! cyclopsPowerTab.AddModdedCraftingNode("PowerUpgradeModuleMk2"); cyclopsPowerTab.AddModdedCraftingNode("PowerUpgradeModuleMk3"); var cyclopsRechargTab = cyclopsTab.AddTabNode("CyclopsRechargeTab", "Recharge Modules", SpriteManager.Get(TechType.SeamothSolarCharge)); cyclopsRechargTab.AddModdedCraftingNode("CyclopsSolarCharger"); cyclopsRechargTab.AddModdedCraftingNode("CyclopsSolarChargerMk2"); cyclopsRechargTab.AddCraftingNode(TechType.CyclopsThermalReactorModule); cyclopsRechargTab.AddModdedCraftingNode("CyclopsThermalChargerMk2"); cyclopsRechargTab.AddModdedCraftingNode("CyclopsNuclearModule"); //cyclopsPowerTab.AddModdedCraftingNode("CyclopsNuclearModuleRefil"); // Only in the nuclear fabricator var exosuitTab = rootNode.AddTabNode("ExosuitModules", "Prawn Suit Modules", SpriteManager.Get(SpriteManager.Group.Category, "SeamothUpgrades_ExosuitModules")); var exosuitDepthTab = exosuitTab.AddTabNode("ExosuitDepthModules", "Depth Modules", SpriteManager.Get(TechType.ExoHullModule1)); exosuitDepthTab.AddCraftingNode(TechType.ExoHullModule1, TechType.ExoHullModule2); exosuitTab.AddCraftingNode(TechType.ExosuitThermalReactorModule, TechType.ExosuitJetUpgradeModule, TechType.ExosuitPropulsionArmModule, TechType.ExosuitGrapplingArmModule, TechType.ExosuitDrillArmModule, TechType.ExosuitTorpedoArmModule); var seamothTab = rootNode.AddTabNode("SeamothModules", "Seamoth Modules", SpriteManager.Get(SpriteManager.Group.Category, "SeamothUpgrades_SeamothModules")); var seamothDepthTab = seamothTab.AddTabNode("SeamothDepthModules", "Depth Modules", SpriteManager.Get(TechType.VehicleHullModule1)); seamothDepthTab.AddCraftingNode(TechType.VehicleHullModule1, TechType.VehicleHullModule2, TechType.VehicleHullModule3); seamothDepthTab.AddModdedCraftingNode("SeamothHullModule4"); // Compatible with MoreSeamothUpgrades mod whether you have it or not! seamothDepthTab.AddModdedCraftingNode("SeamothHullModule5"); // Compatible with MoreSeamothUpgrades mod whether you have it or not! seamothTab.AddCraftingNode(TechType.SeamothSolarCharge, TechType.SeamothElectricalDefense, TechType.SeamothSonarModule); seamothTab.AddModdedCraftingNode("SeamothThermalModule"); // Compatible with MoreSeamothUpgrades mod whether you have it or not! seamothTab.AddModdedCraftingNode("SeamothDrillModule"); // Compatible with MoreSeamothUpgrades mod whether you have it or not! var commonTab = rootNode.AddTabNode("CommonModules", "Common Modules", SpriteManager.Get(SpriteManager.Group.Category, "SeamothUpgrades_CommonModules")); commonTab.AddCraftingNode(TechType.VehicleArmorPlating, TechType.VehiclePowerUpgradeModule, TechType.VehicleStorageModule); commonTab.AddModdedCraftingNode("SpeedModule"); commonTab.AddModdedCraftingNode("VehiclePowerCore"); var torpedoesTab = rootNode.AddTabNode("TorpedoesModules", "Torpedoes", SpriteManager.Get(SpriteManager.Group.Category, "SeamothUpgrades_Torpedoes")); torpedoesTab.AddCraftingNode(TechType.WhirlpoolTorpedo, TechType.GasTorpedo); }