예제 #1
0
        public static void Patch()
        {
            SeraLogger.PatchStart(modName, "1.4.2");
            try
            {
                var harmony = HarmonyInstance.Create("seraphimrisen.nitrogenmod.mod");

                AssetBundle ab = AssetBundle.LoadFromFile(assetBundle);
                N2HUD = ab.LoadAsset("NMHUD") as GameObject;

                NitrogenOptions savedSettings = new NitrogenOptions();
                OptionsPanelHandler.RegisterModOptions(savedSettings);

                NitroDamagePatcher.Lethality(savedSettings.nitroLethal);
                NitroDamagePatcher.AdjustScaler(savedSettings.damageScaler);
                BreathPatcher.EnableCrush(savedSettings.crushEnabled);
                nitrogenEnabled = savedSettings.nitroEnabled;

                harmony.PatchAll(Assembly.GetExecutingAssembly());

                DummySuitItems.PatchDummyItems();
                ReinforcedSuitsCore.PatchSuits();
                if (specialtyTanks)
                {
                    O2TanksCore.PatchTanks();
                }

                SeraLogger.PatchComplete(modName);
            }
            catch (Exception ex)
            {
                SeraLogger.PatchFailed(modName, ex);
            }
        }
예제 #2
0
        public static void Patch()
        {
            SeraLogger.PatchStart(modName, "1.5.1");
            try
            {
                var harmony = new Harmony("seraphimrisen.nitrogenmod.mod");

                AssetBundle ab = AssetBundle.LoadFromFile(assetBundle);
                N2HUD = ab.LoadAsset("NMHUD") as GameObject;

                NitrogenOptions savedSettings = new NitrogenOptions();
                OptionsPanelHandler.RegisterModOptions(savedSettings);

                nitrogenEnabled       = savedSettings.nitroEnabled;
                decompressionVehicles = savedSettings.decompressionVehicles;
                NitroDamagePatcher.Lethality(savedSettings.nitroLethal);
                NitroDamagePatcher.AdjustScaler(savedSettings.damageScaler);
                NitroDamagePatcher.SetDecomVeh(decompressionVehicles);
                BreathPatcher.EnableCrush(savedSettings.crushEnabled);

                harmony.PatchAll(Assembly.GetExecutingAssembly());

                DummySuitItems.PatchDummyItems();
                ReinforcedSuitsCore.PatchSuits();
                if (specialtyTanks)
                {
                    O2TanksCore.PatchTanks();
                }

                AddDiveSuit(ReinforcedSuitsCore.ReinforcedStillSuit, 1300f, 0.75f, 15f);
                AddDiveSuit(ReinforcedSuitsCore.ReinforcedSuit2ID, 1300f, 0.75f, 20f);
                AddDiveSuit(ReinforcedSuitsCore.ReinforcedSuit3ID, 8000f, 0.55f, 35f);
                Console.WriteLine(typeof(NitroDamagePatcher).AssemblyQualifiedName);
                SeraLogger.PatchComplete(modName);
            }
            catch (Exception ex)
            {
                SeraLogger.PatchFailed(modName, ex);
            }
        }