コード例 #1
0
ファイル: CodexPatches.cs プロジェクト: erny0507/ONI_MODS
        public override void OnLoad(Harmony harmony)
        {
            base.OnLoad(harmony);

            PUtil.InitLibrary(false);

            PCodexManager pCodexManager = new PCodexManager();

            pCodexManager.RegisterCreatures();
            //PCodex.RegisterCreatures();
        }
コード例 #2
0
        public override void OnLoad(Harmony harmony)
        {
            base.OnLoad(harmony);

            PUtil.InitLibrary(false);

            PCodexManager pCodexManager = new PCodexManager();

            pCodexManager.RegisterCreatures();



            TUNING.CREATURES.EGG_CHANCE_MODIFIERS.MODIFIER_CREATORS.Add(
                Traverse.Create(typeof(TUNING.CREATURES.EGG_CHANCE_MODIFIERS))
                .Method("CreateTemperatureModifier", CREATE_TEMPERATURE_MODIFIER_METHOD_TYPES)
                .GetValue <System.Action>(
                    BetaPacuConfig.ID,
                    BetaPacuConfig.EGG_ID.ToTag(),
                    BetaPacuConfig.MIN_TEMP,
                    BetaPacuConfig.MAX_TEMP,
                    CustomPacuTuning.MODIFIER_PER_SECOND, false));

            PacuTuning.EGG_CHANCES_BASE.Add(
                new FertilityMonitor.BreedingChance
            {
                egg    = BetaPacuConfig.EGG_ID.ToTag(),
                weight = 0.02f
            });

            TUNING.CREATURES.EGG_CHANCE_MODIFIERS.MODIFIER_CREATORS.Add(
                Traverse.Create(typeof(TUNING.CREATURES.EGG_CHANCE_MODIFIERS))
                .Method("CreateTemperatureModifier", CREATE_TEMPERATURE_MODIFIER_METHOD_TYPES)
                .GetValue <System.Action>(
                    AlgaePacuConfig.ID,
                    AlgaePacuConfig.EGG_ID.ToTag(),
                    AlgaePacuConfig.MIN_TEMP,
                    AlgaePacuConfig.MAX_TEMP,
                    CustomPacuTuning.MODIFIER_PER_SECOND, false));

            PacuTuning.EGG_CHANCES_TROPICAL.Add(
                new FertilityMonitor.BreedingChance
            {
                egg    = AlgaePacuConfig.EGG_ID.ToTag(),
                weight = 0.02f
            });

            TUNING.CREATURES.EGG_CHANCE_MODIFIERS.MODIFIER_CREATORS.Add(
                Traverse.Create(typeof(TUNING.CREATURES.EGG_CHANCE_MODIFIERS))
                .Method("CreateTemperatureModifier", CREATE_TEMPERATURE_MODIFIER_METHOD_TYPES)
                .GetValue <System.Action>(
                    PlatePacuConfig.ID,
                    PlatePacuConfig.EGG_ID.ToTag(),
                    PlatePacuConfig.MIN_TEMP,
                    PlatePacuConfig.MAX_TEMP,
                    CustomPacuTuning.MODIFIER_PER_SECOND, false));

            PacuTuning.EGG_CHANCES_CLEANER.Add(
                new FertilityMonitor.BreedingChance
            {
                egg    = PlatePacuConfig.EGG_ID.ToTag(),
                weight = 0.02f
            });
        }