private void DoLotion(Creature consumer, IMultiLotionable multiLotionable, byte index, UseItemCallback postItemUseCallback) { StringBuilder sb = new StringBuilder(); if (multiLotionable is IMultiLotionableCustomText customText) { bool succeeded = multiLotionable.AttemptToLotion(targetTexture, index); sb.Append(customText.DisplayResults(targetTexture, index, succeeded)); } else if (!multiLotionable.IsDifferentTexture(targetTexture, index)) { sb.Append("You " + (consumer.wearingAnything ? "take a second to disrobe before uncorking the flask of lotion and rubbing" : "uncork the flask of lotion and rub") + " the " + LiquidDesc() + " across your " + multiLotionable.MemberLocationDesc(index, out bool isPlural) + ". Once you've finished you feel reinvigorated. "); } else { string location = multiLotionable.MemberLocationDesc(index, out bool isPlural); sb.Append((consumer.wearingAnything ? "Once you've disrobed you take the lotion and" : "You take the lotion and") + " begin massaging it into your " + location + ". As you do so," + location + (isPlural ? " begin" : " begins") + " to tingle pleasantly."); if (multiLotionable.AttemptToLotion(targetTexture, index)) { sb.Append(SuccessfullyAppliedLotion(location, isPlural)); } else { sb.Append(LotionDidNothing(location, isPlural)); } } postItemUseCallback(true, sb.ToString(), null, null); CleanupItems(); }
private StandardDisplay DoMultiLotionMenu(Creature consumer, IMultiLotionable multiLotionable, UseItemCallback postItemUseCallback) { bool canReturnToMenu = display != null; display.ClearOutput(); listMaker.ClearList(); display.OutputText(multiLotionable.LocationDesc() + " has several possible locations or combinations of locations. Where on " + multiLotionable.LocationDesc() + " would you like to apply the " + targetTexture.AsString() + " body lotion?" + Environment.NewLine + "You can also go back to the main menu by hitting back."); for (byte x = 0; x < multiLotionable.numLotionableMembers; x++) { listMaker.AddButtonToList(multiLotionable.MemberButtonText(x), multiLotionable.CanLotion(x), () => DoLotion(consumer, multiLotionable, x, postItemUseCallback)); } listMaker.CreateButtons(new ButtonData(GlobalStrings.BACK(), true, () => StandardMenu(consumer, postItemUseCallback)), new ButtonData(GlobalStrings.CANCEL(), true, () => LotionCancel(consumer, postItemUseCallback))); return(display); }