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); }
//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)); }