Exemple #1
0
        //if (result)
        //{
        //	if (target is PlayerBase target)
        //	{
        //		target.refillHunger(sateHungerAmount);
        //	}
        //	item = null;
        //}

        //if (isBadEnd)
        //{
        //	throw new Tools.InDevelopmentExceptionThatBreaksOnRelease();
        //	//if we hit a bad end, don't resume whatever we were doing - we treat it as if it was a nightmare and nothing happened, except for the stuff that did happen, because continuity
        //	//is hard to enforce in this shit. Just lampshade it - it was a nightmare, but you still suffer the effects of it as if it happened, but only up until the point you realized it
        //	//was a bad end. so, you'll lose any items you were gonna get afterward, etc, but if your butt was stretched to gaping, it'll still be gaping after resuming from the bad end.
        //	//same with piercings, tfs, etc. No time is lost, however, just resume from camp as soon as possible.
        //	//example of lampshading: "it was just a nightmare... but it felt so real - and your eyebrow has a piercing in it, just like in the dream. strange..."

        //	//GameEngine.DoBadEnd();
        //}
        //else
        //{
        //	postItemUseCallback(result, consumeResults, item);
        //}
        //}

#warning Implement IPatternable bs when you figure out how to do so and/or actually feel like it.

        private void DoSubMenu(IMultiDyeable multiDyeable)
        {
            display.OutputText(multiDyeable.LocationDesc() + " has several possible locations or combinations of locations. Where on " + multiDyeable.LocationDesc() +
                               " would you like to apply the " + color.AsString() + " hair dye?" + Environment.NewLine + "You can also go back to the full menu by hitting back.");

            display.ClearOutput();


            buttonMaker.ClearList();
            for (byte x = 0; x < multiDyeable.numDyeableMembers; x++)
            {
                string tip;
                string location = multiDyeable.memberLocationDesc(x, out bool plural);
                if (!multiDyeable.allowsDye(x))
                {
                    tip = location.CapitalizeFirstLetter() + " cannot currently be dyed.";
                }
                else if (!multiDyeable.isDifferentColor(color, x))
                {
                    tip = location.CapitalizeFirstLetter() + (plural ? " are" : " is") + " already " + color.AsString() + ".";
                }
                else
                {
                    tip = null;
                }
                buttonMaker.AddButtonToList(multiDyeable.memberButtonText(x), multiDyeable.allowsDye(x), () => ApplyDye(multiDyeable, x), tip, null);
            }

            buttonMaker.CreateButtons(new ButtonData(GlobalStrings.BACK(), true, RunMainMenu), new ButtonData(GlobalStrings.CANCEL(), true, PutBack));
        }
Exemple #2
0
        private void ApplyDye(IMultiDyeable multiDyeable, byte index)
        {
            string results;
            bool   success = multiDyeable.attemptToDye(color, index);

            if (multiDyeable is IMultiDyeableCustomText customText)
            {
                results = customText.DisplayResults(color, index, success);
            }
            else
            {
                results = ResultsOfDyeText(multiDyeable, index, success);
            }

            CleanupAndReturn(results);
        }
Exemple #3
0
 private string ResultsOfDyeText(IMultiDyeable dyeable, byte index, bool succeeded)
 {
     return(ResultsOfDyeText(dyeable.memberLocationDesc(index, out bool _), dyeable.memberPostDyeDescription(index), succeeded));
 }