Exemple #1
0
        public bool ApplyFeature(ref CompositeDisposable disp, MoreShopItemsPlugin inst)
        {
            const string itemName = "Ero Detection App";

            disp.Add(StoreApi.RegisterShopItem(
                         itemId: MoreShopItemsPlugin.DetectorItemId,
                         itemName: itemName,
                         explaination: "A phone app that notifies you about erotic activities happening around the island. It's fully automatic and gives estimated locations.",
                         shopType: StoreApi.ShopType.NightOnly,
                         itemBackground: StoreApi.ShopBackground.Yellow,
                         itemCategory: 3,
                         stock: 1,
                         resetsDaily: false,
                         cost: 200,
                         sort: 500));

            disp.Add(Harmony.CreateAndPatchAll(typeof(EroDetectorFeat)));

            _notifyMast = inst.Config.Bind(itemName, "Notification on masturbation", true, "If the item is purchased, show a notification whenever any NPC starts a masturbation action.");
            _notifyLesb = inst.Config.Bind(itemName, "Notification on lesbian", true, "If the item is purchased, show a notification whenever any NPC starts a lesbian action.");

            TranslationHelper.TranslateAsync(_infoTextPrefix, s => _infoTextPrefix = s);

            return(true);
        }
Exemple #2
0
        public bool Install(Harmony instance, ConfigFile config)
        {
            if (StudioAPI.InsideStudio || Interlocked.Increment(ref _installed) != 1)
            {
                return(false);
            }

            StoreApi.RegisterShopItem(
                itemId: AfterpillStoreId,
                itemName: "Afterpill",
                explaination: "Prevents pregnancy when used within a few days of insemination. Always smart to keep a couple of these for emergencies.",
                shopType: StoreApi.ShopType.NightOnly,
                itemBackground: StoreApi.ShopBackground.Pink,
                itemCategory: 8,
                stock: 5,
                resetsDaily: false,
                cost: 50,
                sort: 461);

            instance.PatchMoveNext(
                original: AccessTools.Method(typeof(TalkScene), nameof(TalkScene.Introduction)),
                transpiler: new HarmonyMethod(typeof(CustomEventsFeature), nameof(IntroductionTpl)));

            // todo make heroine want to talk to player when theres a custom event waiting

            return(true);
        }
Exemple #3
0
        public static void Apply(Harmony hi)
        {
            hi.PatchAll(typeof(AccessPointHooks));

            StoreApi.RegisterShopItem(StoreItemId, "Cursed drawing board",
                                      "Gives access to a supposedly cursed drawing board inside the Training Center. The board is said to give its user the ability to bestow lewd crests upon people they know. Each upgrade lets you affect characters that you know less well.",
                                      StoreApi.ShopType.Normal, StoreApi.ShopBackground.Yellow, 3, 3, false, 100,
                                      numText: "{0} available upgrades");
        }
Exemple #4
0
        public bool Install(Harmony instance, ConfigFile config)
        {
            if (StudioAPI.InsideStudio || Interlocked.Increment(ref _installed) != 1)
            {
                return(false);
            }

            var insertCat = StoreApi.RegisterShopItemCategory(ResourceUtils.GetEmbeddedResource("icon_insertable.png").LoadTexture());

            StoreApi.RegisterShopItem(SuppositoryStoreId, "Family Making Tampons",
                                      "Cum delivery devices disguised as a pack of tampons. Thanks to multiple patented technologies the conception rate is close to 100%. Perfect as a gift. (Doesn't work on infertile characters)",
                                      StoreApi.ShopType.NightOnly, StoreApi.ShopBackground.Pink, insertCat, 3, true, 100, 461, onBought: item => TopicApi.AddTopicToInventory(SuppositoryTopicId));

            TopicApi.RegisterTopic(SuppositoryTopicId, "Family Making Tampons", TopicApi.TopicCategory.Love, TopicApi.TopicRarity.Rarity5, GetAdvScript, GetAdvResult);

            return(true);
        }
Exemple #5
0
        public bool Install(Harmony instance, ConfigFile config)
        {
            if (StudioAPI.InsideStudio || Interlocked.Increment(ref _installed) != 1)
            {
                return(false);
            }

            var rubberCat = StoreApi.RegisterShopItemCategory(ResourceUtils.GetEmbeddedResource("item_rubber.png").LoadTexture());

            StoreApi.RegisterShopItem(itemId: RubberStoreId,
                                      itemName: "Family Making Condoms",
                                      explaination: "Makes pregnancy up to 95% likely after cumming inside with a condom on. Active in all H scenes until the end of the next day, use with caution! (Doesn't work on infertile characters)",
                                      shopType: StoreApi.ShopType.NightOnly,
                                      itemBackground: StoreApi.ShopBackground.Pink,
                                      itemCategory: rubberCat,
                                      stock: 1,
                                      resetsDaily: true,
                                      cost: 100,
                                      sort: 460);

            instance.PatchAll(typeof(FamilyCondomsFeature));

            return(true);
        }
Exemple #6
0
        public bool ApplyFeature(ref CompositeDisposable disp, MoreShopItemsPlugin inst)
        {
            var ico = ResourceUtils.GetEmbeddedResource("item_talisman.png", typeof(MoreShopItemsPlugin).Assembly).LoadTexture();
            var talismanCategoryId = StoreApi.RegisterShopItemCategory(ico);

            disp.Add(ico);

            const int maxTalismansOwned = 2;

            disp.Add(StoreApi.RegisterShopItem(
                         itemId: MoreShopItemsPlugin.TalismanItemId,
                         itemName: "Twin-making Talisman",
                         explaination: "An old talisman that was allegedly used for conversing with spirits in the past. It can summon a fake twin of any living person that is experienced in sex. (One time use during H scenes)",
                         shopType: StoreApi.ShopType.NightOnly,
                         itemBackground: StoreApi.ShopBackground.Pink,
                         itemCategory: talismanCategoryId,
                         stock: maxTalismansOwned,
                         resetsDaily: false,
                         cost: 100,
                         numText: "{0} remaining out of " + maxTalismansOwned));

            disp.Add(CustomTrespassingHsceneButtons.AddHsceneTrespassingButtonWithConfirmation(
                         buttonText: "Let's use a Twin-making Talisman",
                         spawnConditionCheck: hSprite =>
            {
                var flags = hSprite.flags;
                return((flags.mode == HFlag.EMode.aibu || flags.mode == HFlag.EMode.sonyu || flags.mode == HFlag.EMode.houshi) &&
                       !flags.isFreeH
                       // 3P is only available for experienced or horny
                       && flags.lstHeroine[0].HExperience >= Heroine.HExperienceKind.慣れ &&
                       StoreApi.GetItemAmountBought(MoreShopItemsPlugin.TalismanItemId) > 0
                       // Only enable if not coming from a peeping H scene, because trying to start 3P in that state just ends the H scene
                       && GameObject.FindObjectOfType <HScene>().dataH.peepCategory.Count == 0);
            },
                         confirmBoxTitle: "Hシーン確認",
                         confirmBoxSentence: "Do you want to use one of your Twin-making Talismans?\n\nIt's supposed to create a twin of the girl, but what will actually happen?",
                         onConfirmed: hSprite =>
            {
                MoreShopItemsPlugin.Logger.LogDebug("Twin-making Talisman used");

                // Custom code, copy current heroine and add a copy to the "other heroine waiting" field
                var hsp = GameObject.FindObjectOfType <HSceneProc>();
                if (hsp == null)
                {
                    throw new ArgumentNullException(nameof(hsp));
                }

                var currHeroine = hsp.dataH.lstFemale[0];
                if (currHeroine == null)
                {
                    throw new ArgumentNullException(nameof(currHeroine));
                }

                MoreShopItemsPlugin.Logger.LogDebug($"Creating a copy of the main heroine: {currHeroine.Name} chaCtrl={currHeroine.chaCtrl}");
                Heroine.SetBytes(currHeroine.version, Heroine.GetBytes(currHeroine), out var copyHeroine);
                copyHeroine.chaCtrl   = currHeroine.chaCtrl;
                hsp.dataH.newHeroione = copyHeroine;

                // Stock game code to initialize the 3P transition
                MoreShopItemsPlugin.Logger.LogDebug("Starting 3P transition copied character");
                var flags         = hSprite.flags;
                flags.click       = HFlag.ClickKind.end;
                flags.isHSceneEnd = true;
                flags.numEnd      = 2;
                //flags.lstHeroine[0].lewdness = 100;
                var asi = ActionScene.instance;
                if (asi == null)
                {
                    throw new ArgumentNullException(nameof(asi));
                }
                if (asi)
                {
                    asi.isPenetration = true;
                }
                if (flags.shortcut != null)
                {
                    flags.shortcut.enabled = false;
                }
                if (asi)
                {
                    asi.ShortcutKeyEnable(false);
                }

                // Eat one of the held items
                StoreApi.DecreaseItemAmountBought(MoreShopItemsPlugin.TalismanItemId);
            }));

            return(true);
        }