private void MuseumDialogAnswerHandler(Farmer farmer, string whichAnswer)
        {
            switch (whichAnswer)
            {
            case DialogOption_Donate:
                Game1.activeClickableMenu = new MuseumMenuEx();
                break;

            case DialogOption_Rearrange:
                Game1.activeClickableMenu = new MuseumMenuNoInventory();
                break;

            case DialogOption_Collect:
                Game1.activeClickableMenu = new ItemGrabMenu(LibraryMuseumHelper.GetRewardsForPlayer(Game1.player),
                                                             false, true, null, null,
                                                             "Rewards", new ItemGrabMenu.behaviorOnItemSelect(LibraryMuseumHelper.CollectedReward),
                                                             false, false, false, false, false, 0, null, -1, this);
                break;

            case DialogOption_Status:
                if (LibraryMuseumHelper.HasCollectedAllBooks && LibraryMuseumHelper.HasDonatedAllMuseumPieces)
                {
                    Game1.drawDialogue(gunther, translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_STATUS_COMPLETED));
                }
                else
                {
                    DialogHelper.DrawDialog(translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_STATUS_INTRO) + DialogHelper.DIALOG_NEWLINE +
                                            translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_LIBRARY_STATUS) + LibraryMuseumHelper.LibraryBooks + "/" + LibraryMuseumHelper.TotalLibraryBooks + DialogHelper.DIALOG_NEWLINE +
                                            translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_MUSEUM_STATUS) + LibraryMuseumHelper.MuseumPieces + "/" + LibraryMuseumHelper.TotalMuseumPieces,
                                            gunther);
                }

                break;

            case DialogOption_Leave:
                break;
            }
        }
Exemplo n.º 2
0
        private void MuseumDialogAnswerHandler(Farmer farmer, string whichAnswer)
        {
            switch (whichAnswer)
            {
            case DialogOption_Donate:
                Game1.activeClickableMenu = new MuseumMenuEx();
                break;

            case DialogOption_Rearrange:
                Game1.activeClickableMenu = new MuseumMenuNoInventory();
                break;

            case DialogOption_Collect:
                Game1.activeClickableMenu = (IClickableMenu) new ItemGrabMenu((IList <Item>)LibraryMuseumHelper.GetRewardsForPlayer(Game1.player),
                                                                              false, true, (InventoryMenu.highlightThisItem)null, (ItemGrabMenu.behaviorOnItemSelect)null,
                                                                              "Rewards", new ItemGrabMenu.behaviorOnItemSelect(LibraryMuseumHelper.CollectedReward),
                                                                              false, false, false, false, false, 0, (Item)null, -1, (object)this);
                break;

            case DialogOption_Status:
                if (LibraryMuseumHelper.HasCollectedAllBooks && LibraryMuseumHelper.HasDonatedAllMuseumPieces)
                {
                    Game1.drawDialogue(gunther, translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_STATUS_COMPLETED));
                }
                else
                {
                    // Work-around to create newlines
                    string statusIntroLinePadding = translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_STATUS_INTRO_LINE_PADDING);
                    if (statusIntroLinePadding.StartsWith("(no translation:"))
                    {
                        statusIntroLinePadding = "";
                    }

                    string libraryStatusLinePadding = translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_LIBRARY_STATUS_LINE_PADDING);
                    if (libraryStatusLinePadding.StartsWith("(no translation:"))
                    {
                        libraryStatusLinePadding = "";
                    }

                    Game1.drawDialogue(gunther, translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_STATUS_INTRO) + statusIntroLinePadding +
                                       translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_LIBRARY_STATUS) + $"{ LibraryMuseumHelper.LibraryBooks}/{LibraryMuseumHelper.TotalLibraryBooks}" + libraryStatusLinePadding +
                                       translationHelper.Get(Translation.GUNTHER_ARCHAEOLOGY_HOUSE_MUSEUM_STATUS) + $"{LibraryMuseumHelper.MuseumPieces}/{LibraryMuseumHelper.TotalMuseumPieces} ");
                }
                break;

            case DialogOption_Leave:
                break;
            }
        }