private void DoExplore()
        {
            currentDisplay.ClearOutput();

            if (!anyLocationsUnlocked)
            {
                Exploration.RunArea(currentDisplay);
            }
            else
            {
                //append the explore text to the current display.

                AddReturnButtonToDisplay();                 //add the return button.

                ButtonListMaker listMaker = new ButtonListMaker(currentDisplay);
                listMaker.AddButtonToList(ExploreString(), true, () => Exploration.RunArea(currentDisplay));

                foreach (var item in GameEngine.GetUnlockedLocations())
                {
                    listMaker.AddButtonToList(item.Value, true, () => GameEngine.GoToAreaAndRun(item.Key));
                }

                listMaker.CreateButtons(true);                 //create the list of buttons, with a reserved final button as given.
            }
        }
Beispiel #2
0
        private StandardDisplay StandardMenu(Creature consumer, UseItemCallback postItemUseCallback)
        {
            if (validMembers.Count == 1)
            {
                return(DoMultiLotionMenu(consumer, (IMultiLotionable)validMembers[0], postItemUseCallback));
            }

            display.ClearOutput();
            listMaker.ClearList();

            display.OutputText("Where do you want to apply the " + targetTexture.AsString() + " body lotion?");

            foreach (IBodyPart part in consumer.bodyParts)
            {
                if (part is ILotionable lotionable)
                {
                    listMaker.AddButtonToList(part.BodyPartName(), lotionable.CanLotion(), () => DoLotion(consumer, lotionable, postItemUseCallback));
                }
                else if (part is IMultiLotionable multiLotionable)
                {
                    listMaker.AddButtonToList(multiLotionable.ButtonText() + "...", multiLotionable.numLotionableMembers > 0, () => DoMultiLotionMenu(consumer, multiLotionable, postItemUseCallback));
                }
            }
            listMaker.CreateButtons(GlobalStrings.CANCEL(), true, () => LotionCancel(consumer, postItemUseCallback));

            return(display);
        }
Beispiel #3
0
        private void RunMainMenu()
        {
            display.ClearOutput();

            display.OutputText("Where do you want to apply the " + color.AsString() + " hair dye?");

            foreach (IBodyPart item in listOfDyeableParts)
            {
                if (item is IMultiDyeable multiDyeable)
                {
                    bool   active = Enumerable.Range(0, multiDyeable.numDyeableMembers).Select(x => multiDyeable.isDifferentColor(color, (byte)x)).Any(x => x);
                    string tip    = active ? "Dye part of your " + item.BodyPartName() + ". This will bring up more options." : "Your " + item.BodyPartName() + "cannot be dyed or is already the same color";
                    buttonMaker.AddButtonToList(multiDyeable.buttonText() + "...", active, () => DoSubMenu(multiDyeable));
                }
                else if (item is IDyeable dyeable)
                {
                    string tip;
                    string location = dyeable.locationDesc(out bool plural);

                    if (!dyeable.allowsDye())
                    {
                        tip = location.CapitalizeFirstLetter() + " cannot currently be dyed.";
                    }
                    else if (!dyeable.isDifferentColor(color))
                    {
                        tip = location.CapitalizeFirstLetter() + (plural ? " are" : " is") + " already " + color.AsString() + ".";
                    }
                    else
                    {
                        tip = null;
                    }

                    buttonMaker.AddButtonToList(dyeable.buttonText(), dyeable.allowsDye() && dyeable.isDifferentColor(color), () => ApplyDye(dyeable), tip, null);
                }
            }

            buttonMaker.CreateButtons(GlobalStrings.CANCEL(), true, PutBack);
        }
        private void DoPlaceMenu()
        {
            currentDisplay.ClearOutput();
            //append the places text to the current display.

            AddReturnButtonToDisplay();             //add the return button.

            ButtonListMaker listMaker = new ButtonListMaker(currentDisplay);

            foreach (var item in GameEngine.GetUnlockedPlaces())
            {
                listMaker.AddButtonToList(item.Value, true, () => GameEngine.GoToAreaAndRun(item.Key));
            }

            listMaker.CreateButtons(true);             //create the list of buttons, with a reserved final button as given.
        }
        private void DoLoversMenu()
        {
            currentDisplay.ClearOutput();
            //display generic lovers text.

            AddReturnButtonToDisplay();             //add the return button.


            var maker = new ButtonListMaker(currentDisplay);

            foreach (var lover in lovers)
            {
                maker.AddButtonToList(lover.Name(), true, lover.OnSelect);
            }

            maker.CreateButtons(true);
        }
        private void DoSlavesMenu()
        {
            currentDisplay.ClearOutput();

            //display generic slaves text.

            AddReturnButtonToDisplay();             //add the return button.


            var maker = new ButtonListMaker(currentDisplay);

            foreach (var slave in slaves)
            {
                maker.AddButtonToList(slave.Name(), true, slave.OnSelect);
            }

            maker.CreateButtons(false);
        }
Beispiel #7
0
        protected override DisplayBase BuildMenu(Creature consumer, UseItemCallback postItemUseCallback)
        {
            var display = new StandardDisplay();

            display.OutputText("You ponder the needle in your hand knowing it will enlarge the injection site. What part of your body will you use it on? ");

            var listMaker = new ButtonListMaker(display);

            foreach (var bodyPart in consumer.bodyParts)
            {
                if (bodyPart is IGrowable growable)
                {
                    listMaker.AddButtonToList(bodyPart.BodyPartName(), growable.CanGroPlus(), () => ApplyGrowPlus(consumer, growable, postItemUseCallback));
                }
            }

            return(display);
        }