public static void Load() { // Knives CraftTreeHandler.AddTabNode(CraftTree.Type.Workbench, "KnifeUpgrades", "Knife Upgrades", SpriteManager.Get(SpriteManager.Group.Category, "workbench_knifemenu")); CraftTreeHandler.RemoveNode(CraftTree.Type.Workbench, new string[] { "HeatBlade" }); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Workbench, TechType.HeatBlade, new string[] { "KnifeUpgrades" }); // Tanks CraftTreeHandler.RemoveNode(CraftTree.Type.Workbench, new string[] { "HighCapacityTank" }); CraftTreeHandler.AddTabNode(CraftTree.Type.Workbench, "ModTanks", "Tank Upgrades", SpriteManager.Get(TechType.HighCapacityTank)); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Workbench, TechType.HighCapacityTank, new string[] { "ModTanks" }); // Fins menu CraftDataHandler.SetTechData(TechType.UltraGlideFins, new SMLHelper.V2.Crafting.RecipeData() { craftAmount = 1, Ingredients = new List <Ingredient>() { new Ingredient(TechType.Fins, 1), new Ingredient(TechType.Silicone, 2), new Ingredient(TechType.Titanium, 1), new Ingredient(TechType.Lithium, 1) } }); CraftTreeHandler.AddTabNode(CraftTree.Type.Workbench, "FinUpgrades", "Fin Upgrades", SpriteManager.Get(SpriteManager.Group.Category, "workbench_finsmenu")); CraftTreeHandler.RemoveNode(CraftTree.Type.Workbench, new string[] { "SwimChargeFins" }); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Workbench, TechType.SwimChargeFins, new string[] { "FinUpgrades" }); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Workbench, TechType.UltraGlideFins, new string[] { "FinUpgrades " }); // Test purposes, may be changed to a databox before release KnownTechHandler.SetAnalysisTechEntry(TechType.SwimChargeFins, new TechType[] { TechType.UltraGlideFins }); // Seatruck Upgrades CraftTreeHandler.AddTabNode(CraftTree.Type.Workbench, "SeaTruckWBUpgrades", "Seatruck Upgrades", SpriteManager.Get(SpriteManager.Group.Category, "fabricator_seatruckupgrades")); CraftTreeHandler.RemoveNode(CraftTree.Type.Workbench, new string[] { "SeaTruckUpgradeHull2" }); CraftTreeHandler.RemoveNode(CraftTree.Type.Workbench, new string[] { "SeaTruckUpgradeHull3" }); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Workbench, TechType.SeaTruckUpgradeHull2, new string[] { "SeaTruckWBUpgrades" }); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Workbench, TechType.SeaTruckUpgradeHull3, new string[] { "SeaTruckWBUpgrades" }); // Exosuit Upgrades CraftTreeHandler.AddTabNode(CraftTree.Type.Workbench, "ExoUpgrades", "Exosuit Upgrades", SpriteManager.Get(SpriteManager.Group.Category, "workbench_exosuitmenu")); CraftTreeHandler.RemoveNode(CraftTree.Type.Workbench, new string[] { "ExoHullModule2" }); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Workbench, TechType.ExoHullModule2, new string[] { "ExoUpgrades" }); // Now our custom stuff CraftTreeHandler.AddTabNode(CraftTree.Type.Workbench, "SuitUpgrades", "Suit Upgrades", SpriteManager.Get(TechType.Stillsuit)); CraftTreeHandler.AddTabNode(CraftTree.Type.Fabricator, "ChipEquipment", "Chips", SpriteManager.Get(TechType.MapRoomHUDChip), new string[] { "Personal" }); CraftTreeHandler.AddTabNode(CraftTree.Type.Fabricator, "ChipRecharge", "Chip Recharges", SpriteManager.Get(TechType.MapRoomHUDChip), new string[] { "Personal" }); CraftTreeHandler.AddTabNode(CraftTree.Type.Fabricator, "DPDTier1", "Diver Perimeter Defence Chip", SpriteManager.Get(TechType.MapRoomHUDChip), new string[] { "Personal", "ChipRecharge" }); CraftTreeHandler.AddTabNode(CraftTree.Type.Fabricator, "DPDTier2", "Diver Perimeter Defence Chip Mk2", SpriteManager.Get(TechType.MapRoomHUDChip), new string[] { "Personal", "ChipRecharge" }); CraftTreeHandler.AddTabNode(CraftTree.Type.Fabricator, "DPDTier3", "Diver Perimeter Defence Chip Mk3", SpriteManager.Get(TechType.MapRoomHUDChip), new string[] { "Personal", "ChipRecharge" }); CraftTreeHandler.RemoveNode(CraftTree.Type.Fabricator, new string[] { "Machines", "HoverbikeSilentModule" }); CraftTreeHandler.RemoveNode(CraftTree.Type.Fabricator, new string[] { "Machines", "HoverbikeJumpModule" }); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Fabricator, TechType.HoverbikeIceWormReductionModule, new string[] { "Upgrades", "HoverbikeUpgrades" }); CraftTreeHandler.AddCraftingNode(CraftTree.Type.Fabricator, TechType.HoverbikeJumpModule, new string[] { "Upgrades", "HoverbikeUpgrades" }); foreach (Spawnable s in new List <Spawnable>() { new ExosuitLightningClawPrefab(), //new ExosuitSprintModule(), //new ExosuitLightningClawGeneratorModule(), new PowerglideFragmentPrefab(), new SurvivalSuit(), #if BELOWZERO new InsulatedRebreather(), new ReinforcedColdSuit(), new ReinforcedColdGloves(), new HighCapacityBooster(), new SurvivalColdSuit(), new SurvivalSuitBlueprint_FromReinforcedCold(), new SurvivalSuitBlueprint_FromSurvivalCold(), new HoverbikeMobilityUpgrade(), new SeatruckSolarModule(), new SeatruckThermalModule(), new SeaTruckSonarModule(), #endif new ReinforcedSurvivalSuit(), new PowerglideEquipable(), new SuperSurvivalSuit(), //new SurvivalSuitBlueprint_BaseSuits(), new SurvivalSuitBlueprint_FromReinforcedSurvival(), new ShadowLeviathanSample(), new DiverPerimeterDefenceChip_Broken(), new DiverPerimeterDefenceChipItem(), new DiverDefenceSystemMk2(), new DiverDefenceMk2_FromBrokenChip(), new DiverDefenceSystemMk3(), }) { s.Patch(); } Databox powerglideDatabox = new Databox() { DataboxID = "PowerglideDatabox", PrimaryDescription = PowerglideEquipable.friendlyName + " Databox", SecondaryDescription = PowerglideEquipable.description, TechTypeToUnlock = GetModTechType("PowerglideEquipable"), CoordinatedSpawns = new Dictionary <Vector3, Vector3>() { { new Vector3(285f, -242.07f, -1299f), new Vector3(344f, 3.77f, 14f) } } }; powerglideDatabox.Patch(); var harmony = new Harmony($"DaWrecka_{myAssembly.GetName().Name}"); harmony.PatchAll(myAssembly); }
public static void MetalHands_InitializationMethod() { Config = OptionsPanelHandler.Main.RegisterModOptions <IngameConfigMenu>(); var GloveBlueprint = new MetalHandsMK1(); GloveBlueprint.Patch(); MetalHandsMK1TechType = GloveBlueprint.TechType; var GloveMK2Blueprint = new MetalHandsMK2(); GloveMK2Blueprint.Patch(); MetalHandsMK2TechType = GloveMK2Blueprint.TechType; var GRAVHANDBlueprint = new MetalHandsClawModule(); GRAVHANDBlueprint.Patch(); MetalHandsClawModuleTechType = GRAVHANDBlueprint.TechType; if (MetalHands_BZ.Config.Config_Hardcore == true) { BiomesToSpawnIn_pre = new List <LootDistributionData.BiomeData> { new LootDistributionData.BiomeData() { biome = BiomeType.TreeSpires_Ground, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.ArcticKelp_CaveInner_Sand, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.GlacialBasin_BikeCrashSite, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.TwistyBridges_Cave_Ground, count = 1, probability = 0.01f } }; } else { BiomesToSpawnIn_pre = new List <LootDistributionData.BiomeData> { new LootDistributionData.BiomeData() { biome = BiomeType.TreeSpires_Ground, count = 1, probability = 0.05f }, new LootDistributionData.BiomeData() { biome = BiomeType.ArcticKelp_CaveInner_Sand, count = 1, probability = 0.02f }, new LootDistributionData.BiomeData() { biome = BiomeType.GlacialBasin_BikeCrashSite, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.TwistyBridges_Cave_Ground, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.TwistyBridges_Shallow_Coral, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.LilyPads_Deep_Ground, count = 1, probability = 0.01f }, }; } Databox myDatabox = new Databox() { DataboxID = "MetalHandDatabox", PrimaryDescription = "Metal Hand Safety Glove Databox", SecondaryDescription = "Contains Crafting Tree for Improved Safety Gloves - Alterrra Copyright", BiomesToSpawnIn = BiomesToSpawnIn_pre, TechTypeToUnlock = MetalHands_BZ.MetalHandsMK1TechType }; myDatabox.Patch(); Logger.Log(Logger.Level.Debug, "MetalHands_BZ Initialization"); Harmony harmony = new Harmony("MetalHands_BZ"); harmony.PatchAll(Assembly.GetExecutingAssembly()); Logger.Log(Logger.Level.Info, "MetalHands_BZ Patched"); IncreasedChunkDrops_exist = QModServices.Main.ModPresent("IncreasedChunkDrops"); if (IncreasedChunkDrops_exist) { Logger.Log(Logger.Level.Info, "MetalHands has detected Increased Chunk Drops"); ErrorMessage.AddMessage("Attention MetalHands does not work properly with Increased Chunk Drops"); //QModServices.Main.AddCriticalMessage("Attention MetalHands does not work properly with Increased Chunk Drops"); } else { Logger.Log(Logger.Level.Info, "MetalHands has NOT detected Increased Chunk Drops"); } //QModServices.Main.AddCriticalMessage("Warning the MetalHands Mod is in BETA Status !"); }
public static void MetalHands_InitializationMethod() { Config = OptionsPanelHandler.Main.RegisterModOptions <IngameConfigMenu>(); var GloveBlueprint = new MetalHandsMK1(); GloveBlueprint.Patch(); MetalHandsMK1TechType = GloveBlueprint.TechType; var GloveMK2Blueprint = new MetalHandsMK2(); GloveMK2Blueprint.Patch(); MetalHandsMK2TechType = GloveMK2Blueprint.TechType; var GRAVHANDBlueprint = new MetalHandsClawModule(); GRAVHANDBlueprint.Patch(); MetalHandsClawModuleTechType = GRAVHANDBlueprint.TechType; if (MetalHands.Config.Config_Hardcore == true) { BiomesToSpawnIn_pre = new List <LootDistributionData.BiomeData> { new LootDistributionData.BiomeData() { biome = BiomeType.BloodKelp_TechSite_Scatter, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.CragField_Grass, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.UnderwaterIslands_TechSite_Scatter, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.SeaTreaderPath_TechSite_Scatter, count = 1, probability = 0.02f } }; } else { BiomesToSpawnIn_pre = new List <LootDistributionData.BiomeData> { new LootDistributionData.BiomeData() { biome = BiomeType.GrassyPlateaus_Grass, count = 1, probability = 0.01f }, new LootDistributionData.BiomeData() { biome = BiomeType.SparseReef_Techsite, count = 1, probability = 0.02f }, new LootDistributionData.BiomeData() { biome = BiomeType.GrassyPlateaus_TechSite_Scattered, count = 1, probability = 0.02f }, new LootDistributionData.BiomeData() { biome = BiomeType.CragField_Grass, count = 1, probability = 0.02f }, new LootDistributionData.BiomeData() { biome = BiomeType.BloodKelp_TechSite_Scatter, count = 1, probability = 0.02f }, new LootDistributionData.BiomeData() { biome = BiomeType.SeaTreaderPath_TechSite_Scatter, count = 1, probability = 0.02f }, new LootDistributionData.BiomeData() { biome = BiomeType.UnderwaterIslands_TechSite_Scatter, count = 1, probability = 0.02f } }; } Databox myDatabox = new Databox() { DataboxID = "MetalHandDatabox", PrimaryDescription = "Metal Hand Safety Glove Databox", SecondaryDescription = "Contains Crafting Tree for Improved Safety Gloves - Alterrra Copyright", BiomesToSpawnIn = BiomesToSpawnIn_pre, TechTypeToUnlock = MetalHands.MetalHandsMK1TechType }; myDatabox.Patch(); Logger.Log(Logger.Level.Debug, "MetalHands Initialization"); Harmony harmony = new Harmony("MetalHands"); harmony.PatchAll(Assembly.GetExecutingAssembly()); Logger.Log(Logger.Level.Info, "MetalHands Patched"); IncreasedChunkDrops_exist = QModServices.Main.ModPresent("IncreasedChunkDrops"); if (IncreasedChunkDrops_exist) { Logger.Log(Logger.Level.Info, "MetalHands has detected Increased Chunk Drops"); ErrorMessage.AddMessage("Attention MetalHands does not work properly with Increased Chunk Drops"); //QModServices.Main.AddCriticalMessage("Attention MetalHands does not work properly with Increased Chunk Drops"); } else { Logger.Log(Logger.Level.Info, "MetalHands has NOT detected Increased Chunk Drops"); } //QModServices.Main.AddCriticalMessage("Warning the MetalHands Mod is in BETA Status !"); }