private static void HandleEventHallMenu(string tileActionString = "") { //If player doesn't have enough money to book an event if (Game1.player.Money < 1500) { Game1.activeClickableMenu = new DialogueBox(Helper.Translation.Get("EventHallCounter.Booking.NotEnoughMoney")); } //If player has booked an event else if (HotelMenu.IsThereUpcomingBirthdayBooked() || Game1.player.mailReceived.Contains(RECEPTIONBOOKEDFLAG) || Game1.player.mailReceived.Contains(ANNIVERSARYBOOKEDFLAG)) { Game1.activeClickableMenu = new DialogueBox(Helper.Translation.Get("EventHallCounter.Booking.AlreadyBooked")); } //player has enough money and not any event else { var responses = new List <Response>(); var responseActions = new List <Action>(); //handle birthday booking if (!HotelMenu.IsThereUpcomingBirthdayBooked()) { //can throw birthday party Response birthdayResponse = new Response("bday", Helper.Translation.Get("EventHallCounter.Booking.BirthdayParty")); responses.Add(birthdayResponse); Action birthdayAction = delegate { HandleBirthdayEventMenu(); }; responseActions.Add(birthdayAction); } if (!Game1.player.mailReceived.Contains(RECEPTIONBOOKEDFLAG) && Game1.player.isEngaged()) { Response receptionesponse = new Response("weddingReception", Helper.Translation.Get("EventHallCounter.Booking.WeddingReception")); responses.Add(receptionesponse); Action receptionAction = delegate { HandleReceptionEventMenu(); }; responseActions.Add(receptionAction); } if (Game1.player.isMarried()) { Response anvresponse = new Response("anvParty", Helper.Translation.Get("EventHallCounter.Anv.Title")); responses.Add(anvresponse); Action anvAction = delegate { HandleAnniversaryMenu(); }; responseActions.Add(anvAction); } responses.Add(new Response("no", Helper.Translation.Get("HotelCounter.Booking.No"))); responseActions.Add(delegate { }); Game1.activeClickableMenu = new DialogueBoxWithActions(Helper.Translation.Get("EventHallCounter.Booking.Question"), responses, responseActions); } }
public override void Entry(IModHelper helper) { ModMonitor = Monitor; Helper = helper; if (!new InstallationChecker().checkInstallation(helper)) { return; } ConfigMenu = new ConfigMenu(this); CustomCPTokens = new CustomCPTokens(this); helper.Events.GameLoop.GameLaunched += OnGameLaunched; helper.Events.GameLoop.SaveLoaded += OnSaveLoaded; helper.Events.GameLoop.DayStarted += OnDayStarted; BgUtils.Initialize(this); TortsBackground.Initialize(this); BloomProjectile.Initialize(this); MistProjectile.Initialize(this); Mistblade.Initialize(this); Patcher = new Patcher(this); Patcher.PerformPatching(); HotelMenu.Initialize(this); Minecarts.Initialize(this); SpiritRealm.Initialize(this); SpecialOrders.Initialize(this); IanShop.Initialize(this); Elves.Initialize(this); Greenhouses.Initialize(this); Loan.Initialize(this); //SummitHouse.Initialize(this); WarpTotem.Initialize(this); PaulaClinic.Initialize(this); Offering.OfferingTileAction.Initialize(this); NightlyEvent.Initialize(this); NinjaBooks.Initialize(this); Foxbloom.Initialize(this); //not done (yet?) //new CliffBackground(); Helper.ConsoleCommands.Add("LocationModData", "show ModData of given location", printLocationModData); Helper.ConsoleCommands.Add("remove_equipment", "Remove all clothes and equipment from farmer", RemoveEquipment); }