Exemplo n.º 1
0
        private void Start()
        {
            Logger = base.Logger;

            _confUnlockStoryMaker = Config.Bind("Gameplay", "Allow changing crests in story mode character maker",
                                                false,
                                                "If false, to change crests inside story mode you have to invite the character to the club and use the crest icon in clubroom.");

            CharacterApi.RegisterExtraBehaviour <LewdCrestXController>(GUID);

            if (StudioAPI.InsideStudio)
            {
                LoadAssets();
                CreateStudioControls();
            }
            else
            {
                //todo hook only when entering story mode?
                _hi = new Harmony(GUID);
                _hi.PatchAll(typeof(CharacterHooks));
                AccessPointHooks.Apply(_hi);
                _hi.PatchAll(typeof(AccessPointHooks));
                _hi.PatchAll(typeof(TalkHooks));
                _hi.PatchAll(typeof(HsceneHooks));

                if (!PreggersHooks.TryPatchPreggers(_hi))
                {
                    ImplementedCrestTypes.Remove(CrestType.breedgasm);
                    ImplementedCrestTypes.Remove(CrestType.lactation);
                }
#if KK
                var effType = Type.GetType("KK_SkinEffects.SkinEffectsController, KK_SkinEffects", false);
#elif KKS
                var effType = Type.GetType("KK_SkinEffects.SkinEffectsController, KKS_SkinEffects", false);
#endif
                if (effType != null)
                {
                    SkinEffectsType = effType;
                }
                else
                {
                    Logger.LogWarning("Could not find KK_SkinEffects.SkinEffectsController, some features might not work until you install KK_SkinEffects (please report this if you do have latest version of KK_SkinEffects installed)");
                }

                LoadAssets();

                GameAPI.RegisterExtraBehaviour <LewdCrestXGameController>(GUID);

                MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;
                MakerAPI.MakerFinishedLoading        += MakerAPIOnMakerFinishedLoading;
            }
        }
Exemplo n.º 2
0
 public static void OnInsideFinish2(HFlag __instance)
 {
     try
     {
         if (__instance.player != null)
         {
             var heroine      = __instance.GetLeadingHeroine();
             var currentCrest = heroine.GetCurrentCrest();
             if (currentCrest == CrestType.breedgasm)
             {
                 PreggersHooks.ApplyTempPreggers(heroine);
             }
         }
     }
     catch (Exception e)
     {
         UnityEngine.Debug.LogError(e);
     }
 }
Exemplo n.º 3
0
        private IEnumerator OnPeriodChangeCo()
        {
            yield return(null);

            yield return(new WaitWhile(SceneApi.GetIsNowLoadingFade));

            PreggersHooks.OnPeriodChanged();

            _existingControllers = GetHeroineList().Select(x => x.GetCrestController()).Where(x => x != null).ToList();
            var actCtrl = GameAPI.GetActionControl();

            if (actCtrl != null)
            {
                foreach (var ctrl in _existingControllers)
                {
                    var heroine = ctrl.Heroine;
                    if (heroine == null)
                    {
                        continue;
                    }
                    switch (ctrl.CurrentCrest)
                    {
                    case CrestType.libido:
                        heroine.lewdness = 100;
                        actCtrl.AddDesire(4, heroine, 20);                                               //want to mast
                        actCtrl.AddDesire(5, heroine, 40);                                               //want to h
                        actCtrl.AddDesire(26, heroine, heroine.parameter.attribute.likeGirls ? 30 : 10); //les
                        actCtrl.AddDesire(27, heroine, heroine.parameter.attribute.likeGirls ? 30 : 10); //les
                        actCtrl.AddDesire(29, heroine, 60);                                              //ask for h
                        break;

                    case CrestType.liberated:
                        heroine.lewdness = Mathf.Min(100, heroine.lewdness + 20);
                        actCtrl.AddDesire(4, heroine, 40);     //want to mast
                        break;
                    }
                }
            }
        }
Exemplo n.º 4
0
        protected override void OnDayChange(Cycle.Week day)
        {
            foreach (var heroine in GetHeroineList())
            {
                if (heroine == null)
                {
                    continue;
                }

                switch (heroine.GetCurrentCrest())
                {
                case CrestType.restore:
                    if (!heroine.isVirgin)
                    {
                        LewdCrestXPlugin.Logger.LogInfo("Resetting heroine to virgin because of restore crest: " + heroine.charFile?.parameter?.fullname);
                        heroine.isVirgin = true;
                        heroine.hCount   = 0;
                    }
                    break;
                }
            }

            PreggersHooks.ClearTempPreggers();
        }
Exemplo n.º 5
0
 protected override void OnGameSave(GameSaveLoadEventArgs args)
 {
     PreggersHooks.ClearTempPreggers();
 }