From 4e0662abe914a3738243d5e5821108f470a14918 Mon Sep 17 00:00:00 2001 From: JoshuaNavarro Date: Sat, 7 Dec 2019 18:27:34 -0800 Subject: [PATCH] Finished abigails party. --- GeneralMods/HappyBirthday/BirthdayMessages.cs | 15 ++++- .../HappyBirthday/Framework/BirthdayEvents.cs | 64 ++++++++++++++++--- GeneralMods/HappyBirthday/HappyBirthday.cs | 23 +++++++ 3 files changed, 92 insertions(+), 10 deletions(-) diff --git a/GeneralMods/HappyBirthday/BirthdayMessages.cs b/GeneralMods/HappyBirthday/BirthdayMessages.cs index 29138088..740b8086 100644 --- a/GeneralMods/HappyBirthday/BirthdayMessages.cs +++ b/GeneralMods/HappyBirthday/BirthdayMessages.cs @@ -144,7 +144,7 @@ namespace Omegasis.HappyBirthday ["Mail:birthdayDatingMaru"] = "Hey @. ^ My family and I decided to have a birthday party for you at our place. Could you come by our house sometime today?^Sincerly,^ -Maru", ["Mail:birthdayDatingSebastian"] = "Hey @. ^ Could you come by my place later? My family and I decided to have a birthday party for you to celebrate. ^^ -Sebastian", ["Mail:birthdayDatingLeah"] = "Hey @. ^ Could you come by my place later? I thought it would be nice if we had a small party for you. ^Sincerly,^ -Leah", - + ["Mail:birthdayDatingAbigail"] = "Hey @. ^ My family and I decided to have a birthday party for you at our place. Could you come by our house sometime today?^Sincerly,^ -Abigail", ["Happy Birthday: Star Message"] = "It's your birthday today! Happy birthday!", ["Happy Birthday: Farmhand Birthday Message"] = "It's @'s birthday! Happy birthday to them!", @@ -199,6 +199,19 @@ namespace Omegasis.HappyBirthday ["Event:DatingLeahBirthday_Finish:0"] = "It was nice celebrating my birthday with Leah.", ["Event:DatingLeahBirthday_Finish:1"] = "It looks like there was some leftover cake too!", + ["Event:DatingAbigailBirthday_Abigail:0"] = "Hey @! You are just in time for the party!$h", + ["Event:DatingAbigailBirthday_Abigail:1"] = "Wow this cake looks delicious mom!$h", + ["Event:DatingAbigailBirthday_Abigail:2"] = "Go ahead and make a wish @.", + ["Event:DatingAbigailBirthday_Abigail:3"] = "So @, what did you wish for? Hopefully for some awesome skills!", + ["Event:DatingAbigailBirthday_Abigail:4"] = "Anyways, happy birthday! I hope we get to have many more adventures to come. $l", + ["Event:DatingAbigailBirthday_Caroline:0"] = "Please, I'm sure your customers won't mind if you are gone for a few minutes. Anyways the cake is done.", + ["Event:DatingAbigailBirthday_Caroline:1"] = "*sigh* Honestly.", + ["Event:DatingAbigailBirthday_Caroline:2"] = "Well @ feel free to help yourself to as much as you like.$h", + ["Event:DatingAbigailBirthday_Pierre:0"] = "Make yourself at home @! I can't stay too long since I have to attend to the store but I thought a party would be a good idea!$h", + ["Event:DatingAbigailBirthday_Pierre:1"] = "Well of course it would be. It was made from the *highest* quality ingredients from the store! $h", + ["Event:DatingAbigailBirthday_Finish:0"] = "It was nice celebrating my birthday with Abigail and her family.", + ["Event:DatingAbigailBirthday_Finish:1"] = "It looks like there was some leftover cake too!", + ["Event:PartyOver"] = "That was a fun party. Back to work!" }, diff --git a/GeneralMods/HappyBirthday/Framework/BirthdayEvents.cs b/GeneralMods/HappyBirthday/Framework/BirthdayEvents.cs index 9c6ec081..9efe2936 100644 --- a/GeneralMods/HappyBirthday/Framework/BirthdayEvents.cs +++ b/GeneralMods/HappyBirthday/Framework/BirthdayEvents.cs @@ -279,11 +279,60 @@ namespace Omegasis.HappyBirthday.Framework return e; } - /* + public static EventHelper DatingBirthday_Abigail() { + List conditions = new List(); + conditions.Add(new FarmerBirthdayPrecondition()); + conditions.Add(new LocationPrecondition(Game1.getLocationFromName("SeedShop"))); + conditions.Add(new TimePrecondition(600, 2600)); + + NPC abigail = Game1.getCharacterFromName("Abigail"); + NPC pierre = Game1.getCharacterFromName("Pierre"); + NPC caroline = Game1.getCharacterFromName("Caroline"); + + conditions.Add(new StardustCore.Events.Preconditions.NPCSpecific.DatingNPC(abigail)); + + EventHelper e = new EventHelper("BirthdayDating:Abigail", 19953, conditions, new EventStartData("playful", 35, 7, new EventStartData.FarmerData(31,11, EventHelper.FacingDirection.Up), new List() { + new EventStartData.NPCData(abigail,36,9, EventHelper.FacingDirection.Left), + new EventStartData.NPCData(pierre,33,6, EventHelper.FacingDirection.Down), + new EventStartData.NPCData(caroline,35,5, EventHelper.FacingDirection.Up), + })); + e.globalFadeIn(); + + //Dialogue here. + e.moveFarmerUp(2, EventHelper.FacingDirection.Right, false); + e.moveFarmerRight(4, EventHelper.FacingDirection.Right, false); + + e.speak(abigail, GetTranslatedString("Event:DatingAbigailBirthday_Abigail:0")); //abi 0 + + e.npcFaceDirection(caroline, EventHelper.FacingDirection.Down); + + e.speak(pierre, GetTranslatedString("Event:DatingAbigailBirthday_Pierre:0")); //pie 0 + e.speak(caroline, GetTranslatedString("Event:DatingAbigailBirthday_Caroline:0")); //car 0 + e.addObject(35, 5, 220); + e.speak(abigail, GetTranslatedString("Event:DatingAbigailBirthday_Abigail:1")); //abi 1 + e.speak(pierre, GetTranslatedString("Event:DatingAbigailBirthday_Pierre:1")); //pie 1 + e.speak(caroline, GetTranslatedString("Event:DatingAbigailBirthday_Caroline:1")); //car 1 + e.speak(caroline, GetTranslatedString("Event:DatingAbigailBirthday_Caroline:2")); //car 2 + e.speak(abigail, GetTranslatedString("Event:DatingAbigailBirthday_Abigail:2")); //abi 2 + e.emoteFarmer_Thinking(); + e.speak(abigail, GetTranslatedString("Event:DatingAbigailBirthday_Abigail:3"));//abi 3 + e.speak(abigail, GetTranslatedString("Event:DatingAbigailBirthday_Abigail:4"));///abi 4 + + e.emoteFarmer_Heart(); + e.emote_Heart("Abigail"); + e.globalFadeOut(0.010); + e.setViewportPosition(-100, -100); + e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingAbigailBirthday_Finish:0")); //abi party finish 0 + e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingAbigailBirthday_Finish:1")); //abi party finish 0 + e.addObjectToPlayersInventory(220, 1, false); + e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:PartyOver")); + e.end(); + return e; } + /* public static EventHelper DatingBirthday_Emily() { @@ -382,22 +431,19 @@ namespace Omegasis.HappyBirthday.Framework } - public static EventHelper Birthday_Krobus() + + public static EventHelper MarriedBirthday() { } - public static EventHelper MarriedBirthday_NoKids() + public static EventHelper CommunityBirthday() { } - - public static EventHelper MarriedBirthday_OneKids() - { - - } - public static EventHelper MarriedBirthday_TwoKids() + + public static EventHelper JojaBirthday() { } diff --git a/GeneralMods/HappyBirthday/HappyBirthday.cs b/GeneralMods/HappyBirthday/HappyBirthday.cs index 78e1a627..1fc359c2 100644 --- a/GeneralMods/HappyBirthday/HappyBirthday.cs +++ b/GeneralMods/HappyBirthday/HappyBirthday.cs @@ -130,6 +130,11 @@ namespace Omegasis.HappyBirthday EventHelper eve = this.eventManager.getEvent("BirthdayDating:Leah"); eve.startEventAtLocationifPossible(); } + if (e.NewLocation == Game1.getLocationFromName("SeedShop")) + { + EventHelper eve = this.eventManager.getEvent("BirthdayDating:Abigail"); + eve.startEventAtLocationifPossible(); + } } private void GameLoop_GameLaunched(object sender, GameLaunchedEventArgs e) @@ -160,6 +165,7 @@ namespace Omegasis.HappyBirthday data["birthdayDatingMaru"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDatingMaru"); data["birthdayDatingSebastian"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDatingSebastian"); data["birthdayDatingLeah"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDatingLeah"); + data["birthdayDatingAbigail"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDatingAbigail"); } @@ -601,6 +607,10 @@ namespace Omegasis.HappyBirthday { Game1.player.mailReceived.Remove("birthdayDatingLeah"); } + if (Game1.player.mailReceived.Contains("birthdayDatingAbigail")) + { + Game1.player.mailReceived.Remove("birthdayDatingAbigail"); + } EventHelper communityCenterJunimoBirthday = BirthdayEvents.CommunityCenterJunimoBirthday(); @@ -608,12 +618,14 @@ namespace Omegasis.HappyBirthday EventHelper birthdayDating_Maru = BirthdayEvents.DatingBirthday_Maru(); EventHelper birthdayDating_Sebastian = BirthdayEvents.DatingBirthday_Sebastian(); EventHelper birthdayDating_Leah = BirthdayEvents.DatingBirthday_Leah(); + EventHelper birthdayDating_Abigail = BirthdayEvents.DatingBirthday_Abigail(); this.eventManager.addEvent(communityCenterJunimoBirthday); this.eventManager.addEvent(birthdayDating_Penny); this.eventManager.addEvent(birthdayDating_Maru); this.eventManager.addEvent(birthdayDating_Sebastian); this.eventManager.addEvent(birthdayDating_Leah); + this.eventManager.addEvent(birthdayDating_Abigail); if (Game1.player.eventsSeen.Contains(communityCenterJunimoBirthday.getEventID())) { Game1.player.eventsSeen.Remove(communityCenterJunimoBirthday.getEventID()); //Repeat the event. @@ -634,6 +646,10 @@ namespace Omegasis.HappyBirthday { Game1.player.eventsSeen.Remove(birthdayDating_Leah.getEventID()); //Repeat the event. } + if (Game1.player.eventsSeen.Contains(birthdayDating_Abigail.getEventID())) + { + Game1.player.eventsSeen.Remove(birthdayDating_Abigail.getEventID()); //Repeat the event. + } } /// Raised before the game begins writes data to the save file (except the initial save creation). @@ -711,6 +727,13 @@ namespace Omegasis.HappyBirthday Game1.player.mailbox.Add("birthdayDatingLeah"); } } + if (Game1.player.friendshipData.ContainsKey("Abigail")) + { + if (Game1.player.friendshipData["Abigail"].IsDating()) + { + Game1.player.mailbox.Add("birthdayDatingabigail"); + } + } if (Game1.player.friendshipData.ContainsKey("Sebastian"))