Ejemplo n.º 1
0
        public void Patch()
        {
            TechType = TechTypeHandler.AddTechType(ID, DisplayName, Tooltip, RequiredForUnlock == TechType.None);

            if (RequiredForUnlock != TechType.None)
            {
                KnownTechHandler.SetAnalysisTechEntry(RequiredForUnlock, new TechType[] { TechType });
            }

            if (Sprite == null)
            {
                SpriteHandler.RegisterSprite(TechType, $"./QMods/SeamothClawArm/Assets/{ID}.png");
            }
            else
            {
                SpriteHandler.RegisterSprite(TechType, Sprite);
            }

            switch (Fabricator)
            {
            case CraftTree.Type.Workbench:
                CraftDataHandler.AddToGroup(TechGroup.Workbench, TechCategory.Workbench, TechType, AddAfter);
                break;

            case CraftTree.Type.SeamothUpgrades:
                CraftDataHandler.AddToGroup(TechGroup.VehicleUpgrades, TechCategory.VehicleUpgrades, TechType, AddAfter);
                break;
            }

            CraftDataHandler.SetEquipmentType(TechType, EquipmentType.SeamothModule);
            CraftDataHandler.SetTechData(TechType, GetTechData());

            CraftTreeHandler.AddCraftingNode(Fabricator, TechType, StepsToTab);
        }
Ejemplo n.º 2
0
        public void RegisterFloraFabricator(List <IDecorationItem> decorationItems)
        {
            if (this.IsRegistered == false)
            {
                // Create new Craft Tree Type
                CreateCustomTree(out CraftTree.Type craftType, decorationItems);
                this.TreeTypeID = craftType;

                // Add the new TechType to the buildables
                CraftDataHandler.AddBuildable(this.TechType);

                // Add the new TechType to the group of Interior Module buildables
                CraftDataHandler.AddToGroup(TechGroup.InteriorModules, TechCategory.InteriorModule, this.TechType, TechType.Fabricator);

                // Register handover text
                LanguageHandler.SetLanguageLine(HandOverText, LanguageHelper.GetFriendlyWord(HandOverText));

                // Unlock at start
                KnownTechHandler.UnlockOnStart(this.TechType);

                // Set the buildable prefab
                PrefabHandler.RegisterPrefab(this);

                // Register sprite
                SpriteHandler.RegisterSprite(this.TechType, AssetsHelper.Assets.LoadAsset <Sprite>("fabricator_icon_green"));

                // Load texture
                this.ColoredTexture = AssetsHelper.Assets.LoadAsset <Texture2D>("submarine_fabricator_green");

                // Associate the recipie to the new TechType
                CraftDataHandler.SetTechData(this.TechType, this.Recipe);

                this.IsRegistered = true;
            }
        }
        public void Patch(bool auxConsolesEnabled)
        {
            this.TechType = TechTypeHandler.AddTechType(NameID, FriendlyName, Description, false);

            if (!auxConsolesEnabled) // Even if the options have this be disabled,
            {
                return;              // we still want to run through the AddTechType methods to prevent mismatched TechTypeIDs as these settings are switched
            }
            LanguageHandler.SetLanguageLine(HandOverText, "Access Auxiliary Cyclops Upgrade Console");
            CraftDataHandler.AddBuildable(this.TechType);
            CraftDataHandler.AddToGroup(TechGroup.InteriorModules, TechCategory.InteriorModule, this.TechType);

            PrefabHandler.RegisterPrefab(this);

            var recipe = new TechData()
            {
                craftAmount = 1,
                Ingredients = new List <Ingredient>(new Ingredient[3]
                {
                    new Ingredient(TechType.AdvancedWiringKit, 1),
                    new Ingredient(TechType.Titanium, 2),
                    new Ingredient(TechType.Lead, 1),
                })
            };

            CraftDataHandler.SetTechData(this.TechType, recipe);
            SpriteHandler.RegisterSprite(this.TechType, @"./QMods/MoreCyclopsUpgrades/Assets/AuxCyUpgradeConsole.png");
            KnownTechHandler.SetAnalysisTechEntry(TechType.CyclopsHullModule1, new TechType[1] {
                this.TechType
            }, $"{FriendlyName} blueprint discovered!");
        }
Ejemplo n.º 4
0
        public void Patch()
        {
            TechType = TechTypeHandler.AddTechType(ID, DisplayName, Tooltip, RequiredForUnlock == TechType.Seaglide);

            if (RequiredForUnlock != TechType.None)
            {
                KnownTechHandler.SetAnalysisTechEntry(RequiredForUnlock, new TechType[] { TechType.PowerGlide });
            }

            if (Sprite == null)
            {
                SpriteHandler.RegisterSprite(TechType, $"./QMods/BetterSeaglide/Assets/powerglide.png");
            }
            else
            {
                SpriteHandler.RegisterSprite(TechType, Sprite);
            }

            /*switch (Fabricator)
             * {
             *  case CraftTree.Type.Fabricator:
             *      CraftDataHandler.AddToGroup(TechGroup.Machines, TechCategory.Machines, TechType, AddAfter);
             *      break;
             *
             * }*/

            //CraftDataHandler.AddToGroup(TechGroup.Machines, TechCategory.Machines, TechType, AddAfter);
            CraftDataHandler.SetEquipmentType(TechType, EquipmentType.Hand);
            CraftDataHandler.SetTechData(TechType, GetTechData());
            CraftDataHandler.SetQuickSlotType(TechType, QuickSlotType.Selectable);
            //CraftTreeHandler.AddTabNode(Fabricator, "Deployables", "Better Seaglide", SpriteManager.Get(BetterSeaglide));
            CraftTreeHandler.AddCraftingNode(Fabricator, TechType, StepsToTab);
        }
        protected override void Patch()
        {
            DepletedNuclearModuleID = TechTypeHandler.AddTechType(DepletedNameID, FriendlyName, Description, false);

            RefillNuclearModuleID = TechTypeHandler.AddTechType(RefillNameID,
                                                                "Reload Cyclops Nuclear Module",
                                                                "Reload a Depleted Cyclops Nuclear Module with a Reactor Rod",
                                                                false);

            if (CyclopsModule.ModulesEnabled) // Even if the options have this be disabled,
            {                                 // we still want to run through the AddTechType methods to prevent mismatched TechTypeIDs as these settings are switched
                SpriteHandler.RegisterSprite(DepletedNuclearModuleID, $"./QMods/MoreCyclopsUpgrades/Assets/DepletedCyclopsNuclearModule.png");
                SpriteHandler.RegisterSprite(RefillNuclearModuleID, $"./QMods/MoreCyclopsUpgrades/Assets/CyclopsNuclearModule.png");

                CraftDataHandler.SetTechData(RefillNuclearModuleID, GetRecipe());
                KnownTechHandler.SetAnalysisTechEntry(TechType.BaseNuclearReactor, new TechType[1] {
                    RefillNuclearModuleID
                }, "Reload of cyclops nuclear module available.");

                PrefabHandler.RegisterPrefab(this);
                PrefabHandler.RegisterPrefab(new RefillNuclearModule(RefillNuclearModuleID));

                LanguageHandler.SetLanguageLine(DepletedEventKey, "Nuclear Reactor Module depleted");
            }

            this.NukFabricator.Patch(CyclopsModule.ModulesEnabled);
        }
Ejemplo n.º 6
0
        protected virtual void Patch()
        {
            this.TechType = TechTypeHandler.AddTechType(NameID, FriendlyName, Description, RequiredForUnlock == TechType.None);

            if (!ModulesEnabled) // Even if the options have this be disabled,
            {
                return;          // we still want to run through the AddTechType methods to prevent mismatched TechTypeIDs as these settings are switched
            }
            if (RequiredForUnlock == TechType.None)
            {
                KnownTechHandler.UnlockOnStart(this.TechType);
            }
            else
            {
                KnownTechHandler.SetAnalysisTechEntry(RequiredForUnlock, new TechType[1] {
                    this.TechType
                }, $"{FriendlyName} blueprint discovered!");
            }

            PrefabHandler.RegisterPrefab(this);

            SpriteHandler.RegisterSprite(this.TechType, $"./QMods/MoreCyclopsUpgrades/Assets/{NameID}.png");

            CraftDataHandler.SetTechData(this.TechType, GetRecipe());

            if (AddToCraftTree)
            {
                CraftTreeHandler.AddCraftingNode(Fabricator, this.TechType, FabricatorTabs);
            }

            CraftDataHandler.SetEquipmentType(this.TechType, EquipmentType.CyclopsModule);
            CraftDataHandler.AddToGroup(TechGroup.Cyclops, TechCategory.CyclopsUpgrades, this.TechType);

            SetStaticTechTypeID(this.TechType);
        }
Ejemplo n.º 7
0
        public virtual void Patch()
        {
            Atlas.Sprite sprite;

            if (NameUsingForFiles != null)
            {
                sprite = ImageUtils.LoadSpriteFromFile($"./QMods/{NameUsingForFiles}/Assets/{NameUsingForFiles}.png");
            }
            else
            {
                sprite = GetResourceIcon(PrefabTemplate);
            }


            TechType = TechTypeHandler.AddTechType(NameID, FriendlyName, Description, sprite, false);
            SpriteHandler.RegisterSprite(TechType, sprite);
            CraftTreeHandler.AddCraftingNode(FabricatorType, TechType, FabricatorTab);
            CraftDataHandler.SetTechData(TechType, GetRecipe());
            CraftDataHandler.AddToGroup(GroupForPDA, CategoryForPDA, TechType);
            CraftDataHandler.SetEquipmentType(TechType, TypeForEquipment);
            CraftDataHandler.SetQuickSlotType(TechType, TypeForQuickslot);
            CraftDataHandler.SetItemSize(TechType, ItemSize);

            KnownTechHandler.SetAnalysisTechEntry(RequiredForUnlock, new TechType[1] {
                TechType
            }, $"{FriendlyName} blueprint discovered!");

            PrefabHandler.RegisterPrefab(this);
        }
        public ExteriorPlantPotPrefab(string plantPotId, string displayName, string tooltip, string basePotPath, TechType basePotTechType) : base(plantPotId, $"Submarine/Build/{plantPotId}")
        {
            this.basePlantPotPath = basePotPath;

            // Register the TechType
            TechType = TechTypeHandler.AddTechType(plantPotId, displayName, tooltip, false);

            // Register the Sprite(icon) of the new TechType with the icon of the base plant pot.
            SpriteHandler.RegisterSprite(TechType, SpriteManager.Get(basePotTechType));

            // Set the recipe of the TechType.
            CraftDataHandler.SetTechData(TechType, new TechData()
            {
                craftAmount = 1,
                Ingredients = new List <Ingredient>()
                {
                    new Ingredient(TechType.Titanium, 2)
                }
            });

            // Add it as a buildable.
            CraftDataHandler.AddBuildable(TechType);

            // Add it to the group in the PDA.
            CraftDataHandler.AddToGroup(TechGroup.ExteriorModules, TechCategory.ExteriorOther, TechType);

            // Set it to unlock after the base TechType is unlocked.
            KnownTechHandler.SetAnalysisTechEntry(basePotTechType, new List <TechType>()
            {
                TechType
            });

            // Register this prefab.
            PrefabHandler.RegisterPrefab(this);
        }
Ejemplo n.º 9
0
        public CoralSample()
            : base("CoralSample", "Coral Shelf Sample", "A sample of coral from the Twisty Bridges.")
        {
            OnFinishedPatching += () =>
            {
                KnifePatches.AddHarvestable(TechType.TwistyBridgesCoralShelf, 200f);
                Main.AddModTechType(this.TechType);
                CraftDataHandler.SetHarvestOutput(TechType.TwistyBridgesCoralShelf, this.TechType);
                CraftDataHandler.SetHarvestType(TechType.TwistyBridgesCoralShelf, HarvestType.DamageAlive);
                CraftDataHandler.SetTechData(TechType.Bleach, new SMLHelper.V2.Crafting.RecipeData()
                {
                    craftAmount = 1,
                    Ingredients = new List <Ingredient>()
                    {
                        new Ingredient(this.TechType, 1),
                        new Ingredient(TechType.Salt, 1)
                    }
                });
                CraftTreeHandler.AddCraftingNode(CraftTree.Type.Fabricator, TechType.Bleach, new string[] { "Resources", "BasicMaterials" });

                CraftDataHandler.SetTechData(TechType.DisinfectedWater, new SMLHelper.V2.Crafting.RecipeData()
                {
                    craftAmount = 2,
                    Ingredients = new List <Ingredient>()
                    {
                        new Ingredient(TechType.Bleach, 1)
                    }
                });
                CraftTreeHandler.AddCraftingNode(CraftTree.Type.Fabricator, TechType.DisinfectedWater, new string[] { "Survival", "Water" });
                KnownTechHandler.SetAnalysisTechEntry(this.TechType, new TechType[] { TechType.Bleach });
                KnownTechHandler.SetAnalysisTechEntry(TechType.Bleach, new TechType[] { TechType.DisinfectedWater });
                LanguageHandler.Main.SetTechTypeTooltip(TechType.Bleach, "NaClO. Sodium hypochlorite bleach. Sanitizing applications.");
            };
        }
Ejemplo n.º 10
0
        public void Patch()
        {
            if (this.IsPatched)
            {
                return;
            }

            this.TechType = TechTypeHandler.AddTechType(this.ClassID, this.FriendlyName, this.Description, this.UnlocksAtStart);

            if (!this.UnlocksAtStart)
            {
                KnownTechHandler.SetAnalysisTechEntry(this.RequiredForUnlock, new TechType[] { this.TechType });
            }

            if (this.Sprite == null)
            {
                this.Sprite = ImageUtils.LoadSpriteFromFile(IOUtilities.Combine(ExecutingFolder, this.PluginFolder, this.IconFileName));
            }

            SpriteHandler.RegisterSprite(this.TechType, this.Sprite);

            CraftDataHandler.SetTechData(this.TechType, GetBlueprintRecipe());

            CraftDataHandler.AddToGroup(TechGroup.Resources, TechCategory.Electronics, this.TechType);

            CraftDataHandler.SetEquipmentType(this.TechType, this.ChargerType);

            CraftTreeHandler.AddCraftingNode(CraftTree.Type.Fabricator, this.TechType, this.StepsToFabricatorTab);

            PrefabHandler.RegisterPrefab(this);

            AddToList();

            this.IsPatched = true;
        }
Ejemplo n.º 11
0
        public void PostPatch()
        {
            //patch crafting recipes
            //is there a more efficient way of doing this?
            var techDataBlade = new RecipeData()
            {
                craftAmount = 3,
                Ingredients = new List <Ingredient>()
                {
                    new Ingredient(TechType.Titanium, 3)
                }
            };

            CraftDataHandler.SetTechData(turbineBlade, techDataBlade);
            CraftTreeHandler.AddCraftingNode(CraftTree.Type.Fabricator, turbineBlade, new string[] { "Resources", "Electronics" });
            KnownTechHandler.SetAnalysisTechEntry(TechType.WiringKit, new TechType[] { turbineBlade });
            CraftDataHandler.SetItemSize(turbineBlade, new Vector2int(2, 1));
            //SetItemSize(turbineBlade, 2, 1);

            var techDataGen = new RecipeData()
            {
                craftAmount = 1,
                Ingredients = new List <Ingredient>()
                {
                    new Ingredient(TechType.WiringKit, 1),
                    new Ingredient(TechType.PowerCell, 1),
                    new Ingredient(TechType.Lubricant, 1)
                }
            };

            CraftDataHandler.SetTechData(turbineGenerator, techDataGen);
            KnownTechHandler.SetAnalysisTechEntry(TechType.WiringKit, new TechType[] { turbineGenerator });
            CraftTreeHandler.AddCraftingNode(CraftTree.Type.Fabricator, turbineGenerator, new string[] { "Resources", "Electronics" });
            CraftDataHandler.SetItemSize(turbineGenerator, new Vector2int(2, 2));
            //SetItemSize(turbineBlade, 2, 2);

            var techDataPole = new RecipeData()
            {
                craftAmount = 1,
                Ingredients = new List <Ingredient>()
                {
                    new Ingredient(TechType.Titanium, 4)
                }
            };

            CraftDataHandler.SetTechData(turbinePole, techDataPole);
            KnownTechHandler.SetAnalysisTechEntry(TechType.WiringKit, new TechType[] { turbinePole });
            CraftTreeHandler.AddCraftingNode(CraftTree.Type.Fabricator, turbinePole, new string[] { "Resources", "Electronics" });
            CraftDataHandler.SetItemSize(turbinePole, new Vector2int(1, 2));
            //SetItemSize(turbineBlade, 1, 2);

            //Add the databank entry.
            LanguageHandler.SetLanguageLine("Ency_WindTurbine", "Wind Turbine");
            LanguageHandler.SetLanguageLine("EncyDesc_WindTurbine", string.Format("A large generator suspended by 17.5 meter tall pole. The lightweight blades are rotated by the planet's strong air currents and efficiently converts the force into electrical energy. The generator contains a large internal battery that can hold up to {0} units of power. Unlike solar panels, these operate at roughly the same efficiency throughout the day. Orientation does not appear to affect power output. However certain places seem to simply have more wind than others. Power output also increases with altitude.", config.MaxPower));

            //This just isn't working for now. Maybe another update?
            //var windTool = new WindTool.WindToolPatch();
            //windTool.Patch();
        }
Ejemplo n.º 12
0
        private void PatchTechDataEntry()
        {
            CraftDataHandler.SetTechData(TechType, GetBlueprintRecipe());


            if (GroupForPDA != TechGroup.Uncategorized)
            {
                List <TechCategory> categories = new List <TechCategory>();
                CraftData.GetBuilderCategories(GroupForPDA, categories);
                if (categories.Contains(CategoryForPDA))
                {
                    CraftDataHandler.AddToGroup(GroupForPDA, CategoryForPDA, TechType);
                }
                else
                {
                    Logger.Error($"Failed to add {TechType} to {GroupForPDA}/{CategoryForPDA} as it is not a registered combination.");
                }
            }

            if (EncyclopediaEntryData != null)
            {
                PDAEncyclopediaHandler.AddCustomEntry(EncyclopediaEntryData);
            }

            if (!UnlockedAtStart)
            {
                var unlockTech = RequiredForUnlock == TechType.None? this.TechType: RequiredForUnlock;

                KnownTechHandler.SetAnalysisTechEntry(unlockTech, new TechType[1] {
                    TechType
                }, DiscoverMessageResolved);

                if (CompoundTechsForUnlock != null && CompoundTechsForUnlock.Count > 0)
                {
                    KnownTechHandler.SetCompoundUnlock(this.TechType, CompoundTechsForUnlock);
                }

                if (AddScannerEntry)
                {
                    PDAScanner.EntryData entryData = new PDAScanner.EntryData()
                    {
                        key              = unlockTech,
                        blueprint        = TechType,
                        destroyAfterScan = DestroyFragmentOnScan,
                        isFragment       = true,
                        locked           = true,
                        scanTime         = TimeToScanFragment,
                        totalFragments   = FragmentsToScan
                    };

                    if (EncyclopediaEntryData != null)
                    {
                        entryData.encyclopedia = EncyclopediaEntryData.key;
                    }
                    PDAHandler.AddCustomScannerEntry(entryData);
                }
            }
        }
Ejemplo n.º 13
0
        public virtual void Patch()
        {
            Atlas.Sprite sprite = null;

            if (IconFilename != null)
            {
                string iconfilePath = $"./QMods/{IconFilename}/Assets/{IconFilename}.png";

                try
                {
                    sprite = ImageUtils.LoadSpriteFromFile(iconfilePath);
                }
                catch
                {
                    SNLogger.Log($"[{NameID}] ***ERROR! File [{iconfilePath}] not Found! ");
                }
            }
            else if (IconTechType != TechType.None)
            {
                try
                {
                    sprite = GetResourceIcon(IconTechType);
                }
                catch
                {
                    SNLogger.Log($"[{NameID}] ***ERROR! Resource TechType icon [{IconTechType.ToString()}] not Found! ");
                }
            }
            else
            {
                try
                {
                    sprite = GetResourceIcon(PrefabTemplate);
                }
                catch
                {
                    SNLogger.Log($"[{NameID}] ***ERROR! Resource template icon [{PrefabTemplate.ToString()}] not Found! ");
                }
            }


            TechType = TechTypeHandler.AddTechType(NameID, FriendlyName, Description, sprite, false);
            SpriteHandler.RegisterSprite(TechType, sprite);
            CraftTreeHandler.AddCraftingNode(FabricatorType, TechType, FabricatorTab);
            CraftDataHandler.SetTechData(TechType, GetRecipe());
            CraftDataHandler.AddToGroup(GroupForPDA, CategoryForPDA, TechType);
            CraftDataHandler.SetEquipmentType(TechType, TypeForEquipment);
            CraftDataHandler.SetQuickSlotType(TechType, TypeForQuickslot);
            CraftDataHandler.SetItemSize(TechType, ItemSize);
            CraftDataHandler.SetBackgroundType(TechType, BackgroundType);
            KnownTechHandler.SetAnalysisTechEntry(RequiredForUnlock, new TechType[1] {
                TechType
            }, $"{FriendlyName} blueprint discovered!");

            PrefabHandler.RegisterPrefab(this);
        }
        public void Patch()
        {
            ModdedItems.Initialize();

            // Create new Craft Tree Type
            CreateCustomTree(out CraftTree.Type craftType);
            this.TreeTypeID = craftType;

            // Create a new TechType for new fabricator
            this.TechType = TechTypeHandler.AddTechType(
                internalName: NameID,
                displayName: FriendlyName,
                tooltip: "Construct vehicle upgrade modules from the comfort of your favorite habitat or cyclops.",
                sprite: ImageUtils.LoadSpriteFromFile(@"./QMods/VModFabricator/Assets/VModFabIcon.png"),
                unlockAtStart: false);

            // Create a Recipie for the new TechType
            var customFabRecipe = new TechData()
            {
                craftAmount = 1,
                Ingredients = new List <Ingredient>(new Ingredient[4]
                {
                    new Ingredient(TechType.Titanium, 2),
                    new Ingredient(TechType.ComputerChip, 1),
                    new Ingredient(TechType.Diamond, 1),
                    new Ingredient(TechType.Lead, 1),
                })
            };

            // Add the new TechType to the buildables
            CraftDataHandler.AddBuildable(this.TechType);

            // Add the new TechType to the group of Interior Module buildables
            CraftDataHandler.AddToGroup(TechGroup.InteriorModules, TechCategory.InteriorModule, this.TechType);

            LanguageHandler.SetLanguageLine(HandOverText, "Use Vehicle Module Fabricator");

            // Set the buildable prefab
            PrefabHandler.RegisterPrefab(this);

            // Associate the recipie to the new TechType
            CraftDataHandler.SetTechData(this.TechType, customFabRecipe);

            // Set which blueprints unlock the VMod Fabricator
            string unlockMessage = $"{FriendlyName} blueprint discovered!";
            var    unlockThis    = new TechType[1] {
                this.TechType
            };

            KnownTechHandler.SetAnalysisTechEntry(TechType.Workbench, unlockThis, unlockMessage);
            KnownTechHandler.SetAnalysisTechEntry(TechType.BaseUpgradeConsole, unlockThis, unlockMessage);
            KnownTechHandler.SetAnalysisTechEntry(TechType.Cyclops, unlockThis, unlockMessage);
        }
Ejemplo n.º 15
0
        private static void HandleUnlocks(IModifiedRecipe modifiedRecipe)
        {
            if (modifiedRecipe.ForceUnlockAtStart)
            {
                KnownTechHandler.UnlockOnStart(modifiedRecipe.ItemID);
            }

            if (modifiedRecipe.UnlocksCount.HasValue)
            {
                KnownTechHandler.SetAnalysisTechEntry(modifiedRecipe.ItemID, modifiedRecipe.Unlocks);
            }
        }
Ejemplo n.º 16
0
        public void Patch()
        {
            // Register this Prefab with SMLHelper
            PrefabHandler.RegisterPrefab(this);

            // Create a new TechType for new Buildable
            this.TechType = TechTypeHandler.AddTechType
                            (
                NameID,
                FriendlyName,
                "This machine gathers resources from underground veins and pulls them to the surface.",
                ImageUtils.LoadSpriteFromFile(@"./BaseDrillMod/BaseDrillIcon.png"),
                true
                            );

            // Add the new TechType to the buildables
            CraftDataHandler.AddBuildable(this.TechType);

            // Add the new TechType to the group of Interior Module buildables
            CraftDataHandler.AddToGroup(TechGroup.InteriorModules, TechCategory.InteriorModule, this.TechType);

            LanguageHandler.SetLanguageLine(HandOverText, "Resource Drill");

            // Create new instance of TechData and apply the recipie to it
            TechData techData = new TechData
            {
                craftAmount = 1,
                Ingredients = new List <Ingredient>(new Ingredient[]
                {
                    new Ingredient(TechType.TitaniumIngot, 2),
                    new Ingredient(TechType.Diamond, 2),
                    new Ingredient(TechType.Lithium, 4),
                    new Ingredient(TechType.AdvancedWiringKit, 1),
                    new Ingredient(TechType.Lubricant, 1)
                })
            };

            // Associate TechType and TechData
            CraftDataHandler.SetTechData(base.TechType, techData);

            // Set which blueprints unlock the Item
            string unlockMessage = $"{FriendlyName} blueprint discovered!";
            var    unlockThis    = new TechType[1] {
                this.TechType
            };

            KnownTechHandler.SetAnalysisTechEntry(TechType.BaseMapRoom, unlockThis, unlockMessage);
            BaseDrillModule instance = new BaseDrillModule();

            instance.GetGameObject();
        }
Ejemplo n.º 17
0
        public virtual void Patch()
        {
            TechType = TechTypeHandler.AddTechType(NameID, FriendlyName, Description, ImageUtils.LoadSpriteFromFile($"./QMods/LaserCannon/Assets/{NameID}.png"), false);

            CraftTreeHandler.AddCraftingNode(FabricatorType, TechType, FabricatorTab);
            CraftDataHandler.SetTechData(TechType, GetRecipe());

            PrefabHandler.RegisterPrefab(this);

            KnownTechHandler.SetAnalysisTechEntry(RequiredForUnlock, new TechType[1] {
                TechType
            }, $"{FriendlyName} blueprint discovered!");
            CraftDataHandler.AddToGroup(GroupForPDA, CategoryForPDA, TechType);
        }
        public virtual void Patch_B()
        {
            Atlas.Sprite sprite = null;

            if (IconFilename != null)
            {
                try
                {
                    sprite = ImageUtils.LoadSpriteFromFile($"./QMods/{IconFilename}/Assets/{IconFilename}.png");
                }
                catch
                {
                    SNLogger.Log($"[{_ClassID}] ***ERROR! File [{IconFilename}.png] not Found! ");
                }
            }
            else if (IconTechType != TechType.None)
            {
                try
                {
                    sprite = GetResourceIcon(IconTechType);
                }
                catch
                {
                    SNLogger.Log($"[{_ClassID}] ***ERROR! Resource TechType icon [{IconTechType.ToString()}] not Found! ");
                }
            }
            else
            {
                try
                {
                    sprite = GetResourceIcon(PrefabTemplate);
                }
                catch
                {
                    SNLogger.Log($"[{_ClassID}] ***ERROR! Resource template icon [{PrefabTemplate.ToString()}] not Found! ");
                }
            }


            TechType = TechTypeHandler.AddTechType(_ClassID, _FriendlyName, _Description, sprite, false);
            SpriteHandler.RegisterSprite(TechType, sprite);
            CraftDataHandler.SetTechData(TechType, GetRecipe());
            CraftDataHandler.AddToGroup(GroupForPDA, CategoryForPDA, TechType);
            KnownTechHandler.SetAnalysisTechEntry(RequiredForUnlock, new TechType[1] {
                TechType
            }, $"{_FriendlyName} blueprint discovered!");

            PrefabHandler.RegisterPrefab(this);
        }
        private void Patch()
        {
            if (IsPatched)
            {
                return; // Already patched. Skip all this.
            }
            if (Prerequisite != null && !Prerequisite.IsPatched)
            {
                Prerequisite.Patch(); // Go and patch the prerequisite craftable first
            }
            PrePatch();               // Run any prepatch overrides

            if (PatchTechTypeOnly)    // Register just the TechType to preserve the ID.
            {
                this.TechType = TechTypeHandler.AddTechType(NameID, FriendlyName, Description, false);
            }
            else // Full patching
            {
                this.TechType = TechTypeHandler.AddTechType(
                    internalName: NameID,
                    displayName: FriendlyName,
                    tooltip: Description,
                    sprite: ImageUtils.LoadSpriteFromFile($"./QMods/UpgradedVehicles/Assets/{NameID}.png"),
                    unlockAtStart: false);

                CraftTreeHandler.AddCraftingNode(FabricatorType, this.TechType, FabricatorTab);
                CraftDataHandler.SetTechData(this.TechType, GetRecipe());

                PrefabHandler.RegisterPrefab(this);

                if (Config.ForceUnlockAtStart)
                {
                    KnownTechHandler.UnlockOnStart(this.TechType);
                }
                else
                {
                    KnownTechHandler.SetAnalysisTechEntry(RequiredForUnlock, new TechType[1] {
                        this.TechType
                    }, $"{FriendlyName} blueprint discovered!");
                }

                CraftDataHandler.AddToGroup(GroupForPDA, CategoryForPDA, this.TechType);
            }

            PostPatch(); // Run any postpatch overrides

            IsPatched = true;
        }
        // This patch is handled by the Nuclear Charger
        internal void Patch(bool nukFabricatorEnabled)
        {
            // Create new Craft Tree Type
            CreateCustomTree(out CraftTree.Type craftType);
            TreeTypeID = craftType;

            // Create a new TechType for new fabricator
            this.TechType = TechTypeHandler.AddTechType(NameID, FriendlyName,
                                                        "A specialized fabricator for safe handling of radioactive energy sources.", false);

            if (!nukFabricatorEnabled) // Even if the options have this be disabled,
            {
                return;                // we still want to run through the AddTechType methods to prevent mismatched TechTypeIDs as these settings are switched
            }
            // Create a Recipie for the new TechType
            var customFabRecipe = new TechData()
            {
                craftAmount = 1,
                Ingredients = new List <Ingredient>(new Ingredient[4]
                {
                    new Ingredient(TechType.Titanium, 2),
                    new Ingredient(TechType.ComputerChip, 1),
                    new Ingredient(TechType.Magnetite, 1),
                    new Ingredient(TechType.Lead, 2),
                })
            };

            // Add the new TechType to the buildables
            CraftDataHandler.AddBuildable(this.TechType);

            // Add the new TechType to the group of Interior Module buildables
            CraftDataHandler.AddToGroup(TechGroup.InteriorModules, TechCategory.InteriorModule, this.TechType);

            // Set the buildable prefab
            PrefabHandler.RegisterPrefab(this);

            LanguageHandler.SetLanguageLine(HandOverText, "Use Nuclear Fabricator");

            // Set the custom sprite for the Habitat Builder Tool menu
            SpriteHandler.RegisterSprite(this.TechType, @"./QMods/MoreCyclopsUpgrades/Assets/NuclearFabricatorI.png");

            // Associate the recipie to the new TechType
            CraftDataHandler.SetTechData(this.TechType, customFabRecipe);

            KnownTechHandler.SetAnalysisTechEntry(TechType.BaseNuclearReactor, new TechType[1] {
                this.TechType
            }, $"{FriendlyName} blueprint discovered!");
        }
        public static void Patch()
        {
            try
            {
                // Hook up with harmony
                var harmony = HarmonyInstance.Create("com.standpeter.seamothhabitatbuilder");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                // Create TechType and register its inventory icon
                SeamothBuilderModule = TechTypeHandler.AddTechType("SeamothBuilderModule", "Seamoth habitat builder", "Allows the Seamoth to perform habitat construction tasks.");
                SpriteHandler.RegisterSprite(SeamothBuilderModule, "QMods/SeamothHabitatBuilder/Assets/SeamothBuilderModule.png");

                // Create blueprint
                TechData blueprint = new TechData
                {
                    craftAmount = 1,
                    Ingredients = new List <Ingredient>(2)
                    {
                        new Ingredient(TechType.Builder, 1),
                        new Ingredient(TechType.AdvancedWiringKit, 1)
                    }
                };
                CraftDataHandler.SetTechData(SeamothBuilderModule, blueprint);

                // Make the item craftable
                const string subTree = "Seamoth modules";
                CraftTreeHandler.AddCraftingNode(CraftTree.Type.SeamothUpgrades, SeamothBuilderModule, subTree);
                KnownTechHandler.UnlockOnStart(SeamothBuilderModule);

                // Set how the new item gets used
                CraftDataHandler.AddToGroup(TechGroup.VehicleUpgrades, TechCategory.VehicleUpgrades, SeamothBuilderModule);
                CraftDataHandler.SetQuickSlotType(SeamothBuilderModule, QuickSlotType.Selectable);
                CraftDataHandler.SetEquipmentType(SeamothBuilderModule, EquipmentType.SeamothModule);

                // Register the prefab for the item
                ModPrefab prefab = new SeamothBuilderPrefab("SeamothBuilder", "WorldEntities/Tools/SeamothBuilderModule", SeamothBuilderModule);
                PrefabHandler.RegisterPrefab(prefab);

                Console.WriteLine("[SeamothHabitatBuilder] Succesfully patched!");
            }
            catch (Exception e)
            {
                Console.WriteLine("[SeamothHabitatBuilder] Caught exception! " + e.InnerException.Message);
                Console.WriteLine(e.InnerException.StackTrace);
            }
        }
Ejemplo n.º 22
0
        private void PatchTechDataEntry()
        {
            CraftDataHandler.SetTechData(this.TechType, GetBlueprintRecipe());

            CraftDataHandler.AddToGroup(this.GroupForPDA, this.CategoryForPDA, this.TechType);

            if (this.UnlockedAtStart)
            {
                KnownTechHandler.UnlockOnStart(this.TechType);
            }
            else
            {
                KnownTechHandler.SetAnalysisTechEntry(this.RequiredForUnlock, new TechType[1] {
                    this.TechType
                }, $"{this.FriendlyName} blueprint discovered!");
            }
        }
Ejemplo n.º 23
0
        public static void Patch()
        {
            try
            {
                Config.Load();
                HarmonyInstance.Create("MrPurple6411_SpecialtyManifold").PatchAll(Assembly.GetExecutingAssembly());

                KnownTechHandler.SetAnalysisTechEntry(TechType.Workbench, new List <TechType>()
                {
                    O2TanksCore.PhotosynthesisSmallID, O2TanksCore.PhotosynthesisTankID, O2TanksCore.ChemosynthesisTankID
                });
            }
            catch (Exception ex)
            {
                Debug.LogException(ex);
            }
        }
        public static void AddRecipe(TechType craftedItem, TechData recipe, CraftTree.Type craftTree, string path)
        {
            Assert.AreNotEqual(craftedItem.ToString(), ((int)craftedItem).ToString(), "This API in intended only for use with standard, non-modded TechTypes.");
            // Only modded enums use the int string as their ToString value

            //CraftTreeHandler.customNodes.Add(new CustomCraftNode(craftedItem, craftTree, path));
            CraftDataHandler.SetTechData(craftedItem, recipe);

            string[] steps = path.Split(CraftingNode.Splitter);

            if (steps.Length <= 1)
            {
                CraftTreeHandler.AddCraftingNode(craftTree, craftedItem);
            }
            else
            {
                CraftTreeHandler.AddCraftingNode(craftTree, craftedItem, steps);
            }

            KnownTechHandler.UnlockOnStart(craftedItem);
        }
Ejemplo n.º 25
0
 /// <summary>
 /// Loads the fabricator tabs
 /// </summary>
 public static void FabricatorTabs()
 {
     try
     {
         Log.Debug("Loading fabricator tabs... (0/2)");
         ingotsplus = ingotDict["yenzen-ingotsplus"];
         var spritetabcraft2  = ingotsplus.LoadAsset <Sprite>("IPFabTabCraft");
         var spritetabunpack2 = ingotsplus.LoadAsset <Sprite>("IPFabTabUnpack");
         CraftTreeHandler.AddTabNode(CraftTree.Type.Fabricator, "Craft", "Craft MoreIngots", spritetabcraft2, "Resources");
         Log.Debug("Loading fabricator tabs... (1/2)");
         CraftTreeHandler.AddTabNode(CraftTree.Type.Fabricator, "Unpack", "Unpack MoreIngots", spritetabunpack2, "Resources");
         Log.Debug("Loading fabricator tabs... (2/2)");
         Log.Debug("Fabricator tabs loaded");
         KnownTechHandler.UnlockOnStart(TechType.ScrapMetal);
         KnownTechHandler.UnlockOnStart(TechType.PrecursorIonCrystal);
     }
     catch (Exception e)
     {
         Log.e(e);
     }
 }
Ejemplo n.º 26
0
            public TankType(TechType tank, float baseO2capacity, Sprite sprite = null, bool bUnlockAtStart = false, float speedModifier = 1f)
            {
                Logger.Log(Logger.Level.Debug, $"Registering tank TechType.{tank.AsString()}");
                if (sprite != null)
                {
                    this.sprite = sprite;
                }
                else
                {
                    this.sprite = SpriteManager.Get(tank);
                }
                string tankName = Language.main.Get(tank);

                this.BaseO2Capacity = baseO2capacity;
                this.speedModifier  = speedModifier;
                if (Main.config.bManualRefill)
                {
                    //new TankCraftHelper(tank).Patch();
                    this.refillTechType = TechTypeHandler.AddTechType((tank.AsString(false) + "Refill"), tankName + " Refill", "Refilled " + tankName, false);
                    KnownTechHandler.SetAnalysisTechEntry(tank, new TechType[] { this.refillTechType });
                    SpriteHandler.RegisterSprite(this.refillTechType, this.sprite);
                    var techData = new RecipeData()
                    {
                        craftAmount = 0,
                        Ingredients = new List <Ingredient>()
                        {
                            new Ingredient(tank, 1)
                        }
                    };
                    techData.LinkedItems.Add(tank);

                    CraftDataHandler.SetTechData(this.refillTechType, techData);
                    CraftTreeHandler.AddCraftingNode(CraftTree.Type.Fabricator, this.refillTechType, new string[] {
                        "Personal",
                        "TankRefill"
                    });
#if SUBNAUTICA_STABLE
                    if (CraftData.GetCraftTime(tank, out float craftTime))
#elif BELOWZERO
                    if (TechData.GetCraftTime(tank, out float craftTime))
#endif
                    {
                        Logger.Log(Logger.Level.Debug, $"Setting crafting time of {craftTime} for TechType.{this.refillTechType.AsString()}");
                        CraftDataHandler.SetCraftingTime(this.refillTechType, craftTime);
                    }
                    else
                    {
                        Logger.Log(Logger.Level.Debug, $"Couldn't find crafting time for TechType.{tank}");
                    }

                    if (!Main.bannedTech.Contains(this.refillTechType))
                    {
                        Main.bannedTech.Add(this.refillTechType);
                    }
                    if (bUnlockAtStart)
                    {
                        KnownTechHandler.UnlockOnStart(this.refillTechType);
                    }
                }
                else
                {
                    this.refillTechType = TechType.None;
                }
            }
Ejemplo n.º 27
0
        public static void Patch()
        {
            // Create new Craft Tree Type
            CreateCustomTree(out CraftTree.Type craftType);
            HModTreeType = craftType;

            // Create a new TechType for new fabricator
            HModFabTechType = TechTypeHandler.AddTechType(CustomFabAndTreeID,
                                                          FriendlyName,
                                                          "Construct Player upgrade modules So you can survive more deadly woonds, or even deliver them yourself.",
                                                          ImageUtils.LoadSpriteFromFile(@"./QMods/HealthModuleMod/Assets/MissingFabricator.png"),
                                                          true);

            // Create a Recipie for the new TechType
            var customFabRecipe = new TechData()
            {
                craftAmount = 1,
                Ingredients = new List <Ingredient>(new Ingredient[3]//State you are using 3 ingredients
                {
                    new Ingredient(TechType.Titanium, 1),
                    new Ingredient(TechType.ComputerChip, 1),
                    new Ingredient(TechType.FiberMesh, 2),
                    //State what ingredients you are using.
                })
            };

            // Add the new TechType to the buildables
            CraftDataHandler.AddBuildable(HModFabTechType);

            // Add the new TechType to the group of Interior Module buildables
            CraftDataHandler.AddToGroup(TechGroup.InteriorModules, TechCategory.InteriorModule, HModFabTechType);

            LanguageHandler.SetLanguageLine(HandOverText, "Use Vehicle Module Fabricator");

            // Set the buildable prefab
            PrefabHandler.RegisterPrefab(new HModFabricatorModulePrefab(CustomFabAndTreeID, HModFabTechType));

            // Associate the recipie to the new TechType
            CraftDataHandler.SetTechData(HModFabTechType, customFabRecipe);

            string unlockMessage = $"{FriendlyName} blueprint discovered!";

            SMLHelper.CustomSpriteHandler.customSprites.Add(new SMLHelper.CustomSprite(TechType.Terraformer, ImageUtils.LoadSpriteFromFile(@"./QMods/HealthModuleMod/Assets/TerraFormer.png")));

            var toUnlock = new TechType[1] {
                TechType.DiamondBlade
            };

            KnownTechHandler.SetAnalysisTechEntry(TechType.Diamond, toUnlock, unlockMessage);
            var toUnlock1 = new TechType[1] {
                HModFabTechType
            };

            KnownTechHandler.SetAnalysisTechEntry(TechType.FiberMesh, toUnlock1, unlockMessage);
            var toUnlock2 = new TechType[1] {
                TechType.Terraformer
            };

            KnownTechHandler.SetAnalysisTechEntry(TechType.Melon, toUnlock2, unlockMessage);
            var toUnlock3 = new TechType[1] {
                TechType.BaseUpgradeConsole
            };

            KnownTechHandler.SetAnalysisTechEntry(TechType.Terraformer, toUnlock3, unlockMessage);
            //KnownTechHandler.SetAnalysisTechEntry(TechType.Cyclops, toUnlock, unlockMessage);
        }
Ejemplo n.º 28
0
 protected void unlockOnStart() => KnownTechHandler.UnlockOnStart(TechType);
Ejemplo n.º 29
0
 // Token: 0x06000005 RID: 5 RVA: 0x00002098 File Offset: 0x00000298
 public static void Patch()
 {
     Logger.Log("Started Patching BonesharkEgg");
     QPatch.egg1tt = TechTypeHandler.AddTechType("Boneshark Egg", "Boneshark Egg", "Required to hatch: Spotted Dockleaf.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg1tt);
     LanguageHandler.SetTechTypeTooltip(TechType.BonesharkEgg, "Required to hatch: Spotted Dockleaf");
     KnownTechHandler.UnlockOnStart(QPatch.egg1tt);
     Atlas.Sprite sprite = SpriteManager.Get(TechType.BonesharkEgg);
     SpriteHandler.RegisterSprite(QPatch.egg1tt, sprite);
     Logger.Log("Started Patching CrabsnakeEgg");
     QPatch.egg2tt = TechTypeHandler.AddTechType("Crabsnake Egg", "Crabsnake Egg", "Required to hatch: Jellyshroom.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg2tt);
     LanguageHandler.SetTechTypeTooltip(TechType.CrabsnakeEgg, "Required to hatch: Jellyshroom.");
     KnownTechHandler.UnlockOnStart(QPatch.egg2tt);
     Atlas.Sprite sprite2 = SpriteManager.Get(TechType.CrabsnakeEgg);
     SpriteHandler.RegisterSprite(QPatch.egg2tt, sprite2);
     Logger.Log("Started Patching CrabsquidEgg");
     QPatch.egg3tt = TechTypeHandler.AddTechType("Crabsquid Egg", "Crabsquid Egg", "Required to hatch: Bloodvine.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg3tt);
     LanguageHandler.SetTechTypeTooltip(TechType.CrabsquidEgg, "Required to hatch: Bloodvine.");
     KnownTechHandler.UnlockOnStart(QPatch.egg3tt);
     Atlas.Sprite sprite3 = SpriteManager.Get(TechType.CrabsquidEgg);
     SpriteHandler.RegisterSprite(QPatch.egg3tt, sprite3);
     Logger.Log("Started Patching CrashfishEgg");
     QPatch.egg4tt = TechTypeHandler.AddTechType("Crashfish Egg", "Crashfish Egg", "Required to hatch: Spiked Horn Grass.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg4tt);
     LanguageHandler.SetTechTypeTooltip(TechType.CrashEgg, "Required to hatch: Spiked Horn Grass.");
     KnownTechHandler.UnlockOnStart(QPatch.egg4tt);
     Atlas.Sprite sprite4 = SpriteManager.Get(TechType.CrashEgg);
     SpriteHandler.RegisterSprite(QPatch.egg4tt, sprite4);
     Logger.Log("Started Patching GasopodEgg");
     QPatch.egg5tt = TechTypeHandler.AddTechType("Gasopod Egg", "Gasopod Egg", "Required to hatch: Creepvine.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg5tt);
     LanguageHandler.SetTechTypeTooltip(TechType.GasopodEgg, "Required to hatch: Creepvine.");
     KnownTechHandler.UnlockOnStart(QPatch.egg5tt);
     Atlas.Sprite sprite5 = SpriteManager.Get(TechType.GasopodEgg);
     SpriteHandler.RegisterSprite(QPatch.egg5tt, sprite5);
     Logger.Log("Started Patching JellyrayEgg");
     QPatch.egg6tt = TechTypeHandler.AddTechType("Jellyray Egg", "Jellyray Egg", "Required to hatch: Jellyshroom.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg6tt);
     LanguageHandler.SetTechTypeTooltip(TechType.JellyrayEgg, "Required to hatch: Jellyshroom.");
     KnownTechHandler.UnlockOnStart(QPatch.egg6tt);
     Atlas.Sprite sprite6 = SpriteManager.Get(TechType.JellyrayEgg);
     SpriteHandler.RegisterSprite(QPatch.egg6tt, sprite6);
     Logger.Log("Started Patching LavaLizardEgg");
     QPatch.egg7tt = TechTypeHandler.AddTechType("Lavalizard Egg", "Lavalizard Egg", "Required to hatch: Deep Shroom.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg7tt);
     LanguageHandler.SetTechTypeTooltip(TechType.LavaLizardEgg, "Required to hatch: Deep Shroom.");
     KnownTechHandler.UnlockOnStart(QPatch.egg7tt);
     Atlas.Sprite sprite7 = SpriteManager.Get(TechType.LavaLizardEgg);
     SpriteHandler.RegisterSprite(QPatch.egg7tt, sprite7);
     Logger.Log("Started Patching MesmerEgg");
     QPatch.egg8tt = TechTypeHandler.AddTechType("Mesmer Egg", "Mesmer Egg", "Required to hatch: Violet Beau.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg8tt);
     LanguageHandler.SetTechTypeTooltip(TechType.MesmerEgg, "Required to hatch: Violet Beau.");
     KnownTechHandler.UnlockOnStart(QPatch.egg8tt);
     Atlas.Sprite sprite8 = SpriteManager.Get(TechType.MesmerEgg);
     SpriteHandler.RegisterSprite(QPatch.egg8tt, sprite8);
     Logger.Log("Started Patching RabbitRayEgg");
     QPatch.egg9tt = TechTypeHandler.AddTechType("Rabbitray Egg", "Rabbitray Egg", "Required to hatch: Veined Nettle.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg9tt);
     LanguageHandler.SetTechTypeTooltip(TechType.RabbitrayEgg, "Required to hatch: Veined Nettle.");
     KnownTechHandler.UnlockOnStart(QPatch.egg9tt);
     Atlas.Sprite sprite9 = SpriteManager.Get(TechType.RabbitrayEgg);
     SpriteHandler.RegisterSprite(QPatch.egg9tt, sprite9);
     Logger.Log("Started Patching SandsharkEgg");
     QPatch.egg10tt = TechTypeHandler.AddTechType("Sandshark Egg", "Sandshark Egg", "Required to hatch: Writhing Weed.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg10tt);
     LanguageHandler.SetTechTypeTooltip(TechType.SandsharkEgg, "Required to hatch: Writhing Weed.");
     KnownTechHandler.UnlockOnStart(QPatch.egg10tt);
     Atlas.Sprite sprite10 = SpriteManager.Get(TechType.SandsharkEgg);
     SpriteHandler.RegisterSprite(QPatch.egg10tt, sprite10);
     Logger.Log("Started Patching ShockerEgg");
     QPatch.egg11tt = TechTypeHandler.AddTechType("Shocker Egg", "Shocker Egg", "Required to hatch: Bulb Bush.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg11tt);
     LanguageHandler.SetTechTypeTooltip(TechType.ShockerEgg, "Required to hatch: Bulb Bush.");
     KnownTechHandler.UnlockOnStart(QPatch.egg11tt);
     Atlas.Sprite sprite11 = SpriteManager.Get(TechType.ShockerEgg);
     SpriteHandler.RegisterSprite(QPatch.egg11tt, sprite11);
     Logger.Log("Started Patching SpadefishEgg");
     QPatch.egg12tt = TechTypeHandler.AddTechType("Spadefish Egg", "Spadefish Egg", "Required to hatch: Blue Palm.");
     LanguageHandler.SetTechTypeTooltip(TechType.SpadefishEgg, "Required to hatch: Blue Palm.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg12tt);
     KnownTechHandler.UnlockOnStart(QPatch.egg12tt);
     Atlas.Sprite sprite12 = SpriteManager.Get(TechType.SpadefishEgg);
     SpriteHandler.RegisterSprite(QPatch.egg12tt, sprite12);
     Logger.Log("Started Patching StalkerEgg");
     QPatch.egg13tt = TechTypeHandler.AddTechType("Stalker Egg", "Stalker Egg", "Required to hatch: Creepvine.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg13tt);
     LanguageHandler.SetTechTypeTooltip(TechType.StalkerEgg, "Required to hatch: Creepvine.");
     KnownTechHandler.UnlockOnStart(QPatch.egg13tt);
     Atlas.Sprite sprite13 = SpriteManager.Get(TechType.StalkerEgg);
     SpriteHandler.RegisterSprite(QPatch.egg13tt, sprite13);
     Logger.Log("Started Patching CutefishEgg");
     QPatch.egg14tt = TechTypeHandler.AddTechType("Cutefish Egg", "Cutefish Egg", "Required to hatch: AcidMushroom.");
     LanguageHandler.SetTechTypeTooltip(TechType.CutefishEgg, "Required to hatch: AcidMushroom.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg14tt);
     KnownTechHandler.UnlockOnStart(QPatch.egg14tt);
     Atlas.Sprite sprite14 = SpriteManager.Get(TechType.CutefishEgg);
     SpriteHandler.RegisterSprite(QPatch.egg14tt, sprite14);
     Logger.Log("Started Patching ReefbackEgg");
     QPatch.egg15tt = TechTypeHandler.AddTechType("Reefback Egg", "Reefback Egg", "Required to hatch: AcidMushroom.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg15tt);
     LanguageHandler.SetTechTypeTooltip(TechType.ReefbackEgg, "Required to hatch: AcidMushroom.");
     KnownTechHandler.UnlockOnStart(QPatch.egg15tt);
     Atlas.Sprite sprite15 = SpriteManager.Get(TechType.ReefbackEgg);
     SpriteHandler.RegisterSprite(QPatch.egg15tt, sprite15);
     Logger.Log("Started Patching JumperEgg");
     QPatch.egg16tt = TechTypeHandler.AddTechType("Jumper Egg", "Jumper Egg", "Required to hatch: AcidMushroom.");
     LanguageHandler.SetTechTypeTooltip(TechType.JumperEgg, "Required to hatch: AcidMushroom.");
     LanguageHandler.SetTechTypeTooltip(egg16tt, "Required to hatch: AcidMushroom.");
     CraftDataHandler.AddToGroup(TechGroup.Miscellaneous, TechCategory.Misc, QPatch.egg16tt);
     KnownTechHandler.UnlockOnStart(QPatch.egg16tt);
     Atlas.Sprite sprite16 = SpriteManager.Get(TechType.JumperEgg);
     SpriteHandler.RegisterSprite(QPatch.egg16tt, sprite16);
 }
Ejemplo n.º 30
0
 protected void setTechTypeForUnlock(TechType techType) =>
 KnownTechHandler.SetAnalysisTechEntry(techType, new TechType[1] {
     TechType
 });